/* ============================================
   ROSSI'S READS
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;1,6..72,500&family=Work+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');


/* ============================================
   DESIGN TOKENS
   ============================================ */

:root {
    --paper: #F3E9D2;
    --paper-shadow: #E4D3A8;

    --ink: #1F2E23;
    --ink-light: #2C4232;

    --wood: #6B4A2B;
    --wood-dark: #4A3119;

    --charcoal: #3A2A1E;

    --rust: #B5502D;
    --mustard: #D9A441;
    --olive: #6B7A3A;

    --cream-text: #F7EEDD;

    --font-title: 'Cormorant Garamond', serif;
    --font-display: 'Newsreader', serif;
    --font-body: 'Work Sans', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;

    --max-width: 1080px;
}


/* ============================================
   GLOBAL
   ============================================ */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

body {
    margin: 0;

    font-family: var(--font-body);

    background-color: var(--paper);

    color: var(--charcoal);

    line-height: 1.6;

    cursor: url("images/bookmark-cursor.png"), auto;
}

a {
    color: var(--rust);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

a,
button {
    cursor: url("images/bookmark-cursor.png"), pointer;
}

h1,
h2,
h3 {
    font-family: var(--font-display);

    color: var(--ink);

    line-height: 1.15;

    margin-top: 0;
}

h1 {
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    font-weight: 600;
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
}

.eyebrow {
    font-family: var(--font-mono);

    text-transform: uppercase;

    letter-spacing: 0.12em;

    font-size: 0.75rem;

    color: var(--rust);
}

/* ============================================
   HEADER & BANNER (CLEAN AUTUMNAL & GOLD EMBLEM)
   ============================================ */

site-header {
    display: block;
    width: 100%;
}

.site-header {
    /* Rich Oxblood / Dark Crimson background */
    background-color: #5C1D18;
    background-image: radial-gradient(rgba(217, 164, 65, 0.15) 0.85px, transparent 0.85px);
    background-size: 12px 12px;

    padding: 2rem 1rem 1.75rem;
    position: relative;
    border-bottom: 3px solid var(--mustard);
    box-shadow: 0 4px 18px -3px rgba(0, 0, 0, 0.35);
}

.site-header .brand-row {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
}

.brand-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
}

/* Streamlined Emblem — No inner box, warm gold border on oxblood */
.brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--mustard);
    padding: 6px 18px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.2); /* Subtle dark tint instead of green */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.badge-accent {
    font-size: 0.85rem;
    color: var(--mustard);
}

.brand {
    font-family: var(--font-title);
    font-size: clamp(2.5rem, 6vw, 4.2rem);
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1;
    color: #FFF6E5; /* Bright Warm Cream */
}

.brand a {
    color: #FFF6E5;
}

.brand a:hover {
    text-decoration: none;
    color: var(--mustard);
}

.tagline {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #E6C887; /* Soft Warm Gold */
    font-weight: 500;
    letter-spacing: 0.06em;
    padding-left: 4px;
}

.header-utilities {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-search {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--mustard);
    border-radius: 4px;
    padding: 3px 6px 3px 10px;
}

.header-search input {
    background: transparent;
    border: none;
    color: #FFF6E5;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    outline: none;
    width: 170px;
}

.header-search input::placeholder {
    color: #E6C887;
    opacity: 0.7;
}

.header-search button {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1rem; /* Slightly enlarged for better visibility */
    padding: 0 4px;
    display: flex;
    align-items: center;
}

@media (max-width: 640px) {
    .header-search {
        display: none; /* Collapses search on small mobile screens */
    }
}

/* ============================================
   READING TICKER (AUTUMNAL & JEWEL TONES)
   ============================================ */

reading-ticker {
    display: block;
    width: 100%;
}

.reading-ticker {
    overflow: hidden;
    border-top: 1px dashed rgba(217, 164, 65, 0.4);
    margin-top: 1.5rem;
    padding-top: 0.8rem;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.ticker-track {
    display: flex;
    gap: 1.25rem;
    width: max-content;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #FFF6E5;
    animation: scroll-ticker 28s linear infinite;
}

.ticker-pill {
    display: inline-flex;
    align-items: center;
    background: #3B120F; /* Dark Plum/Bordeaux pill */
    border: 1px solid rgba(217, 164, 65, 0.5);
    color: #FFF6E5;
    border-radius: 20px;
    padding: 4px 14px;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.ticker-track em {
    color: var(--mustard);
    font-style: normal;
    font-weight: 600;
    margin-left: 0.25rem;
}

@keyframes scroll-ticker {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

/* ============================================
   MAIN LAYOUT
   ============================================ */

.layout {
    max-width: 1400px;

    margin: 0 auto;

    padding: 2rem 1rem 0;

    display: flex;

    align-items: flex-start;

    gap: 2.5rem;
}

bookshelf-sidebar {
    flex: 0 0 240px;

    position: sticky;

    top: 1.25rem;

    align-self: flex-start;

    max-height: calc(100vh - 2.5rem);

    overflow-y: auto;
}

.sidebar {
    width: 100%;
}

main {
    flex: 1 1 auto;

    min-width: 0;

    max-width: 760px;

    padding-bottom: 4rem;
}

/* Genre page runs a wide 4-across shelf */
main.main-content {
    max-width: 900px;
}


/* ============================================
   HORIZONTAL BOOK SPINES (SIDEBAR NAVIGATION)
   ============================================ */

.bookshelf-frame {
    background-color: var(--wood-dark);

    border: 4px solid #36220f;

    border-radius: 4px;

    padding: 16px 12px 18px;

    box-shadow:
        inset 0 0 10px rgba(0, 0, 0, 0.6),
        0 4px 12px rgba(0, 0, 0, 0.2);

    position: relative;
}

/* Bottom shelf wooden ledge */
.bookshelf-frame::after {
    content: "";

    position: absolute;

    bottom: -10px;

    left: -8px;

    right: -8px;

    height: 12px;

    background: linear-gradient(180deg, var(--wood), #2d1b0d);

    border-radius: 2px;

    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.shelf {
    display: flex;

    flex-direction: column;

    gap: 14px;
}

/* Wooden plank dividers between each spine — makes every nav item
   read as its own shelf rather than one crowded stack of books */
.shelf-plank {
    height: 10px;

    margin: 0 -12px;

    background: linear-gradient(180deg, var(--wood) 0%, #2d1b0d 100%);

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 3px 6px rgba(0, 0, 0, 0.4);

    position: relative;
}

/* Plank end-caps, echoing the frame's own wood-grain edge */
.shelf-plank::before,
.shelf-plank::after {
    content: "";

    position: absolute;

    top: 0;

    bottom: 0;

    width: 12px;

    background: linear-gradient(180deg, #4a3119 0%, #24160a 100%);
}

.shelf-plank::before {
    left: 0;
}

.shelf-plank::after {
    right: 0;
}

.book-spine {
    display: flex;

    align-items: center;

    justify-content: center;

    height: 42px;

    padding: 0 16px;

    position: relative;

    text-decoration: none;

    border-radius: 2px;

    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.25),
        inset 0 -3px 0 rgba(0, 0, 0, 0.35),
        2px 3px 5px rgba(0, 0, 0, 0.25);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}

/* Spine edge details (book page effect on right side) */
.book-spine::after {
    content: "";

    position: absolute;

    right: 4px;

    top: 3px;

    bottom: 3px;

    width: 6px;

    background: repeating-linear-gradient(
        90deg,
        #fff8eb 0px,
        #fff8eb 1px,
        #d1c3a5 1px,
        #d1c3a5 2px
    );

    border-radius: 1px;

    box-shadow: inset 1px 0 2px rgba(0,0,0,0.2);
}

/* Gold foil bands near spine edges */
.book-spine::before {
    content: "";

    position: absolute;

    left: 12px;

    top: 0;

    bottom: 0;

    width: 2px;

    background: linear-gradient(180deg, rgba(255,215,0,0.6), rgba(184,134,11,0.8), rgba(255,215,0,0.6));

    box-shadow: 180px 0 0 rgba(255,215,0,0.4);
}

.spine-title {
    font-family: var(--font-title);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* Spine Color Varieties */
/* ============================================
   CLASSY AUTUMNAL & LEATHER SPINE VARIETIES
   ============================================ */

/* 1. Deep Oxblood / Mahogany (Complements Header Base) */
.spine-rust {
    background: linear-gradient(180deg, #6e2721, #4d1814, #360e0b);
    color: #FFF6E5;
}

/* 2. Dark Forest / Pine (Deep Jewel Tone Contrast) */
.spine-olive {
    background: linear-gradient(180deg, #324335, #222e24, #141c16);
    color: #F7EEDD;
}

/* 3. Aged Amber / Burnished Gold (Pulls Header Mustard Tones) */
.spine-mustard {
    background: linear-gradient(180deg, #b88232, #8f6220, #664312);
    color: #FFF6E5;
}

/* 4. Rich Tobacco / Dark Walnut (Grounded Warm Wood) */
.spine-wood {
    background: linear-gradient(180deg, #573a25, #3d2818, #28190e);
    color: #F7EEDD;
}

/* 5. Plum Charcoal / Dark Bordeaux (Deep Muted Accent) */
.spine-ink {
    background: linear-gradient(180deg, #3d2429, #28161a, #1a0c0f);
    color: #FFF6E5;
}

.spine-plum {
    background-color: #4A2E35;
    border-left: 3px solid #6E444E;
    color: #F7EBE8;
}

.spine-plum:hover {
    background-color: #5C3942;
}

/* Hover & Active States - Books slide out on the shelf */
.book-spine:hover,
.book-spine:focus-visible {
    text-decoration: none;

    transform: translateX(8px);

    filter: brightness(1.08);

    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.35),
        inset 0 -3px 0 rgba(0, 0, 0, 0.35),
        -4px 4px 10px rgba(0, 0, 0, 0.35);
}

.book-spine[aria-current="page"] {
    transform: translateX(12px);

    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.4),
        inset 0 -3px 0 rgba(0, 0, 0, 0.4),
        -6px 6px 12px rgba(0, 0, 0, 0.4);

    outline: 1px solid rgba(255, 255, 255, 0.3);
}

.book-spine[aria-current="page"]::after {
    background: repeating-linear-gradient(
        90deg,
        #ffe8b3 0px,
        #ffe8b3 1px,
        #d1a355 1px,
        #d1a355 2px
    );
}


/* ============================================
   BOOKS BY FEELING — mood-curated recommendation shelves
   ============================================ */

.feeling-section {
  margin-bottom: 5rem;
  scroll-margin-top: 2rem;
}

.feeling-band {
  border-left: 4px solid var(--feeling-color, var(--rust));
  padding-left: 1.25rem;
  margin-bottom: 3rem;
}

.feeling-label {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: var(--feeling-color, var(--rust));
}

.feeling-band h2 {
  margin: 0.35rem 0 0.6rem;
}

.feeling-desc {
  margin: 0;
  max-width: 60ch;
  color: var(--charcoal);
}

.feeling-devastating { --feeling-color: #8a2a2a; }
.feeling-cozy { --feeling-color: #b88232; }
.feeling-tense { --feeling-color: #4A2E35; }
.feeling-elsewhere { --feeling-color: #2f5f74; }
.feeling-uplifting { --feeling-color: #c97c3d; }

.mood-link.mood-devastating { color: #8a2a2a; }
.mood-link.mood-devastating:hover { color: #6b1414; }
.mood-link.mood-devastating::after { background: #8a2a2a; }

.mood-link.mood-cozy { color: #96691f; }
.mood-link.mood-cozy:hover { color: #714f16; }
.mood-link.mood-cozy::after { background: #96691f; }

.mood-link.mood-tense-feeling { color: #4A2E35; }
.mood-link.mood-tense-feeling:hover { color: #331f26; }
.mood-link.mood-tense-feeling::after { background: #4A2E35; }

.mood-link.mood-elsewhere-feeling { color: #2f5f74; }
.mood-link.mood-elsewhere-feeling:hover { color: #204353; }
.mood-link.mood-elsewhere-feeling::after { background: #2f5f74; }

.mood-link.mood-uplifting { color: #c97c3d; }
.mood-link.mood-uplifting:hover { color: #a1622c; }
.mood-link.mood-uplifting::after { background: #c97c3d; }

/* Generic muted footnote — same treatment as the bookstore map's note */
.page-note {
  font-size: 0.85rem;
  color: var(--charcoal);
  opacity: 0.75;
  margin-top: 1rem;
}


/* ============================================
   BACK TO TOP BUTTON
   ============================================ */

.back-to-top {
    position: fixed;

    right: 1.5rem;

    bottom: 1.5rem;

    width: 46px;

    height: 46px;

    border-radius: 50%;

    border: 1px solid var(--mustard);

    background: linear-gradient(180deg, #6e2721, #4d1814, #360e0b);

    color: #FFF6E5;

    font-size: 1.3rem;

    line-height: 1;

    display: flex;

    align-items: center;

    justify-content: center;

    opacity: 0;

    visibility: hidden;

    transform: translateY(10px);

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);

    transition:
        opacity 0.25s ease,
        transform 0.25s ease,
        visibility 0.25s ease,
        filter 0.2s ease;

    z-index: 40;
}

.back-to-top.is-visible {
    opacity: 1;

    visibility: visible;

    transform: translateY(0);
}

.back-to-top:hover,
.back-to-top:focus-visible {
    filter: brightness(1.15);
}

@media (prefers-reduced-motion: reduce) {
    .back-to-top {
        transition: opacity 0.1s linear, visibility 0.1s linear;
    }
}

@media (max-width: 640px) {
    .back-to-top {
        right: 1rem;

        bottom: 1rem;

        width: 42px;

        height: 42px;

        font-size: 1.15rem;
    }
}


/* ============================================
   HERO
   ============================================ */

.hero {
    padding-bottom: 2rem;

    padding-top: 1.5rem;

    border-bottom: 1px solid var(--paper-shadow);

    margin-bottom: 2.5rem;

    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
}

.hero p.lede {
    font-size: 1.15rem;

    max-width: 60ch;
}


/* ============================================
   SHELF TALKER — pinned note on a book cover
   ============================================ */

.shelf-talker {
    position: absolute;

    left: -22px;
    bottom: 34px;

    width: 150px;

    padding: 0.6rem 0.7rem;

    background-color: var(--cream-text);

    border: 1px solid var(--paper-shadow);

    border-radius: 2px;

    font-family: var(--font-display);

    font-style: italic;

    font-size: 0.78rem;

    line-height: 1.35;

    text-align: left;

    transform: rotate(-7deg);

    box-shadow: 3px 3px 0 rgba(0,0,0,0.15);

    z-index: 4;

    opacity: 0;

    pointer-events: none;

    transition:
        opacity 0.25s ease,
        transform 0.35s ease;
}

.book-card:hover .shelf-talker {
    opacity: 1;

    pointer-events: auto;

    transform: rotate(-7deg) translateY(-42px);
}

.shelf-talker::before {
    content: "";

    position: absolute;

    top: -6px;
    left: 14px;

    width: 10px;
    height: 10px;

    border-radius: 50%;

    background-color: var(--rust);

    box-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

.shelf-talker em {
    display: block;

    margin-top: 0.4rem;

    font-family: var(--font-mono);

    font-style: normal;

    font-size: 0.65rem;

    color: var(--rust);
}

@media (max-width: 550px) {

    .shelf-talker {
        position: static;

        width: auto;

        margin: 1rem auto 0;

        transform: rotate(-2deg);

        opacity: 1;

        pointer-events: auto;
    }

    .shelf-talker::before {
        display: none;
    }
}


/* ============================================
   FEATURED BOOKS
   ============================================ */

.monthly-shelf {
    width: 100%;

    margin-top: 4rem;
}

.section-heading {
    margin-bottom: 4rem;
}

.book-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    row-gap: 6.5rem;
    column-gap: 2.5rem;

    width: 100%;
}

.book-card {
    display: block;

    width: 100%;

    min-width: 0;

    text-align: center;

    perspective: 1200px;
}


/* ============================================
   BOOK COVERS — tilted, podium-lit
   ============================================ */

.book-cover {
    width: 100%;

    max-width: 240px;

    aspect-ratio: 2 / 3;

    margin: 0 auto 3.5rem;

    position: relative;

    overflow: visible;
}

.book-cover::before {
    content: "";

    position: absolute;

    top: -70px;
    left: 50%;

    width: 150%;
    height: 130px;

    transform: translateX(-50%);

    background: radial-gradient(
        ellipse at center,
        rgba(255, 247, 224, 0.6),
        rgba(255, 247, 224, 0) 72%
    );

    pointer-events: none;

    z-index: 0;
}

.book-cover::after {
    content: "";

    position: absolute;

    left: 50%;
    bottom: -30px;

    width: 82%;
    height: 36px;

    transform: translateX(-50%) perspective(300px) rotateX(58deg);
    transform-origin: top center;

    background: linear-gradient(180deg, var(--paper-shadow), var(--wood));

    border-radius: 5px;

    box-shadow:
        0 12px 18px rgba(0, 0, 0, 0.38),
        0 1px 0 rgba(255, 255, 255, 0.4) inset;

    z-index: -1;

    transition: box-shadow 0.3s ease;
}

.book-cover img {
    width: 100%;

    height: 100%;

    object-fit: cover;

    display: block;

    position: relative;

    z-index: 1;

    border-radius: 1px;

    transform-style: preserve-3d;

    transform: perspective(900px) rotateX(5deg) rotateY(-6deg);

    transform-origin: center bottom;

    box-shadow:
        0 2px 0 rgba(255,255,255,0.55) inset,
        0 -50px 45px -25px rgba(255,255,255,0.4) inset,
        5px 6px 0 rgba(0, 0, 0, 0.1),
        10px 16px 26px rgba(0, 0, 0, 0.22),
        0 55px 35px -25px rgba(0, 0, 0, 0.35);

    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease;
}

.book-card:nth-child(even) .book-cover img {
    transform: perspective(900px) rotateX(5deg) rotateY(6deg);
}

.book-card:hover .book-cover img {
    transform:
        perspective(900px)
        rotateX(0deg)
        rotateY(0deg)
        translateY(-42px)
        scale(1.05);

    box-shadow:
        0 2px 0 rgba(255,255,255,0.6) inset,
        0 -50px 45px -25px rgba(255,255,255,0.45) inset,
        6px 10px 0 rgba(0, 0, 0, 0.1),
        16px 28px 34px rgba(0, 0, 0, 0.3),
        0 45px 30px -22px rgba(0, 0, 0, 0.32);
}

.book-card:hover .book-cover::after {
    box-shadow:
        0 6px 10px rgba(0, 0, 0, 0.28),
        0 1px 0 rgba(255, 255, 255, 0.4) inset;
}


/* ============================================
   CART BUTTON
   ============================================ */

.cart-btn {
    position: absolute;

    top: 8px;
    right: 8px;

    width: 46px;
    height: 46px;

    display: flex;
    align-items: center;
    justify-content: center;

    background-color: var(--rust);
    color: var(--cream-text);

    border-radius: 50%;

    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);

    opacity: 0;
    pointer-events: none;

    z-index: 3;

    transform: translateY(0);

    transition:
        opacity 0.25s ease,
        transform 0.35s ease,
        background-color 0.2s ease;
}

.cart-btn svg {
    width: 22px;
    height: 22px;
}

.cart-btn:hover {
    background-color: var(--mustard);
    color: var(--ink);
}

.book-card:hover .cart-btn {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-42px);
}


/* ============================================
   GENRE STICKER
   ============================================ */

.genre-sticker {
    position: absolute;

    right: -15px;

    bottom: -20px;

    background: #3f3428;

    color: #f4e8cf;

    padding: 12px 20px;

    font-family: "Bodoni Moda", "Times New Roman", serif;

    font-size: 0.85rem;

    font-weight: 700;

    letter-spacing: 0.08em;

    text-transform: uppercase;

    white-space: nowrap;

    border: 1px solid #f4e8cf;

    border-radius: 2px;

    box-shadow:
        3px 3px 0 rgba(63, 52, 40, 0.15);

    z-index: 10;
}


/* ============================================
   BOOK INFORMATION
   ============================================ */

.book-info {
    max-width: 240px;

    margin-left: auto;

    margin-right: auto;

    text-align: center;
}

.book-info h3 {
    font-size: 1.4rem;

    line-height: 1.25;

    margin: 0.5rem 0 0.65rem;

    text-align: center;
}

.book-author {
    display: block;

    font-size: 1rem;

    font-weight: normal;

    font-style: italic;

    margin-top: 0.25rem;
}

.book-info p {
    text-align: center;

    line-height: 1.6;

    margin: 0;
}

.rating {
    text-align: center;

    letter-spacing: 0.12em;
}


/* ============================================
   ABOUT — Q&A SECTION
   ============================================ */

.qa-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.qa-item {
    padding-bottom: 2rem;
    border-bottom: 1px dashed var(--paper-shadow);
}

.qa-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.qa-question {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    margin: 0 0 0.6rem;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--ink);
}

.qa-mark {
    font-family: var(--font-title);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--rust);
    line-height: 1;
    flex: 0 0 auto;
}

.qa-answer {
    margin: 0;
    padding-left: calc(1.6rem + 0.6rem);
    color: var(--charcoal);
}

.qa-answer.qa-placeholder {
    font-style: italic;
    opacity: 0.65;
}


/* ============================================
   GENERAL CARDS
   ============================================ */

.card {
    background-color: #fff;

    border: 1px solid var(--paper-shadow);

    border-radius: 4px;

    padding: 1.5rem;
}


/* ============================================
   REVIEWS
   ============================================ */

.review-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.review-card {
    background-color: #fff;

    border: 1px solid var(--paper-shadow);

    border-radius: 4px;

    padding: 1.75rem;

    scroll-margin-top: 1.5rem;
}

.review-header {
    display: flex;
    gap: 1.5rem;

    margin-bottom: 1.25rem;
}

.review-cover {
    flex: 0 0 90px;

    width: 90px;
    height: 136px;

    border-radius: 2px;

    overflow: hidden;

    box-shadow: 2px 3px 6px rgba(0, 0, 0, 0.2);
}

.review-cover img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    display: block;
}

.review-heading-text {
    display: flex;
    flex-direction: column;

    justify-content: center;
}

.review-status {
    align-self: flex-start;

    font-family: var(--font-mono);

    text-transform: uppercase;

    letter-spacing: 0.08em;

    font-size: 0.68rem;

    color: var(--charcoal);

    background-color: var(--mustard);

    padding: 0.15rem 0.5rem;

    border-radius: 2px;

    margin-bottom: 0.5rem;
}

.review-title {
    margin-bottom: 0.15rem;
}

.review-author {
    font-family: var(--font-mono);

    font-size: 0.85rem;

    color: var(--ink-light);

    margin: 0 0 0.5rem;
}

.review-rating {
    color: var(--mustard);

    letter-spacing: 0.05em;
}

.review-body {
    border-top: 1px solid var(--paper-shadow);

    padding-top: 1.25rem;

    font-size: 1rem;
}

.review-body p {
    margin: 0;
}

.review-body ol {
    margin: 0.5rem 0 0.75rem 1.25rem;

    padding: 0;
}

.review-body li {
    margin: 0.2rem 0;
}

.review-body blockquote.review-quote {
    margin: 0.75rem 0;

    padding: 0.75rem 1rem;

    border-left: 3px solid var(--rust);

    background-color: var(--paper);

    font-family: var(--font-title);

    font-style: italic;

    font-size: 1.02rem;

    color: var(--charcoal);
}

.review-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;

    margin-top: 1.25rem;
}

.review-tag {
    font-family: var(--font-mono);

    text-transform: uppercase;

    letter-spacing: 0.06em;

    font-size: 0.65rem;

    color: var(--olive);

    border: 1px solid var(--olive);

    border-radius: 999px;

    padding: 0.25rem 0.7rem;
}

@media (max-width: 550px) {
    .review-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .review-cover {
        flex: 0 0 auto;
    }
}


/* ============================================
   BOOKSTORE MAP
   ============================================ */

.map-card {
    height: 420px;

    width: 100%;

    border-radius: 6px;

    border: 1px solid var(--paper-shadow);

    box-shadow: 0 2px 0 var(--paper-shadow);

    background-color: #fff;
}

.map-pin {
    font-size: 1.4rem;

    line-height: 1;

    filter: drop-shadow(
        0 2px 2px rgba(0,0,0,0.35)
    );
}

.leaflet-popup-content-wrapper {
    font-family: var(--font-body);

    color: var(--charcoal);

    border-radius: 4px;
}

.leaflet-popup-content strong {
    font-family: var(--font-display);

    color: var(--ink);

    font-size: 1.05rem;
}

.bookstore-groups {
    margin-top: 1.75rem;

    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(260px, 1fr));

    gap: 1.75rem 2rem;
}

.city-group {
    min-width: 0;
}

.city-heading {
    display: flex;

    align-items: center;

    gap: 0.5rem;

    font-family: var(--font-mono);

    font-size: 0.85rem;

    text-transform: uppercase;

    letter-spacing: 0.1em;

    color: var(--ink);

    margin: 0 0 0.75rem;

    padding-bottom: 0.4rem;

    border-bottom: 2px solid var(--paper-shadow);
}

.city-swatch {
    width: 12px;

    height: 12px;

    border-radius: 2px;

    flex: 0 0 auto;
}

.bookstore-list {
    list-style: none;

    margin: 0;

    padding: 0;

    display: flex;

    flex-direction: column;

    gap: 0.6rem;
}

.bookstore-item {
    width: 100%;

    display: flex;

    flex-direction: column;

    align-items: flex-start;

    gap: 0.15rem;

    background-color: #fff;

    border: 1px solid var(--paper-shadow);

    border-left: 5px solid var(--rust);

    border-radius: 3px;

    padding: 0.7rem 0.9rem;

    font-family: var(--font-body);

    text-align: left;

    cursor: pointer;

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

.bookstore-item:hover,
.bookstore-item:focus-visible {
    transform: translateY(-2px);

    box-shadow:
        0 4px 8px rgba(0,0,0,0.15);
}

.bookstore-name {
    font-family: var(--font-display);

    font-weight: 600;

    color: var(--ink);
}

.bookstore-city {
    font-family: var(--font-mono);

    font-size: 0.75rem;

    color: var(--rust);
}

.map-note {
    font-size: 0.85rem;

    color: var(--charcoal);

    opacity: 0.75;

    margin-top: 1rem;
}

/* ============================================
   FOOTER (AUTUMNAL MATCHING HEADER)
   ============================================ */

site-footer {
    display: block;
    width: 100%;
}

.site-footer {
    /* Match Header's Oxblood & Gold Pattern */
    background-color: #5C1D18;
    background-image: radial-gradient(rgba(217, 164, 65, 0.15) 0.85px, transparent 0.85px);
    background-size: 12px 12px;

    color: #FFF6E5;

    padding: 2.5rem 1.5rem;

    margin-top: 3rem;

    border-top: 3px solid var(--mustard);
    box-shadow: 0 -4px 18px -3px rgba(0, 0, 0, 0.25);
}

.reading-goal {
    max-width: var(--max-width);

    margin: 0 auto 1.5rem;

    font-family: var(--font-mono);

    font-size: 0.75rem;

    color: #E6C887;
}

.goal-label {
    display: block;

    margin-bottom: 0.4rem;

    color: #FFF6E5;
}

.goal-track {
    height: 8px;

    background-color: rgba(0, 0, 0, 0.35); /* Dark recessed groove */

    border: 1px solid rgba(217, 164, 65, 0.3);

    border-radius: 4px;

    overflow: hidden;
}

.goal-fill {
    height: 100%;

    background: linear-gradient(90deg, var(--mustard), #F7EEDD); /* Glowing gold fill */

    border-radius: 3px;

    box-shadow: 0 0 8px rgba(217, 164, 65, 0.5);
}

.library-card {
    max-width: var(--max-width);

    margin: 0 auto;

    font-family: var(--font-mono);

    font-size: 0.8rem;

    display: flex;

    justify-content: space-between;

    flex-wrap: wrap;

    gap: 0.5rem;

    border-top: 1px dashed rgba(217, 164, 65, 0.4);

    padding-top: 1.25rem;

    color: #FFF6E5;
}

.library-card .stamp {
    color: var(--mustard);

    border: 1px solid var(--mustard);

    padding: 0.15rem 0.5rem;

    border-radius: 2px;

    transform: rotate(-2deg);

    display: inline-block;
}

/* ============================================
   RESPONSIVE & ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {

    .book-spine,
    .book-cover img,
    .book-cover::after,
    .cart-btn,
    .shelf-talker,
    .ticker-track {
        transition: none;
        animation: none;
    }
}


/* ============================================
   TABLET
   ============================================ */

@media (max-width: 850px) {

    .book-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        row-gap: 6.5rem;
        column-gap: 2rem;
    }
}


/* ============================================
   LAYOUT TABLET
   ============================================ */

@media (max-width: 800px) {

    .layout {
        flex-direction: column;

        gap: 1.5rem;
    }

    bookshelf-sidebar {
        flex: 1 1 auto;

        width: 100%;

        position: static;

        max-height: none;
    }

    .book-spine:hover,
    .book-spine:focus-visible {
        transform: translateY(-4px);
    }

    .book-spine[aria-current="page"] {
        transform: translateY(-6px);
    }
}


/* ============================================
   PHONE NAVIGATION
   ============================================ */

/* Hide button by default on desktop & laptop screens */
.nav-toggle {
    display: none;
}

@media (max-width: 640px) {

    .nav-toggle {
        display: inline-block;
    }

    bookshelf-sidebar .shelf {
        display: none;
    }

    bookshelf-sidebar.is-open .shelf {
        display: flex;
    }
}


/* ============================================
   PHONE BOOK GRID
   ============================================ */

@media (max-width: 550px) {

    .book-grid {
        grid-template-columns: 1fr;

        row-gap: 6rem;
    }

    .book-cover {
        max-width: 240px;
    }

    .genre-sticker {
        right: -10px;
    }
}



/* ============================================
   BOOKSTORE 3D CUBBY SHELVES & PLAQUES
   (Genre bays — single source of truth, was
   previously duplicated inline on genres.html)
   ============================================ */

.cubby-section {
  margin-bottom: 5rem;
  padding: 2.75rem 2rem 2.5rem;
  border-radius: 22px;
  perspective: 1200px;
  position: relative;
}

.shelf-header-wrapper {
  text-align: center;
  margin-bottom: 2.25rem;
}

/* Hanging charm / wax-seal medallion above each plaque —
   the signature element: one per genre, themed to its shelf */
.shelf-emblem {
  position: relative;
  width: 52px;
  height: 52px;
  margin: 0 auto -8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  background: radial-gradient(circle at 32% 28%, var(--emblem-light, #3a2a1e) 0%, var(--emblem-dark, #17110b) 75%);
  border: 1.5px solid var(--emblem-border, rgba(212, 175, 55, 0.4));
  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.55),
    inset 0 1px 2px rgba(255, 255, 255, 0.15),
    0 0 0 rgba(0, 0, 0, 0);
}

.shelf-emblem svg {
  width: 24px;
  height: 24px;
  color: var(--emblem-icon, #e6c584);
  position: relative;
  z-index: 2;
}

.shelf-emblem::after {
  /* fine hairline "chain" linking the charm down to the plaque */
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  width: 1px;
  height: 20px;
  background: linear-gradient(180deg, var(--emblem-border, rgba(212, 175, 55, 0.4)), transparent);
}

.shelf-plaque {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-family: var(--font-title);
  font-size: clamp(1.4rem, 2.3vw, 1.75rem);
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.75rem 2.3rem;
  background: linear-gradient(135deg, #241b16 0%, #120e0b 100%);
  color: #e6c584;
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 10px;
  box-shadow:
    0 6px 15px rgba(0, 0, 0, 0.6),
    inset 0 1px 2px rgba(255, 255, 255, 0.15),
    inset 0 -2px 4px rgba(0, 0, 0, 0.8);
  position: relative;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.shelf-plaque::before,
.shelf-plaque::after {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: radial-gradient(circle, #f3e5ab 0%, #8c733f 100%);
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.8), inset 0 1px 1px rgba(255, 255, 255, 0.5);
}
.shelf-plaque::before { left: 10px; }
.shelf-plaque::after { right: 10px; }

/* One-line character note under the plaque, in each shelf's own voice */
.shelf-desc {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.85rem;
  max-width: 420px;
  margin: 0.85rem auto 0;
  color: var(--desc-color, #d8c9ae);
  opacity: 0.85;
}

.cubby-shelf-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  position: relative;
}

@media (max-width: 900px) {
  .cubby-shelf-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 460px) {
  .cubby-shelf-grid {
    grid-template-columns: 1fr;
  }
}

.book-cubby {
  background: linear-gradient(180deg, #18110b 0%, #291d13 100%);
  transform: rotateX(4deg) rotateY(-2deg);
  transform-style: preserve-3d;
  border-radius: 12px;
  padding: 1.4rem 0.85rem 1.9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  box-shadow:
    inset 10px 0 16px rgba(0, 0, 0, 0.65),
    inset -10px 0 16px rgba(0, 0, 0, 0.65),
    inset 0 16px 20px rgba(0, 0, 0, 0.85),
    0 15px 35px rgba(0, 0, 0, 0.5),
    0 3px 6px rgba(0, 0, 0, 0.4);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.book-cubby:hover {
  transform: rotateX(0deg) rotateY(0deg) translateY(-6px);
  box-shadow:
    inset 8px 0 16px rgba(0, 0, 0, 0.6),
    inset -8px 0 16px rgba(0, 0, 0, 0.6),
    inset 0 16px 20px rgba(0, 0, 0, 0.8),
    0 20px 40px rgba(0, 0, 0, 0.6),
    0 6px 12px rgba(0, 0, 0, 0.4);
}

.book-cubby::after {
  content: "";
  position: absolute;
  bottom: -12px;
  left: -6px;
  right: -6px;
  height: 14px;
  background: linear-gradient(180deg, #5c3d22 0%, #312012 60%, #170e07 100%);
  border-radius: 8px;
  transform: rotateX(-15deg);
  transform-origin: top;
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.6);
  z-index: 5;
}

.cubby-cover {
  width: 105px;
  height: 160px;
  border-radius: 3px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(0, 0, 0, 0.3)),
    var(--emblem-dark, #1c130d);
  border: 1px solid var(--emblem-border, rgba(212, 175, 55, 0.35));
  transform: translateZ(25px) rotateY(-8deg);
  box-shadow: -8px 12px 20px rgba(0, 0, 0, 0.8);
  margin-bottom: 1rem;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  z-index: 2;
}

.book-cubby:hover .cubby-cover {
  transform: translateZ(45px) rotateY(0deg) translateY(-4px);
  box-shadow: -12px 18px 25px rgba(0, 0, 0, 0.9);
}

.cubby-cover-monogram {
  font-family: var(--font-title);
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
  color: var(--emblem-icon, #e6c584);
  opacity: 0.38;
  user-select: none;
}

/* Real cover art (loaded via cover-loader.js) fills the cubby box.
   Books with no known ISBN keep the plain monogram fallback above. */
.cubby-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* When both Google Books and Open Library have no cover, cover-loader.js
   drops to a small drawn book icon — shrink it so it doesn't fill the
   whole box like a real cover would */
.cubby-cover img.cover-fallback {
  width: 60%;
  height: 60%;
  object-fit: contain;
  margin: auto;
  opacity: 0.5;
}

/* Queer shelf's cover borrows its emblem's rainbow ring instead of
   the flat accent border every other shelf uses */
.shelf-queer .cubby-cover {
  border: none;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(0, 0, 0, 0.3)) padding-box,
    var(--emblem-dark, #150c18) padding-box,
    conic-gradient(from 180deg, #e57373, #ffb74d, #fff176, #81c784, #64b5f6, #ba68c8, #e57373) border-box;
  border: 2px solid transparent;
}
.shelf-queer .cubby-cover-monogram {
  color: #f5d6ea;
  opacity: 0.45;
}

.cubby-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.3rem;
  transform: translateZ(15px);
  z-index: 2;
}

.cubby-author {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  opacity: 0.8;
  margin: 0;
  transform: translateZ(10px);
  z-index: 2;
}

.cubby-rating {
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: #d4af37;
  opacity: 0.85;
  margin-top: 0.35rem;
  transform: translateZ(10px);
  z-index: 2;
}

.cubby-review-link {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.03em;
  color: var(--desc-color, var(--cream-text));
  opacity: 0.85;
  margin-top: 0.4rem;
  text-decoration: underline;
  text-underline-offset: 2px;
  transform: translateZ(10px);
  z-index: 2;
}
.cubby-review-link:hover {
  opacity: 1;
}

/* --- THEMED 3D CABINETS, PLAQUES & CHARMS --- */

/* 1. Literary & Contemporary Fiction — warm sepia, quill charm.
      The quietest of the four: no glow, candlelit and understated. */
.shelf-literary {
  --emblem-light: #4a3423;
  --emblem-dark: #1f140c;
  --emblem-border: rgba(212, 175, 55, 0.45);
  --emblem-icon: #e6c584;
  --desc-color: #d4b59b;
  background: linear-gradient(135deg, #2b1c14 0%, #170e0a 100%);
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.8), 0 10px 30px rgba(0, 0, 0, 0.6);
}
.shelf-literary .shelf-plaque {
  background: linear-gradient(135deg, #3d2719 0%, #1f140c 100%);
  color: #f3dfc4;
  border-color: rgba(212, 175, 55, 0.4);
}
.shelf-literary .book-cubby {
  background: linear-gradient(180deg, #1f140c 0%, #302016 100%);
}
.shelf-literary .book-cubby::after {
  background: linear-gradient(180deg, #6b4528, #3b2515, #170e07);
}
.shelf-literary .cubby-title { color: #fdf8f2; }
.shelf-literary .cubby-author { color: #d4b59b; }

/* 2. Thrillers & Mystery — noir with a dagger charm, styled after
      the printed obelisk / dagger footnote mark. A single bead of
      crimson clings to the point. */
.shelf-thrillers {
  --emblem-light: #2a1214;
  --emblem-dark: #0d090a;
  --emblem-border: rgba(160, 40, 40, 0.5);
  --emblem-icon: #e3c4c8;
  --desc-color: #b88f94;
  background: linear-gradient(135deg, #111418 0%, #07090b 100%);
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.9), 0 10px 30px rgba(0, 0, 0, 0.6);
  position: relative;
}
.shelf-thrillers::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(160, 20, 20, 0.4), transparent);
}
.shelf-thrillers .shelf-plaque {
  background: linear-gradient(135deg, #1f1618 0%, #0d090a 100%);
  color: #e3c4c8;
  border-color: rgba(160, 40, 40, 0.4);
}
.shelf-thrillers .book-cubby {
  background: linear-gradient(180deg, #0d0a0b 0%, #1c1315 100%);
  box-shadow:
    inset 12px 0 20px rgba(0, 0, 0, 0.85),
    inset -12px 0 20px rgba(0, 0, 0, 0.85),
    inset 0 20px 25px rgba(0, 0, 0, 0.95),
    inset 0 0 15px rgba(120, 10, 10, 0.08),
    0 15px 35px rgba(0, 0, 0, 0.5);
}
.shelf-thrillers .book-cubby::after {
  background: linear-gradient(180deg, #42292c, #211315, #0a0506);
  border-top: 1px solid rgba(180, 50, 50, 0.25);
}
.shelf-thrillers .cubby-title { color: #f7eded; }
.shelf-thrillers .cubby-author { color: #b88f94; }
.shelf-thrillers .shelf-emblem { animation: emblem-pulse-crimson 3.4s ease-in-out infinite; }
.shelf-thrillers .emblem-drip {
  position: absolute;
  bottom: -3px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 6px;
  border-radius: 50% 50% 60% 60%;
  background: radial-gradient(circle at 30% 30%, #d9534f, #6b1010);
  box-shadow: 0 0 5px rgba(180, 30, 30, 0.7);
}

/* 3. Queer Literature & Voices — a ribbon bookmark charm in full
      pride-spectrum gradient, set in a gently glowing ring. */
.shelf-queer {
  --desc-color: #d69bc5;
  background: linear-gradient(135deg, #231626 0%, #0e0810 100%);
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.8), 0 10px 30px rgba(0, 0, 0, 0.6);
  position: relative;
}
.shelf-queer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 2px;
  background: linear-gradient(90deg, #e57373, #ffb74d, #fff176, #81c784, #64b5f6, #ba68c8);
  opacity: 0.5;
  filter: blur(1px);
}
.shelf-queer .shelf-plaque {
  background: linear-gradient(135deg, #36203a 0%, #160d18 100%);
  color: #f5d6ea;
  border-color: rgba(212, 130, 190, 0.4);
}
.shelf-queer .book-cubby {
  background: linear-gradient(180deg, #140b17 0%, #29182d 100%);
  box-shadow:
    inset 12px 0 20px rgba(0, 0, 0, 0.8),
    inset -12px 0 20px rgba(0, 0, 0, 0.8),
    inset 0 20px 25px rgba(0, 0, 0, 0.9),
    inset 0 0 20px rgba(180, 100, 200, 0.05),
    0 15px 35px rgba(0, 0, 0, 0.5);
}
.shelf-queer .book-cubby::after {
  background: linear-gradient(180deg, #57335c, #2b172e, #120814);
}
.shelf-queer .cubby-title { color: #fdf5fb; }
.shelf-queer .cubby-author { color: #d69bc5; }
/* rainbow ring border, drawn with a double-background trick so the
   inside stays a plain dark charm and only the ring carries color */
.shelf-queer .shelf-emblem {
  border: none;
  background:
    radial-gradient(circle at 32% 28%, #2c1b30 0%, #150c18 75%) padding-box,
    conic-gradient(from 180deg, #e57373, #ffb74d, #fff176, #81c784, #64b5f6, #ba68c8, #e57373) border-box;
  border: 2px solid transparent;
  animation: emblem-pulse-glow-soft 3.8s ease-in-out infinite;
}
.shelf-queer .shelf-emblem::after {
  background: linear-gradient(180deg, rgba(212, 130, 190, 0.6), transparent);
}

/* 4. Speculative & Sci-Fi — cybernetic blue, an orbiting-planet
      charm with a faint electric flicker. */
.shelf-scifi {
  --emblem-light: #16232c;
  --emblem-dark: #070c10;
  --emblem-border: rgba(0, 162, 255, 0.5);
  --emblem-icon: #99d6ff;
  --desc-color: #73b9ff;
  background: linear-gradient(135deg, #1c242b 0%, #0d1114 100%);
  box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.6), 0 10px 30px rgba(0, 0, 0, 0.5);
}
.shelf-scifi .shelf-plaque {
  background: linear-gradient(135deg, #152028 0%, #090d10 100%);
  color: #99d6ff;
  border-color: rgba(0, 162, 255, 0.35);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.6), inset 0 1px 2px rgba(0, 242, 255, 0.2);
}
.shelf-scifi .book-cubby {
  background: linear-gradient(180deg, #101518 0%, #1a232b 100%);
  box-shadow:
    inset 12px 0 20px rgba(0, 0, 0, 0.8),
    inset -12px 0 20px rgba(0, 0, 0, 0.8),
    inset 0 20px 25px rgba(0, 0, 0, 0.9),
    inset 0 0 15px rgba(0, 242, 255, 0.05),
    0 15px 35px rgba(0, 0, 0, 0.5);
}
.shelf-scifi .book-cubby::after {
  background: linear-gradient(180deg, #3d5061, #1d262e, #0c1014);
  border-top: 1px solid rgba(0, 242, 255, 0.3);
}
.shelf-scifi .cubby-title { color: #eef7ff; }
.shelf-scifi .cubby-author { color: #73b9ff; }
.shelf-scifi .shelf-emblem { animation: emblem-pulse-cyan 2.6s ease-in-out infinite; }
.shelf-scifi .emblem-orbit {
  animation: orbit-spin 14s linear infinite;
  transform-origin: 16px 16px;
}

@keyframes emblem-pulse-crimson {
  0%, 100% { box-shadow: 0 4px 10px rgba(0, 0, 0, 0.55), inset 0 1px 2px rgba(255, 255, 255, 0.15), 0 0 0 rgba(160, 20, 20, 0); }
  50% { box-shadow: 0 4px 10px rgba(0, 0, 0, 0.55), inset 0 1px 2px rgba(255, 255, 255, 0.15), 0 0 10px rgba(180, 30, 30, 0.55); }
}

@keyframes emblem-pulse-cyan {
  0%, 100% { box-shadow: 0 4px 10px rgba(0, 0, 0, 0.55), inset 0 1px 2px rgba(255, 255, 255, 0.15), 0 0 0 rgba(0, 200, 255, 0); }
  50% { box-shadow: 0 4px 10px rgba(0, 0, 0, 0.55), inset 0 1px 2px rgba(255, 255, 255, 0.15), 0 0 12px rgba(0, 200, 255, 0.55); }
}

@keyframes emblem-pulse-glow-soft {
  0%, 100% { box-shadow: 0 4px 10px rgba(0, 0, 0, 0.55), 0 0 0 rgba(230, 180, 230, 0); }
  50% { box-shadow: 0 4px 10px rgba(0, 0, 0, 0.55), 0 0 10px rgba(230, 180, 230, 0.45); }
}

@keyframes orbit-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .shelf-thrillers .shelf-emblem,
  .shelf-scifi .shelf-emblem,
  .shelf-queer .shelf-emblem,
  .shelf-scifi .emblem-orbit {
    animation: none;
  }
}

/* ============================================
   MOOD PICKER (genre page quick-jump)
   ============================================ */

.cubby-section {
  scroll-margin-top: 2rem;
}

.mood-picker {
  text-align: center;
  margin: 0 0 3.75rem;
  padding: 0.5rem 1rem 1.75rem;
  border-bottom: 1px dashed rgba(107, 74, 43, 0.3);
}

.mood-line {
  margin: 0;
  font-family: var(--font-title);
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  font-weight: 600;
  line-height: 1.6;
  color: var(--ink);
}

.mood-intro {
  font-style: italic;
  font-weight: 500;
  color: var(--charcoal);
}

.mood-dots {
  opacity: 0.55;
}

.mood-sep,
.mood-or {
  font-family: var(--font-body);
  font-size: 0.55em;
  font-style: normal;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--charcoal);
  opacity: 0.5;
  margin: 0 0.15em;
  vertical-align: middle;
}

.mood-link {
  position: relative;
  display: inline-block;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 0 0.05em;
  transition: color 0.25s ease, filter 0.25s ease;
}

.mood-link:hover,
.mood-link:focus-visible {
  text-decoration: none;
}

.mood-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -0.06em;
  height: 0.06em;
  border-radius: 2px;
  transition: right 0.35s ease;
}

.mood-link:hover::after,
.mood-link:focus-visible::after {
  right: 0;
}

.mood-link.mood-thrillers {
  color: #8a2a2a;
}
.mood-link.mood-thrillers:hover {
  color: #6b1414;
}
.mood-link.mood-thrillers::after {
  background: #8a2a2a;
}

.mood-link.mood-scifi {
  color: #146a94;
}
.mood-link.mood-scifi:hover {
  color: #0d4d6e;
}
.mood-link.mood-scifi::after {
  background: #146a94;
}

.mood-link.mood-literary {
  color: #7a5626;
}
.mood-link.mood-literary:hover {
  color: #5c3f1a;
}
.mood-link.mood-literary::after {
  background: #7a5626;
}

.mood-link.mood-queer {
  background: linear-gradient(90deg, #e0524f, #d98a2b, #c9a916, #4f9a5a, #2f7fc2, #9d4fae);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: saturate(1);
}
.mood-link.mood-queer:hover {
  filter: saturate(1.4) brightness(1.05);
}
.mood-link.mood-queer::after {
  background: linear-gradient(90deg, #e0524f, #d98a2b, #c9a916, #4f9a5a, #2f7fc2, #9d4fae);
}

@media (max-width: 460px) {
  .mood-line {
    font-size: 1.35rem;
    line-height: 1.65;
  }
}

/* 5. Fantasy & Fairy Tale — deep forest green and gold, a small
      crown charm for realms with their own rules of magic. */
.shelf-fantasy {
  --emblem-light: #1b3a2a;
  --emblem-dark: #0a1811;
  --emblem-border: rgba(196, 168, 78, 0.5);
  --emblem-icon: #d9c67a;
  --desc-color: #a9c9b0;
  background: linear-gradient(135deg, #12271b 0%, #08130d 100%);
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.75), 0 10px 30px rgba(0, 0, 0, 0.6);
}
.shelf-fantasy .shelf-plaque {
  background: linear-gradient(135deg, #1c3826 0%, #0a1a11 100%);
  color: #e3d59e;
  border-color: rgba(196, 168, 78, 0.4);
}
.shelf-fantasy .book-cubby {
  background: linear-gradient(180deg, #0d1911 0%, #1e3423 100%);
  box-shadow:
    inset 12px 0 20px rgba(0, 0, 0, 0.8),
    inset -12px 0 20px rgba(0, 0, 0, 0.8),
    inset 0 20px 25px rgba(0, 0, 0, 0.9),
    inset 0 0 15px rgba(196, 168, 78, 0.05),
    0 15px 35px rgba(0, 0, 0, 0.5);
}
.shelf-fantasy .book-cubby::after {
  background: linear-gradient(180deg, #3c5a44, #1c3223, #08130d);
  border-top: 1px solid rgba(196, 168, 78, 0.25);
}
.shelf-fantasy .cubby-title { color: #f2ecd8; }
.shelf-fantasy .cubby-author { color: #a9c9b0; }
.shelf-fantasy .shelf-emblem { animation: emblem-pulse-gold 3.6s ease-in-out infinite; }

/* 6. Young Adult & Coming-of-Age — warm terracotta and coral, a
      small sprouting sapling for stories about growing up. */
.shelf-ya {
  --emblem-light: #4a2a1c;
  --emblem-dark: #1c0f09;
  --emblem-border: rgba(232, 132, 90, 0.5);
  --emblem-icon: #f0b48f;
  --desc-color: #e3ab8a;
  background: linear-gradient(135deg, #2c1712 0%, #170b08 100%);
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.75), 0 10px 30px rgba(0, 0, 0, 0.6);
}
.shelf-ya .shelf-plaque {
  background: linear-gradient(135deg, #3c2015 0%, #190d09 100%);
  color: #f2c9a9;
  border-color: rgba(232, 132, 90, 0.4);
}
.shelf-ya .book-cubby {
  background: linear-gradient(180deg, #1a0f0a 0%, #2f1c14 100%);
  box-shadow:
    inset 12px 0 20px rgba(0, 0, 0, 0.8),
    inset -12px 0 20px rgba(0, 0, 0, 0.8),
    inset 0 20px 25px rgba(0, 0, 0, 0.9),
    inset 0 0 15px rgba(232, 132, 90, 0.05),
    0 15px 35px rgba(0, 0, 0, 0.5);
}
.shelf-ya .book-cubby::after {
  background: linear-gradient(180deg, #5c3826, #341f14, #150b07);
  border-top: 1px solid rgba(232, 132, 90, 0.25);
}
.shelf-ya .cubby-title { color: #fbeee4; }
.shelf-ya .cubby-author { color: #e3ab8a; }
.shelf-ya .shelf-emblem { animation: emblem-pulse-coral 4s ease-in-out infinite; }

/* 7. The Classics — leather-bound oxblood with antique gold, a
      laurel wreath for the shelf every other shelf answers to. */
.shelf-classics {
  --emblem-light: #3a1218;
  --emblem-dark: #16070a;
  --emblem-border: rgba(201, 161, 90, 0.5);
  --emblem-icon: #d8b06a;
  --desc-color: #c9a3a6;
  background: linear-gradient(135deg, #250d10 0%, #120608 100%);
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.8), 0 10px 30px rgba(0, 0, 0, 0.6);
}
.shelf-classics .shelf-plaque {
  background: linear-gradient(135deg, #33131a 0%, #16070a 100%);
  color: #e8d1a8;
  border-color: rgba(201, 161, 90, 0.4);
}
.shelf-classics .book-cubby {
  background: linear-gradient(180deg, #17080a 0%, #2b1116 100%);
  box-shadow:
    inset 12px 0 20px rgba(0, 0, 0, 0.85),
    inset -12px 0 20px rgba(0, 0, 0, 0.85),
    inset 0 20px 25px rgba(0, 0, 0, 0.95),
    inset 0 0 15px rgba(201, 161, 90, 0.05),
    0 15px 35px rgba(0, 0, 0, 0.5);
}
.shelf-classics .book-cubby::after {
  background: linear-gradient(180deg, #5c2530, #331419, #150709);
  border-top: 1px solid rgba(201, 161, 90, 0.25);
}
.shelf-classics .cubby-title { color: #f5e9d6; }
.shelf-classics .cubby-author { color: #c9a3a6; }
/* no glow — this shelf is meant to feel settled, not dramatic */

/* 8. Memoir & Nonfiction — slate blue-grey, a fountain-pen-nib
      charm for true stories and hard-won ideas. */
.shelf-nonfiction {
  --emblem-light: #26333d;
  --emblem-dark: #0e1418;
  --emblem-border: rgba(143, 168, 191, 0.5);
  --emblem-icon: #c3d3e0;
  --desc-color: #a9bdcc;
  background: linear-gradient(135deg, #1a232b 0%, #0c1116 100%);
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.75), 0 10px 30px rgba(0, 0, 0, 0.6);
}
.shelf-nonfiction .shelf-plaque {
  background: linear-gradient(135deg, #223038 0%, #0e1519 100%);
  color: #d3e0ea;
  border-color: rgba(143, 168, 191, 0.4);
}
.shelf-nonfiction .book-cubby {
  background: linear-gradient(180deg, #101519 0%, #212e36 100%);
  box-shadow:
    inset 12px 0 20px rgba(0, 0, 0, 0.8),
    inset -12px 0 20px rgba(0, 0, 0, 0.8),
    inset 0 20px 25px rgba(0, 0, 0, 0.9),
    inset 0 0 15px rgba(143, 168, 191, 0.05),
    0 15px 35px rgba(0, 0, 0, 0.5);
}
.shelf-nonfiction .book-cubby::after {
  background: linear-gradient(180deg, #3f5361, #1f2a31, #0c1114);
  border-top: 1px solid rgba(143, 168, 191, 0.25);
}
.shelf-nonfiction .cubby-title { color: #eef3f7; }
.shelf-nonfiction .cubby-author { color: #a9bdcc; }
/* no glow here either — steady and clear-eyed */

@keyframes emblem-pulse-gold {
  0%, 100% { box-shadow: 0 4px 10px rgba(0, 0, 0, 0.55), inset 0 1px 2px rgba(255, 255, 255, 0.15), 0 0 0 rgba(196, 168, 78, 0); }
  50% { box-shadow: 0 4px 10px rgba(0, 0, 0, 0.55), inset 0 1px 2px rgba(255, 255, 255, 0.15), 0 0 10px rgba(196, 168, 78, 0.5); }
}

@keyframes emblem-pulse-coral {
  0%, 100% { box-shadow: 0 4px 10px rgba(0, 0, 0, 0.55), inset 0 1px 2px rgba(255, 255, 255, 0.15), 0 0 0 rgba(232, 132, 90, 0); }
  50% { box-shadow: 0 4px 10px rgba(0, 0, 0, 0.55), inset 0 1px 2px rgba(255, 255, 255, 0.15), 0 0 10px rgba(232, 132, 90, 0.45); }
}

.mood-link.mood-fantasy { color: #2e6b46; }
.mood-link.mood-fantasy:hover { color: #204d33; }
.mood-link.mood-fantasy::after { background: #2e6b46; }

.mood-link.mood-ya { color: #b5502d; }
.mood-link.mood-ya:hover { color: #8f3e21; }
.mood-link.mood-ya::after { background: #b5502d; }

.mood-link.mood-classics { color: #7a2530; }
.mood-link.mood-classics:hover { color: #5c1a22; }
.mood-link.mood-classics::after { background: #7a2530; }

.mood-link.mood-nonfiction { color: #3d5a70; }
.mood-link.mood-nonfiction:hover { color: #2a4051; }
.mood-link.mood-nonfiction::after { background: #3d5a70; }

@media (prefers-reduced-motion: reduce) {
  .shelf-fantasy .shelf-emblem,
  .shelf-ya .shelf-emblem {
    animation: none;
  }
}

/* ============================================
   SHELF RAIL (genre page scroll nav)
   ============================================ */

.shelf-rail {
  position: fixed;
  top: 50%;
  right: 1.5rem;
  transform: translateY(-50%);

  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.85rem;

  z-index: 40;
}

.shelf-rail-dot {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 0.65rem;
  height: 0.65rem;

  border-radius: 50%;

  background-color: var(--rail-color, var(--ink));
  opacity: 0.35;

  box-shadow: 0 0 0 3px transparent;

  transition: opacity 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.shelf-rail-dot:hover,
.shelf-rail-dot:focus-visible {
  opacity: 0.75;
  transform: scale(1.15);
}

.shelf-rail-dot.is-active {
  opacity: 1;
  transform: scale(1.35);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--rail-color, var(--ink)) 25%, transparent);
}

.shelf-rail-label {
  position: absolute;
  right: 1.3rem;
  top: 50%;
  transform: translateY(-50%) translateX(0.35rem);

  white-space: nowrap;

  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  text-transform: none;

  background-color: var(--charcoal);
  color: var(--paper);

  padding: 0.3rem 0.6rem;

  border-radius: 3px;

  opacity: 0;
  pointer-events: none;

  transition: opacity 0.2s ease, transform 0.2s ease;
}

.shelf-rail-dot:hover .shelf-rail-label,
.shelf-rail-dot:focus-visible .shelf-rail-label {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.rail-literary    { --rail-color: #7a5626; }
.rail-thrillers   { --rail-color: #8a2a2a; }
.rail-scifi       { --rail-color: #146a94; }
.rail-fantasy     { --rail-color: #2e6b46; }
.rail-ya          { --rail-color: #b5502d; }
.rail-classics    { --rail-color: #7a2530; }
.rail-nonfiction  { --rail-color: #3d5a70; }

.rail-queer {
  background: conic-gradient(#e0524f, #d98a2b, #c9a916, #4f9a5a, #2f7fc2, #9d4fae, #e0524f);
}

@media (max-width: 1150px) {
  .shelf-rail {
    display: none;
  }
}
