.books-hero {
    min-height: 52vh;
    display: grid;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.books-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 22%, rgba(212, 168, 83, 0.14), transparent 34%),
        radial-gradient(circle at 78% 18%, rgba(14, 48, 92, 0.26), transparent 28%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.02), transparent 55%);
    pointer-events: none;
}

.books-hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.books-kicker {
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--text-gold);
    font-size: 0.78rem;
    margin-bottom: 1rem;
}

.books-lead {
    max-width: 42rem;
    font-size: 1.22rem;
    color: var(--text-secondary);
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.book-shelf-card {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    box-shadow: var(--shadow-card);
}

.book-cover-wrap {
    position: relative;
    align-self: start;
}

.book-cover-wrap::before {
    content: '';
    position: absolute;
    inset: 10px -14px -14px 14px;
    background: linear-gradient(145deg, rgba(212, 168, 83, 0.18), rgba(10, 14, 23, 0.08));
    filter: blur(22px);
    z-index: 0;
}

.book-cover {
    position: relative;
    z-index: 1;
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(212, 168, 83, 0.28);
    display: block;
    box-shadow: 0 24px 42px rgba(0, 0, 0, 0.45);
}

.book-meta {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
    margin: 1rem 0 1.25rem;
}

.book-chip {
    padding: 0.3rem 0.7rem;
    border: 1px solid rgba(212, 168, 83, 0.22);
    border-radius: 999px;
    font-size: 0.8rem;
    color: var(--text-gold);
    background: rgba(212, 168, 83, 0.08);
}

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

.book-note {
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 0.98rem;
}

.book-detail-grid {
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    gap: 3rem;
    align-items: start;
}

.book-detail-panel {
    padding: 1.75rem;
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)),
        linear-gradient(135deg, rgba(212, 168, 83, 0.05), transparent 58%);
    box-shadow: var(--shadow-card);
}

.book-summary {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 48rem;
}

.book-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.book-stat {
    padding: 1rem 1rem 0.9rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(212, 168, 83, 0.14);
}

.book-stat-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.45rem;
}

.book-stat-value {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--text-primary);
}

.support-panel {
    margin-top: 2rem;
    padding: 1.6rem;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(212, 168, 83, 0.08), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(212, 168, 83, 0.22);
}

.support-panel p {
    color: var(--text-secondary);
}

.books-inline-link {
    color: var(--text-gold);
    text-decoration: none;
    border-bottom: 1px solid rgba(212, 168, 83, 0.3);
}

.download-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100001;
    background: rgba(5, 7, 11, 0.72);
    backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

.download-modal.active {
    display: flex;
}

.download-modal-card {
    width: min(720px, 100%);
    background: #f7f0e2;
    color: #1d1b17;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.download-modal-header {
    display: flex;
    justify-content: flex-end;
    padding: 0.9rem 1rem 0;
}

.download-close {
    font-size: 2rem;
    line-height: 1;
    color: #3b3427;
    background: transparent;
    border: none;
}

.download-modal-body {
    padding: 0 2rem 2rem;
    text-align: center;
}

.download-modal-cover {
    width: 190px;
    max-width: 60%;
    margin: 0 auto 1.4rem;
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
    display: block;
}

.download-modal-title {
    font-family: var(--font-heading);
    font-size: 2.3rem;
    margin-bottom: 0.55rem;
    color: #1f1a14;
}

.download-modal-text {
    font-size: 1.18rem;
    color: #50463b;
    max-width: 34rem;
    margin: 0 auto 1.5rem;
}

.download-modal-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 1.25rem;
}

.download-modal-note {
    margin-top: 1rem;
    color: #736759;
    font-size: 0.98rem;
}

@media (max-width: 920px) {
    .books-hero-grid,
    .book-detail-grid,
    .book-shelf-card {
        grid-template-columns: 1fr;
    }

    .book-cover-wrap {
        max-width: 320px;
    }
}
