/* #region スターターパック */
/* -webkitの情報-
    webkit- : Chrome, Safari, Opera
    moz- : Firefox
    ms- : Internet Explorer(考えなくてヨシ)
    khtml- : Konqueror(考えなくてヨシ)
    o- : 古いOpera(考えなくてヨシ)
    ただし、-webkit-は**Safari以外**ではプレフィックスなしで使用可能なプロパティも多い。
    例外的に、user-selectは全てのブラウザでプレフィックスが必要。
    さらに例外的に、touch-calloutはSafariでしか使用できない。
*/
html{
    margin: -8px;
    overflow: hidden;
    user-select:none;
}
body{
    width: 100vw;
    height: 100vh;
    white-space: nowrap;
    overflow: hidden;

    user-select: none;
    touch-action: manipulation;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    -webkit-touch-callout: 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-touch-callout: none;
    pointer-events: none;
}
::-webkit-scrollbar{
    display: none;
}
:focus{
    outline: none;
}

/* #region nicotext */
.nicotext{
    position: fixed;
    top: 0;
    right: 0;
    background: #f0f8ff80;
    color: #000000;
    font-size: 20px;
    transition: right 2.0s linear;
    white-space: nowrap;
    pointer-events: none;
}
/* #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: #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: #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: #363636e2;
    color: #f0f8ff;
    text-align: left;
    padding: 5px 10px;
    border-radius: 5px;
    z-index: 256;
}
#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: 2147483647;
}
.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: #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 */


body{
    background: #000000;
}
#main{
    display: block;
    width: var(--iPhone-width);
    height: 100vh;
    background: #6b5542;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

/*#region debugのやつ*/

/* しょうしょうおまちを～～ */
#debug{
    display: none;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 5px;
    padding: 10px;
    padding-right: 40px;
    background: #cfe9ff;
    position: fixed;
    top: 0px;
    left: 0px;
    font-size: 20px;
    text-align: left;
}
#debug::after{
    content: "";
    width: 30px;
    height: 100%;
    background: #4473ad;
    position: absolute;
    top: 0px;
    right: 0px;
}
#debug.show{
    display: flex;
}
#debug .stat{
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    height: fit-content;
    padding-bottom: 10px;
    border-bottom: 1px dashed #b2b2b2;
    box-sizing: border-box;
}
#debug .data{
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #b2b2b2;
    box-sizing: border-box;
}
#debug .data .item{
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 5px;
    width: fit-content;
    height: 24px;
    box-sizing: border-box;
}
#debug .data .item .num{
    flex: 1;
    line-height: 20px;
}
#debug .data .item img{
    height: 100%;
    aspect-ratio: 1;
}
/*#endregion*/


.area{
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 45px;
    width: 100%;
    height: 100%;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    padding-top: 25%;
}
.area.show{
    display: flex;
}

/* #region upper */
#upper{
    width: 100%;
    height: 60px;
    background: var(--back-col);
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px 0;
    position: absolute;
    top: 0;
    left: 0;
    box-sizing: border-box;
    z-index: 7;
}
#upper .stat{
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 5px;
}
#upper .stat .st{
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 5px;
}
#upper .stat .st img{
    width: 20px;
    aspect-ratio: 1/1;
    object-fit: cover;
}
#upper .stat .st .num{
    line-height: 18px;
}
#upper .back{
    display: block;
    width: 125px;
    height: 50px;
    background: var(--back-col);
    position: absolute;
    right: 0;
    bottom: 0px;
    transition: bottom 0.5s ease, background 0.5s ease;
    cursor: pointer;
    z-index: -10;
}
#upper .back.show{
    bottom: -25px;
    transition: bottom 0.5s ease, background 1.0s ease;
}
#upper .back.show:hover{
    /* background: #adcfff; */
    bottom: -50px;
}
#upper .back::after{
    content: '';
    display: none;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0px;
    left: 0px;
    background: var(--back-col);
    transition: background 4.0s ease;
    pointer-events: none;
}
#upper .back:active{
    background: #f0f8ff;
}   
#upper .back:active::after{
    background: #f0f8ff;
}
#upper .back.show:hover::after{
    display: block;
}
/* #endregion */

/* #region loby */
#loby .grid{
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    width: fit-content;
    aspect-ratio: 1/1;
}
#loby .grid .icon{
    width: 120px;
    aspect-ratio: 1/1;
}
#loby .grid .icon img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}
/* #endregion */

/* #region mine */
#mine{
    content: 'mine';
}
#mine .vein{
    display: grid;
    width: fit-content;
    grid-template-columns: repeat(var(--mine-row), 1fr);
    gap: 10px;
    width: fit-content;
    aspect-ratio: 1 / 1;
}
#mine .vein .ore{
    display: block;
    width: 75px;
    aspect-ratio: 1 / 1;
    position: relative;
    background: #cecece;
}
#mine .vein .ore.o0{
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%)
}
#mine .vein .ore img{
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    transition: clip-path 0s ease;
    object-fit: cover;
    pointer-events: none
}
#mine .vein .ore img.dest{
    opacity: 0;
    image-rendering: pixelated;
    z-index: 2;
}
#mine .vein .ore img.dest.show{
    opacity: 1;
}
/* #endregion */

/* #region shichi */
#shichi{
    content: 'shichi';
}
#shichi .terner{
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 10px;
}
#shichi .terner .item img{
    width: 80px;
    aspect-ratio: 1/1;
}
/* #endregion */

    /*感情の表現が顕著で、あーこれはｽﾊﾞﾗｼｲﾃﾞｽﾈ~~ ぜ〜ひとも私に売っていただきたいですね〜〜 ....いやこれはだめだな、なんか....宝の質屋だな*/
    /*...セイムマートを少年にして、こっちはシーナ風、つまり おや？こんな時間に客とは珍しいねぇ.. やあお兄さん、私に何を売ってくれるんだい？ ....いいね*/

#shichi .chara img{
    width: 40px;
    height: auto;
}