:root {
    --paper: #f6f1e8;
    --paper-2: #fffaf0;
    --paper-3: #ede2cf;
    --ink: #2f261d;
    --muted: #66594c;
    --soft: #8a7b6b;
    --line: #d8c9b6;
    --line-strong: #b8a48e;
    --blue: #2b6f9f;
    --blue-dark: #1d4f75;
    --teal: #20756c;
    --red: #a8442f;
    --gold: #b87925;
    --green: #50763f;
    --shadow: 0 10px 22px rgba(67, 51, 36, 0.18);
    --cover-shadow: 0 10px 18px rgba(47, 38, 29, 0.28);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        linear-gradient(180deg, rgba(255, 250, 240, 0.72), rgba(246, 241, 232, 0.96)),
        var(--paper);
    color: var(--ink);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.55;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button,
input,
select {
    font: inherit;
}

.skip-link,
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.skip-link:focus {
    z-index: 50;
    width: auto;
    height: auto;
    clip: auto;
    left: 1rem;
    top: 1rem;
    padding: 0.7rem 0.9rem;
    border-radius: 4px;
    background: var(--blue);
    color: white;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(255, 250, 240, 0.96);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.site-header.is-scrolled {
    box-shadow: 0 4px 14px rgba(47, 38, 29, 0.12);
}

.site-nav {
    width: min(1220px, calc(100% - 2rem));
    min-height: 112px;
    margin: 0 auto;
    padding: 0.7rem 0;
    display: grid;
    grid-template-columns: 170px minmax(320px, 1fr) auto;
    grid-template-areas:
        "brand search toggle"
        "menu menu menu";
    align-items: center;
    gap: 0.6rem 1rem;
}

.brand {
    grid-area: brand;
    width: 154px;
}

.brand img,
.footer-brand img {
    width: 100%;
    height: auto;
}

.site-search,
.welcome-search {
    display: grid;
    grid-template-columns: auto 1fr auto;
    min-height: 44px;
    border: 1px solid var(--line-strong);
    border-radius: 4px;
    background: white;
    overflow: hidden;
}

.site-search {
    grid-area: search;
}

.site-search select,
.welcome-search select,
.site-search input,
.welcome-search input {
    min-width: 0;
    border: 0;
    border-right: 1px solid var(--line);
    outline: 0;
    background: white;
    color: var(--ink);
}

.site-search select,
.welcome-search select {
    padding: 0 0.65rem;
    color: var(--muted);
    font-weight: 700;
}

.site-search input,
.welcome-search input {
    padding: 0 0.85rem;
}

.site-search button,
.welcome-search button,
.small-action,
.read-button {
    border: 0;
    background: var(--blue);
    color: white;
    font-weight: 800;
    cursor: pointer;
}

.site-search button,
.welcome-search button {
    padding: 0 1rem;
}

.site-search button:hover,
.welcome-search button:hover,
.small-action:hover,
.read-button:hover {
    background: var(--blue-dark);
}

.nav-toggle {
    grid-area: toggle;
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line-strong);
    border-radius: 4px;
    background: white;
    color: var(--ink);
}

.nav-toggle span {
    display: block;
    width: 19px;
    height: 2px;
    margin: 4px auto;
    background: currentColor;
}

.nav-panel {
    grid-area: menu;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.15rem 0.75rem;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 800;
}

.nav-panel > a,
.nav-group summary {
    padding: 0.3rem 0;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
}

.nav-panel > a:hover,
.nav-group summary:hover {
    color: var(--blue);
    border-bottom-color: var(--blue);
}

.nav-group {
    position: relative;
}

.nav-group summary {
    display: block;
    cursor: pointer;
    list-style: none;
}

.nav-group summary::-webkit-details-marker {
    display: none;
}

.nav-submenu {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    z-index: 40;
    min-width: 190px;
    max-height: min(70vh, 520px);
    display: grid;
    gap: 0.2rem;
    padding: 0.45rem;
    border: 1px solid var(--line-strong);
    border-radius: 5px;
    background: var(--paper-2);
    box-shadow: var(--shadow);
    overflow-y: auto;
}

.nav-group:not([open]) .nav-submenu {
    display: none;
}

.nav-submenu a {
    padding: 0.55rem 0.65rem;
    border-radius: 4px;
    color: var(--muted);
    font-weight: 800;
}

.nav-submenu a:hover {
    background: #e3f0f8;
    color: var(--blue-dark);
}

.language-switcher {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    margin-left: auto;
    padding: 0.15rem;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--paper-2);
}

.language-switcher a {
    min-width: 32px;
    min-height: 30px;
    display: inline-grid;
    place-items: center;
    border-radius: 3px;
    color: var(--blue-dark);
    font-size: 0.76rem;
}

.language-switcher a:hover {
    background: #e3f0f8;
}

.site-header {
    background: transparent;
    border-bottom: 0;
    box-shadow: none;
}

.site-header.is-scrolled {
    box-shadow: 0 6px 18px rgba(4, 38, 68, 0.12);
}

.header-main {
    background: #073763;
}

.site-nav {
    width: min(1360px, calc(100% - 2rem));
    min-height: 118px;
    padding: 0.7rem 0;
    grid-template-columns: 240px minmax(360px, 700px) auto auto;
    grid-template-areas: "brand search actions toggle";
    justify-content: center;
    gap: clamp(1rem, 3vw, 3rem);
}

.brand {
    width: 168px;
    justify-self: start;
}

.brand img {
    filter: brightness(1.34) saturate(1.2) drop-shadow(0 2px 7px rgba(255, 255, 255, 0.08));
}

.site-search {
    grid-template-columns: minmax(0, 1fr) 160px 56px;
    min-height: 48px;
    align-self: center;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 24px;
    background: white;
}

.site-search input,
.site-search select {
    border: 0;
    background: white;
}

.site-search input {
    padding: 0 1.1rem;
}

.site-search select {
    border-left: 1px solid #dce6ef;
    border-right: 0;
    color: #111827;
    font-weight: 800;
}

.site-search button {
    padding: 0;
    display: grid;
    place-items: center;
    border-radius: 0 24px 24px 0;
    background: #0a4f8b;
}

.site-search button svg,
.header-actions svg,
.store-link svg,
.phone-link svg,
.service-item svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.header-actions {
    grid-area: actions;
    display: flex;
    align-items: center;
    gap: 0.95rem;
    color: white;
}

.header-actions a {
    position: relative;
    min-width: 34px;
    min-height: 34px;
    display: inline-grid;
    place-items: center;
    color: white;
}

.header-actions span {
    position: absolute;
    top: 1px;
    right: -2px;
    min-width: 16px;
    height: 16px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #eaf3fb;
    color: #073763;
    font-size: 0.62rem;
    font-weight: 900;
}

.header-menu-row {
    background: white;
    border-bottom: 1px solid #edf2f7;
}

.header-menu-inner {
    position: relative;
    width: min(1360px, calc(100% - 2rem));
    min-height: 64px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr) 210px;
    align-items: center;
    gap: 1rem;
}

.header-menu-inner .nav-panel {
    grid-area: auto;
}

.store-link,
.phone-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: #0a2540;
    font-weight: 900;
}

.store-link {
    justify-self: start;
    font-size: 0.82rem;
    text-decoration: underline;
}

.store-link svg,
.phone-link svg {
    color: #073763;
}

.phone-link {
    justify-self: end;
    font-size: 0.94rem;
}

.nav-panel {
    justify-self: center;
    justify-content: center;
    gap: clamp(0.7rem, 1.7vw, 1.8rem);
    color: #0d1721;
    font-size: 0.95rem;
    font-weight: 900;
}

.nav-panel > a,
.nav-group summary {
    padding: 1.2rem 0;
}

.nav-panel > a:hover,
.nav-group summary:hover {
    color: #0a4f8b;
    border-bottom-color: #0a4f8b;
}

.nav-submenu {
    top: calc(100% + 0.1rem);
    background: white;
}

.language-switcher {
    margin-left: 0;
    background: #f6fbff;
}

.home-hero {
    position: relative;
    min-height: 575px;
    overflow: hidden;
    background: #fff6d9;
}

.home-hero::before {
    content: "";
    position: absolute;
    left: -7vw;
    top: -18%;
    width: 56vw;
    height: 58vw;
    border-radius: 50%;
    background: rgba(239, 219, 164, 0.58);
}

.home-hero::after {
    content: "";
    position: absolute;
    left: 35%;
    top: -30%;
    width: 42vw;
    height: 42vw;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.38);
}

.hero-slide {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.95fr);
    align-items: stretch;
    opacity: 0;
    pointer-events: none;
    transform: translateX(54px);
    transition: opacity 680ms ease, transform 760ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-slide.is-active {
    z-index: 2;
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.hero-art,
.hero-copy {
    position: relative;
    z-index: 1;
}

.hero-art {
    min-height: 575px;
}

.hero-book {
    position: absolute;
    left: clamp(8rem, 19vw, 23rem);
    top: clamp(3.6rem, 8vw, 5rem);
    width: clamp(220px, 24vw, 340px);
    aspect-ratio: 0.68;
    display: grid;
    place-items: center;
    border-radius: 4px 12px 12px 4px;
    background: linear-gradient(135deg, #5f7f9c, #24384d);
    box-shadow:
        26px 28px 38px rgba(30, 45, 54, 0.24),
        8px 8px 0 #d4d5d5;
    transform: perspective(900px) rotateY(-18deg) rotateZ(-12deg);
    transform-origin: center;
    transition: transform 220ms ease, box-shadow 220ms ease;
}

.hero-book.cover-landscape {
    width: clamp(320px, 31vw, 470px);
    aspect-ratio: 1.43;
    padding: 7px;
    border-radius: 10px;
    background: white;
    box-shadow:
        24px 28px 40px rgba(30, 45, 54, 0.24),
        0 0 0 1px rgba(47, 38, 29, 0.08);
    overflow: hidden;
    transform: rotateZ(-10deg);
}

.hero-book::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 18px;
    border-radius: 4px 0 0 4px;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.18), rgba(255, 255, 255, 0.2));
}

.hero-book::after {
    content: "";
    position: absolute;
    left: 18px;
    right: -16px;
    bottom: -16px;
    height: 22px;
    border-radius: 0 0 10px 4px;
    background: linear-gradient(180deg, #f9f9f5, #cfd3d5);
    transform: skewX(-42deg);
    transform-origin: left top;
}

.hero-book.cover-landscape::before,
.hero-book.cover-landscape::after {
    display: none;
}

.hero-book:hover {
    transform: perspective(900px) rotateY(-13deg) rotateZ(-9deg) translateY(-5px);
    box-shadow:
        28px 34px 42px rgba(30, 45, 54, 0.28),
        8px 8px 0 #d4d5d5;
}

.hero-book.cover-landscape:hover {
    transform: rotateZ(-7deg) translateY(-5px);
    box-shadow:
        26px 34px 44px rgba(30, 45, 54, 0.28),
        0 0 0 1px rgba(47, 38, 29, 0.08);
}

.hero-book img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}

.hero-book.cover-landscape img {
    border-radius: 6px;
    object-fit: cover;
    background: transparent;
}

.hero-book span {
    position: relative;
    z-index: 1;
    color: white;
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 6rem;
    font-weight: 800;
}

.hero-copy {
    display: grid;
    align-content: center;
    justify-items: center;
    padding: 4rem min(8vw, 7rem) 5rem 1rem;
    text-align: center;
}

.hero-copy .eyebrow {
    margin-bottom: 1.2rem;
    color: #e85d4f;
}

.hero-copy h1 {
    position: relative;
    margin: 0;
    color: #030303;
    font-family: Inter, system-ui, sans-serif;
    font-size: clamp(3.1rem, 5vw, 5rem);
    font-weight: 900;
    line-height: 1.06;
}

.hero-copy h1::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 0.62em;
    width: min(285px, 72%);
    height: 8px;
    border-radius: 999px;
    background: #f2695f;
    transform: translateX(-50%) rotate(-3deg);
    z-index: -1;
}

.hero-copy h1 span {
    display: block;
}

.hero-slide.is-active .hero-book {
    animation: heroBookIn 760ms cubic-bezier(0.2, 0.8, 0.2, 1) both, heroBookFloat 4.6s ease-in-out 900ms infinite alternate;
}

.hero-slide.is-active .hero-book.cover-landscape {
    animation: heroBookFloat 4.6s ease-in-out 900ms infinite alternate;
}

.hero-slide.is-active .hero-copy .eyebrow,
.hero-slide.is-active .hero-copy h1,
.hero-slide.is-active .hero-copy p:not(.eyebrow) {
    animation: heroCopyIn 620ms ease both;
}

.hero-slide.is-active .hero-copy h1 {
    animation-delay: 110ms;
}

.hero-slide.is-active .hero-copy p:not(.eyebrow) {
    animation-delay: 210ms;
}

.hero-slide.is-active .hero-ornament-bauble {
    animation: heroDrop 740ms cubic-bezier(0.2, 0.8, 0.2, 1) both, heroSway 4s ease-in-out 900ms infinite alternate;
}

.hero-slide.is-active .hero-ornament-gift {
    animation: heroGiftPop 620ms ease both, heroFloat 4.4s ease-in-out 800ms infinite alternate;
}

.hero-slide.is-active .hero-leaf-bottom {
    animation: heroLeafPop 620ms ease both, heroFloat 4.4s ease-in-out 800ms infinite alternate;
}

.hero-slide.is-active .hero-leaf-top {
    animation: heroLeafTopPop 620ms ease both;
}

.hero-copy p:not(.eyebrow) {
    margin: 1.2rem 0 0;
    color: #4b4136;
    font-weight: 800;
}

.hero-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 2.5rem;
    display: flex;
    justify-content: center;
    gap: 0.48rem;
}

.hero-dots button,
.hero-dots span {
    width: 11px;
    height: 11px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #b9b6ac;
    cursor: pointer;
}

.hero-dots .is-active {
    outline: 2px solid #f2695f;
    outline-offset: 2px;
    background: white;
}

@keyframes heroBookIn {
    from {
        opacity: 0;
        transform: perspective(900px) rotateY(-26deg) rotateZ(-17deg) translate(-34px, 28px) scale(0.94);
    }
    to {
        opacity: 1;
        transform: perspective(900px) rotateY(-18deg) rotateZ(-12deg) translate(0, 0) scale(1);
    }
}

@keyframes heroBookFloat {
    from {
        margin-top: 0;
    }
    to {
        margin-top: -10px;
    }
}

@keyframes heroCopyIn {
    from {
        opacity: 0;
        transform: translateY(22px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroDrop {
    from {
        opacity: 0;
        transform: translateY(-46px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroSway {
    from {
        transform: rotate(-2deg);
    }
    to {
        transform: rotate(4deg);
    }
}

@keyframes heroGiftPop {
    from {
        opacity: 0;
        transform: scale(0.82) rotate(-18deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(-38deg);
    }
}

@keyframes heroLeafPop {
    from {
        opacity: 0;
        transform: scale(0.82) rotate(-8deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(10deg);
    }
}

@keyframes heroLeafTopPop {
    from {
        opacity: 0;
        transform: scale(0.82) rotate(-8deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0);
    }
}

@keyframes heroFloat {
    from {
        margin-top: 0;
    }
    to {
        margin-top: -12px;
    }
}

.hero-ornament,
.hero-leaf {
    position: absolute;
    z-index: 2;
    display: block;
    pointer-events: none;
}

.hero-ornament-bauble {
    left: clamp(3rem, 6vw, 7rem);
    top: 6.6rem;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background:
        linear-gradient(0deg, transparent 20%, #fff 21%, #fff 25%, transparent 26%, transparent 46%, #fff 47%, #fff 51%, transparent 52%),
        repeating-linear-gradient(135deg, #f9b21d 0 10px, #1fb6aa 10px 19px, #f05f4f 19px 29px);
    box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.55);
}

.hero-ornament-bauble::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 100%;
    width: 2px;
    height: 120px;
    background: #e3a515;
}

.hero-ornament-gift {
    left: clamp(8rem, 12vw, 15rem);
    bottom: 2.1rem;
    width: 110px;
    height: 110px;
    border-radius: 8px;
    background:
        linear-gradient(90deg, transparent 42%, #7e35d8 43%, #7e35d8 57%, transparent 58%),
        linear-gradient(0deg, transparent 42%, #7e35d8 43%, #7e35d8 57%, transparent 58%),
        repeating-linear-gradient(135deg, #f59c1c 0 16px, #ffcf3e 16px 28px);
    transform: rotate(-38deg);
}

.hero-ornament-gift::before,
.hero-ornament-gift::after {
    content: "";
    position: absolute;
    top: 25px;
    width: 42px;
    height: 35px;
    border: 8px solid #7e35d8;
    border-radius: 50% 50% 0 50%;
    background: transparent;
}

.hero-ornament-gift::before {
    left: 12px;
    transform: rotate(24deg);
}

.hero-ornament-gift::after {
    right: 12px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-24deg);
}

.hero-leaf-top {
    left: clamp(3.6rem, 8vw, 9rem);
    top: 0.9rem;
    width: 120px;
    height: 120px;
}

.hero-leaf-bottom {
    left: clamp(30rem, 38vw, 42rem);
    bottom: -0.9rem;
    width: 105px;
    height: 130px;
    transform: rotate(10deg);
}

.hero-leaf::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    width: 8px;
    height: 100%;
    border-radius: 999px;
    background: #8bcf66;
    transform: rotate(24deg);
}

.hero-leaf::after {
    content: "";
    position: absolute;
    inset: 8px 0;
    background:
        radial-gradient(ellipse at 35% 16%, #a9dc78 0 12px, transparent 13px),
        radial-gradient(ellipse at 62% 28%, #a9dc78 0 15px, transparent 16px),
        radial-gradient(ellipse at 30% 44%, #a9dc78 0 17px, transparent 18px),
        radial-gradient(ellipse at 65% 60%, #a9dc78 0 18px, transparent 19px);
}

.hero-leaf-bottom::before,
.hero-leaf-bottom::after {
    filter: saturate(1.2);
}

.service-strip {
    width: min(1360px, calc(100% - 2rem));
    min-height: 104px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: center;
    gap: clamp(1rem, 3vw, 2.8rem);
    background: white;
}

.service-item {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    grid-template-areas:
        "icon title"
        "icon text";
    align-items: center;
    gap: 0 1rem;
    color: #0d1721;
}

.service-item span {
    grid-area: icon;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #074b85;
    color: white;
}

.service-item strong {
    grid-area: title;
    align-self: end;
    font-weight: 900;
}

.service-item small {
    grid-area: text;
    align-self: start;
    color: #9aa1a9;
    font-size: 0.86rem;
}

.service-item:hover strong {
    color: #0a4f8b;
}

.library-welcome {
    width: min(1220px, calc(100% - 2rem));
    margin: 1rem auto;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 1rem;
}

.welcome-copy,
.welcome-actions,
.library-around,
.shelf-section,
.subject-section,
.static-page-inner,
.person-card {
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--paper-2);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
}

.welcome-copy {
    padding: clamp(1.2rem, 3vw, 2rem);
    background:
        linear-gradient(135deg, rgba(43, 111, 159, 0.09), rgba(184, 121, 37, 0.1)),
        var(--paper-2);
}

.eyebrow {
    margin: 0 0 0.45rem;
    color: var(--red);
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.welcome-copy h1,
.shelf-heading h2,
.library-around h2,
.static-page h1 {
    margin: 0;
    font-family: "Source Serif 4", Georgia, serif;
    line-height: 1.05;
}

.welcome-copy h1 {
    max-width: 780px;
    font-size: clamp(2.5rem, 5vw, 4.7rem);
}

.welcome-copy p:not(.eyebrow) {
    max-width: 720px;
    margin: 1rem 0 1.2rem;
    color: var(--muted);
    font-family: "Source Serif 4", Georgia, serif;
    font-size: clamp(1.08rem, 2vw, 1.32rem);
}

.welcome-search {
    width: min(720px, 100%);
}

.welcome-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    padding: 1rem;
    background: #f1e6d6;
}

.welcome-actions a {
    min-height: 136px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: white;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.welcome-actions a:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.welcome-actions strong {
    color: var(--blue-dark);
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 1.25rem;
    line-height: 1.12;
}

.welcome-actions span {
    color: var(--muted);
    font-size: 0.92rem;
}

.shelf-section,
.subject-section,
.library-around {
    width: min(1220px, calc(100% - 2rem));
    margin: 1rem auto;
    padding: 1rem;
}

.shelf-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.shelf-heading h2 {
    color: var(--ink);
    font-size: clamp(1.65rem, 3vw, 2.35rem);
}

.shelf-controls {
    display: flex;
    gap: 0.35rem;
}

.shelf-controls button {
    width: 36px;
    height: 36px;
    border: 1px solid var(--line-strong);
    border-radius: 4px;
    background: white;
    color: var(--blue-dark);
    font-size: 1.25rem;
    font-weight: 900;
    cursor: pointer;
}

.book-shelf {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 188px;
    align-items: stretch;
    gap: 1.1rem;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: inline mandatory;
    padding: 0.25rem 0.2rem 0.8rem;
    scrollbar-color: var(--line-strong) transparent;
}

.book-shelf .book-card {
    scroll-snap-align: start;
}

.book-shelf .book-card.cover-landscape {
    grid-column: span 2;
}

.empty-shelf {
    min-height: 180px;
    display: grid;
    align-content: center;
    justify-items: start;
    gap: 0.55rem;
    padding: 1.2rem;
    border: 1px dashed var(--line-strong);
    border-radius: 5px;
    background: white;
}

.empty-shelf h3 {
    margin: 0;
    color: var(--blue-dark);
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 1.5rem;
}

.empty-shelf p {
    max-width: 620px;
    margin: 0;
    color: var(--muted);
}

.book-grid,
.content-list-grid {
    width: min(1220px, calc(100% - 2rem));
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(188px, 1fr));
    gap: 1rem;
}

.book-card {
    --book-card-cover-row-height: 225px;
    min-width: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-rows: var(--book-card-cover-row-height) minmax(0, 1fr);
}

.book-grid .book-card.cover-landscape,
.content-list-grid .book-card.cover-landscape {
    grid-column: span 2;
}

.book-card-cover {
    width: 138px;
    aspect-ratio: 0.66;
    margin: 0 auto;
    align-self: start;
    display: grid;
    place-items: center;
    border-radius: 4px 7px 7px 4px;
    background: linear-gradient(135deg, #426f55, #243d55);
    box-shadow: var(--cover-shadow);
    overflow: hidden;
}

.book-card-cover.cover-landscape {
    width: min(320px, 100%);
    aspect-ratio: 1.42;
    border-radius: 7px;
}

.book-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-card-cover.cover-landscape img,
.book-detail-cover.cover-landscape img,
.reader-cover-mini.cover-landscape img {
    object-fit: contain;
    background: white;
}

.cover-fallback {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    padding: 0.8rem;
    color: white;
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 3.3rem;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.18), transparent 16px),
        linear-gradient(135deg, var(--blue), var(--teal));
}

.book-card-body {
    min-height: 250px;
    padding: 0.9rem 0.2rem 0;
    display: grid;
    grid-template-rows: minmax(2.3em, auto) minmax(3.3em, auto) minmax(2.6em, auto) auto;
    align-content: start;
    text-align: center;
}

.book-card-meta {
    min-height: 2.3em;
    margin: 0 0 0.35rem;
    display: flex;
    align-items: end;
    justify-content: center;
    color: var(--soft);
    font-size: 0.7rem;
    font-weight: 900;
    line-height: 1.28;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.book-card h3 {
    min-height: 3.15em;
    margin: 0;
    display: flex;
    align-items: start;
    justify-content: center;
    color: var(--blue-dark);
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 1.04rem;
    line-height: 1.05;
    overflow-wrap: anywhere;
}

.book-card h3 a:hover {
    text-decoration: underline;
}

.book-card-author {
    min-height: 2.4em;
    margin: 0.35rem 0 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 0.82rem;
    overflow-wrap: anywhere;
}

.book-card-actions {
    display: grid;
    gap: 0.4rem;
    align-self: end;
    margin-top: auto;
}

.book-card-actions a {
    width: 100%;
}

.read-button,
.details-link {
    min-height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 4px;
    padding: 0.4rem 0.65rem;
    font-size: 0.84rem;
}

.details-link {
    border: 1px solid var(--line);
    background: white;
    color: var(--blue-dark);
    font-weight: 800;
}

.details-link:hover {
    border-color: var(--blue);
}

.subject-groups {
    display: grid;
    gap: 1rem;
}

.subject-group {
    display: grid;
    gap: 0.65rem;
}

.subject-group h3 {
    margin: 0;
    color: var(--ink);
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 1.45rem;
}

.subject-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 0.75rem;
}

.subject-card {
    min-height: 86px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0.85rem;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: white;
}

.subject-card:hover {
    border-color: var(--blue);
    box-shadow: var(--shadow);
}

.subject-card span {
    color: var(--blue-dark);
    font-weight: 900;
}

.subject-card small {
    color: var(--soft);
}

.small-action {
    min-height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 4px;
    padding: 0.45rem 0.75rem;
}

.library-around {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.6fr);
    gap: 1rem;
    align-items: center;
    background: #e8f0ed;
}

.library-around p:not(.eyebrow) {
    max-width: 760px;
    color: var(--muted);
}

.library-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
}

.library-stats article {
    min-height: 96px;
    display: grid;
    place-items: center;
    padding: 0.8rem;
    border: 1px solid #c3d5d0;
    border-radius: 5px;
    background: white;
    text-align: center;
}

.library-stats strong {
    color: var(--green);
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 2.1rem;
}

.library-stats span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.static-page {
    width: min(1220px, calc(100% - 2rem));
    margin: 1rem auto;
}

.static-page-inner {
    padding: clamp(1.4rem, 4vw, 2.4rem);
}

.static-page h1 {
    font-size: clamp(2.5rem, 5vw, 4.6rem);
}

.static-page p:not(.eyebrow) {
    max-width: 820px;
    color: var(--muted);
    font-family: "Source Serif 4", Georgia, serif;
    font-size: clamp(1.08rem, 2vw, 1.3rem);
}

.static-section {
    max-width: 920px;
    margin-top: 1.6rem;
}

.static-section h2 {
    margin: 0 0 0.65rem;
    color: var(--blue-dark);
    font-family: "Source Serif 4", Georgia, serif;
    font-size: clamp(1.55rem, 3vw, 2.25rem);
    line-height: 1.12;
}

.static-list {
    display: grid;
    gap: 0.75rem;
    margin: 0.9rem 0 0;
    padding: 0;
    list-style: none;
}

.static-list li {
    padding-left: 0.85rem;
    border-left: 3px solid var(--gold);
    color: var(--muted);
    font-family: "Source Serif 4", Georgia, serif;
    font-size: clamp(1.04rem, 1.8vw, 1.22rem);
}

.static-list strong {
    color: var(--ink);
}

.static-closing {
    margin-top: 1.7rem;
}

.static-signature {
    margin: 1rem 0 0;
    color: var(--blue-dark);
    font-weight: 900;
}

.content-section {
    width: min(1220px, calc(100% - 2rem));
    margin: 1rem auto;
}

.person-card {
    min-height: 160px;
    padding: 1rem;
}

.person-card h2 {
    margin: 0 0 0.55rem;
    color: var(--blue-dark);
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 1.42rem;
    line-height: 1.12;
}

.person-card p {
    margin: 0;
    color: var(--gold);
    font-weight: 900;
}

.person-card span {
    display: block;
    margin-top: 0.7rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.book-detail-hero {
    width: min(1220px, calc(100% - 2rem));
    margin: 1rem auto;
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
    gap: clamp(1.2rem, 4vw, 2.4rem);
    align-items: center;
    padding: clamp(1.2rem, 4vw, 2.2rem);
    border: 1px solid var(--line);
    border-radius: 6px;
    background:
        linear-gradient(135deg, rgba(43, 111, 159, 0.1), rgba(184, 121, 37, 0.1)),
        var(--paper-2);
}

.book-detail-cover {
    width: min(280px, 100%);
    aspect-ratio: 0.68;
    display: grid;
    place-items: center;
    justify-self: center;
    border-radius: 5px 10px 10px 5px;
    background: linear-gradient(135deg, var(--blue), var(--teal));
    box-shadow: var(--cover-shadow);
    overflow: hidden;
}

.book-detail-cover.cover-landscape {
    width: min(420px, 100%);
    aspect-ratio: 1.42;
    border-radius: 8px;
}

.book-detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-detail-cover span {
    color: white;
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 5rem;
    font-weight: 800;
}

.book-detail-copy h1 {
    max-width: 860px;
    margin: 0;
    font-family: "Source Serif 4", Georgia, serif;
    font-size: clamp(2.35rem, 5vw, 4.8rem);
    line-height: 1.02;
}

.book-subtitle {
    max-width: 760px;
    margin: 0.85rem 0 0;
    color: var(--muted);
    font-family: "Source Serif 4", Georgia, serif;
    font-size: clamp(1.1rem, 2vw, 1.35rem);
}

.book-meta-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem 1rem;
    margin: 1.2rem 0 0;
}

.book-meta-list div,
.book-side-panel dl div {
    min-width: 0;
}

.book-meta-list dt,
.book-side-panel dt {
    color: var(--soft);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.book-meta-list dd,
.book-side-panel dd {
    margin: 0.18rem 0 0;
    color: var(--ink);
    font-weight: 800;
}

.book-meta-list a {
    color: var(--blue-dark);
}

.book-meta-list a:hover {
    text-decoration: underline;
}

.book-stat-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.1rem;
}

.book-stat-row span {
    padding: 0.35rem 0.55rem;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: white;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 900;
}

.book-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1.25rem;
}

.book-detail-layout {
    width: min(1220px, calc(100% - 2rem));
    margin: 1rem auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 1rem;
    align-items: start;
}

.book-content-panel,
.book-side-panel {
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--paper-2);
}

.book-content-panel {
    padding: clamp(1.1rem, 3vw, 1.6rem);
}

.book-content-panel + .book-content-panel {
    margin-top: 1rem;
}

.book-content-panel h2,
.book-side-panel h2 {
    margin: 0 0 0.75rem;
    color: var(--blue-dark);
    font-family: "Source Serif 4", Georgia, serif;
    line-height: 1.12;
}

.book-content-panel h2 {
    font-size: clamp(1.45rem, 3vw, 2.05rem);
}

.book-content-panel p,
.book-side-panel p {
    margin: 0;
    color: var(--muted);
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 1.08rem;
}

.book-side-panel {
    display: grid;
    gap: 0;
}

.book-side-panel section {
    padding: 1rem;
}

.book-side-panel section + section {
    border-top: 1px solid var(--line);
}

.book-side-panel dl {
    display: grid;
    gap: 0.7rem;
    margin: 0;
}

.buy-link-list {
    display: grid;
    gap: 0.5rem;
}

.buy-link-list a {
    min-height: 38px;
    display: grid;
    place-items: center;
    border-radius: 4px;
    background: var(--blue);
    color: white;
    font-weight: 900;
}

.buy-link-list a:hover {
    background: var(--blue-dark);
}

.reader-stage {
    width: min(1220px, calc(100% - 2rem));
    margin: 1rem auto;
    display: grid;
    gap: 1rem;
}

.reader-topbar,
.reader-notes article {
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--paper-2);
}

.reader-topbar {
    min-height: 86px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem;
}

.reader-title {
    min-width: 0;
    text-align: center;
}

.reader-title h1 {
    margin: 0;
    color: var(--blue-dark);
    font-family: "Source Serif 4", Georgia, serif;
    font-size: clamp(1.55rem, 3vw, 2.45rem);
    line-height: 1.05;
}

.reader-title p:not(.eyebrow) {
    margin: 0.3rem 0 0;
    color: var(--muted);
    font-weight: 800;
}

.reader-top-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: end;
    gap: 0.5rem;
}

.reader-book-shell {
    padding: clamp(0.8rem, 3vw, 1.5rem);
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(47, 38, 29, 0.08), transparent 18%, transparent 82%, rgba(47, 38, 29, 0.08)),
        #d9c8ad;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.reader-spread {
    position: relative;
    max-width: 1100px;
    min-height: min(74vh, 720px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(250px, 0.9fr) minmax(320px, 1.1fr);
    border-radius: 10px;
    background: #fff8ea;
    box-shadow:
        0 22px 42px rgba(47, 38, 29, 0.3),
        inset 0 0 0 1px rgba(184, 164, 142, 0.55);
    overflow: hidden;
}

.reader-spread::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 50%;
    z-index: 2;
    width: 20px;
    transform: translateX(-50%);
    background:
        linear-gradient(90deg, rgba(47, 38, 29, 0.24), rgba(255, 255, 255, 0.62), rgba(47, 38, 29, 0.18));
    box-shadow: 0 0 28px rgba(47, 38, 29, 0.16);
    pointer-events: none;
}

.reader-page {
    position: relative;
    min-height: min(74vh, 720px);
    padding: clamp(1.1rem, 3vw, 2rem);
    background:
        linear-gradient(90deg, rgba(184, 164, 142, 0.18), transparent 10%, transparent 90%, rgba(184, 164, 142, 0.12)),
        var(--paper-2);
    overflow: hidden;
}

.reader-page-cover {
    display: grid;
    align-content: center;
    justify-items: center;
    text-align: center;
}

.reader-page-cover::after,
.reader-page-content::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 86px;
    height: 86px;
    background: linear-gradient(135deg, transparent 50%, rgba(184, 164, 142, 0.3) 51%, rgba(255, 255, 255, 0.7));
}

.reader-page-content {
    padding: 1rem 1rem 2rem;
}

.reader-cover-mini {
    width: min(210px, 64%);
    aspect-ratio: 0.68;
    margin-bottom: 1.2rem;
    display: grid;
    place-items: center;
    border-radius: 5px 10px 10px 5px;
    background: linear-gradient(135deg, var(--blue), var(--teal));
    box-shadow: var(--cover-shadow);
    overflow: hidden;
}

.reader-cover-mini.cover-landscape {
    width: min(260px, 78%);
    aspect-ratio: 1.42;
    border-radius: 8px;
}

.reader-cover-mini img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.reader-cover-mini span {
    color: white;
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 4rem;
    font-weight: 800;
}

.reader-kicker {
    margin: 0 0 0.5rem;
    color: var(--gold);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.reader-page h2 {
    margin: 0;
    color: var(--blue-dark);
    font-family: "Source Serif 4", Georgia, serif;
    font-size: clamp(1.65rem, 3vw, 2.45rem);
    line-height: 1.08;
}

.reader-page p {
    color: var(--muted);
}

.reader-page-number {
    position: absolute;
    right: 1rem;
    bottom: 0.75rem;
    color: var(--soft);
    font-size: 0.75rem;
    font-weight: 900;
}

.reader-frame {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    min-height: calc(min(74vh, 720px) - 3rem);
    border: 0;
    border-radius: 6px;
    background: white;
    box-shadow: inset 0 0 0 1px var(--line);
}

.reader-file-fallback,
.reader-text-pages {
    min-height: calc(min(74vh, 720px) - 3rem);
    display: grid;
    align-content: center;
    justify-items: start;
    gap: 0.75rem;
    padding: clamp(0.8rem, 3vw, 1.5rem);
}

.reader-text-pages p {
    margin: 0;
    color: var(--muted);
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 1.12rem;
}

.reader-notes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.reader-notes article {
    padding: 1rem;
}

.reader-notes h2 {
    margin: 0 0 0.6rem;
    color: var(--blue-dark);
    font-family: "Source Serif 4", Georgia, serif;
}

.reader-notes p {
    margin: 0;
    color: var(--muted);
}

.site-footer {
    margin-top: clamp(1.5rem, 4vw, 3rem);
    color: #eaf5ff;
    background:
        linear-gradient(135deg, rgba(7, 55, 99, 0.98), rgba(5, 38, 70, 0.98)),
        #073763;
    overflow: hidden;
}

.footer-cta {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: 1px solid rgba(255, 255, 255, 0.13);
    background:
        linear-gradient(90deg, rgba(10, 79, 139, 0.96), rgba(20, 118, 145, 0.92)),
        #0a4f8b;
}

.footer-cta-inner,
.footer-main,
.footer-bottom-inner {
    width: min(1360px, calc(100% - 2rem));
    margin: 0 auto;
}

.footer-cta-inner {
    min-height: 126px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
}

.footer-kicker {
    margin: 0 0 0.45rem;
    color: #b8ddf8;
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.footer-cta h2 {
    margin: 0;
    max-width: 720px;
    color: white;
    font-family: "Source Serif 4", Georgia, serif;
    font-size: clamp(2rem, 3.8vw, 3.35rem);
    line-height: 1.04;
}

.footer-cta-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.7rem;
}

.footer-cta a {
    min-width: 154px;
    min-height: 50px;
    padding: 0.75rem 1.15rem;
    display: inline-grid;
    place-items: center;
    border: 1px solid white;
    border-radius: 6px;
    background: white;
    color: #073763;
    font-size: 0.98rem;
    font-weight: 900;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, color 180ms ease;
}

.footer-cta a:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(2, 19, 36, 0.22);
}

.footer-cta .footer-cta-secondary {
    background: transparent;
    color: white;
}

.footer-main {
    position: relative;
    padding: clamp(3rem, 6vw, 5.5rem) 0 clamp(2.4rem, 5vw, 4rem);
    display: grid;
    grid-template-columns: minmax(260px, 1.08fr) minmax(150px, 0.62fr) minmax(180px, 0.72fr) minmax(300px, 1fr);
    gap: clamp(1.5rem, 4vw, 4rem);
}

.footer-main h2 {
    position: relative;
    margin: 0 0 1.2rem;
    padding-bottom: 0.55rem;
    color: white;
    font-size: 1.05rem;
    font-weight: 900;
    line-height: 1.1;
}

.footer-main h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 42px;
    height: 3px;
    border-radius: 999px;
    background: #f1a72b;
}

.footer-brand-block p {
    max-width: 335px;
    margin: 1.1rem 0 0;
    color: #c6d9e7;
    font-size: 1rem;
    line-height: 1.75;
}

.footer-brand {
    width: 172px;
    display: inline-block;
    padding: 0.45rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
}

.footer-brand img {
    filter: brightness(1.35) saturate(1.14) drop-shadow(0 8px 18px rgba(1, 18, 32, 0.24));
}

.footer-links {
    display: grid;
    align-content: start;
    justify-items: start;
    gap: 0.7rem;
}

.footer-links a {
    position: relative;
    padding-left: 0.95rem;
    color: #d6e8f4;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.35;
    transition: color 180ms ease;
}

.footer-links a::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 6px;
    height: 6px;
    border-top: 2px solid #f1a72b;
    border-right: 2px solid #f1a72b;
    transform: rotate(45deg);
}

.footer-links a:hover,
.footer-contact a:hover,
.footer-bottom a:hover {
    color: #f1a72b;
}

.footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1.35rem;
}

.footer-social a {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: white;
    font-size: 0.78rem;
    font-weight: 900;
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.footer-social a:hover {
    border-color: #f1a72b;
    background: #f1a72b;
    color: #062f55;
    transform: translateY(-2px);
}

.footer-contact ul {
    display: grid;
    gap: 1.1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-contact li {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 0.85rem;
    align-items: start;
    color: #d6e8f4;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.55;
}

.footer-contact-icon {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(241, 167, 43, 0.35);
    border-radius: 8px;
    background: rgba(241, 167, 43, 0.1);
    color: #f1a72b;
}

.footer-contact-icon svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.11);
    background: rgba(3, 28, 51, 0.6);
}

.footer-bottom-inner {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: #b8d0df;
    font-size: 0.9rem;
}

.footer-bottom p {
    margin: 0;
}

.footer-bottom-inner > div {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.85rem 1.25rem;
}

.footer-bottom a {
    color: #d6e8f4;
    font-weight: 800;
}

@media (max-width: 1120px) {
    .footer-main {
        grid-template-columns: minmax(260px, 1fr) repeat(2, minmax(180px, 0.7fr));
    }

    .footer-contact {
        grid-column: 1 / -1;
    }
}

@media (max-width: 980px) {
    .site-nav {
        min-height: 86px;
        grid-template-columns: 150px 1fr auto;
        grid-template-areas:
            "brand search toggle"
            "menu menu menu";
    }

    .nav-toggle {
        display: block;
    }

    .nav-panel {
        position: absolute;
        left: 1rem;
        right: 1rem;
        top: 88px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
        border: 1px solid var(--line-strong);
        border-radius: 5px;
        background: var(--paper-2);
        box-shadow: var(--shadow);
        font-size: 0.94rem;
    }

    .nav-panel.is-open {
        display: flex;
    }

    .nav-group {
        width: 100%;
    }

    .nav-group summary {
        padding: 0.35rem 0;
    }

    .nav-submenu {
        position: static;
        margin: 0.25rem 0 0.5rem;
        box-shadow: none;
    }

    .language-switcher {
        align-self: flex-start;
        margin-left: 0;
    }

    .library-welcome,
    .library-around,
    .book-detail-hero,
    .book-detail-layout,
    .reader-topbar,
    .reader-spread,
    .reader-notes,
    .footer-main {
        grid-template-columns: 1fr;
    }

    .book-side-panel {
        order: -1;
    }

    .reader-topbar {
        justify-items: start;
    }

    .reader-title {
        text-align: left;
    }

    .reader-top-actions {
        justify-content: start;
    }

    .reader-spread::before {
        display: none;
    }

    .reader-page,
    .reader-spread {
        min-height: auto;
    }

    .reader-frame,
    .reader-file-fallback,
    .reader-text-pages {
        min-height: 68vh;
    }

    .footer-cta-inner {
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        padding: 1.4rem 0;
    }

    .footer-cta-actions {
        justify-content: flex-start;
    }

    .footer-bottom-inner {
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        padding: 1rem 0;
    }

    .footer-bottom-inner > div {
        justify-content: flex-start;
    }
}

@media (max-width: 700px) {
    .site-nav {
        width: min(100% - 1rem, 1220px);
        grid-template-columns: 136px 1fr;
        grid-template-areas:
            "brand toggle"
            "search search"
            "menu menu";
        gap: 0.55rem;
    }

    .brand {
        width: 136px;
    }

    .nav-toggle {
        justify-self: end;
    }

    .nav-panel {
        top: 118px;
    }

    .site-search,
    .welcome-search {
        grid-template-columns: 1fr auto;
    }

    .site-search select,
    .welcome-search select {
        display: none;
    }

    .welcome-actions,
    .library-stats,
    .book-meta-list {
        grid-template-columns: 1fr;
    }

    .shelf-heading {
        align-items: start;
        flex-direction: column;
    }

    .book-shelf {
        grid-auto-columns: 164px;
    }

    .book-card-cover {
        width: 126px;
    }

    .book-card {
        --book-card-cover-row-height: 191px;
    }

    .book-card-cover.cover-landscape {
        width: min(260px, 100%);
    }

    .book-grid .book-card.cover-landscape,
    .content-list-grid .book-card.cover-landscape {
        grid-column: span 1;
    }

    .book-card-body {
        min-height: 240px;
    }

    .reader-book-shell {
        padding: 0.55rem;
    }

    .reader-page {
        padding: 1rem;
    }

    .reader-frame,
    .reader-file-fallback,
    .reader-text-pages {
        min-height: 62vh;
    }

    .footer-main {
        padding: 2.4rem 0;
        gap: 2rem;
    }

    .footer-brand-block p,
    .footer-contact li {
        font-size: 1rem;
    }

    .footer-cta-actions,
    .footer-cta a {
        width: 100%;
    }
}

@media (max-width: 1100px) {
    .site-nav {
        grid-template-columns: 180px minmax(280px, 1fr) auto auto;
        gap: 1rem;
    }

    .brand {
        width: 150px;
    }

    .header-actions {
        gap: 0.55rem;
    }

    .header-menu-inner {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .nav-panel {
        gap: 0.8rem;
        font-size: 0.88rem;
    }

    .phone-link span {
        display: none;
    }
}

@media (max-width: 980px) {
    .site-nav {
        width: min(100% - 1rem, 1220px);
        min-height: 96px;
        grid-template-columns: 150px minmax(0, 1fr) auto;
        grid-template-areas: "brand search toggle";
        justify-content: stretch;
    }

    .header-actions {
        display: none;
    }

    .nav-toggle {
        display: block;
        justify-self: end;
        border-color: rgba(255, 255, 255, 0.42);
        background: rgba(255, 255, 255, 0.08);
        color: white;
    }

    .header-menu-inner {
        width: min(100% - 1rem, 1220px);
        min-height: 52px;
        grid-template-columns: 1fr auto;
    }

    .store-link {
        font-size: 0.8rem;
    }

    .phone-link {
        display: none;
    }

    .nav-panel {
        position: absolute;
        left: 0;
        right: 0;
        top: calc(100% + 0.5rem);
        z-index: 45;
        display: none;
        flex-direction: column;
        align-items: stretch;
        justify-content: start;
        padding: 0.8rem 1rem;
        border: 1px solid var(--line-strong);
        border-radius: 6px;
        background: white;
        box-shadow: var(--shadow);
        font-size: 0.94rem;
    }

    .nav-panel.is-open {
        display: flex;
    }

    .nav-panel > a,
    .nav-group summary {
        padding: 0.42rem 0;
    }

    .nav-submenu {
        position: static;
        max-height: 280px;
        margin: 0.2rem 0 0.55rem;
        box-shadow: none;
    }

    .language-switcher {
        align-self: flex-start;
    }

    .home-hero {
        min-height: 800px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
    }

    .home-hero::before {
        width: 86vw;
        height: 86vw;
    }

    .home-hero::after {
        left: 38%;
        width: 62vw;
        height: 62vw;
    }

    .hero-art {
        min-height: 480px;
    }

    .hero-book {
        left: 50%;
        top: 4.2rem;
        width: clamp(220px, 42vw, 330px);
        transform: translateX(-50%) perspective(900px) rotateY(-16deg) rotateZ(-10deg);
    }

    .hero-book:hover {
        transform: translateX(-50%) perspective(900px) rotateY(-12deg) rotateZ(-8deg) translateY(-4px);
    }

    .hero-book.cover-landscape {
        transform: translateX(-50%) rotateZ(-8deg);
    }

    .hero-book.cover-landscape:hover {
        transform: translateX(-50%) rotateZ(-6deg) translateY(-4px);
    }

    .hero-copy {
        min-height: 320px;
        padding: 0 1rem 5rem;
    }

    .hero-dots {
        bottom: 2rem;
    }

    .hero-ornament-bauble {
        left: 6vw;
        top: 5rem;
    }

    .hero-ornament-gift {
        left: 10vw;
        bottom: 2rem;
    }

    .hero-leaf-top {
        left: 14vw;
    }

    .hero-leaf-bottom {
        left: auto;
        right: 16vw;
    }

    .service-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 1rem 0;
    }
}

@media (max-width: 700px) {
    .site-nav {
        width: 100%;
        padding: 0.75rem 0.5rem 0.8rem;
        grid-template-columns: minmax(0, 1fr) 44px;
        grid-template-areas:
            "brand toggle"
            "search search";
        column-gap: 0.5rem;
    }

    .nav-toggle {
        grid-area: toggle;
        width: 44px;
        height: 44px;
        display: grid !important;
        align-content: center;
    }

    .site-search {
        width: 100%;
        max-width: 100%;
        grid-template-columns: 1fr 48px;
        min-height: 46px;
    }

    .site-search select {
        display: none;
    }

    .header-menu-inner {
        display: block;
        min-height: 46px;
        padding: 0.75rem 0;
    }

    .store-link {
        display: inline-flex;
    }

    .nav-panel {
        top: calc(100% + 0.1rem);
    }

    .home-hero::after {
        display: none;
    }

    .home-hero {
        min-height: 760px;
    }

    .hero-art {
        min-height: 430px;
    }

    .hero-book {
        top: 3.4rem;
        width: min(215px, 52vw);
    }

    .hero-book.cover-landscape {
        width: min(300px, 72vw);
    }

    .hero-copy {
        min-height: 255px;
        padding-bottom: 4.5rem;
    }

    .hero-copy h1 {
        font-size: clamp(2.1rem, 10.5vw, 2.75rem);
    }

    .hero-copy h1::after {
        height: 6px;
    }

    .hero-ornament-bauble {
        width: 58px;
        height: 58px;
        top: 3.6rem;
    }

    .hero-ornament-bauble::before {
        height: 76px;
    }

    .hero-ornament-gift {
        width: 72px;
        height: 72px;
        left: 4vw;
        bottom: 1.2rem;
    }

    .hero-ornament-gift::before,
    .hero-ornament-gift::after {
        display: none;
    }

    .hero-leaf-top {
        display: none;
    }

    .hero-leaf-bottom {
        right: 4vw;
        width: 78px;
        height: 96px;
    }

    .service-strip {
        width: min(100% - 1rem, 1220px);
        grid-template-columns: 1fr;
        gap: 0.9rem;
        padding: 1rem 0;
    }

    .service-item {
        grid-template-columns: 50px minmax(0, 1fr);
    }

    .service-item span {
        width: 50px;
        height: 50px;
    }
}
