body {
  background-image: url('/ui/fullbgtest.png');
  background-repeat: no-repeat;
  background-position: center center; 
  background-size: cover; 
  background-attachment: fixed;
  overflow: hidden;
  color: black;
  font-family: "Comic Neue", "LXGW WenKai Mono TC", Verdana;
  display: flex;
  overflow: auto;
  justify-content: center; 
  align-items: center; 
  min-height: 90vh;
  text-align: justify;
  font-size: 13px;
  margin: 0;
  padding: 0;
}
img {
		max-width: 100%; 
		height: auto;
		margin: 0;
	}

.page {
    margin: 0;
    padding: 0.5rem;
    height: 90vh;
    width: 75vw;
    display: grid;
    grid-template-areas: 
    "banner banner banner"
    "nav main main"
    "foot foot foot"    
    ;
    grid-template-columns: 2fr 10fr 1fr;
    column-gap: 2.5rem;
    grid-template-rows: auto 1fr auto;
    row-gap: .25rem;
}
main {
    grid-area: main;
    background-color: #FFF7E7;
    border: 30px solid black;
    border-image: url('/ui/layoutpieces3.png') 100 / 70px / 25px repeat;
    z-index: 90;
    padding: .25rem;
    padding-right: 0;
    max-height: 500px;
    overflow: scroll;
    padding-right: 20px;
}
.title {
    grid-area: top;
}
.comment {
    grid-area: com;
}
.character {
    grid-area: cha;
}
.item2 {
    grid-area: ite;
}
.description {
    grid-area: des;
}
.menu {
    grid-area: men;
    overflow: scroll;
    max-height: 500px;
    padding-right: 25px;
}
nav {
    grid-area: nav;
    border: 30px solid black;
    border-image: url('/ui/layoutpieces2.png') 100 / 40px / 12px repeat;
    background-color: #FFF7E7;
    padding: .25rem;
}
sub {
    grid-area: sub;
    background-color: rgba(255, 255, 255, 0.5);
    background-size: auto;
    padding: .25rem;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column
}
header {
    grid-area: banner;
    display: flex;
    justify-content: center; 
    align-items: center; 
}
footer {
    grid-area: foot;
    background-color: rgba(255, 255, 255, 0.5);
    margin: 1rem;
    padding: .25rem;
}
.button {
		width: 4rem; 
		height: auto;
		margin: 0;
	    }
/* unvisited link */
	a:link {
	color: rgb(42, 90, 50);
	}
	/* visited link */
	a:visited {
	color: rgb(2, 143, 2);
	}
	/* mouse over link */
	a:hover {
	color: rgb(114, 221, 114);
	}
	/* selected link */
	a:active {
	color: blue;
	}
/* Headers */
	h1 {
		font-family: "Protest Revolution", sans-serif;
	}
	h2 {
		font-family: "Protest Revolution", sans-serif;
		color: gray;
	}
	h3 {
		font-family: "Protest Revolution", sans-serif;
	}

    /* Shop */
    button {
    border: none;
    background: none;
    padding: 0;
    }
    .item {
    width: 100px;
    height: auto;
    margin-left:auto;
    margin-right:auto;
    }
    .itemlist {
    overflow: scroll; 
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    grid-template-rows: repeat(auto, 1fr);
    }

    .homebutton {
    position: fixed;
    bottom: 0; 
    right: 0;  
    z-index: 999;
    }
    .frontdecal {
    position: fixed;
    pointer-events: none; /* Lets you click through image and interact regardless of z-index. */
    width: 100%;
    height: 100%;
    bottom: 0; 
    left: 0;  
    z-index: 900;
    }
    /* Calendar */
	.cal_calendar {
    border: 1px solid #1e3d18;
    padding: 1px;
    background: linear-gradient(#7ed37e, #325f32);
    width: 90%;
    margin: 0.6rem auto 0 auto;
    height: 191px;
    color: #1e3d18;
    border-radius: 5px;
  }
  .cal_calendar th {
    border: 1px solid #1e3d18;
    background: linear-gradient(50deg, #a4ebaa, #69ce72);
    width: 36px;
    font-size: 0.69em;
    border-radius: 3px;
    color: #1e3d18;
    box-shadow: inset #3ca044 0 0 4px 1px;
  }
  .cal_calendar td {
    border: 1px solid #1e3d18;
    background: linear-gradient(#a4ebaa, #69ce72);
    text-align: center;
    font-size: 0.8em;
    border-radius: 3px;
    box-shadow: inset rgb(199, 248, 197) 0 3px 3px, inset #1c442e5b 0 0 2px 1px;
  }
  .cal_today {
    color: #c51b1b;
    font-weight: bold;
  }
  .cal_days_bef_aft {
    color: #356cb4;
  }
@media (max-width: 700px) {
		.page {
			grid-template-rows: auto;
            row-gap: 0.5rem;
			grid-template-columns: 1fr;
			grid-template-areas: 
			"banner"
			"nav"
            "sub"
            "main"
			"foot";
		}
        .frontdecal, .homebutton {
        display: none;
        }
        nav, sub {
            flex-direction: unset;
            border-radius: 10px;
            padding: .25rem;
        }
        main {
        grid-area: main;
        background-color: #FFF7E7;
        border: 30px solid black;
        border-image: url('/ui/layoutpieces3.png') 100 / 40px / 10px repeat;
        z-index: 90;
        padding: .25rem;
        min-height: 500px;
        }
        header {
            grid-area: banner;
        }
        footer {
            grid-area: foot;
            border-radius: 10px;
            padding: .25rem;
        }
		.button {
		width: 4rem; 
		height: auto;
		margin: 0;
	    }
        .item {
        width: 50px;
        height: auto;
        }
        .itemlist {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(50px, 1fr));
        grid-template-rows: repeat(auto, 1fr);
        }
	}