/* FIVE-LIBRARY — RESPONSIVE PUBLIC PAGE */

:root {
    --navy: #102a43;
    --navy-light: #183b5b;
    --gold: #d9a441;
    --gold-light: #fff5dc;
    --text: #20364b;
    --muted: #728195;
    --line: #e5ebf1;
    --white: #ffffff;
    --bg: #f5f7fa;
    --green: #248454;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 3px solid rgba(217, 164, 65, .45);
    outline-offset: 3px;
}

/* HEADER */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

.header-inner {
    width: min(1180px, calc(100% - 40px));
    min-height: 76px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    flex-shrink: 0;
}

.brand-icon {
    width: 43px;
    height: 43px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: var(--navy);
    color: var(--gold);
    font-size: 25px;
    font-weight: 900;
}

.brand-text strong,
.brand-text small {
    display: block;
}

.brand-text strong {
    color: var(--navy);
    font-size: 15px;
    letter-spacing: .6px;
}

.brand-text small {
    color: var(--muted);
    font-size: 11px;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 29px;
}

.header-nav a {
    color: #526579;
    font-size: 13px;
    font-weight: 700;
    transition: color .2s;
}

.header-nav a:hover {
    color: var(--gold);
}

.header-cta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 11px 17px;
    border-radius: 10px;
    background: var(--navy);
    color: white;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    transition: background .2s, transform .2s;
}

.header-cta:hover,
.primary-link:hover {
    background: var(--navy-light);
    transform: translateY(-2px);
}

.header-cta span {
    color: var(--gold);
    font-size: 17px;
}

/* MAIN CONTAINER */

.library-section {
    width: min(1180px, calc(100% - 40px));
    margin: auto;
    padding-top: 34px;
}

/* HERO */

.hero-library {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr);
    align-items: center;
    gap: 25px;
    min-height: 370px;
    padding: 48px 58px;
    overflow: hidden;
    border: 1px solid #e3eaf1;
    border-radius: 27px;
    background:
        radial-gradient(circle at 83% 18%, rgba(217,164,65,.20), transparent 31%),
        linear-gradient(120deg, #ffffff 0%, #edf4f9 100%);
    box-shadow: 0 15px 45px rgba(16,42,67,.06);
}

.hero-text {
    position: relative;
    z-index: 3;
    min-width: 0;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    color: #a47720;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.7px;
}

.eyebrow-dot,
.count-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold);
    flex-shrink: 0;
}

.hero-text h1 {
    margin-bottom: 17px;
    color: var(--navy);
    font-size: clamp(35px, 4.2vw, 56px);
    font-weight: 850;
    line-height: 1.12;
    letter-spacing: -1.8px;
}

.hero-text h1 span,
.section-heading h2 span,
.collection-heading h2 span {
    color: #c18a22;
}

.hero-text > p {
    max-width: 490px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.9;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 17px;
    margin-top: 25px;
}

.primary-link {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    padding: 13px 18px;
    border-radius: 10px;
    background: var(--navy);
    color: white;
    font-size: 12px;
    font-weight: 700;
    transition: .2s;
}

.primary-link span {
    color: var(--gold);
    font-size: 18px;
}

.hero-note {
    color: #758397;
    font-size: 11px;
}

/* CSS BOOK ILLUSTRATION — NO IMAGE NEEDED */

.hero-visual {
    position: relative;
    min-width: 0;
    height: 270px;
    display: grid;
    place-items: center;
    isolation: isolate;
}

.visual-orbit {
    position: absolute;
    left: 50%;
    top: 47%;
    border: 1px solid rgba(24,59,91,.12);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.orbit-one {
    width: 240px;
    height: 240px;
}

.orbit-two {
    width: 190px;
    height: 190px;
    border-style: dashed;
}

.hero-book {
    position: absolute;
    width: 100px;
    height: 145px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px 13px 13px 7px;
    font-size: 40px;
    box-shadow: 8px 15px 28px rgba(16,42,67,.20);
}

.hero-book-back {
    z-index: 1;
    margin: 15px 0 0 100px;
    background: #c28c35;
    transform: rotate(14deg);
}

.hero-book-side {
    z-index: 2;
    margin: 20px 95px 0 0;
    background: #537d9c;
    transform: rotate(-13deg);
}

.hero-book-front {
    z-index: 3;
    flex-direction: column;
    gap: 8px;
    width: 115px;
    height: 163px;
    margin-top: 15px;
    background: linear-gradient(145deg, #183b5b, #102a43);
    border-left: 7px solid rgba(255,255,255,.15);
    color: white;
    transform: rotate(-2deg);
}

.book-front-mark {
    color: var(--gold);
    font-size: 27px;
    font-weight: 900;
}

.book-front-line {
    width: 54px;
    height: 2px;
    background: var(--gold);
}

.book-front-caption {
    font-size: 8px;
    letter-spacing: 1px;
}

.book-front-emoji {
    font-size: 24px;
}

.visual-spark {
    position: absolute;
    z-index: 4;
    color: var(--gold);
    font-size: 25px;
}

.spark-one {
    top: 25px;
    right: 24px;
}

.spark-two {
    bottom: 29px;
    left: 32px;
    font-size: 18px;
}

.visual-caption {
    position: absolute;
    z-index: 5;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 13px;
    border: 1px solid #e6ebef;
    border-radius: 12px;
    background: white;
    box-shadow: 0 8px 22px rgba(16,42,67,.09);
}

.caption-icon {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: var(--gold-light);
    color: #b9811c;
}

.visual-caption strong,
.visual-caption small {
    display: block;
}

.visual-caption strong {
    color: var(--navy);
    font-size: 11px;
}

.visual-caption small {
    color: var(--muted);
    font-size: 9px;
}

/* QUICK INFO */

.quick-info {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 22px 0 55px;
    padding: 22px 15px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: white;
    box-shadow: 0 8px 25px rgba(16,42,67,.035);
}

.info-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-width: 0;
    padding: 0 12px;
}

.info-icon {
    display: grid;
    place-items: center;
    width: 43px;
    height: 43px;
    flex-shrink: 0;
    border-radius: 12px;
    background: var(--gold-light);
    font-size: 19px;
}

.info-item strong,
.info-item small {
    display: block;
}

.info-item strong {
    color: var(--navy);
    font-size: 17px;
    line-height: 1.3;
}

.info-item small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
}

/* SECTION HEADINGS */

.category-section,
.collection-section {
    scroll-margin-top: 100px;
}

.category-section {
    margin-bottom: 48px;
}

.section-heading,
.collection-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.section-label {
    display: block;
    margin-bottom: 7px;
    color: #b48123;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.6px;
}

.section-heading h2,
.collection-heading h2 {
    color: var(--navy);
    font-size: clamp(25px, 3vw, 32px);
    line-height: 1.25;
    letter-spacing: -.6px;
}

.section-heading p,
.collection-heading p {
    margin-top: 7px;
    color: var(--muted);
    font-size: 13px;
}

/* CATEGORY FILTERS */

.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 17px;
    background: white;
}

.category-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 9px 15px;
    border: 1px solid #e0e7ee;
    border-radius: 11px;
    background: #fff;
    color: #506176;
    font-size: 12px;
    font-weight: 700;
    transition: color .2s, background .2s, border-color .2s, transform .2s;
}

.category-chip:hover {
    border-color: var(--gold);
    color: var(--navy);
    transform: translateY(-1px);
}

.category-chip.active {
    border-color: var(--navy);
    background: var(--navy);
    color: white;
    box-shadow: 0 5px 14px rgba(16,42,67,.13);
}

.category-chip span {
    font-size: 15px;
}

/* COLLECTION HEADER */

.collection-heading {
    align-items: flex-end;
    margin-bottom: 21px;
}

.collection-count {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding: 8px 12px;
    border: 1px solid #dfe8e1;
    border-radius: 30px;
    background: #f0f8f2;
    color: #34744e;
    font-size: 10px;
    font-weight: 700;
}

/* SEARCH */

.search-box {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 58px;
    padding: 6px;
    border: 1px solid #dce5ed;
    border-radius: 14px;
    background: white;
    box-shadow: 0 6px 20px rgba(16,42,67,.035);
    transition: border-color .2s, box-shadow .2s;
}

.search-box:focus-within {
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(217,164,65,.11);
}

.search-icon {
    padding: 0 10px 0 13px;
    color: #8b99a8;
    font-size: 26px;
    line-height: 1;
}

.search-box input {
    width: 100%;
    min-width: 0;
    height: 43px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--navy);
    font-size: 13px;
}

.search-box input::placeholder {
    color: #9aa6b4;
}

.search-box button {
    min-height: 42px;
    flex-shrink: 0;
    padding: 0 20px;
    border: 0;
    border-radius: 9px;
    background: var(--navy);
    color: white;
    font-size: 12px;
    font-weight: 700;
    transition: background .2s;
}

.search-box button:hover {
    background: var(--navy-light);
}

.active-filter {
    min-height: 22px;
    margin: 15px 0;
    color: var(--muted);
    font-size: 11px;
}

/* BOOK GRID */

.book-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 17px;
}

.book-card {
    display: flex;
    align-items: stretch;
    gap: 18px;
    min-width: 0;
    min-height: 208px;
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: 17px;
    background: white;
    box-shadow: 0 7px 22px rgba(16,42,67,.035);
    transition: transform .22s, border-color .22s, box-shadow .22s;
}

.book-card:hover {
    transform: translateY(-3px);
    border-color: #d5dfe8;
    box-shadow: 0 13px 28px rgba(16,42,67,.075);
}

.book-card[hidden] {
    display: none !important;
}

/* BOOK COVER */

.book-cover {
    position: relative;
    display: flex;
    flex: 0 0 112px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 11px;
    width: 112px;
    min-height: 165px;
    align-self: flex-start;
    overflow: hidden;
    border-radius: 7px 12px 12px 7px;
    color: white;
    box-shadow: 5px 8px 15px rgba(16,42,67,.15);
}

.book-cover::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 7px;
    height: 100%;
    background: rgba(255,255,255,.2);
    content: "";
}

.book-cover::after {
    position: absolute;
    right: -28px;
    bottom: -35px;
    width: 100px;
    height: 100px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 50%;
    content: "";
}

.cover-1 {
    background: linear-gradient(145deg, #214d70, #102a43);
}

.cover-2 {
    background: linear-gradient(145deg, #e0b653, #b77b20);
}

.cover-3 {
    background: linear-gradient(145deg, #5489a5, #28516d);
}

.cover-4 {
    background: linear-gradient(145deg, #8d7257, #574330);
}

.cover-5 {
    background: linear-gradient(145deg, #577c65, #244d3c);
}

.cover-6 {
    background: linear-gradient(145deg, #876d9e, #4b3b64);
}

.cover-top-label,
.cover-bottom-label,
.cover-bottom-line,
.cover-emoji {
    position: relative;
    z-index: 1;
}

.cover-top-label {
    font-size: 7px;
    font-weight: 800;
    letter-spacing: 1px;
}

.cover-emoji {
    font-size: 38px;
    line-height: 1.2;
}

.cover-bottom-line {
    width: 42px;
    height: 2px;
    background: rgba(255,255,255,.65);
}

.cover-bottom-label {
    font-size: 7px;
    letter-spacing: 1px;
}

/* BOOK INFORMATION */

.book-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
}

.book-category {
    display: inline-block;
    max-width: 100%;
    margin-bottom: 7px;
    overflow: hidden;
    color: #b17d22;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .9px;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.book-info h3 {
    display: -webkit-box;
    width: 100%;
    margin-bottom: 6px;
    overflow: hidden;
    color: var(--navy);
    font-size: 16px;
    font-weight: 800;
    line-height: 1.4;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.book-author {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 5px;
    color: #6d7c8d;
    font-size: 11px;
    overflow-wrap: anywhere;
}

.book-year {
    margin-bottom: 8px;
    color: #8a97a5;
    font-size: 10px;
}

.book-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    margin-top: auto;
    padding-top: 12px;
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 700;
}

.status-dot {
    width: 7px;
    height: 7px;
    flex-shrink: 0;
    border-radius: 50%;
}

.status.available {
    color: var(--green);
}

.status.available .status-dot {
    background: #36a66c;
}

.status.unavailable {
    color: #a66d28;
}

.status.unavailable .status-dot {
    background: #d5a04a;
}

.borrow-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    max-width: 100%;
    padding: 9px 12px;
    border: 0;
    border-radius: 9px;
    background: var(--navy);
    color: white;
    font-size: 10px;
    font-weight: 700;
    transition: background .2s, transform .2s;
}

.borrow-btn span {
    color: var(--gold);
    font-size: 15px;
}

.borrow-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    background: var(--navy-light);
}

.borrow-btn:disabled {
    background: #e5e9ed;
    color: #818b96;
    cursor: not-allowed;
}

/* EMPTY STATES */

.empty-books,
.no-result {
    grid-column: 1 / -1;
    padding: 45px 20px;
    border: 1px dashed #d8e1e9;
    border-radius: 17px;
    background: white;
    text-align: center;
}

.empty-icon,
.no-result-icon {
    margin-bottom: 10px;
    font-size: 37px;
}

.empty-books h3,
.no-result h3 {
    margin-bottom: 6px;
    color: var(--navy);
    font-size: 19px;
}

.empty-books p,
.no-result p {
    color: var(--muted);
    font-size: 12px;
}

.no-result {
    display: none;
    margin-top: 10px;
}

#resetFilter {
    margin-top: 17px;
    padding: 10px 15px;
    border: 0;
    border-radius: 9px;
    background: var(--navy);
    color: white;
    font-size: 12px;
    font-weight: 700;
}

/* BOTTOM CALL TO ACTION */

.bottom-callout {
    display: flex;
    align-items: center;
    gap: 17px;
    margin-top: 48px;
    padding: 25px 28px;
    border-radius: 19px;
    background: var(--navy);
    color: white;
}

.callout-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 14px;
    background: rgba(255,255,255,.1);
    font-size: 24px;
}

.bottom-callout > div:nth-child(2) {
    flex: 1;
    min-width: 0;
}

.bottom-callout h2 {
    font-size: 17px;
    line-height: 1.4;
}

.bottom-callout p {
    margin-top: 4px;
    color: #d0dce7;
    font-size: 11px;
}

.bottom-callout > a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    padding: 11px 15px;
    border-radius: 9px;
    background: var(--gold);
    color: var(--navy);
    font-size: 11px;
    font-weight: 800;
}

.bottom-callout > a span {
    font-size: 17px;
}

/* FOOTER */

.site-footer {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 27px 0 30px;
    color: var(--muted);
}

.footer-brand {
    color: var(--navy);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .7px;
}

.site-footer p,
.site-footer > span {
    font-size: 10px;
}

.site-footer p {
    text-align: center;
}

/* BORROW MODAL */

.modal {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(8,28,45,.68);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
}

.modal-content {
    position: relative;
    width: min(460px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    border: 1px solid #edf0f3;
    border-radius: 22px;
    background: white;
    box-shadow: 0 25px 70px rgba(0,0,0,.25);
    animation: modalIn .22s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.close-btn {
    position: absolute;
    top: 13px;
    right: 13px;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #f0f3f6;
    color: var(--navy);
    font-size: 23px;
}

.modal-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin-bottom: 13px;
    border-radius: 14px;
    background: var(--gold-light);
    font-size: 25px;
}

.modal-label {
    color: #b17d22;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.4px;
}

.modal-content h2 {
    margin: 5px 0 7px;
    color: var(--navy);
    font-size: 27px;
}

.modal-book {
    margin-bottom: 20px;
    color: var(--muted);
    font-size: 12px;
    overflow-wrap: anywhere;
}

.modal-book strong {
    color: var(--navy);
}

#borrowForm {
    display: flex;
    flex-direction: column;
}

#borrowForm label {
    margin-bottom: 6px;
    color: #31475c;
    font-size: 12px;
    font-weight: 700;
}

#borrowForm input {
    width: 100%;
    min-height: 44px;
    margin-bottom: 14px;
    padding: 0 12px;
    border: 1px solid #dbe3eb;
    border-radius: 9px;
    outline: none;
    background: white;
    color: var(--navy);
    font-size: 13px;
}

#borrowForm input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(217,164,65,.12);
}

.submit-btn {
    width: 100%;
    min-height: 45px;
    margin-top: 3px;
    padding: 12px 15px;
    border: 0;
    border-radius: 10px;
    background: var(--navy);
    color: white;
    font-size: 12px;
    font-weight: 800;
}

.submit-btn:hover {
    background: var(--navy-light);
}

.submit-btn:disabled {
    opacity: .6;
    cursor: wait;
}

.borrow-error {
    display: none;
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 9px;
    background: #fff0f0;
    color: #b43b3b;
    font-size: 12px;
}

/* SUCCESS TOAST */

.toast {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 6000;
    width: max-content;
    max-width: calc(100% - 36px);
    padding: 13px 17px;
    border-radius: 11px;
    background: var(--navy);
    color: white;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 12px 30px rgba(0,0,0,.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: .25s ease;
}

.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* HELP BUTTON */

.help-button {
    position: fixed !important;
    top: 92px !important;
    right: 22px !important;
    z-index: 1200 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    height: 44px !important;
    padding: 0 !important;
    border: 2px solid white !important;
    border-radius: 50% !important;
    background: var(--gold) !important;
    color: var(--navy) !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 20px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    box-shadow: 0 5px 18px rgba(16,42,67,.2);
    cursor: pointer !important;
    transition: transform .2s, background .2s;
}

.help-button:hover {
    transform: scale(1.06);
    background: #f0c45f !important;
}

/* BORROW GUIDE */

.borrow-guide {
    position: fixed !important;
    inset: 0 !important;
    z-index: 7000 !important;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.borrow-guide.active {
    display: flex !important;
}

.borrow-guide-overlay {
    position: absolute;
    inset: 0;
    background: rgba(7,24,40,.7);
    backdrop-filter: blur(7px);
}

.borrow-guide-box {
    position: relative;
    z-index: 1;
    width: min(580px, 100%);
    max-height: 88vh;
    overflow-y: auto;
    padding: 27px;
    border: 1px solid white;
    border-radius: 22px;
    background: white;
    box-shadow: 0 30px 70px rgba(0,0,0,.3);
    animation: modalIn .25s ease;
}

.borrow-guide-close {
    position: absolute;
    top: 16px;
    right: 16px;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: white;
    color: var(--navy);
    font-size: 22px;
}

.guide-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-bottom: 13px;
    border-radius: 13px;
    background: var(--gold-light);
    color: #b17d22;
    font-size: 22px;
    font-weight: 900;
}

.guide-label {
    display: block;
    margin-bottom: 5px;
    color: #b17d22;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1.7px;
}

.borrow-guide-box h2 {
    margin-bottom: 7px;
    color: var(--navy);
    font-size: 29px;
    line-height: 1.2;
}

.guide-intro {
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 12px;
}

.guide-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-bottom: 19px;
}

.guide-item {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #f8fafc;
}

.guide-number {
    display: grid;
    place-items: center;
    width: 39px;
    height: 39px;
    flex: 0 0 39px;
    border-radius: 11px;
    background: var(--navy);
    color: white;
    font-size: 11px;
    font-weight: 900;
}

.guide-item h3 {
    margin-bottom: 3px;
    color: var(--navy);
    font-size: 13px;
}

.guide-item p {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}

.guide-done {
    width: 100%;
    min-height: 43px;
    border: 0;
    border-radius: 10px;
    background: var(--navy);
    color: white;
    font-size: 12px;
    font-weight: 800;
}

.guide-done:hover {
    background: var(--navy-light);
}

.borrow-guide-box::-webkit-scrollbar {
    width: 5px;
}

.borrow-guide-box::-webkit-scrollbar-thumb {
    border-radius: 20px;
    background: #cbd5df;
}

/* TABLET */

@media (max-width: 900px) {
    .header-inner {
        width: calc(100% - 32px);
        gap: 15px;
    }

    .header-nav {
        gap: 16px;
    }

    .hero-library {
        grid-template-columns: minmax(0, 1fr) minmax(220px, .75fr);
        gap: 10px;
        padding: 38px 30px;
    }

    .hero-visual {
        transform: scale(.9);
    }

    .quick-info {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px 8px;
        padding: 22px 12px;
    }

    .info-item {
        justify-content: flex-start;
        padding-left: 12px;
    }

    .book-list {
        grid-template-columns: 1fr;
    }
}

/* PHONE */

@media (max-width: 600px) {
    html {
        scroll-padding-top: 75px;
    }

    .header-inner {
        width: calc(100% - 24px);
        min-height: 68px;
        flex-wrap: wrap;
        gap: 9px;
        padding: 10px 0;
    }

    .brand-icon {
        width: 38px;
        height: 38px;
        font-size: 22px;
    }

    .brand-text strong {
        font-size: 13px;
    }

    .brand-text small {
        font-size: 10px;
    }

    .header-nav {
        order: 3;
        width: 100%;
        justify-content: space-between;
        gap: 8px;
        padding: 5px 0 1px;
    }

    .header-nav a {
        font-size: 11px;
    }

    .header-cta {
        padding: 9px 11px;
        gap: 7px;
        font-size: 10px;
    }

    .library-section {
        width: calc(100% - 24px);
        padding-top: 17px;
    }

    .hero-library {
        grid-template-columns: 1fr;
        gap: 5px;
        padding: 29px 23px 20px;
        border-radius: 20px;
    }

    .eyebrow {
        margin-bottom: 14px;
        font-size: 9px;
        letter-spacing: 1.1px;
    }

    .hero-text h1 {
        font-size: clamp(32px, 9vw, 43px);
        letter-spacing: -1.2px;
    }

    .hero-text > p {
        font-size: 12px;
        line-height: 1.8;
    }

    .hero-actions {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
        margin-top: 19px;
    }

    .primary-link {
        padding: 11px 14px;
        font-size: 11px;
    }

    .hero-note {
        font-size: 10px;
    }

    .hero-visual {
        width: 100%;
        height: 215px;
        margin-top: 4px;
        transform: none;
    }

    .orbit-one {
        width: 190px;
        height: 190px;
    }

    .orbit-two {
        width: 150px;
        height: 150px;
    }

    .hero-book {
        width: 75px;
        height: 112px;
        font-size: 31px;
    }

    .hero-book-back {
        margin-left: 75px;
    }

    .hero-book-side {
        margin-right: 75px;
    }

    .hero-book-front {
        width: 88px;
        height: 128px;
    }

    .book-front-mark {
        font-size: 23px;
    }

    .book-front-caption {
        font-size: 7px;
    }

    .book-front-emoji {
        font-size: 20px;
    }

    .visual-caption {
        right: 0;
        bottom: 0;
        padding: 8px 10px;
    }

    .quick-info {
        gap: 18px 5px;
        margin: 15px 0 38px;
        padding: 18px 8px;
        border-radius: 15px;
    }

    .info-item {
        gap: 9px;
        padding-left: 5px;
    }

    .info-icon {
        width: 34px;
        height: 34px;
        border-radius: 10px;
        font-size: 16px;
    }

    .info-item strong {
        font-size: 14px;
    }

    .info-item small {
        font-size: 9px;
        line-height: 1.35;
    }

    .category-section {
        margin-bottom: 35px;
    }

    .section-heading,
    .collection-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 11px;
    }

    .section-heading h2,
    .collection-heading h2 {
        font-size: 26px;
    }

    .section-heading p,
    .collection-heading p {
        font-size: 11px;
    }

    .section-label {
        font-size: 9px;
        letter-spacing: 1.2px;
    }

    .category-list {
        gap: 8px;
        padding: 12px;
        border-radius: 14px;
    }

    .category-chip {
        min-height: 38px;
        gap: 6px;
        padding: 8px 10px;
        border-radius: 9px;
        font-size: 10px;
    }

    .category-chip span {
        font-size: 13px;
    }

    .collection-heading {
        margin-bottom: 17px;
    }

    .collection-count {
        font-size: 9px;
    }

    .search-box {
        min-height: 51px;
        padding: 4px;
        border-radius: 11px;
    }

    .search-icon {
        padding: 0 6px 0 8px;
        font-size: 22px;
    }

    .search-box input {
        height: 40px;
        font-size: 11px;
    }

    .search-box button {
        min-height: 39px;
        padding: 0 11px;
        font-size: 10px;
    }

    .active-filter {
        margin: 12px 0;
        font-size: 10px;
    }

    .book-list {
        gap: 12px;
    }

    .book-card {
        gap: 13px;
        min-height: 0;
        padding: 12px;
        border-radius: 14px;
    }

    .book-cover {
        flex-basis: 83px;
        width: 83px;
        min-height: 125px;
        gap: 8px;
    }

    .cover-top-label,
    .cover-bottom-label {
        font-size: 6px;
    }

    .cover-emoji {
        font-size: 30px;
    }

    .book-info h3 {
        font-size: 13px;
    }

    .book-category {
        margin-bottom: 5px;
        font-size: 8px;
    }

    .book-author {
        font-size: 10px;
    }

    .book-year {
        font-size: 9px;
    }

    .book-bottom {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
        padding-top: 8px;
    }

    .status {
        font-size: 9px;
    }

    .borrow-btn {
        padding: 9px 10px;
        font-size: 9px;
    }

    .bottom-callout {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 12px;
        margin-top: 33px;
        padding: 18px;
        border-radius: 15px;
    }

    .callout-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .bottom-callout > div:nth-child(2) {
        flex: 1 1 calc(100% - 55px);
    }

    .bottom-callout h2 {
        font-size: 14px;
    }

    .bottom-callout p {
        font-size: 10px;
    }

    .bottom-callout > a {
        margin-left: 52px;
        padding: 9px 12px;
        font-size: 10px;
    }

    .site-footer {
        grid-template-columns: 1fr auto;
        gap: 7px;
        padding: 22px 0;
    }

    .site-footer p {
        grid-column: 1 / -1;
        grid-row: 2;
        text-align: left;
    }

    .site-footer > span {
        text-align: right;
    }

    .help-button {
        top: auto !important;
        right: 14px !important;
        bottom: 16px !important;
        width: 42px !important;
        height: 42px !important;
        border: 2px solid white !important;
    }

    .modal {
        padding: 12px;
    }

    .modal-content {
        padding: 25px 20px;
        border-radius: 18px;
    }

    .borrow-guide {
        padding: 12px;
    }

    .borrow-guide-box {
        max-height: 90vh;
        padding: 22px 16px;
        border-radius: 18px;
    }

    .borrow-guide-box h2 {
        font-size: 25px;
    }

    .guide-item {
        align-items: flex-start;
        gap: 10px;
        padding: 10px;
    }

    .guide-number {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
        border-radius: 9px;
    }

    .guide-item h3 {
        font-size: 12px;
    }

    .guide-item p {
        font-size: 10px;
    }
}

/* VERY SMALL PHONES */

@media (max-width: 360px) {
    .brand-text strong {
        font-size: 11px;
    }

    .header-cta {
        padding: 8px;
        font-size: 9px;
    }

    .header-nav a {
        font-size: 10px;
    }

    .hero-library {
        padding-right: 17px;
        padding-left: 17px;
    }

    .hero-text h1 {
        font-size: 31px;
    }

    .info-item {
        gap: 6px;
    }

    .info-icon {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    .book-card {
        gap: 9px;
        padding: 9px;
    }

    .book-cover {
        flex-basis: 70px;
        width: 70px;
        min-height: 110px;
    }

    .book-info h3 {
        font-size: 12px;
    }

    .borrow-btn {
        font-size: 8px;
        padding: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}