@font-face {
    font-family: "initial";
    src: url("/fonts/initial/Roycroft-Initials.ttf");
}
html {
    font-family: Georgia, 'Times New Roman', Times, serif;
    background-color: rgb(32, 42, 35);
    background-image: radial-gradient(
        circle 4px at 50% 0%, 
        rgba(160, 130, 60, 0.25) 0%, 
        transparent 100%
    ), radial-gradient(
        circle 4px at 50% 100%, 
        rgba(160, 130, 60, 0.25) 0%, 
        transparent 100%
    ), radial-gradient(
        circle 2px at 0% 50%, 
        rgba(160, 130, 60, 0.25) 0%, 
        transparent 100%
    ), radial-gradient(
        circle 2px at 100% 50%, 
        rgba(160, 130, 60, 0.25) 0%, 
        transparent 100%
    );
    background-size: 50px 50px;
    background-repeat: repeat;
    background-attachment: fixed;
} 

body {
    margin: 0;
    overflow-x: hidden;
}

main {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}
nav {
    padding: 20px;
    background-image: repeating-radial-gradient(
        ellipse 6px 4px at 18% 22%, 
        rgba(180, 110, 55, 0.45) 0px, 
        transparent 5px
    ), repeating-radial-gradient(
        ellipse 5px 7px at 55% 63%, 
        rgba(140, 80, 30, 0.30) 0px, 
        transparent 6px
    ), repeating-radial-gradient(
        ellipse 8px 4px at 80% 35%, 
        rgba(200, 140, 70, 0.25) 0px, 
        transparent 7px
    ), repeating-radial-gradient(
        ellipse 4px 8px at 40% 80%, 
        rgba(160, 95, 40, 0.35) 0px, 
        transparent 5px
    ), repeating-linear-gradient(
        19deg, 
        transparent 0px, 
        rgba(0, 0, 0, 0.06) 1px, 
        transparent 2px, 
        transparent 8px
    ), repeating-linear-gradient(
        -11deg, 
        transparent 0px, 
        rgba(255, 255, 255, 0.04) 1px, 
        transparent 2px, 
        transparent 14px
    ), repeating-linear-gradient(
        78deg, 
        transparent 0px, 
        rgba(0, 0, 0, 0.04) 1px, 
        transparent 2px, 
        transparent 9px
    ), linear-gradient(
        130deg, 
        rgb(212, 153, 106) 0%, 
        rgb(192, 120, 72) 30%, 
        rgb(184, 104, 56) 55%, 
        rgb(200, 133, 85) 80%, 
        rgb(207, 160, 112) 100%
    );
    border: 10px solid rgb(78, 50, 24);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: row;
    gap: 50px;
    justify-content: center;
    align-items: center;
}

.notice {
    position: relative;
    background: rgb(230, 204, 153);
    padding: 10px;
    min-width: 200px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 3px 4px 10px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.notice:first-of-type { transform: rotate(-2deg); }
.notice:last-of-type { transform: rotate(1.5deg); }
.notice:hover {
    transform: rotate(0deg) scale(1.06) translateY(-4px);
    box-shadow: 6px 10px 20px rgba(0, 0, 0, 0.5);
}
.notice a {
    position: absolute;
    inset: 0;
    color: rgb(57, 47, 32);
    text-decoration: none;
    font-style: italic;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;

}
.notice a:hover {
    color: rgb(118, 33, 38);
    text-decoration: underline;
}
.pin {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: radial-gradient(
        circle at 35% 30%,
        rgb(160, 30, 34),
        rgb(90, 10, 14) 60%,
        rgb(40, 4, 6)
    );
    box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.6);
}
.pin::after {
    content: "";
    position: absolute;
    top: 16px;
    left: 7.25px;
    width: 1.5px;
    height: 8px;
    background: rgb(60, 30, 10);
}

figure { width: 100%; }
.bookshelf {
    width: 80%;
    margin: 0 auto; /*center*/
    background: repeating-linear-gradient(
        92deg,
        transparent 0px,
        transparent 4px,
        rgba(0, 0, 0, 0.03) 4px,
        rgba(0, 0, 0, 0.03) 5px
    ), repeating-linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.015) 0px,
        rgba(255, 255, 255, 0.015) 2px,
        transparent 2px,
        transparent 9px
    ), repeating-linear-gradient(
        89deg,
        rgba(0, 0, 0, 0.06) 0px,
        rgba(0, 0, 0, 0.06) 1px,
        transparent 1px,
        transparent 22px
    ), linear-gradient(
        to bottom,
        rgb(112, 70, 32) 0%,
        rgb(98, 59, 27) 40%,
        rgb(88, 52, 22) 70%,
        rgb(77, 45, 19) 100%
    );
    border: 8px solid rgb(48, 29, 13);
    border-top: 10px solid rgb(38, 22, 9);
    box-shadow:
        inset 2px 0 8px rgba(0, 0, 0, 0.4),
        inset -2px 0 8px rgba(0, 0, 0, 0.4),
        inset 0 4px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}
.shelf {
    position: relative;
    margin-top: 5px;
    display: flex;
    flex-direction: column;
}
.books {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    flex-wrap: nowrap;
    min-height: 120px;
    overflow-x: auto;
    overflow-y: hidden;
}
.label { position: relative; }
.bookend { 
    height: 250px; 
    display: block; /* prevents random gap from appearing underneath the image */
}
.books > .bookend {
    transform: rotateY(180deg);
}
.label span {
    position: absolute;
    left: 70px;
    bottom: 28px;
    width: 124px;
    background: linear-gradient(
        160deg,
        rgb(220, 185, 80) 0%,
        rgb(255, 220, 100) 40%,
        rgb(190, 148, 50) 100%
    );
    color: rgb(57, 47, 32);
    text-align: center;
    padding: 3px;
    box-shadow:
        inset 0 1px 3px rgba(255,255,255,0.4),
        inset 0 -1px 3px rgba(0,0,0,0.3),
        1px 2px 4px rgba(0,0,0,0.5);
    border-radius: 1px;
}
.spine {
    position: relative;
    bottom: -1px;
    cursor: default;
    height: fit-content;
    max-height: 300px; 
    border-radius: 5px;
    background: var(--spine-color, rgb(93, 30, 30)); 
    background-image: linear-gradient(
        to right,
        rgba(0, 0, 0, 0.28),
        rgba(0, 0, 0, 0.05) 18%,
        rgba(255, 255, 255, 0.07) 52%,
        rgba(0, 0, 0, 0.28)
    ), repeating-linear-gradient(
        47deg,
        rgba(0, 0, 0, 0.10) 0px,
        rgba(0, 0, 0, 0.10) 1px,
        transparent 1px, transparent 3px
    ), repeating-linear-gradient(
        -43deg,
        rgba(0,0,0,0.07) 0px, 
        rgba(0,0,0,0.07) 1px,
        transparent 1px, 
        transparent 3px
    );
    box-shadow: 
        inset 0 0 3px rgba(0, 0, 0, 0.65), 
        inset 0 0 8px rgba(0, 0, 0, 0.20), 
        2px 0 6px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.spine span {
    color: gold;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}
.title {
    position: relative;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    padding: 20px 5px 70px;
    font-size: 20px;
    line-height: 25px;
}
.title::before, .title::after {
    content: "";
    position: absolute;
    right: 0;
    height: 5px;
    width: 100%;
    background: linear-gradient( 
        180deg, 
        rgba(0, 0, 0, 0.18) 0%, 
        rgba(255, 242, 190, 0.17) 25%, 
        rgba(255, 242, 190, 0.24) 50%, 
        rgba(255, 242, 190, 0.17) 75%, 
        rgba(0, 0, 0, 0.15) 100%
    );
    border-top: 1px solid rgba(210, 178, 88, 0.5); 
    border-bottom: 1px solid rgba(210, 178, 88, 0.5);
}
.title::before { top: 3px; }
.title::after { bottom: 1px; }
.author { 
    position: absolute; 
    bottom: 10px;
    width: 100%; 
    height: auto;
    left: 0;
    padding: 0 5px; 
    box-sizing: border-box; 
    display: flex;
    flex-direction: column;
    justify-content: flex-end; 
}
.author::after {
    content: "⚜";
    color: gold;
    font-size: 14px;
    margin-top: 4px; 
}

.view-toggle { display: none; }
.view-toggle-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    color: rgb(230, 204, 153);
    font-variant: small-caps;
}
.toggle-track {
    position: relative;
    width: 52px;
    height: 26px;
    background: rgba(230, 204, 153, 0.15);
    border: 1px solid rgba(230, 204, 153, 0.5);
    border-radius: 13px;
    flex-shrink: 0;
}
.toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgb(230, 204, 153);
    transition: transform 0.3s ease;
}
.view-toggle:checked + .view-toggle-label .toggle-thumb { transform: translateX(26px); }
.view-toggle:checked ~ figure.shelf-figure .spine {
    background: none;
    box-shadow: none;
}
.view-toggle:checked ~ figure.shelf-figure .title, .view-toggle:checked ~ figure.shelf-figure .author { display: none; }
.view-toggle:checked ~ figure.shelf-figure .cover {
    display: block;
    height: 200px;
    width: 150px;
    border-style: solid;
    border-width: 3px;
    border-color: transparent;
}
.books .cover { display: none; } 

.plank {
    height: 18px;
    margin-bottom: 10px;
    background: repeating-linear-gradient(
        181deg,
        transparent 0px, 
        transparent 18px,
        rgba(0, 0, 0, 0.1) 18px, 
        rgba(0, 0, 0, 0.1) 21px,
        transparent 22px, 
        transparent 50px
    ), linear-gradient(
        to bottom, 
        rgb(196, 144, 96) 0%, 
        rgb(155, 101, 53) 28%, 
        rgb(122, 74, 34) 60%, 
        rgb(107, 62, 26) 100%
    );
    box-shadow:
        inset 6px 0 8px rgba(0, 0, 0, 0.4),
        inset -6px 0 8px rgba(0, 0, 0, 0.4);
}

.ladder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.ladder a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 60px;
    text-decoration: none;
    color: rgb(196, 144, 96);
    white-space: nowrap;
    transform: rotate(10deg);
    transform-origin: bottom center;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.ladder a:hover {
    transform: rotate(0deg);
}
.ladder svg rect {
    fill: rgb(126, 90, 57);
    filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.9));
}
.ladder a span {
    display: inline-block;
    transform: rotate(-10deg);
    transition: transform 0.3s ease;
    color: rgb(255, 215, 178);
}
.ladder a:hover span {
    transform: rotate(0deg) scale(1.1);
    color: rgb(126, 90, 57);
}
.ladder .backlink:hover {
    transform: scale(1.05);
    color: rgb(255, 215, 178);
}

.exit {
    position: relative;
    display: flex;
    flex-direction: row;
    width: 90%;
    justify-content:space-between;
    margin-bottom: 20px;
}
.exit a { max-width: 40%; }

.exit a, .backlink { 
    color: rgba(230, 204, 153, 0.6);
    text-decoration: none;
}
.exit a:hover, .backlink:hover { 
    color: rgb(230, 204, 153);
    text-decoration: underline;
}

.covers {
    display: flex;
    flex-direction: column;
    width: 90%;
    gap: 5px;
    box-sizing: border-box;
}
.covers a { 
    position: relative; 
    display: flex;
    flex-direction: row-reverse;
    background-color: rgba(230, 204, 153, 0.1);
    border-style: solid;
    border-color: rgba(230, 204, 153, 0.1);
    align-items: center;
    text-decoration: none;
    min-height: 170px;
}
.covers a.hidden { display: none; }
.covers a:hover {  border-color: rgb(230, 204, 153); }
.covers a img {
    width: 120px;
    height: 170px;
    position: absolute;
    left: 0;
    flex-shrink: 0;
}
.covers a .tooltip {
    width: 100%;
    margin-left: 150px;
    color: rgb(230, 204, 153); 
}
.tooltip-title {
    font-weight: bold;
    text-decoration: underline;
}
.tooltip-line {
    font-size: 12px;
    line-height: 25px;
}
.tooltip-label {
    text-transform: uppercase;
    margin-right: 10px;
}

.controls {
    color: rgb(230, 204, 153);
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    flex-direction: column;
    width: 90%; 
}
label {
    font-variant: small-caps;
    display: flex;
    flex-direction: row;
    gap: 10px;
    position: relative;
}
select {
    font-family: Georgia, 'Times New Roman', Times, serif;
    color: rgb(230, 204, 153);
    background: rgb(20, 28, 22);
    border-width: 1px;
    border-style: solid;
    border-color: rgba(230, 204, 153, 0.5);
    padding: 5px 8px;
    cursor: pointer;
}
.controls select:hover, .controls select:focus { border-color: rgb(230, 204, 153); }
.genre-control {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.genre-control-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgb(230, 204, 153);
}
.toggle { display: flex; }
.mode-btn {
    background: none;
    color: rgb(230, 204, 153);
    border: none;
    padding: 2px 7px;
    font-family: Georgia, 'Times New Roman', Times, serif;
    cursor: pointer;
    opacity: 0.5;
    border-width: 1px;
    border-color: rgba(230, 204, 153, 0.5);
    border-style: dashed;
}
.mode-btn.active {
    background: rgba(230, 204, 153, 0.3);
    opacity: 1;
    border-style: solid;
}
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 1px;
}
.chip {
    background: none;
    color: rgb(230, 204, 153);
    border-width: 1px;
    border-style: solid;
    border-color: rgba(230, 204, 153, 0.5);
    padding: 8px;
    font-family: Georgia, 'Times New Roman', Times, serif;
    cursor: pointer;
    opacity: 0.5;
}
.chip:hover { opacity: 1; }
.chip.selected {
    background: rgba(230, 204, 153, 0.1);
    border-color: rgba(230, 204, 153);
    opacity: 1;
}
.rating {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.rating-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgb(230, 204, 153);
}

.fourh {
    position: relative;
    display: flex;
    align-items: center;
}
.fourh span:first-of-type {
    color: white;
    cursor: help;
    text-decoration: underline dotted;
    text-underline-offset: 2px;
    position: absolute;
    font-size: 2em;
    text-shadow: 
        -2px -1px 0 rgb(0, 0, 0),  
        2px -1px 0 rgb(0, 0, 0),
        -2px 1px 0 rgb(0, 0, 0),
        2px 1px 0 rgb(0, 0, 0);
}
.fourh span:last-of-type {
    position: absolute;
    top: 50%;
    width: 250px;
    opacity: 0;
    color: rgb(230, 204, 153);
    transition: opacity 0.2s ease;
    background: rgb(20, 28, 22);
    padding: 8px;
    border: 1px solid rgba(230, 204, 153, 0.5);
    text-transform: none;
    z-index: 20;
    pointer-events: none;
}
.fourh span a { 
    color: rgb(230, 204, 153); 
    font-weight: bold;
}
.fourh:hover span:last-of-type {
    opacity: 1;
    pointer-events: auto;
}
ul {
    list-style-type: none;
    padding: 0;
}
li {
    padding-left: 1.5em;
    text-indent: -1.5em;
}
.reclinks li { margin: 50px; }
.reclinks a {
    text-decoration: none;
    font-size: 30px;
}
.reclinks a:hover { text-decoration: underline; }
.reclinks span { font-size: 18px; }

.bookmeta {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: center;
    min-height: 170px;
}
.bookmeta img {
    width: 120px;
    height: 170px;
    flex-shrink: 0;
}
.bookmeta-text {
    display: flex;
    flex-direction: column;
}

.blurb-short {
    display: block;
    overflow: hidden;
    max-height: 1em;
    line-height: 1em;
    transition: max-height 0.25s ease;
    font-size: 17px;
    padding-bottom: 5px;
}
.expanded .blurb-short { max-height: fit-content; }
.blurb-toggle {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: inherit;
    font-size: 17px;
    font-family: inherit;
    display: block;
    text-decoration: underline;
    opacity: 0.5;
}
.blurb-toggle:hover { opacity: 1; }

article {
    width: min(1000px, 90%);
    background-color: rgb(32, 42, 35);
    color: rgb(210, 190, 150);
    padding: 40px 0;
    text-align: justify;
}
article section {
    line-height: 36px;
    font-size: 24px;
    margin-top: 50px;
}
article .disclaimer { font-style: italic; }
article section > p:first-child::first-letter {
    float: left;
    font-family: "initial";
    font-size: 3em;
    margin-right: 5px;
    margin-top: 5px;
}
article a {
    color: rgb(210, 190, 150);
    font-weight: bold;
}
blockquote {
    border-left: 2px solid rgba(230, 204, 153, 0.5);
    font-style: italic;
    padding-left: 10px;
}
cite {
    display: block;
    font-size: 0.8rem;
    font-style: normal;
    letter-spacing: 0.05em;
    color: rgba(210, 190, 150, 0.5);
    text-align: right;
}

.similar-books, .similar-books a {
    width: min(1000px, 90%);
    color: rgb(210, 190, 150);
}
.similar-books h2 { font-variant: small-caps; }

.booklist li {
    font-size: 18px;
    padding-top: 10px;
}

s { text-decoration-thickness: 5px; }