@media screen and (max-width: 530px){
* 
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body
{
  background-color: #EFE9E7;
}

main 
{
  display: flex;
  flex-direction: column;
}

header
{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background-color: #37312F;
  width: 100vw;
  z-index: 5;
}

header img
{
  width: 70px;
  margin: 15 40 10 30;
}

#naviheader
{
  display: flex;
  width: 100vw;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  background-color: #37312F;
  padding-top: 8px;
  z-index: 5;
}

nav 
{
  display: flex;
  flex-direction: column;
}

nav ul
{
  display: block;
  list-style-type: none;
  text-align: right;
  align-self: end;
  margin-bottom: 5px;
  margin-top: -12px;
  padding-right: 30px;
}

nav ul:last-child
{
  width: 100%;
  flex-basis: 100%;
}

nav ul li
{
  margin: 10px;
}

nav ul li a 
{
  color: #EFE9E7;
  text-decoration: none;
  font-size: 15px;

  margin: 5;
  text-align: right;
  padding: 2px;
}

input[type='checkbox']:not(:checked)+ul 
{
    display: none;
}

nav input[type='checkbox'], nav label {
    display: none;
}

nav label 
{
    display: block;
    align-self: end;
}

nav label img
{
  width: 20px;
  height: auto;
  display: block;
}

nav ul li a:hover
{
  color: #D02536;
}

nav ul li a:active
{
  color: #FF1F3D;
}

#bar 
{
  background-color: #706E60;
  height: 3px;
  width: 100vw;
}

.footer
{
  background-color: #37312F;
  max-width: 100%;
  width: 100%;
  height: 30px;
  position: fixed;
  bottom: 0;
  margin: 0;
}

.footer p
{
  text-align: center;
  color: #706E60;
  padding-bottom: 6px;
  padding-top: 6px;
  font-family: "Quicksand", sans-serif;
  font-size: 10px;
}
}

/*header and footer styles end*/
@media screen and (max-width: 360px){

#gallerytitle
{
  font-family: "Perandory", serif;
  text-decoration: none;
  color: #706E60;
  font-size: 20px;
  margin: 15 0 9 30;

}

#gallerynav
{
  display: flex;
  flex-direction: column;
  z-index: 2;
}

#gallerynavtop
{
  display: flex;
  flex-direction: row;
  align-items: center;
  margin-left: 30px;
}
#backbutton img
{
  width: 25px;
}

#backbutton img:hover
{
  content: url(../icons/arrow_hover.svg);
}

#backbutton img:active
{
  content: url(../icons/arrow_active.svg);
}

#gallerynavbot
{
  display: flex;
  flex-direction: row;
  align-items: center;
  margin-left: 3px;
}

#vl
{
  background-color: #706E60;
  height: 50px;
  margin-left: 50px;
  margin-right: 47px;
  width: 3px;
}

#char-end ul
{
  display: flex;
  flex-direction: column;
  font-family: "Rangile", serif;
  list-style: none;
  margin: -20px;
}

.char-end
{
    text-decoration: none;
    margin-right: 40;
    color: #706E60;
    font-size: 23px;
    letter-spacing: 1px;
}

#char-end ul li a:hover
{
  color: #D02536;
}

#char-end ul li a:active, .char-end.active
{
  color: #FF1F3D;
}

/* for ending sectionnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn*/

#endlist
{
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;
  margin-top: 16px;
}

#endlist div 
{
  width: 85vw;
  height: 100px;
  margin: 10px;

}

#endlist img
{
  width: auto;
  height: 40vh;
  object-fit: cover;

}

#endlist img:hover
{
  filter: invert(20%);
}

#endlist img:active
{
  filter: saturate(300%);
}

#overlay1
{
  position: fixed;
  display: none;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0,0,0,0.7);
  cursor: pointer;
  z-index: 4;
}

#overlay2
{
  position: fixed;
  display: none;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0,0,0,0.7);
  cursor: pointer;
  z-index: 4;
}

#overlay3
{
  position: fixed;
  display: none;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0,0,0,0.7);
  cursor: pointer;
  z-index: 4;
}

#overlayend
{
  display: flex;
  flex-direction: column;
  align-items: center;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  -ms-transform: translate(-50%,-50%);
}

#endpic1
{
  width: 80vmin;
  height: auto;
  margin-bottom: 10px;
}

#endpic2
{
  width: 80vmin;
  height: auto;
  margin-bottom: 10px;
}

#endpic3
{
  width: 80vmin;
  height: auto;
  margin-bottom: 10px;
}

#overlayend h3
{
  font-family: "Perandory", serif;
  font-size: 160%;
  color: #FF1F3D;
  letter-spacing: 1px;
}

#overlayend p
{
  font-family: "Quicksand", sans-serif;
  font-size: 73%;
  color: #EFE9E7;
}

/* for ending sectionnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn end*/

.character-main
{
  display: flex;
  flex-direction: column-reverse;
  justify-content: center;
  width: 80vw;
}

.char-select
{
  display: flex;
  flex-direction: row;
  align-items: center;
  margin: 6 27;
}

.char-select ul 
{
	display: flex;
  list-style: none;
  margin: 10px;
  justify-content: space-evenly;
    z-index: 6;
}

.char-select ul li 
{
  display: flex;
  flex-direction: column;
  margin: -2 10 0 10;
}

.char-select ul li img
{
  height: 50px;
}

.char-select ul li img:hover
{
  filter: invert(20%);
}

.char-select ul li img:active
{
  filter: saturate(300%);
}

#displayer-paris
{
  display: block;
  flex-direction: column;
  align-content: center;
  width: 200px;
  height: 400px;
  margin: 15 87;
  align-items: flex-start;
  margin-top: -69px;
}

#displayer-zel
{
  display: none;
  flex-direction: column;
  align-content: center;
  width: 200px;
  height: 400px;
  margin: 15 87;
  align-items: flex-start;
  margin-top: -69px;
}

#displayer-millie
{
  display: none;
  flex-direction: column;
  align-content: center;
  width: 200px;
  height: 400px;
  margin: 15 87;
  align-items: flex-start;
  margin-top: -69px;
}

#displayer-viviko
{
  display: none;
  flex-direction: column;
  align-content: center;
  width: 200px;
  height: 400px;
  margin: 15 87;
  align-items: flex-start;
  margin-top: -69px;
}
#char-display p
{
  text-align: left;
  font-family: "Quicksand", sans-serif;
  font-size: 9px;
  width: 250px;
  color: #37312F;
  margin-top: 210px;
}

#char-display
{
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 200px;
  height: 400px;
  margin: 30 auto;
}

#char-display h1
{
  z-index: -2;
  font-size: 100px;
  font-family: "Perandory", serif;
  letter-spacing: 3px;
  color: #706E60;
  margin-top: -320px;
}

#char-display h2
{
  z-index: -2;
  font-size: 100px;
  font-family: "Perandory", serif;
  letter-spacing: 3px;
  color: #D02536;
  margin-top: -320px;
}

#displaybg
{
  display: flex;
  z-index: -1;
  align-items: flex-end;
  height: 380px;
}

#displaybg img
{
  height: 200px;
  filter: contrast(80%);
}

#displayperson
{
  display: flex;
  margin-top: -400px;
}

#displayperson img
{
  height: 300px;
  margin-top: 120px;
}


}