body {
    margin: 0 auto;
    width: 100%;
}
ul {
    list-style: none;
    margin-top: 15px;
}
a {
    text-decoration: none;
    color: lightseagreen;
}
header {
    display: flex;
    justify-content: space-between;
    height: 100px;
    width: 100%;
    padding: 25px 50px;
    border-bottom: solid 2px #80808040;
    box-sizing: border-box;
}
header small {
    margin-top: 40px;
    font-size: 16px;
}
h1 {
    margin: 0px;
    font-size: 36px;
    line-height: 1;
    margin-left: 10px;
    position: relative;
}
h1::before {
    content: "";
    display: block;
    height: 45px;
    width: 7px;
    background-color: green;
    margin-right: 10px;
    position: absolute;
    left: -14px;
    top: -7px;
}
footer {
    width: 100%;
    height: 75px;
    text-align: center;
    background-color: rgba(0,0,0,0.8);
    color: #ddd;
    font-size: 24px;
    padding-top: 20px;
    box-sizing: border-box;
}
footer small a {
    color: #ddd;
}
footer small a:hover {
    color: #eee;
}

#wrap {
    display: flex;
    height: 800px;
    margin: 40px auto;
    width: 1100px;
}
main {
    width: 60%;
    height: 100%;
    box-shadow: 2px 5px 10px rgba(0,0,0,0.5);
}
aside {
    width: 40%;
    height: 100%;
}
aside>div {
    margin: 10px 0 30px 20%;
    width: 400px;
    height: 50px;
    font-size: 24px;
}

#help {
    width: 960px;
    margin: 0 auto;
}

.piece-adjuster label {
    display: flex;
    width: inherit;
    height: inherit;
    position: relative;
}
.piece-adjuster label:not(#topm-label):not(#leftm-label)::before,#TXmarginlist>span::before {
    content: "";
    display: inline-block;
    height: 100%;
    width: 5px;
    background-color: crimson;
    position: absolute;
    left: -10px;
    top: 0;
}
#piece-marger-span {
    position: relative;
}
.piece-adjuster label span {
    display: inline-block;
    padding: 15px 5px;
    box-sizing: border-box;
    line-height: 1;
    white-space: nowrap;
}
input#piecename {
    width: 160px;
    height: 50px;
    margin: 5px 0 0 10px;
    display: inline-block;
    font-size: 24px;
}

#piecedirec {
    width: 50px;
    height: 50px;
    margin: 10px;
}
#TXmarginlist {
    height: auto;
}
/* #screenshot {
    width: 150px;
    height: 50px;
    font-size: 24px;
    border-radius: 5px;
    background-color: cornflowerblue;
    color: #fff;
    border: transparent 2px solid;
    transition: 0.3s;
}
#screenshot:hover {
    cursor: pointer;
    background-color: transparent;
    color: cornflowerblue;
    border: solid 2px cornflowerblue;
} */



/* 将棋駒 */
.piece {
    width: 500px;
    height: 600px;
    transform-style: preserve-3d;
    perspective-origin: center;
    transition: 0.1s;
    position: absolute;
    transform: rotate3d(1,1,0,20deg);
    margin: 30px 70px;
}
.piece .surface {
    box-sizing: border-box;
    border: solid 1px rgba(0,0,0,0.5);
    position: absolute;
    background-image: url("./woodback.jpg");
}




/* 表面 */
.surface1 {
    height: 600px;
    width: 500px;
    /* background-color: burlywood; */
    position: absolute;
    top: 0;
    left: 0;
    clip-path: polygon(50% 0, 90% 15%,100% 100%, 0% 100%, 10% 15%);
}
.surface1 span {
    display: block;
    padding: 13% 24% 5%;
    font-size: 256px;
    font-family: "Sawarabi Mincho",serif;
    font-weight: bold;
    line-height: 1;
    text-align: center;
}
/* 右斜面 */
.surface2 {
    top: 1px;
    left: 251px;
    width: 219.3px;
    height: 80px;
    /* background-color: red; */
    transform-origin: left top;
    transform: rotateX(-90deg) rotateY(-24.2deg);
}
/* 右面 */
.surface3 {
    bottom: -2px;
    right: 50px;
    width: 80px;
    height: 512.5px;
    /* background-color: blue; */
    transform-origin: right top;
    transform: rotateY(-90deg) rotateX(-5.6deg);
}
/* 下面 */
.surface4 {
    bottom: 0;
    left: 0;
    width: 500px;
    height: 80px;
    /* background-color: yellow; */
    transform-origin: bottom;
    transform: rotateX(90deg);
}
/* 左面 */
.surface5 {
    bottom: -2px;
    left: -30px;
    width: 80px;
    height: 512.5px;
    /* background-color: green; */
    transform-origin: right top;
    transform: rotateY(-90deg) rotateX( 5.6deg);
}

/* 左斜面 */
.surface6 {
    top: 0;
    right: 250px;
    width: 219.3px;
    height: 80px;
    /* background-color: purple; */
    transform-origin: right top;
    transform: rotateX( -90deg) rotateY( 24.2deg);
}

/* 底面 */
.surface7 {
    height: 600px;
    width: 500px;
    /* background-color: coral; */
    position: absolute;
    top: 0;
    left: 0;
    clip-path: polygon(50% 0, 90% 15%,100% 100%, 0% 100%, 10% 15%);
    transform: translateZ(-80px);
}


@media screen and (max-width: 480px){
    header {
        flex-wrap: wrap;
        padding: 10px 5px 0 10px;
    }
    h1 {
        font-size: 5.5vw;
    }
    h1::before {
        height: 27px;
        width: 7px;
        left: -15px;
    }
    header small {
        margin: 20px 0 0 44%;
    }
    #help {
        width: auto;
        padding: 10px;
        position: relative;
    }
    #hoheikun {
        position: absolute;
        right: 6%;
        bottom: -10%;
        height: auto;
    }
    #hoheikun img {
        /* filter: drop-shadow(2px 4px 6px rgba(131,100,40,0.8)); */
        height: 80px;
    }
    #wrap {
        width: auto;
        height: 100vh;
        flex-direction: column;
        position: relative;
    }
    main,aside {
        height: 100%;
        width: 100%;
        position: absolute;
        transform-origin: 25% top;
        transform: scale(0.5);
    }
    main {
        height: 110vh;
        width: 180vw;
        transform-origin: 5% top;
    }
    aside {
        background-color: rgba(255,255,255,0.5);
        width: 190%;
        height: auto;
        transform-origin: left bottom;
        bottom: 0;
        left: 2%;
        display: flex;
        flex-wrap: wrap;
    }
    aside>div {
        width: auto;
        margin-left: 2%;
        font-size: 8vw;
    }
    .piece {
        margin: 0;
        left: 13%;
        top: 6%;
    }
    input#piecename{
        font-size: 7vw;
        width: 60vw;
        height: 50px;
    }
    #piece-r-direc {
        margin-left: 10%;
    }
    #sizeinput input {
        width: 120vw;
    }
    #piece-r-amount input {
        width: 136vw;
    }
    #TXmarginlist input {
        width: 114vw;
    }
    footer {
        font-size: 4vw;
        height: 50px;
        padding-top: 14px;
    }
}
