:root {
  --bookcase-back: #70300d;
  --bookcase-front: #bf6d1b;
  --bookcase-shelf: #7d3e1c;
  --bookcase-shelf-edge: #a54b00;
  --outer-bookcase: #a54b00 10px solid;
}

* {
  box-sizing: border-box;
}            

html {
  font-size:25px;
}

body {
  background-image: url(../bg/wall3.jpg), linear-gradient(180deg, rgba(180,100,66,1) 0%, rgba(141,95,76,1) 27%, rgba(50,24,2,1) 100%); ;
  background-blend-mode: overlay;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
    display: grid;
    place-content:center;
  
  }
  
  body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    padding-bottom:1em;
  }
  
  main {
    max-width:50ch;
  }
  
.smol-sidebar {
  display: grid;
  grid-template-columns: fit-content(15rem) minmax(min(50vw, 30ch), 1fr);
  margin-right: 4vw;
  margin-left: 4vw;
}


  
/*header area */
.Text-shelf {
  height: 100vh;
  background-color: var(--bookcase-shelf-edge);
  border: var(--outer-bookcase);
  overflow: none;
  display: flex;
  justify-content: center;
  flex-direction: column;

}

.Text-shelf p,.Text-shelf ul {
  line-height: 1.5;
  font-size: 1rem;
  margin: 0;
  padding: 0
}

header-poster {
  background-image: url(../notice/paper_texture_v5_by_bashcorpo-1181117541.jpg),linear-gradient(70deg, rgb(141, 106, 91) 0%, rgb(112, 84, 73) 27%, rgb(176, 133, 98) 100%);
  background-blend-mode: overlay;
  background-size: 120%;
  aspect-ratio: 2.7 / 3;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1em;
  box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
}

h1 {
  font-family: 'Albertus';
  text-align: center;
  color: rgba(44, 45, 46,0.8);
  font-weight: normal;
}

.back, summary {
  font-family: 'Albertus';
  text-align: center;
  font-size: 1.2rem;
  padding: 0.2rem;
  display: block;  
  text-shadow: -1px -1px rgba(46, 12, 1, 0.5), 1px 1px rgba(255,255,255,0.5);
  color: rgba(0,0,0,0.5);
  border: outset 0.2em #7d4515; 
  background-color: var(--bookcase-shelf-edge);
  text-decoration: none;
}

/* books area */

  shel-ving {
    --min: 1.29rem; /*same size as dummy book */
  
    display: grid;
    /*grid-gap: var(--gap);*/
    /* min() with 100% prevents overflow
    in extra narrow spaces */
    grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--min)), 1fr));
  
    grid-row-gap:2px;
    align-items: end;
    max-width: 50rem;
    border: var(--outer-bookcase);
      background-color: var(--bookcase-back);
      padding-top: 1rem;
  }           
  
  shel-ving > * {
      width: 1.29rem;
      border: var(--outer-bookcase);
      border-top: none;
      border-left: none;
      border-right: none;
      background-repeat:no-repeat;
      background-image: linear-gradient(180deg, var(--bookcase-shelf) 99%,rgba(0,0,0,.01) 100%);
      background-position: 0 100%;
      background-size: 100% 1.3em;
  }

  div-book {
    display: inline-block;
    aspect-ratio: 1/5;
    margin:0;
    padding:0;
    padding-top: 0.6rem;
    width: 100%;
 
  }

  lil-book {
    height: 90%;
  }

  figure lil-book {
    max-width: 100%;
    height: 100%;
    background-size: contain;
  }

  img {
    max-width: 100%;
    height: 100%;
  }
  
  shel-ving lil-book {
      display: block;
      width: 100%;
      background-color:var(--bookcase-back);
      padding-bottom: 0.2em;
  }
      
  shel-ving lil-book:hover {
      transform:scale(1.4);
      border-bottom: none;
      cursor:grab;
  }
  

  /* old spines */
.text {
  width: 100px;
  height: 20px;
  color: gold;
  font-size: small;
  font-weight: bold;
  transform: rotate(-90deg);
  margin-top: -5px;
  margin-left: -38px;
  cursor: pointer;
}

hr {
  margin-top: 4px;
  background-color: gold;
  border: 1px solid gold;
}

.hr {
  margin-top: 50px;
  background-color: gold;
  border: 1px solid gold;
}

span {
  color: rgba(207, 0, 0, 1);
}

.book-spine {
  background-color: #6b853e;
  background-image: linear-gradient(90deg, rgba(3,37,27,1) 0%, rgba(3,37,27,0.6) 1%, rgba(3,37,27,0.25) 10%, rgba(3,37,27,0.1) 20%, rgba(3,37,27,0) 30%), 
  linear-gradient(90deg, rgba(0,0,0,0) 70%, rgba(3,37,27,0.1) 80%, rgba(3,37,27,0.25) 90%, rgba(3,37,27,0.6) 99%, rgba(3,37,27,1) 100%),
  linear-gradient(9deg, rgba(0,0,0,0) 70%, rgba(3,37,27,0.1) 80%, rgba(3,37,27,0.25) 90%, rgba(3,37,27,0.6) 99%, rgba(3,37,27,1) 100%);
  border-right: 1px black solid;

}

.chosen-book-spine {
  position: absolute;
  z-index: 1;
  top: 25vh;
  left: 43vw;
  width: 3em;
  aspect-ratio: 1/5;
  display: none;
  height: 305px;
  background-size:contain;
  border: 1px solid rgba(0, 0, 0, 0.8);
  cursor: grab;
  background-color: #6b853e;
  background-image: linear-gradient(90deg, rgba(3,37,27,1) 0%, rgba(3,37,27,0.6) 1%, rgba(3,37,27,0.25) 10%, rgba(3,37,27,0.1) 20%, rgba(3,37,27,0) 30%), 
  linear-gradient(90deg, rgba(0,0,0,0) 70%, rgba(3,37,27,0.1) 80%, rgba(3,37,27,0.25) 90%, rgba(3,37,27,0.6) 99%, rgba(3,37,27,1) 100%),
  linear-gradient(9deg, rgba(0,0,0,0) 70%, rgba(3,37,27,0.1) 80%, rgba(3,37,27,0.25) 90%, rgba(3,37,27,0.6) 99%, rgba(3,37,27,1) 100%)/*, 
  linear-gradient(180deg, rgba(157,119,25,1) 0%, rgba(218,165,32,1) 18%, rgba(255,220,131,1) 40%, rgba(218,165,32,1) 84%, rgba(157,119,25,1) 100%)*/;
}

#large-text {
  color: gold;
  text-shadow: 0px -1px 0px rgb(3,37,27);
  font-size: 16px;
  text-align: center;
  margin-left: 0px;
  cursor: pointer;
  font-family: 'Albertus';
}

/* Open/close*/
#openClose {
  position: fixed;
  z-index: 6;
  bottom: 0;
  right: 0;
  background-color: rgba(0,0,0,0);
  border: none;
  cursor: pointer;
}

button lil-book {
  padding: 0.2em;
}


/* old book interiors */
.picture {
  position: absolute;
  left: 50%;
  transform: translatex(-50%);
  display: none;
  width: 130px;
  height: 183px;
  background-size: cover;
  margin-top: 5px;
  transition-duration: 1s;
  z-index: 0;
}


/* ===== Scrollbar CSS ===== */
  /* Firefox */
  * {
    scrollbar-width: auto;
    scrollbar-color: #553d39 #896a5f;
  }

  /* Chrome, Edge, and Safari */
  *::-webkit-scrollbar {
    width: 16px;
  }

  *::-webkit-scrollbar-track {
    background: #896a5f;
  }

  *::-webkit-scrollbar-thumb {
    background-color: #553d39;
    border-radius: 10px;
    border: 3px solid #ffffff;
  }

/* Popup */
  .big-map { /*can't use display:flex because display is used for the clock trick */
    position: absolute;
    z-index: 5;
  }
    
  #bigmap {
      display:none;
  }
    
  .bigmap-innards {
    font-family: 'Benne',serif;
    max-width: 40ch;
      background-image: url(../clock/notepaper.png);
      background-size: cover;
      box-shadow: rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px, rgba(10, 37, 64, 0.35) 0px -2px 6px 0px inset;
    margin: 2vw;
    padding: 2vw;
  }
  
  .bigmap-innards h2 {
    font-size: var(--step-3);
    font-family: 'Albertus', serif;
  }
  
  .bigmap-innards p {
    font-size: var(--step-1);
  }
  
  .bigmap-innards a {
    color:#884400;
  }
  .bigmap-innards a:visited {
    color:#836240;
  }