/* #region スターターパック */
html{
    margin: -8px;
    overflow: hidden;
    user-select:none;
}
body{
    width: 100vw;
    height: 100vh;
    margin: 0;
    white-space: nowrap;
    touch-action: none;
}
.row{
    display: flex;
    flex-direction: row;
}
.column{
    display: flex;
    flex-direction: column;
}
.hidden{
    opacity: 0;
    pointer-events: none;
}

img{
    -webkit-user-drag: none;
}
::-webkit-scrollbar{
    display: none;
}
:focus{
    outline: none;
}

/* #region nicotext */
.nicotext{
    position: fixed;
    top: 0;
    right: 0;
    background-color: #f0f8ff80;
    color: #000000;
    font-size: 20px;
    transition: right 2.0s linear;
    white-space: nowrap;
    pointer-events: none;
    z-index: 2147483647;
}
/* #endregion */

/* #region tobitext */
.tobitext{
    opacity: 1;
    padding: 4px 8px;
    background: rgba(0,0,0,0.72);
    border-radius: 8px;
    transform: translate(-50%, -50%) translateY(0px);
    white-space: nowrap;
    color: #ffffff;
    position: absolute;
    transition: none;
    z-index: 2147483647;
    pointer-events: none;
}
/* #endregion */

/* #region logとtext */
#log{
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    width: 320px;
    height: 24vh;
    border: 2px solid #ffffff;
     border-left: none;
    position: fixed;
    left: -334px;
    color: #fefefe;
    overflow-y: hidden;
    transition: left 1.0s ease;
    z-index: 10;
}
#log.tog{
    left: 54px;
}
#log .opener{
    width: 30px;
    height: 100%;
    background-color: #000000ef;
    text-align: center;
    cursor: pointer;
    z-index: inherit;
}
#log .log{
    width: 300px;
    height: 100%;
    max-height: 100%;
    overflow-x: hidden; overflow-y: scroll;
    background-color: #000000de;
    text-align: left;
    font-size: 14px;
    transition: right 0.3s;
    z-index: inherit;
}
#text{
    display: none;
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 1.2em;
    position: fixed;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;

    white-space: nowrap;
    overflow: hidden;
    width: fit-content; /* 文字の長さに応じた幅 */
    animation: fadeIn 0.5s ease forwards;
}
@keyframes fadeIn {
    0%{
        opacity: 0;
    }
    100%{
        opacity: 1;
    }
}
/* #endregion */

/* #region description */
#mobileDesc{
    display: none;
    position: fixed;
    pointer-events: none;
    background-color: #363636e2;
    color: #f0f8ff;
    text-align: left;
    padding: 5px 10px;
    border-radius: 5px;
    z-index: 2147483647;
}
#mobileDesc.show{
    display: block;
}
/* #endregion */

/* #region tk */
.tk{
    position: fixed;
}
.tk.mostop{
    z-index: 2147483647;
}
.tk.cenXY{
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
}
.tk.cenX{
    left: 50% !important;
    transform: translateX(-50%) !important;
}
.tk.cenY{
    top: 50% !important;
    transform: translateY(-50%) !important;
}
/* #endregion */

/* #region alertD */
.alertD{
    display: block;
    width: 320px;
    height: 70px;
    border-radius: 15px;
    box-shadow: #000000 5px 5px 20px;
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    transition: bottom 0.1s linear;
    will-change: bottom;
    overflow: hidden;
    box-sizing: border-box;
    z-index: 2147483646;
}
.alertD.show{
    bottom: 20px;
}
.alertD .row{
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 5px;
    width: 100%;
    height: 100%;
    padding: 10px;
    box-sizing: border-box;
}
.alertD .row .icon{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    aspect-ratio: 1/1;
    border-radius: 50%;
    font-size: 20px;
}
.alertD .row .text{
    font-size: 18px;
}
.alertD .x{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 20px;
    aspect-ratio: 1/1;
    border-radius: 50%;
    background: #00000000;
    position: absolute;
    right: 5px;
    top: 0;
    font-size: 20px;
    cursor: pointer;
}
.alertD .bar{
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 5px;
    border-radius: 0 0 15px 15px;
    overflow: hidden;
}
.alertD .bar .inner{
    width: 0px;
    height: 100%;
    position: absolute;
    left: 0;
    bottom: 0;
}
/* #endregion */

水色 #f0f8ff, #eaf5ff, #def0ff, #cfe9ff, #b5dcff
紫色 #f8f6ff, #f5f2ff, #f1edff, #ece8ff, #e9e4ff
橙色 #fffaf3, #fff7eb, #fff3e2, #fff0d9, #ffeccf
緑色 #f6fff2, #eeffe7, #e6ffdc, #ddffd0, #d4ffc3

#template{
    /* 順番だけ */
    margin-top: 5px;
    margin-left: 5px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 100px;
    height: 100px;
    /* aspect-ratio: 1/1; */
    padding: 5px;
    background-color: #f0f8ff;
    border: 1px solid #000000;
    color: #000000;
    font-size: 12px;
    position: fixed;
    top: 0;
    left: 0;
    animation: fadeIn 0.5s ease forwards;
    z-index: 999;
    margin-right: 5px;
    margin-bottom: 5px;
}
/* #endregion */


#main{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    width: 100vw;
    height: 100vh;
    padding: 30px;
    background: #fffaf3;
    box-sizing: border-box;
}
#main .mono{
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 3px;
    width: 100%;
    /* height: 380px; */
    padding: 10px 20px;
    background: #fff7eb;
    border: 3px solid #fff0d9;
    box-sizing: border-box;
}

/* #region hen */
#main .hen{
    display: flex;
    flex-direction: column;
    gap: 2px;
    height: fit-content;
    font-family: genjuu;
    font-size: 23px;
}
#main .hen .lavel{
    flex: 1;
}
#main .hen input{
    border: none;
    background: #fff3e2;
    color: #222222;
    flex: 1;
}
/* #endregion */

/* #region textcount */
#main .textcount{
    display: flex;
    flex-direction: column;
    gap: 2px;
}
/* #endregion */

/* #region anagram */
#main .anagram{
    height: 420px;
    position: relative;
}
#main .anagram .row{
    gap: 3px;
}
#main .anagram .out{
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 1.5px;
    width: 100%;
    max-height: 100%;
    overflow-y: scroll;
}
#main .anagram .out .item{
    width: 90%;
    padding: 2px 4px;
    border: 2px solid #00000000;
    background: #fff7eb;
}
#main .anagram .out .item.kira{
    background: #daffd8;
}
#main .anagram .out .item:hover{
    border: 2px solid #ffe7c3;
    background: #fff4e2;
}

#main .anagram .sage{
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    position: absolute;
    right: 0;
    top: -25px;
    transition: top 0.5s ease;
}
#main .anagram .sage.tog{
    top: 0;
}
#main .anagram .sage .kira{
    opacity: 0;
    width: 140px;
    height: 25px;
    background: #fffaf3;
    border: none;
    transition: opacity 0.5s ease;
    box-sizing: border-box;
}
#main .anagram .sage.tog .kira{
    opacity: 1;
}
#main .anagram .sage .opener{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 20px;
    background: #fff0d9;
    position: relative;
    color: #e5c492;
    transition: color 0.5s ease;
    cursor: pointer;
    box-sizing: border-box;
}
#main .anagram .sage .opener:hover{
    color: #5c4a2e;
}
/* #endregion */

/* #region rannm */
#main .rannm{
    content:'rannm';
    font-family: genjuu;
}
#main .rannm .input{
    border: none;
    border-bottom: 1px solid #2b2b2b;
    font-size: 18px;
}
#main .rannm .row{
    margin-top: 5px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 0;
}
#main .rannm .row .bt{
    display: block;
    width: 40px;
    aspect-ratio: 2/1;
    padding: 5px 15px;
    scale: 1.0;
    background: #ffe9c7;
    clip-path: polygon(0 0, 75% 0, 100% 100%, 25% 100%);
    text-align: center;
    transition: background 0.05s ease-in-out, scale 0.05s ease-in-out;
}
#main .rannm .row .bt:hover{
    scale: 1.1;
}
#main .rannm .row .bt:active{
    scale: 0.9;
}
/* #endregion */

/* #region bee-game */
#main .bee-game{
    display: flex;
    flex-direction: column;
    align-items: center;
}
#main .bee-game .bar{
    font-family: misaki;
    font-size: 60px;
}
#main .bee-game .log{
    display: flex;
    flex-direction: column;
    gap: 1px;
    justify-content: flex-start;
    width: 90%;
    height: 125px;
    max-height: 125px;
    background: #fff3e2;
    padding: 10px 5px;
    border: 2px solid #ffdb98;
    border-left: none;
    border-right: none;
    overflow-y: scroll;
    box-sizing: border-box;
    margin-bottom: 10px;
}
#main .bee-game .log span{
    pointer-events: none;
}
#main .bee-game.w1 .log{
    background: #ffe7e2;
}
#main .bee-game.w2 .log{
    background: #f1f9ff;
}
#main .bee-game .bt{
    display: none;
    width: 60px;
    aspect-ratio: 3/1;
    padding: 5px 10px;
    background: #fff3e2;
    text-align: center;
    box-sizing: border-box;
}
#main .bee-game.play .bt{
    display: block;
}
#main .bee-game .bt.start{
    display: block;
    width: 90px;
    margin-bottom: 5px;
}
#main .bee-game.play .bt.start{
    display: none;
}
#main .bee-game .bt:hover{
    padding: 3px 8px;
    background: #ffecd1;
    border: 2px solid #ffc250;
}
#main .bee-game.ing .bt:hover{
    background: #8b8b8b;
    border-color: #464646;
}
#main .bee-game .buttons{
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 10px;
}
/* #endregion */

/* #region race-game */
#main .race-game{
    display: flex;
    flex-direction: column;
    align-items: center;
    height: fit-content;
}
#main .race-game .area{
    display: none;
    width: 100%;
    height: fit-content;
    position: relative;
    box-sizing: border-box;
}

#main .race-game .area.title{
    display: block;
    background: #ffefd8;
}
#main .race-game.play .area.title{display: none;}
#main .race-game .title .lavel{
    font-size: 40px;
    color: #895000;
    text-align: center;
}
#main .race-game .title .start{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 20%;
    aspect-ratio: 5 / 2;
    background: #ffeed6;
    scale: 1;
    transition: scale 0.05s ease-in-out;
    margin: 0 auto;
    border: 3px solid #a46b00;
    font-size: 28px;
    box-sizing: border-box;
    cursor: pointer;
}
#main .race-game .title .start:hover{
    background: #ffe6c2;
    scale: 1.2;
}

#main .race-game .area.junbee{
    /* スマブラ風にする予定 */
    background: #ffe7e2;
}
#main .race-game.phase1 .junbee{
    display: block;
}
#main .race-game .junbee .list{
    display: grid;
    justify-items: center;
    justify-content: space-between;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}
#main .race-game .junbee .list .item{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 50px;
    padding: 5px;
    background: #ffd1d1;
    border: 2px solid #ffffff;
    box-sizing: border-box;
    pointer-events: none;
}
#main .race-game.kimeing .junbee .list .item{
    pointer-events: all;
}
/* alice, bob, charles, random */
#main .race-game.kimeing .junbee .list .item::after{content: attr(data-name)}

.raceG-lect{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 22px;
    aspect-ratio: 1/1;
    border-radius: 50%;
    scale: 1.0;
    background: #fff3e2;
    border: 2px solid #8f6d3d;
    transition: scale 0.05s ease-in-out;
    text-align: center;
    font-size: 10px;
    color: #2b2b2b;
    box-sizing: border-box;
    pointer-events: all;
}
.raceG-lect:hover{
    scale: 1.1;
}
.raceG-lect.moving{
    scale: 0.9;
    position: fixed;
    transform: translate(-50%,-50%);
    pointer-events: none;
    z-index: 2147483647;
}
#main .race-game .junbee .list .item .raceG-lect{
    z-index: 2;
}
.raceG-lect.w0{border-color: #ff5454;}
.raceG-lect.w1{border-color: #5269ff;}
.raceG-lect.w2{border-color: #fffc55;}
.raceG-lect.w3{border-color: #54ff42;}

#main .race-game .junbee .selected{
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: 95px;
    padding: 15px;
    padding-bottom:0px;
    box-sizing: border-box;
}
#main .race-game .junbee .selected .sele{
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    aspect-ratio: 3/2;
    background: #fff3e2;
    border: 2px solid #2b2b2b;
    clip-path: polygon(10% 0, 100% 0, 100% 100%, 0 100%, 0 50%);
    position: relative;
    box-sizing: border-box;
}
#main .race-game .junbee .selected .sele::after{
    content: '';
    width: 100%;
    height: 100%;
    background: #2b2b2b;
    clip-path: polygon(0 -1%, 20% -1%, -1% 105%, -1% 0%);
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}
#main .race-game .junbee .selected .img{
    height: 85%;
    aspect-ratio: 1/1;
    object-fit: cover;
    position: absolute;
    left: 5%;
    bottom: 0;
}
#main .race-game .junbee .selected .sele.w0::before{background: #ff5454;}
#main .race-game .junbee .selected .sele.w1::before{background: #5269ff;}
#main .race-game .junbee .selected .sele.w2::before{background: #fffc55;}
#main .race-game .junbee .selected .sele.w3::before{background: #54ff42;}
#main .race-game .junbee .selected .sele::before{
    content: '';
    width: 100%;
    height: 100%;
    clip-path: polygon(70% -1%, 101% -1%, 101% 101%, 50% 101%);
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}
#main .race-game .junbee .selected .sele .text{
    position: absolute;
    right: 1px;
    bottom: 10%;
    font-size: 8px;
    text-align: right;
    z-index: 2;
}

#main .race-game .junbee .go{
    display: block;
    opacity: 0.9;
    width: 150%;
    height: 60px;
    background: #300000;
    border: 4px solid #ab0000;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(5deg);
    color: #ffffff;
    font-size: 40px;
    text-align: center;
}
#main .race-game.kimeing .junbee .go{
    display: none;
}

#main .race-game .area.kaijou{
    background: #fff7eb;
    position: relative;
}
#main .race-game .kaijou .timer{
    display: block;
    width: 100px;
    aspect-ratio: 1/1;
    position: absolute;
    left: 0px;
    bottom: 0px;
    transition: opacity 0.5s ease-in-out;
    opacity: 0.9;
    z-index: 2;
}
#main .race-game .kaijou .timer.tog{
    opacity: 0.1;
}
/* logは中央に黒背景白文字で出して、押したらほぼ透明/逆透明を切り替えれる形？追加されると0.5に？ */
#main .race-game .kaijou .timer .zyou{
    width: 100%;
    aspect-ratio: 1/1;
    clip-path: polygon(45% 0, 55% 0, 60% 20%, 40% 20%);
    background: #464646;
    position: absolute;
    top: -10%;
    left: 0;
}
#main .race-game .kaijou .timer .naka{
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 50%;
    background: #464646;
    position: absolute;
    top: 0;
    left: 0;
}
#main .race-game .kaijou .timer .time{
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 35px;
    font-family: misaki;
    color: #ffffff;
}

#main .race-game .kaijou .log{
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 5px;
    width: 100%;
    height: 200px;
    max-height: 200px;
    padding: 10px 5px;
    opacity: 0.85;
    background: #000000;
    border: 5px solid #ffd297;
    border-top: none;
    border-bottom: none;
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    transition: opacity 0.5s;
    text-align: left;
    overflow-y: scroll;
    box-sizing: border-box;
    z-index: 2;
}
#main .race-game .kaijou .log.tog{
    opacity: 0.01;
}
#main .race-game .kaijou .log .span{
    width: 100%;
    font-size: 15px;
    font-family: craft;
    color: #ffffff;
}

/*
#main .race-game .kaijou .senshus{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: fit-content;
    padding: 15px;
    padding-bottom:0px;
    box-sizing: border-box;
    z-index: 2;
}
#main .race-game .kaijou .senshus .sesh{
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 60%;
    aspect-ratio: 5 / 1;
    background: #fff3e2;
    border: 3px solid #ffe6c4;
    font-size: 35px;
    font-family: misaki;
    box-sizing: border-box;
}
*/

#main .race-game .kaijou .senshus{
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: fit-content;
    padding: 15px;
    padding-bottom:0px;
    box-sizing: border-box;
    z-index: 2;
}
#main .race-game .kaijou .senshus .sesh{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 60%;
    aspect-ratio: 5 / 1;
    background: #fff3e2;
    border: 3px solid #ffe6c4;
    font-size: 35px;
    font-family: misaki;
    box-sizing: border-box;
}
#main .race-game .kaijou .senshus .sesh .load{
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}
#main .race-game .kaijou .senshus .sesh .load .koma{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}
#main .race-game .kaijou .senshus .sesh .load .koma img{
    display: block;
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}
#main .race-game .kaijou .senshus .sesh .load .koma img::after{
    content: '';
    display: block;
    width: 120%;
    aspect-ratio: 1/1;
    background: #fff3e2;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
}

#main .race-game .kaijou .senshus .sesh .load .koma .スタン{
    display: block;
    width: 100%;
    aspect-ratio: 1/1;
    background-image: "../assets/raceGCs/stun.png";
}

#main .race-game.phase2 .area.kaijou{display: block}
#main .race-game.phase3 .area.kaijou{display: block}
#main .race-game .area.kaijou .end{display: none}
#main .race-game.phase3 .area.kaijou .end{display: block}
/* #endregion */


