/* ============================================
   RESET & BASE STYLES
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --navbar-scroll-offset: 86px;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--navbar-scroll-offset);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background-color: #ffffff;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    color: #1a252f;
}

h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #1a252f;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a252f;
}

p {
    margin-bottom: 1rem;
    font-size: 1rem;
}

a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #2980b9;
}

/* ============================================
   UTILITIES
   ============================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.eyebrow {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #3498db;
    margin-bottom: 0.5rem;
}

.hero-tagline {
    font-size: 1.25rem;
    font-weight: 600;
    color: #34495e;
    margin: 0.5rem 0 1rem 0;
    font-style: italic;
}

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

.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #ffffff;
    border-bottom: 1px solid #ecf0f1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.navbar-brand {
    flex-shrink: 0;
}

.logo {
    height: 50px;
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    font-size: 0.95rem;
    font-weight: 500;
    color: #2c3e50;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: #3498db;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    gap: 6px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: #2c3e50;
    border-radius: 2px;
    transition: all 0.3s ease;
}

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

.hero {
    padding: 100px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    padding-right: 2rem;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 500;
    color: #34495e;
    margin-bottom: 1.5rem;
}

.hero-body {
    font-size: 1.1rem;
    color: #555555;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.hero-ctas {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-block;
    padding: 12px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    text-align: center;
}

.btn-primary {
    background-color: #3498db;
    color: #ffffff;
    border-color: #3498db;
}

.btn-primary:hover {
    background-color: #2980b9;
    border-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.btn-secondary {
    background-color: transparent;
    color: #2c3e50;
    border-color: #2c3e50;
}

.btn-secondary:hover {
    background-color: #2c3e50;
    color: #ffffff;
    transform: translateY(-2px);
}

.btn:disabled {
    background-color: #bdc3c7;
    border-color: #bdc3c7;
    color: #7f8c8d;
    cursor: not-allowed;
    transform: none;
}

.btn:disabled:hover {
    background-color: #bdc3c7;
    transform: none;
}

/* ============================================
   SECTIONS
   ============================================ */

.section {
    padding: 80px 0;
    border-bottom: 1px solid #ecf0f1;
}

section[id] {
    scroll-margin-top: var(--navbar-scroll-offset);
}

.section:nth-child(even) {
    background-color: #f8f9fa;
}

.section h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.section-body {
    font-size: 1.05rem;
    color: #555555;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.section-content {
    max-width: 800px;
    margin: 0 auto;
}

.section-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.section-text {
    padding-right: 2rem;
}

.section-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.bullets {
    list-style: none;
    padding-left: 0;
}

.bullets li {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
    position: relative;
    color: #555555;
    font-size: 1.05rem;
    line-height: 1.7;
}

.bullets li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: #3498db;
    font-weight: bold;
}

/* ============================================
   CONTACT SECTION
   ============================================ */

.contact {
    text-align: center;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.contact-link {
    padding: 10px 24px;
    border: 2px solid #3498db;
    color: #3498db;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.contact-link:hover {
    background-color: #3498db;
    color: #ffffff;
    transform: translateY(-2px);
}

.email-link {
    display: inline-block;
    font-size: 1.1rem;
    font-weight: 500;
    color: #2c3e50;
    border: none;
    padding: 0;
}

.email-link:hover {
    color: #3498db;
    transform: none;
    background-color: transparent;
}

.book-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
    justify-items: center;
}

.book-link-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.link-meta {
    font-size: 0.85rem;
    color: #7f8c8d;
    text-align: center;
}

.disclaimer-text {
    font-size: 0.9rem;
    color: #7f8c8d;
    line-height: 1.6;
}

.disclaimer-text a {
    color: #3498db;
    font-weight: 600;
}

.disclaimer-text a:hover {
    color: #2980b9;
}

.image-caption {
    font-size: 0.9rem;
    color: #7f8c8d;
    text-align: center;
    margin-top: 0.75rem;
    font-style: italic;
}

/* ============================================
   SUBSCRIPTION FORM
   ============================================ */

.subscription-box {
    background-color: #f8f9fa;
    border: 1px solid #ecf0f1;
    border-radius: 8px;
    padding: 2rem;
    max-width: 500px;
    margin: 2rem auto 0;
}

.subscription-form {
    width: 100%;
}

.form-group {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.subscription-form input[type="email"] {
    flex: 1;
    padding: 12px 16px;
    font-size: 1rem;
    border: 2px solid #ecf0f1;
    border-radius: 6px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.subscription-form input[type="email"]:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.subscription-form input[type="email"]::placeholder {
    color: #bdc3c7;
}

.subscription-form .btn {
    min-width: 140px;
    padding: 12px 24px;
}

.form-message {
    text-align: center;
    margin: 0;
    font-size: 0.95rem;
    min-height: 1.5rem;
    line-height: 1.5rem;
}

.form-message.success {
    color: #27ae60;
    font-weight: 600;
}

.form-message.error {
    color: #e74c3c;
    font-weight: 600;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 2rem 0;
    text-align: center;
    margin-top: 0;
    border-top: 1px solid #1a252f;
}

.footer p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .container {
        padding: 0 1.5rem;
    }

    .form-group {
        flex-direction: column;
    }

    .subscription-form .btn {
        width: 100%;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        flex-direction: column;
        background-color: #ffffff;
        border-bottom: 1px solid #ecf0f1;
        gap: 0;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        border-bottom: 1px solid #ecf0f1;
    }

    .nav-menu a {
        display: block;
        padding: 1rem 1.5rem;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    .hero {
        padding: 60px 0;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-content {
        padding-right: 0;
    }

    .hero-ctas {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .section {
        padding: 60px 0;
    }

    .section h2 {
        margin-bottom: 2rem;
    }

    .section-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .section-text {
        padding-right: 0;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .hero-body {
        font-size: 1rem;
    }

    .section-body {
        font-size: 1rem;
    }

    .social-grid {
        grid-template-columns: 1fr;
    }

    .contact-links {
        flex-direction: column;
        gap: 1rem;
    }

    .contact-link {
        display: block;
        width: 100%;
    }
}

@media (max-width: 480px) {
    :root {
        --navbar-scroll-offset: 76px;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .eyebrow {
        font-size: 0.8rem;
    }

    .hero {
        padding: 40px 0;
    }

    .section {
        padding: 40px 0;
    }

    .nav-menu {
        gap: 0;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .logo {
        height: 40px;
    }

    .navbar .container {
        height: 60px;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Focus styles for keyboard navigation */
.btn:focus,
.nav-menu a:focus,
.contact-link:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* ============================================
   READ A CHAPTER SECTION
   ============================================ */

.read-chapter {
    background-color: #ffffff;
}

/* ---------- Book Scene (closed state) ---------- */

.book-scene {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
    padding: 2rem 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.book-scene.is-hidden {
    opacity: 0;
    transform: scale(0.88);
    pointer-events: none;
    position: absolute;
    visibility: hidden;
}

.book-closed {
    position: relative;
    width: 220px;
    height: 300px;
    transform-style: preserve-3d;
    transform: perspective(900px) rotateY(-25deg) rotateX(3deg);
}

.book-front {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, #1d4e89 0%, #1a252f 100%);
    border-radius: 2px 4px 4px 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        inset -3px 0 8px rgba(0,0,0,0.3),
        4px 6px 20px rgba(0,0,0,0.35);
    z-index: 2;
}

.book-front-content {
    padding: 1.5rem 1.2rem;
    text-align: center;
    color: #ffffff;
}

.book-front-eyebrow {
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255,255,255,0.7);
    margin-bottom: 0.75rem;
}

.book-front-title {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.2;
    color: #ffffff;
    margin-bottom: 0.6rem;
    font-family: Georgia, "Times New Roman", serif;
}

.book-front-subtitle {
    font-size: 0.65rem;
    font-weight: 400;
    line-height: 1.5;
    color: rgba(255,255,255,0.8);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.book-front-press {
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: rgba(255,255,255,0.5);
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 0.5rem;
}

.book-spine {
    position: absolute;
    left: -14px;
    top: 4px;
    width: 14px;
    height: calc(100% - 8px);
    background: linear-gradient(180deg, #1a6aad 0%, #0e3a6e 100%);
    border-radius: 2px 0 0 2px;
    box-shadow: inset -2px 0 4px rgba(0,0,0,0.3);
    z-index: 1;
}

.book-pages-edge {
    position: absolute;
    right: -10px;
    top: 3px;
    width: 10px;
    height: calc(100% - 6px);
    border-radius: 0 2px 2px 0;
    background: repeating-linear-gradient(
        to right,
        #e8e0d0 0px,
        #f5f0e8 1px,
        #e8e0d0 2px
    );
    box-shadow:
        2px 0 4px rgba(0,0,0,0.15),
        inset -1px 0 2px rgba(0,0,0,0.1);
    z-index: 1;
}

.book-open-cta {
    text-align: center;
}

/* ---------- Open Book State ---------- */

.book-open-wrap {
    display: none;
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.book-open-wrap.is-visible {
    opacity: 1;
    transform: scale(1);
}

.book-open {
    display: flex;
    align-items: stretch;
    max-width: 860px;
    margin: 0 auto;
    border-radius: 4px;
    box-shadow:
        0 12px 40px rgba(0,0,0,0.18),
        0 4px 12px rgba(0,0,0,0.1);
    background: #f5f0e8;
    min-height: 340px;
    position: relative;
    perspective: 1400px;
}

.book-page {
    flex: 1;
    position: relative;
}

.book-page-left {
    background: #f7f5ef;
    box-shadow: inset -4px 0 8px rgba(0,0,0,0.06);
    border-radius: 4px 0 0 4px;
    cursor: default;
    transition: background 0.2s;
}

.book-page-left.can-prev {
    cursor: w-resize;
}

.book-page-left.can-prev:hover {
    background: #f0ede5;
}

.book-page-right {
    background: #faf8f2;
    box-shadow: inset 4px 0 8px rgba(0,0,0,0.04);
    border-radius: 0 4px 4px 0;
    cursor: default;
    transition: background 0.2s;
}

.book-page-right.can-next {
    cursor: e-resize;
}

.book-page-right.can-next:hover {
    background: #f3f0e8;
}

.book-page-inner {
    padding: 2rem 2rem 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.chapter-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
}

.chapter-eyebrow {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #3498db;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.chapter-flourish {
    font-size: 0.9rem;
    color: #aaa;
    line-height: 1;
}

.chapter-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1a252f;
    line-height: 1.2;
    font-family: Georgia, "Times New Roman", serif;
    margin: 0;
}

.chapter-author {
    font-size: 0.8rem;
    font-style: italic;
    color: #777;
    font-family: Georgia, "Times New Roman", serif;
    margin-top: 0.4rem;
}

.book-gutter {
    width: 3px;
    flex-shrink: 0;
    background: linear-gradient(
        to right,
        rgba(0,0,0,0.12),
        rgba(0,0,0,0.04),
        rgba(0,0,0,0.12)
    );
    position: relative;
}

.book-gutter::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(0,0,0,0.06));
}

.book-gutter::after {
    content: '';
    position: absolute;
    right: -4px;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to left, transparent, rgba(0,0,0,0.06));
}

.chapter-page {
    display: none;
    flex-direction: column;
    height: 100%;
    animation: pageFadeIn 0.25s ease forwards;
}

.chapter-page.is-active {
    display: flex;
}

@keyframes pageFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.chapter-text {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.875rem;
    line-height: 1.75;
    color: #2c2c2c;
    margin-bottom: 0.9rem;
    text-align: justify;
}

.chapter-text:last-of-type {
    margin-bottom: auto;
}

.page-number {
    text-align: center;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.75rem;
    color: #aaa;
    margin-top: auto;
    padding-top: 1rem;
}

/* ---------- Book Controls ---------- */

.book-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-top: 0.75rem;
}

.book-nav-btn {
    background: none;
    border: 2px solid #3498db;
    color: #3498db;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.book-nav-btn:hover:not(:disabled) {
    background-color: #3498db;
    color: #ffffff;
    transform: translateY(-2px);
}

.book-nav-btn:disabled {
    border-color: #bdc3c7;
    color: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

.book-nav-btn:focus,
.book-open-btn:focus,
.book-close-btn:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

.book-page-counter {
    font-size: 0.9rem;
    color: #555555;
    font-weight: 500;
    min-width: 50px;
    text-align: center;
}

/* Hover arrow hints on pages */
.book-page-left.can-prev::before,
.book-page-right.can-next::before {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-family: Georgia, serif;
    font-size: 2.2rem;
    color: rgba(0,0,0,0.07);
    transition: color 0.25s;
    pointer-events: none;
    z-index: 1;
}

.book-page-left.can-prev::before {
    content: '\2039';
    left: 1rem;
}

.book-page-right.can-next::before {
    content: '\203A';
    right: 1rem;
}

.book-page-left.can-prev:hover::before,
.book-page-right.can-next:hover::before {
    color: rgba(52, 152, 219, 0.4);
}

/* ---------- 3D Page Flipper ---------- */

.page-flipper {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    transform-style: preserve-3d;
    pointer-events: none;
    z-index: 10;
    border-radius: 0 4px 4px 0;
    opacity: 0;
}

.page-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: inherit;
}

.page-face-front {
    background: linear-gradient(to right, #faf8f2 70%, #ede9df);
    box-shadow: -4px 0 12px rgba(0,0,0,0.1);
}

.page-face-back {
    background: linear-gradient(to left, #e4e0d4 60%, #d8d4c8);
    transform: rotateY(180deg);
    box-shadow: 4px 0 12px rgba(0,0,0,0.12);
}

.page-flipper.flip-forward {
    transform-origin: left center;
    animation: flipForward 0.65s cubic-bezier(0.645, 0.045, 0.355, 1.000) forwards;
}

.page-flipper.flip-backward {
    transform-origin: right center;
    animation: flipBackward 0.65s cubic-bezier(0.645, 0.045, 0.355, 1.000) forwards;
}

@keyframes flipForward {
    0%   { transform: perspective(1400px) rotateY(0deg); opacity: 1; }
    45%  { transform: perspective(1400px) rotateY(-90deg); opacity: 1; }
    55%  { transform: perspective(1400px) rotateY(-90deg); opacity: 1; }
    100% { transform: perspective(1400px) rotateY(-180deg); opacity: 0; }
}

@keyframes flipBackward {
    0%   { transform: perspective(1400px) rotateY(0deg); opacity: 1; }
    45%  { transform: perspective(1400px) rotateY(90deg); opacity: 1; }
    55%  { transform: perspective(1400px) rotateY(90deg); opacity: 1; }
    100% { transform: perspective(1400px) rotateY(180deg); opacity: 0; }
}

/* ---------- Responsive: Mobile ---------- */

@media (max-width: 768px) {
    .book-closed {
        width: 180px;
        height: 250px;
    }

    .book-front-title {
        font-size: 1.1rem;
    }
}

/* Mobile reading overlay — active when book is open on mobile */
.book-open-wrap.is-mobile-reading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99; /* sits below navbar (z-index: 100) so nav stays on top */
    display: flex;
    flex-direction: column;
    opacity: 1;
    transform: none;
    transition: none;
    overflow: hidden;
    padding-top: 86px; /* push below navbar */
    background: #f7f5ef;
}

.book-open-wrap.is-mobile-reading .book-open {
    flex: 1;
    min-height: 0;
    border-radius: 0;
    box-shadow: none;
    flex-direction: column;
    max-width: none;
    margin: 0;
    perspective: none;
    position: relative;
    overflow: hidden;
}

.book-open-wrap.is-mobile-reading .book-gutter {
    width: 100%;
    height: 2px;
    flex-shrink: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.12),
        rgba(0,0,0,0.04),
        rgba(0,0,0,0.12)
    );
}

.book-open-wrap.is-mobile-reading .book-gutter::before,
.book-open-wrap.is-mobile-reading .book-gutter::after {
    display: none;
}

.book-open-wrap.is-mobile-reading .book-page {
    flex: 1;
    min-height: 0;
    border-radius: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.book-open-wrap.is-mobile-reading .book-page-inner {
    padding: 1.75rem 1.5rem 1rem;
    height: auto;
    min-height: 100%;
    justify-content: flex-start;
}

.book-open-wrap.is-mobile-reading .book-page-left,
.book-open-wrap.is-mobile-reading .book-page-right {
    border-radius: 0;
    cursor: default;
}

/* Mobile: hide can-prev/next hover arrows */
.book-open-wrap.is-mobile-reading .book-page-left::before,
.book-open-wrap.is-mobile-reading .book-page-right::before {
    display: none;
}

/* Mobile flipper covers full page width */
.book-open-wrap.is-mobile-reading .page-flipper {
    width: 100%;
    left: 0;
    border-radius: 0;
}

.book-page-left.mobile-hidden,
.book-page-right.mobile-hidden {
    display: none;
}

.book-open-wrap.is-mobile-reading .book-controls {
    flex-shrink: 0;
    padding: 0.6rem 0;
    margin-top: 0;
    background: #f0ece0;
    border-top: 1px solid rgba(0,0,0,0.08);
}

.book-open-wrap.is-mobile-reading .book-close-area {
    flex-shrink: 0;
    text-align: center;
    padding: 0.5rem 0 0.75rem;
    background: #f0ece0;
}

/* Swipe hint */
.swipe-hint {
    text-align: center;
    font-size: 0.7rem;
    color: #aaa;
    padding: 0.25rem 0 0;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    letter-spacing: 0.05em;
    flex-shrink: 0;
    background: #f0ece0;
}

.chapter-text {
    font-size: 0.9rem;
}

.chapter-title {
    font-size: 1.3rem;
}

@media (max-width: 480px) {
    .book-closed {
        width: 150px;
        height: 210px;
    }

    .book-front-title {
        font-size: 0.95rem;
    }

    .book-front-subtitle {
        font-size: 0.55rem;
    }

    .book-open-wrap.is-mobile-reading {
        padding-top: 76px; /* shorter navbar on smallest screens */
    }
}
