@font-face {
	font-family: Helvetica;
	font-weight: normal;
	font-style: normal;
	src: local("Helvetica");
}

:root {
	--table-color: rgba(0, 0, 0, 0.95);
}

html {
	background-color: #32353e;
	font-family: Helvetica, arial, sans-serif;
	color: #ffffff;
	font-size: 18px;
}

body {
	margin: 0;
	background-image: url('images/background.jpg');
	background-size: cover;
	background-repeat: no-repeat;
	background-attachment: fixed;
	background-position: center;
}

header,
section > span,
footer {
	text-shadow:
	-1px -1px 0 black,
	-1px 1px 0 black,
	1px -1px 0 black,
	1px 1px 0 black,

	-0.5px -0.5px 1px black,
	-0.5px 0.5px 1px black,
	0.5px -0.5px 1px black,
	0.5px 0.5px 1px black;
}

.springfield {
	position: fixed;
    top: 32%;
    left: 50%;
	transform: translateX(-637px);
}

.springfield img {
	position: absolute;
}

.springfield img:first-of-type {
	transform: translateX(550px);
}

body > * {
	padding-left: 20px;
	padding-right: 20px;
}

audio {
	width: 100%;
	max-width: 300px;
}

nav {
	position: fixed;
	top: 20px;
    right: 20px;
	display: flex;
    padding: 10px;
    border: 2px solid #f0f0f0;
    border-radius: 5px;
	background-color: #000000c7;
	z-index: 999;
}

nav a {
	font-weight: bold;
	color: #deb76c;
    text-decoration: none;
    margin: 0 5px;
}

nav a:hover {
	text-decoration: underline;
}

.section-text {
	width: 100%;
	font-weight: bold;
	overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

header {
	display: flex;
	justify-content: center;
	padding-top: 20px;
	margin-bottom: 20px;
	font-size: 32px;
	font-weight: bold;
}

.display {
	display: flex;
	justify-content: center;
	gap: 20px;
	transition: all 0.3s;
}

.display div {
	line-height: 0;
	box-shadow: #f0f0f0 0px 0px 0px 2px;
}

.display img {
	-webkit-user-drag: none;
}

.image-container {
	position: relative;
	display: flex;
	justify-content: center;
	align-items: center;
	left: 0;
	overflow: hidden;
    background-color: #000000c7;
	cursor: pointer;
}

.image-container img {
    max-width: 100%;
    max-height: 456px;
    height: auto;
	margin: 0 10px;
	opacity: 1;
	transition: all 0.5s ease-in-out;
}

.aside {
	display: none;
	position: absolute;
	bottom: 5px;
	right: 2px;
	font-size: 8px;
	color: #ffffff;
}

.infobox {
	display: flex;
	justify-content: center;
	align-items: center;
	background-color: #000000c7;
	transition: all 0.3s;
	z-index: 1;
}

.infobox img {
	max-width: 100%;
	max-height: 456px;
	transition: all 0.3s;
}

section > span {
	position: relative;
	display: inline-block;
	margin-top: 40px;
	margin-bottom: 20px;
	font-size: 24px;
	font-weight: bold;
	z-index: 1;
}

section > div {
	display: grid;
	grid-template-columns: 12rem 319px 1fr;
	border-bottom: 2px solid rgba(22, 22, 22, 0.95);
	border-right: 2px solid rgba(22, 22, 22, 0.95);
}

section > div > div {
	padding: 8px;
	border-top: 2px solid rgba(22, 22, 22, 0.95);
	border-left: 2px solid rgba(22, 22, 22, 0.95);
}

.head {
	font-weight: bold;
	color: #000000;
	background-color: #f0b000;
}

.event {
	color: #ffffff;
}

.audio {
	min-height: 56px;
}

.event,
.audio {
	display: flex;
	align-items: center;
}

.transcription {
	align-content: center;
}


.odd,
.even,
.event.odd,
.event.even {
	background-color: var(--table-color);
}

.JP-1 a,
.JP-2 a {
	display: inline-block;
	font-size: 10px;
	transform: translateY(-7px);
	text-decoration: none;
}

div:has(.chibi) {
	position: relative;
}

.chibi {
	position: absolute;
	right: 0;
	top: -71.27px;
	z-index: 1;
}

.event .chibi {
	display: none;
}

.general-chibi {
	top: -69.61px;
	width: 90px;
}

.combat-chibi {
	top: -64.88px;
	width: 100px;
}

.events-chibi {
	top: -53px;
	width: 100px;
}

.misc-chibi {
	top: -27.91px;
	width: 110px;
}

section:last-of-type {
	margin-bottom: 20px;
}

footer {
	position: relative;
	padding-top: 26px;
	padding-bottom: 16px;
	margin: 32px 0 0;
	text-align: left;
	z-index: 1;
}

/*
header span {
	padding: 0 18.5px;
	background: red;
}
*/

.grid-r-2 {
	grid-row: span 2;
}

.grid-r-3 {
	grid-row: span 3;
}

.grid-c-2 {
	grid-column: span 2;
}

.grid-c-3 {
	grid-column: span 3;
}

@media (pointer: coarse) {
	body {
		-webkit-tap-highlight-color: transparent;
	}
	nav a:hover {
		text-decoration: unset;
	}
	nav a:active {
		text-decoration: underline;
	}
	.aside {
		font-style: italic;
		display: unset;
	}
}

@media (max-width: 1138px) {
	nav {
		position: sticky;
		top: 18px;
		justify-content: space-evenly;
        transform: translateY(-18px);
		padding: 10px 0;
		border-radius: unset;
		background-color: var(--table-color);
	}
	nav a {
		margin: 0 20px;
	}
    nav > div {
        display: grid;
        grid-template-columns: fit-content(100%) 1fr fit-content(100%);
        justify-items: center;
    }
	section > div {
		grid-template-columns: 1fr;
	}
	.head {
		display: none;
	}
	.audio {
		background-color: var(--table-color);
	}
	.transcription {
		background-color: var(--table-color);
	}
	.event {
		align-items: unset;
		font-weight: bold;
	}
	.event.odd,
	.event.even {
		background-color: #f0b000;
		color: #000000;
	}
	.event .chibi {
		display: unset;
	}
	footer {
		text-align: right;
	}
	.grid-r-2,
	.grid-r-3 {
		grid-row: unset;
	}
	.grid-c-2,
	.grid-c-3 {
		grid-column: unset;
	}
}

@media (pointer: coarse) and (max-width: 1138px) {
	body {
		-webkit-tap-highlight-color: transparent;
	}
	nav {
		display: grid;
		grid-template-columns: 1fr 3fr 1fr;
		height: 41px;
		padding: 0;
	}
	nav a {
		width: 100%;
		margin: 0;
		text-align: center;
		align-content: center;
		transition: background-color 0.3s;
	}
	nav a:active {
		text-decoration: unset;
		background-color: rgba(240, 240, 240, 0.95);
	}
    nav > div {
        grid-template-columns: 1fr 1fr 1fr;
    }
	.section-text,
	nav > a > span {
		margin: 0 5px;
		text-align: center;
		align-content: center;
	}
}

@media (max-width: 768px) {
	body > *:not(nav) {
		padding-left: 10px;
		padding-right: 10px;
	}
	.display {
		gap: 10px;
	}
}

@media (max-width: 480px) {  
	body > section {
		padding-left: 0;
		padding-right: 0;
	}
	section > span {
		padding-left: 10px;
	}
	#to-top span {
		display: none;
	}
	#to-top::before {
		content: "↑";
	}
	#to-bottom span {
		display: none;
	}
	#to-bottom::before {
		content: "↓";
	}
}

.anim-in {
	gap: 0;
}
.anim-in .infobox {
	opacity: 0;
	/* transform: translateY(100%); */
}
.anim-in .infobox img {
	max-width: 0;
	max-height: 0;
}
.anim-in .image-container img {
	max-height: 752px;
}

.anim-out .infobox {
	transition: all 0.5s;
}
.anim-out .infobox img {
	transition: all 0.5s;
}
.anim-out .image-container img {
	transition: all 0.3s ease-in-out;
}
