:root {
  --text:#fcfbf6;
  --accent:#c23b38;
  --background:#322f31;
  --light-accent:#ffe3a3;
  --background-accent:#3a3639;
}

* {
  box-sizing:border-box;
}

html, body {
  margin:0;
  scroll-behavior:smooth;
}

body {
  margin:0;
  color:var(--text);
  background-color:var(--background);
  font-family:"IBM Plex Sans", sans-serif;
}

a {
  transition:.5s ease;
  color:var(--accent);
  text-decoration:none;
}

a:hover {
  transition:.3s ease;
  text-decoration:none;
  color:var(--light-accent);
}

h1, h2, h3, h4, h5 {
  color:var(--accent);
}

h1, h2 {
  width:100%;
  text-align:left;
  border-bottom:2px solid var(--accent);
}

h4 {
  margin:0;
  width:100%;
  font-size:1.5em;
  text-align:left;
}

h1 {
  margin-top:0;
  font-size:2.5em;
}

h2 {
  font-size:1.8em;
}

h4 {
  font-weight:100;
  padding-left:20px;
}

h5 {
  font-size:1.2em;
  margin-top:20px;
  margin-bottom:-12px;
}

ol {
  list-style-type:lower-alpha;
}

ul {
  margin-top:5px;
  list-style-type:square;
}

li {
  padding-bottom:3px;
}

table {
  width:300px;
  border-collapse:collapse;
  background-color:#e7e9eb;
  border-top:1px solid var(--accent);
  background-color:var(--background);
  border-bottom:1px solid var(--accent);
}

tbody {
  margin:3px 10px;
}

th {
  padding:5px 0;
  text-align:center;
  color:var(--background);
  border:2px solid var(--accent);
  background-color:var(--accent);
}

tr:nth-child(odd) {
  background-color:var(--background-accent);
}

td {
  text-align:left;
  padding:4px 8px;
  border-right:2px solid var(--accent);
}

td:nth-child(odd) {
  border-right:0;
  text-align:left;
  font-weight:600;
  vertical-align:top;
  border-left:2px solid var(--accent);
}

td ul {
  margin:0;
  padding-left:15px;
}

main {
  text-align:justify;
  padding:20px 20px 20px 80px;
  background-color:var(--background);
}

#container {
  margin:0 auto;
  max-width:1070px;
}

.charactermain-image {
  width:300px;
  height:350px;
  margin-left:auto;
  background-size:160%;
  background-position:35% 30%;
  background-repeat:no-repeat;
  border:2px solid var(--accent);
}

#toc {
  float:left;
  width:200px;
  text-align:left;
  margin-right:auto;
  margin:0 40px 10px 0;
  border:2px solid var(--accent);
  background-color:var(--background-accent);
}

#toc ol {
  padding-left:10%;
  list-style-type:decimal;
}

.gallery {
  padding:10px;
  overflow:hidden;
  background-color:rgba(0, 0, 0, 0);
}

.galleryimage {
  float:left;
  margin:10px;
  height:170px;
  min-width:170px;
  max-width:170px;
  position:relative;
  background-size:auto 100%;
  background-position:center;
  background-repeat:no-repeat;
  border:2px solid var(--accent);
}

.galleryimage span {
  right:0;
  bottom:0;
  line-height:1em;
  position:absolute;
  transition:.5s ease;
  padding:3px 2px 0 3px;
  color:var(--background);
  background-color:var(--accent);
  border-top:2px solid var(--accent);
  border-left:2px solid var(--accent);
}

.galleryimage p {
  left:0;
  bottom:0;
  margin:0;
  line-height:1em;
  position:absolute;
  transition:.5s ease;
  padding:3px 5px 0 2px;
  color:var(--background);
  background-color:var(--accent);
  border-top:2px solid var(--accent);
  border-right:2px solid var(--accent);
}

.galleryimage span:hover, .galleryimage p:hover {
  color:var(--accent);
  transition:.3s ease;
  background-color:var(--background);
}

footer {
  width:100%;
  height:40px;
  padding:10px;
  text-align:center;
  background-color:var(--background-accent);
}

.characterprofile {
  float:right;
  width:300px;
  margin-left:auto;
  margin:0 0 30px 30px;
  background-color:var(--background-accent);
}

.row:after {
  clear:both;
  content:"";
  display:table;
}

#top {
  border:0;
  right:30px;
  z-index:99;
  bottom:30px;
  cursor:pointer;
  position:fixed;
  color:var(--text);
  transition:.5s ease;
  padding:5px 8px 4px 8px;
  border:2px solid var(--accent);
  background-color:var(--background);
}

#top:hover {
  transition:.3s ease;
  background-color:var(--accent);
}

.outlink:after {
  content:"⤤";
  line-height:1em;
  padding-left:2px;
}

::selection {
  color:var(--background);
  background-color:var(--accent);
}

::-webkit-scrollbar {
  color:var(--accent);
}

::-webkit-scrollbar-track {
  background:var(--background);
}

::-webkit-scrollbar-thumb {
  background:var(--accent);
}

@media only screen and (max-width:1350px) {
  main {
    float:left;
    width:100%;
    margin-left:auto;
    margin-right:auto;
    padding:10px 20px;
  }
}

@media only screen and (max-width:550px) {
  main {
    padding:20px;
  }
  
  #toc {
    width:100%;
  }
  
  table, .characterprofile {
    float:left;
    width:100%;
    margin:10px 0 0 0;
  }
    
  .characterprofile {
    float:left;
    width:100%;
    margin:0 0 30px 0;
  }
    
  .charactermain-image {
    width:100%;
    margin:0 0 10px 0;
  }
}