:root{
  --brown: #7e412a;
  --yellow: #ffc;
  --orange: #fff3de;
  --em: #b73200;
}
*{
  box-sizing: border-box;
}
body{
	margin: 0;
  background-color: var(--orange);
  background-size: 6.75% 100vh;
  background-repeat: repeat no-repeat;
  font-family: 'Roboto', sans-serif;
}
body.bday{
	background: url("/images/bday.webp");
	background-attachment: fixed;
	background-size: cover;
}
img,
video{
  max-width: 100%;
  max-height: 100%;
}
em{
  color: var(--em);
  font-style: normal;
}
a,
a:visited{
  color: var(--em);
}

button {
  color: white;
  background: var(--brown);
  padding: 12px 24px;
  border: 0;
  cursor: pointer;
  opacity: 0.9;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 18px;
  padding-top: 17px;
  outline: 2px solid var(--brown);
  outline-offset: 2px;
}
body.bday button{
  background: gold;
  outline: 2px solid gold;
	text-shadow: 0 0 5px rgba(0,0,0,0.5);
}
button:hover{
  opacity: 1;
}
button:active{
  background: var(--em);
  outline: 2px solid var(--em);
}
body.bday button:active{
  background: gold;
  outline: 2px solid gold;
}

h1, h2, h3, h4, h5, h6{
  margin: 0;
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 400;
}
p{
  line-height: 1.3em;
  margin: 0;
}
table{
	border: 2px solid var(--brown);
	border-collapse: collapse;
	margin: auto;
}
thead{
	text-align: left;
	color: var(--brown);
	background: var(--orange);
}
th, td{
	padding: 5px 10px;
	border: 2px solid var(--brown);
}

frac{
	display: inline-grid;
	vertical-align: middle;
}
frac::before,
frac::after{
	padding: 0px 4px;
	text-align: center;
}
frac::before{
	content: attr(top);
	border-bottom: 1px solid currentColor;
}
frac::after{
	content: attr(bot);
}
frac > *{
  height: 0;
  opacity: 0;
}

body.bday table{
	border: 2px solid gold;
	background: lightgoldenrodyellow;
}
body.bday thead{
	color: white;
	background: gold;
}
body.bday th, body.bday td{
	border: 2px solid gold;
}

.p-margin{
  margin-top: 1em;
}
.auto-img{
  display: block;
  height: auto;
  max-height: 500px;
  margin: auto;
}
.center{
  text-align: center;
}

#sunflowers-canvas{
	position: fixed;
	top: 0; left:0;
	pointer-events: none;
	z-index: 1000;
}

#error-page{
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	height: 100vh;
}
#error-page h1{
	font-size: 50px;
	margin-bottom: 20px;
}
#error-page img{
	max-height: 60%;
}

.waifu-section{
  margin: 30px 0px;
  padding: 24px;
  background: white;
  border: 3px solid var(--brown);
  outline: 3px solid var(--brown);
  outline-offset: -10px;
}
body.bday .waifu-section:not(.waifu-section-notice){
	border: 3px solid gold;
	outline: 3px solid gold;
	box-shadow: 0 0 10px gold;
}
.waifu-section.waifu-section-notice{
	background: peachpuff;
}
.waifu-section:last-child{
	margin-bottom: 0;
}
.waifu-section h2{
  margin-bottom: 20px;
  color: var(--brown);
  text-align: center;
  font-size: 30px;
  font-weight: 600;
}
.waifu-section h2:not(.simple)::before{
  content: "";
  display: block;
  width: 3em;
  height: 1em;
  margin: auto;
  margin-top: -10px;
  margin-bottom: 10px;
  background-image: url("/images/symbol.webp");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

.with-image{
  display: grid;
  grid-template-columns: max-content 1fr;
  grid-template-areas: "img text";
  gap: 20px;
}
.with-image img{
  grid-area: img;
  justify-self: center;
  max-width: 30vw;
  max-height: 400px;
  height: auto;
}

#waifu-body{
  max-width: 1200px;
  margin: 0 auto;
  padding: 0px 10px;
}
#waifu-name-wrapper{
  display: grid;
  grid-template-columns: 1fr max-content 1fr;
  align-items: center;
  gap: 30px;
}
#waifu-name-wrapper img{
  max-height: 35px;
}
#waifu-name-wrapper img:first-child{
  justify-self: flex-end;
}
#waifu-name-wrapper img:last-child{
  justify-self: flex-start;
}
#waifu-name{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--brown);
  margin: 50px 0px;
}
body.bday #waifu-name{
	color: gold;
}
#waifu-name span{
  font-size: 80px;
  line-height: 1em;
}
#waifu-name small{
  font-size: 20px;
  line-height: 1em;
}
#waifu-img{
  display: block;
  height: auto;
  margin: auto;
  border: 3px solid var(--brown);
  cursor: pointer;
}
body.bday #waifu-img{
  border: 3px solid gold;
	box-shadow: 0 0 10px gold;
}


#sharo-names {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 50px;
  gap: 2px;
  margin-bottom: 50px;
}
#sharo-names > div{
  position: relative;
  border: 1px solid var(--brown);
  border-width: 0px 2px 0px 2px;
}
#sharo-names > div:first-child{
  border-left: 0;
}
#sharo-names > div:last-child{
  border-right: 0;
}
#sharo-names h3{
  text-align: center;
  color: var(--brown);
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 10px;
}
#sharo-names h3 + div{
  text-align: center;
  font-size: 18px;
}
#sharo-names small{
  position: absolute;
  width: 100%;
  top: 0;
  display: block;
  margin-top: -20px;
  text-align: center;
  font-style: italic;
  color: #666;
}

.glow{
  color: #ffe700;
  text-shadow:
    0 0 50px gold,
    0 0 20px gold,
    0 0 2px black,
    0 0 2px gold;
  font-weight: bold;
}

#gallery{
	position: fixed;
	top: 0; left: 0;
	width: 100%; height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0,0,0,0.5);
}
#gallery:not(.show){
	display: none;
}
#gallery .loading {
  position: absolute;
  left: 0;top: 50%;
  width: 100%;
  text-align: center;
  color: white;
	text-shadow: 0 0 5px black, 0 0 10px black, 0 0 20px black;
  padding: 10px;
  font-size: 20px;
	pointer-events: none;
	transition: opacity 100ms ease-in-out;
}
#gallery .loading:not(.show){
	opacity: 0;
}
.gallery-list{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
	justify-items: center;
  gap: 10px;
}
.gallery-list img{
	display: block;
	height: auto;
	cursor: pointer;
}

#copyright{
	margin: 0px;
	margin-top: 10px;
	padding: 20px;
	font-size: 13px;
	background: var(--brown);
	color: white;
}
body.bday #copyright{
  background: rgba(0,0,0,0.3);
	text-shadow: 0 0 2px rgba(0,0,0,1);
}

@media (max-width: 767px){
  body{
    background-size: 12.5% 100vh;
  }
	
	#error-page h1{
		font-size: 30px;
		margin-bottom: 10px;
	}

  .with-image{
    grid-template-columns: 1fr;
    grid-template-areas: "img" "text";
  }
  .with-image img{
    max-width: 100%;
  }

  #sharo-names {
    grid-template-columns: repeat(1, 1fr);
    gap: 50px;
  }
  #sharo-names > div{
    border: 0;
  }
	
	.gallery-list{
	  grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 480px){
	.gallery-list{
		display: flex;
		overflow: auto;
	}
	.gallery-list a{
		flex-shrink: 0;
		width: 80%;
	}
}
