.shelf-controls {
    left: 425px;
    top: 216px;
    width: 680px;
    display: grid;
    grid-template-columns: repeat(3, 200px);
    gap: 13px 30px;
}
.paper-menu-button {
    position: relative;
    width: 200px;
    min-width: 0;
    height: 70px;
    padding: 0 31px 4px 42px;
    border: 0;
    border-radius: 0;
    background: url("../images/author_approved/menu_plaque_transparent.8ddad4e2eea0.png") center/100% 100% no-repeat;
    color: #512b16;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 20px;
    font-style: normal;
    font-weight: 400;
    letter-spacing: -.35px;
    text-shadow: 0 1px #ffe9bd;
    box-shadow: none;
    filter: drop-shadow(2px 4px 3px rgba(50,27,11,.25));
    transform: rotate(-.25deg);
}
.paper-menu-button:nth-child(even) { transform: rotate(.3deg); }
.paper-menu-button::before,
.paper-menu-button::after { content: none; }
.paper-menu-button:hover,
.paper-menu-button:focus-visible,
.paper-menu-button.active {
    color: #445322;
    filter: drop-shadow(3px 7px 4px rgba(50,27,11,.32)) brightness(1.05);
    transform: translateY(-3px) rotate(0);
    box-shadow: none;
}
.paper-menu-button:focus-visible { outline: 2px solid #66743b; outline-offset: 2px; }
.selection-label {
    left: 510px;
    top: 374px;
    width: 510px;
    height: 74px;
    min-height: 0;
    padding: 0 82px 8px;
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url("../images/author_approved/birch_label_transparent.c1be74da2f26.png") center/100% 100% no-repeat;
    color: #4a2c19;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 27px;
    font-style: normal;
    font-weight: 400;
    letter-spacing: -.55px;
    line-height: 1;
    text-shadow: 0 1px #f8dfad;
    box-shadow: none;
    filter: drop-shadow(1px 3px 3px rgba(48,27,11,.2));
}
.selection-label::before,
.selection-label::after { content: none; }
.filter-popover { top: 366px; }

/* The entire shelf composition rests close to the bottom edge. */
.home-shelf-page .cactus-cat {
    top: 465px !important;
}
.home-shelf-page .spines {
    top: 495px !important;
}
.home-shelf-page .wood-shelf {
    top: 925px !important;
}
.home-shelf-page .book-panel {
    top: 350px;
}
.home-shelf-page:has(.book-panel.open) .cactus-cat {
    top: 465px !important;
}
.home-shelf-page:has(.book-panel.open) .spines {
    top: 495px !important;
}

.search-popover {
    left: 535px;
    top: 356px;
    width: 430px;
    max-height: none;
    padding: 26px 30px 28px;
    border: 2px solid #63381e;
    border-radius: 18px 12px 20px 13px;
    background:
        linear-gradient(rgba(247,222,177,.28),rgba(219,178,116,.18)),
        url("../images/author_approved/paper_canvas.adda45703c6b.jpg") center/cover;
    box-shadow: 0 0 0 3px #9a6331, 0 0 0 5px #4e2916,
        inset 0 0 24px rgba(102,55,23,.18), 5px 10px 18px rgba(46,25,11,.34);
}
.search-heading {
    display: block !important;
    margin: 0 0 15px;
    color: #4a2c19;
    font: 400 29px Georgia, "Times New Roman", serif;
    text-align: center;
}
.search-heading::after {
    content: "❧  ·  ❧";
    display: block;
    margin-top: 5px;
    color: #68753c;
    font-size: 18px;
    letter-spacing: 5px;
}
.search-modes {
    display: flex;
    gap: 22px;
    margin: 0 0 18px;
    padding: 0;
    border: 0;
}
.search-modes legend {
    width: 100%;
    margin-bottom: 8px;
    color: #755036;
    font-size: 14px;
}
.search-modes label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    cursor: pointer;
    font-size: 16px;
}
.search-modes input {
    appearance: none;
    width: 20px;
    height: 20px;
    margin: 0;
    border: 2px solid #70401f;
    border-radius: 50%;
    background: #f6dfb6;
    box-shadow: inset 0 0 0 3px #f6dfb6;
}
.search-modes input:checked { background: #68743a; }
.search-modes input:focus-visible { outline: 2px solid #68743a; outline-offset: 2px; }
.search-query-label {
    display: block !important;
    margin: 0 0 8px !important;
    color: #4a2c19;
    font-size: 16px !important;
}
.search-popover .search-row {
    display: grid;
    grid-template-columns: 1fr 92px;
    gap: 10px;
}
.search-popover .search-row input {
    width: 100%;
    height: 43px;
    padding: 0 13px;
    border: 1px solid #815a38;
    border-radius: 7px;
    background: rgba(255,244,218,.8);
    color: #452817;
    font: 16px Georgia, "Times New Roman", serif;
    box-shadow: inset 0 2px 7px rgba(83,43,17,.1);
}
.search-popover .search-row button {
    height: 43px;
    padding: 0 12px;
    border: 1px solid #4d582a;
    border-radius: 7px;
    background: linear-gradient(#6e7a42,#525f2d);
    color: #fff0d0;
    font: 17px Georgia, "Times New Roman", serif;
    box-shadow: 1px 3px 5px rgba(47,27,13,.24);
    cursor: pointer;
}
.search-popover .search-row button:hover { filter: brightness(1.08); }
.author-results {
    left: 535px;
    top: 356px;
    width: 430px;
    max-height: 330px;
    padding: 24px 28px;
}
.author-results > strong {
    margin-bottom: 12px;
    font: 400 25px Georgia, "Times New Roman", serif;
    text-align: center;
}
.author-results .author-choice {
    padding: 11px 8px;
    font-size: 18px;
}
.about-paper {
    width: min(780px, calc(100vw - 44px));
    max-height: 820px;
    padding: 50px 72px 46px;
    overflow-y: auto;
    border: 4px double #70401f;
    border-radius: 22px 12px 24px 14px;
    background-color: #efd3a5;
    box-shadow: inset 0 0 0 7px rgba(151, 92, 37, .13), inset 0 0 35px rgba(111, 61, 24, .18), 0 18px 48px rgba(45, 25, 10, .48);
}
.manifest-text { margin-top: 14px; text-align: left; }
.about-paper .manifest-text p {
    margin: 0 0 17px;
    font-size: 20px;
    line-height: 1.52;
}
.about-paper .manifest-text .manifest-lead {
    margin: 0 0 18px;
    color: #485428;
    font-size: 38px;
    line-height: 1.15;
    font-weight: 700;
    text-align: center;
    text-shadow: 0 1px rgba(255,255,255,.55);
}
.manifest-ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #6b762f;
    font: 30px/1 Georgia, "Times New Roman", serif;
}
.manifest-ornament i {
    width: 88px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #98632f, transparent);
}
.manifest-ornament b {
    color: #a45632;
    font-size: 12px;
}
.manifest-ornament-bottom {
    margin-top: 5px;
    transform: rotate(180deg);
}
.manifest-corner {
    position: absolute;
    z-index: 1;
    color: #65702f;
    font: 56px/1 Georgia, "Times New Roman", serif;
    opacity: .82;
    text-shadow: 1px 1px #f6dfb7;
    pointer-events: none;
}
.corner-top-left { top: 12px; left: 15px; transform: rotate(-42deg); }
.corner-top-right { top: 12px; right: 15px; transform: rotate(42deg); }
.corner-bottom-left { bottom: 12px; left: 15px; transform: rotate(-138deg); }
.corner-bottom-right { right: 15px; bottom: 12px; transform: rotate(138deg); }
@media (max-width: 650px) {
    .about-paper { padding: 44px 38px 40px; }
    .about-paper .manifest-text p { font-size: 18px; }
    .about-paper .manifest-text .manifest-lead { font-size: 31px; }
    .manifest-corner { font-size: 43px; }
}

/* Mobile is a real document flow, not a scaled 1536px desktop canvas. */
@media (max-width: 650px) {
    html,body { width:100%; min-height:100%; }
    body { display:block; height:auto!important; overflow-x:hidden; }
    .page.home-shelf-page {
        display:flex; flex-direction:column; width:100%; min-height:100dvh; height:auto;
        margin:0; overflow:visible; transform:none!important; background-size:auto 100%;
    }
    .home-shelf-page .header {
        position:relative; inset:auto; order:1; flex:0 0 96px; width:100%;
    }
    .home-shelf-page .logo {
        left:8px!important; top:7px!important; width:86px!important; height:79px!important;
    }
    .account-links {
        left:100px; right:8px; top:10px; gap:5px 7px; font-size:12px;
    }
    .home-title-row {
        position:static; order:2; width:100%; padding:0 16px 10px; text-align:center;
    }
    .home-title-row h1 { font-size:clamp(27px,8.5vw,38px); line-height:1.02; }
    .shelf-controls {
        position:static; order:3; width:100%; padding:0 10px;
        grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px 8px;
    }
    .paper-menu-button {
        width:100%; height:clamp(52px,16vw,68px); padding:0 20px 4px 28px;
        font-size:clamp(17px,5.2vw,21px);
    }
    .selection-label {
        position:static; order:4; align-self:center; width:min(270px,78vw); height:62px;
        margin:4px 0 8px; padding:0 55px 7px; transform:none; font-size:22px;
    }
    .home-shelf-page .content {
        position:relative; inset:auto; order:5; flex:0 0 auto; width:100%;
        height:clamp(270px,82vw,390px); z-index:3;
    }
    .home-shelf-page .shelf-area { position:relative; inset:auto; width:100%; height:100%; }
    .home-shelf-page .cactus-cat {
        left:0!important; top:4%!important; width:21%!important; height:82%!important;
    }
    .home-shelf-page .spines {
        left:18%!important; top:8%!important; width:82%; height:78%!important;
        display:flex; align-items:flex-end;
    }
    .home-shelf-page .spine {
        flex:1 1 0; width:auto!important; min-width:0; height:100%!important;
        padding:18% 3px 14%!important; gap:10%;
    }
    .home-shelf-page .spine strong,
    .home-shelf-page .spine strong.long-title {
        width:100%!important; max-width:100%!important; max-height:45%;
        font-size:clamp(10px,3vw,15px)!important; line-height:1.08;
    }
    .home-shelf-page .spine small {
        width:100%!important; max-width:100%!important; font-size:clamp(7px,2.1vw,11px)!important;
    }
    .home-shelf-page .wood-shelf {
        left:0!important; top:84%!important; width:100%!important; height:9%!important;
    }
    .filter-popover,.search-popover,.author-results {
        position:fixed; left:12px; right:12px; top:50%; width:auto; max-height:70dvh;
        transform:translateY(-50%); z-index:80;
    }
    .home-shelf-page .book-panel { z-index:100; }
}

/* A single italic display face for controls throughout the home page. */
.paper-menu-button,.filter-popover button,.filter-popover .author-choice,
.search-popover button,.book-panel button,.book-panel .excerpt,
.book-panel .amazon,.about-paper .close {
    font-family:Georgia,"Times New Roman",serif;
    font-style:italic;
}

@media (max-width: 650px) {
    body { display:block; min-height:100dvh; background-attachment:scroll; }
    .page.home-shelf-page {
        width:100%; min-height:100dvh; height:844px; overflow:hidden;
        transform:none; background-size:auto 100%; background-position:center top;
    }
    .home-shelf-page .logo { left:8px!important; top:8px!important; width:92px!important; height:84px!important; }
    .account-links {
        left:104px; right:10px; top:12px; justify-content:flex-end; align-items:center;
        gap:6px; flex-wrap:wrap; font-size:11px; line-height:1.2; text-align:right;
    }
    .home-title-row { left:104px; right:8px; top:48px; text-align:center; }
    .home-title-row h1 { font-size:25px; line-height:1.02; }
    .shelf-controls {
        left:12px; top:130px; width:calc(100% - 24px);
        grid-template-columns:repeat(2,minmax(0,1fr)); gap:3px 10px;
    }
    .paper-menu-button { width:100%; height:51px; padding:0 20px 4px 28px; font-size:17px; }
    .selection-label {
        left:50%; top:292px; width:250px; height:58px; padding:0 52px 7px;
        transform:translateX(-50%); font-size:21px;
    }
    .home-shelf-page .cactus-cat {
        left:2px!important; top:395px!important; width:82px!important; height:240px!important;
    }
    .home-shelf-page .spines {
        left:75px!important; top:414px!important; width:calc(100% - 80px); height:218px!important;
        align-items:flex-end;
    }
    .home-shelf-page .spine {
        flex:1 1 0; width:auto!important; min-width:0; height:218px!important;
        padding:38px 3px 31px!important; gap:22px;
    }
    .home-shelf-page .spine strong,
    .home-shelf-page .spine strong.long-title {
        width:100%!important; max-width:100%!important; max-height:88px;
        font-size:11px!important; line-height:1.08;
    }
    .home-shelf-page .spine small { width:100%!important; max-width:100%!important; font-size:8px!important; }
    .home-shelf-page .wood-shelf {
        left:0!important; top:625px!important; width:100%!important; height:31px!important;
    }
    .filter-popover,.search-popover,.author-results {
        position:absolute; left:16px; top:294px; width:calc(100% - 32px); min-width:0;
        max-height:330px; padding:20px; z-index:60;
    }
    .search-popover .search-row { grid-template-columns:1fr 82px; }
    .search-popover input { width:100%; }
    .shelf-empty { left:90px; top:475px; width:270px; padding:15px; font-size:20px; }
    .about-modal { position:fixed; }
    .about-paper { width:calc(100% - 24px); max-height:calc(100dvh - 24px); padding:42px 28px 34px; }
    .about-paper .manifest-text p { font-size:16px; line-height:1.42; }
    .about-paper .manifest-text .manifest-lead { font-size:28px; }
    .home-shelf-page .book-panel {
        position:fixed; inset:10px; width:auto; height:auto; padding:54px 20px 24px;
        overflow:auto; border:3px double #70401f; border-radius:18px;
        background:#efd3a5 url("../images/author_approved/paper_canvas.adda45703c6b.jpg") center/cover;
        box-shadow:0 12px 35px rgba(45,25,10,.5);
    }
    .book-panel-art { display:none; }
    .book-card { position:relative; left:auto; top:auto; width:100%; height:auto; grid-template-columns:1fr; }
    .book-card.active { display:block; }
    .page-left,.page-right,.book-card .page-right { padding:0; }
    .page-left h2 { font-size:28px; }
    .cover { width:145px; height:200px; }
    .desc { height:auto; max-height:180px; margin-top:18px; }
    .book-panel>.close { position:fixed; right:20px; top:18px; }
    .book-panel .arrow { position:fixed; top:48%; color:#4b2917; font-size:30px; }
    .book-panel .arrow.left { left:14px; }
    .book-panel .arrow.right { right:14px; }
}

@media (max-width: 650px) {
    .genre-tooltip { display:none; }
    .page.home-shelf-page { height:auto; min-height:100dvh; overflow:visible; }
    .home-shelf-page .header { position:relative; inset:auto; order:1; flex:0 0 96px; }
    .home-shelf-page .logo { left:8px!important; top:7px!important; width:86px!important; height:79px!important; }
    .account-links { left:100px; right:8px; top:10px; font-size:12px; }
    .home-title-row { position:static; order:2; width:100%; padding:0 16px 10px; }
    .home-title-row h1 { font-size:clamp(27px,8.5vw,38px); }
    .shelf-controls { position:static; order:3; width:100%; padding:0 10px; }
    .paper-menu-button { height:clamp(52px,16vw,68px); font-size:clamp(17px,5.2vw,21px); }
    .selection-label {
        position:static; order:4; align-self:center; left:auto; top:auto;
        width:min(270px,78vw); height:62px; margin:4px 0 8px;
        padding:0 55px 7px; transform:none; font-size:22px;
    }
    .home-shelf-page .content {
        position:relative; inset:auto; order:5; width:100%; height:clamp(270px,82vw,390px);
    }
    .home-shelf-page .shelf-area { position:relative; inset:auto; width:100%; height:100%; }
    .home-shelf-page .cactus-cat { left:0!important; top:4%!important; width:21%!important; height:82%!important; }
    .home-shelf-page .spines { left:18%!important; top:8%!important; width:82%; height:78%!important; }
    .home-shelf-page .spine { height:100%!important; padding:18% 3px 14%!important; gap:10%; }
    .home-shelf-page .wood-shelf { left:0!important; top:84%!important; width:100%!important; height:9%!important; }
    .filter-popover,.search-popover,.author-results {
        position:fixed; left:12px; right:12px; top:50%; width:auto; max-height:70dvh;
        transform:translateY(-50%); z-index:80;
    }
    .home-shelf-page .book-panel{
        left:10px;right:10px;top:10px;bottom:10px;width:auto;height:auto;
        transform:none!important;
        box-shadow:0 0 0 100vmax rgba(45,26,12,.48),0 12px 35px rgba(45,25,10,.5);
    }
    .home-shelf-page:has(.book-panel.open) .content{z-index:150;}
    .home-shelf-page:has(.book-panel.open) .cactus-cat{
        left:0!important;top:4%!important;width:21%!important;height:82%!important;
    }
    .home-shelf-page:has(.book-panel.open) .spines{
        left:18%!important;top:8%!important;width:82%!important;height:78%!important;
    }
    .home-shelf-page:has(.book-panel.open) .spine{
        width:auto!important;height:100%!important;
    }
    .home-shelf-page:has(.book-panel.open) .wood-shelf{
        left:0!important;top:84%!important;width:100%!important;height:9%!important;
    }
}
