/* Plain CSS conversion. No Tailwind or build step required. */
:root {
    --paper: #faf8f5;
    --ink: #1c1917;
    --wine: #78121f;
    --gold: #c59b27;
    --heading: 'Newsreader',Georgia,serif;
    --serif: 'Cormorant Garamond',Georgia,serif;
    --sans: 'Inter',Arial,sans-serif
}

* {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: var(--heading);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased
}

::selection {
    background: var(--wine);
    color: white
}

h1,h2,h3,p {
    margin: 0
}

h1,h2 {
    font-weight: 400;
    letter-spacing: -.025em
}

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

button,input {
    font: inherit
}

button,a,input {
    touch-action: manipulation
}

button {
    cursor: pointer
}

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

button {
    border: 0
}

a,button {
    transition: background .2s,color .2s,box-shadow .2s,transform .2s
}

a:hover {
    color: var(--wine)
}

[hidden] {
    display: none!important
}

:focus-visible {
    outline: 2px solid var(--wine);
    outline-offset: 4px
}

.container {
    max-width: 1152px;
    margin: auto;
    padding: 0 24px
}

.narrow-container {
    max-width: 896px;
    margin: auto;
    padding: 0 24px
}

.gold-rule {
    width: 48px;
    height: 2.5px;
    background: var(--gold)
}

.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    background: var(--wine);
    color: #fff;
    padding: 12px 28px;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: .025em;
    border-radius: 2px;
    box-shadow: 0 4px 6px -1px #0002;
    line-height: 1.5
}

.button:hover {
    background: #600e19;
    color: #fff;
    box-shadow: 0 8px 12px -6px #0004
}

.button:disabled {
    opacity: .75;
    cursor: wait
}

.button-small {
    font-size: 14px;
    padding: 8px 20px
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -100px;
    z-index: 100;
    background: white;
    padding: 12px
}

.skip-link:focus {
    top: 12px
}

.site-header {
    position: relative;
    z-index: 30;
    background: #faf8f5e6;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #ece5da
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    padding-bottom: 20px
}

.brand {
    font-family: 'Cinzel',Georgia,serif;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: .22em
}

.desktop-nav {
    display: none;
    gap: 32px;
    align-items: center;
    font-size: 17px;
    color: #44403c
}

.menu-toggle {
    background: transparent;
    padding: 8px;
    color: #292524;
    font-size: 24px;
    line-height: 1
}

.mobile-nav {
    padding: 20px 24px;
    border-top: 1px solid #ece5da;
    box-shadow: 0 8px 14px #0001
}

.mobile-nav a {
    display: block;
    font-size: 18px;
    padding: 6px 0;
    margin-bottom: 16px;
    border-bottom: 1px solid #f0eae1
}

.mobile-nav .button {
    font-size: 14px;
    padding: 10px 20px;
    margin: 8px 0 0
}

.hero {
    position: relative;
    overflow: hidden;
    padding: 32px 0 64px
}

.hero-background {
    position: absolute;
    inset: 0;
    pointer-events: none
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: .85
}

.fade-horizontal,.fade-vertical {
    position: absolute;
    inset: 0
}

.fade-horizontal {
    /* background:linear-gradient(to right,#faf8f5,#faf8f5e6,#faf8f54d); */
}

.fade-vertical {
    background: linear-gradient(to bottom,#faf8f5,transparent 20%,transparent80%,#faf8f5cc);
}

.hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 48px;
    align-items: center
}

.hero-copy {
    max-width: 672px
}

.kicker {
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: #44403c
}

.hero .gold-rule {
    margin: 8px 0 16px
}

h1 {
    font-size: 36px;
    line-height: 1.14;
    margin-bottom: 24px
}

.synopsis {
    font-family: var(--ssans);
    font-style: italic;
    font-size: 18px;
    line-height: 1.625;
    color: #332f2c;
    margin-bottom: 32px;
    max-width: 576px;
    font-weight: 400;
}

.synopsis strong {
    font-weight: 600;
    font-style: normal
}

.hero-actions {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 16px
}

.button-hero {
    padding: 14px 28px
}

.secondary-link {
    font-family: var(--serif);
    font-size: 16px;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-color: #8c827a
}

.secondary-link span {
    display: inline-block;
    margin-left: 6px
}

.print-note {
    font-family: var(--sans);
    font-size: 12px;
    color: #57534e
}

.book-column {
    display: flex;
    align-items: center;
    flex-direction: column;
    min-width: 0
}

.book-container {
    perspective: 1600px;
    position: relative;
    width: 100%;
    max-width: 340px;
    transition: transform .2s
}

.book-container.dragging {
    transform: scale(1.03)
}

.book-3d {
    position: relative;
    transform: rotateY(-18deg) rotateX(4deg) rotateZ(1deg);
    transform-style: preserve-3d;
    transition: transform .5s cubic-bezier(.16,1,.3,1),box-shadow .5s;
    box-shadow: -18px 24px 35px -8px #0007,-4px 8px 15px -4px #0005,0 0 1px 1px #0002;
    border: 1px solid #d1c2af;
    border-left: 0;
    border-radius: 0 6px 6px 0;
    overflow: hidden;
    background: #e8ded0
}

.book-3d:hover {
    transform: rotateY(-12deg) rotateX(2deg) rotateZ(0) translateY(-6px);
    box-shadow: -24px 32px 45px -8px #0008,-6px 12px 20px -4px #0006
}

.book-3d>img {
    width: 100%;
    height: auto;
    user-select: none
}

.book-spine-highlight {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 28px;
    background: linear-gradient(90deg,#ffffff59 0%,#ffffff0d 30%,#00000026 75%,#00000059 100%);
    pointer-events: none;
    z-index: 10
}

.book-pages-edge {
    position: absolute;
    top: 4px;
    bottom: 4px;
    right: -10px;
    width: 10px;
    background: repeating-linear-gradient(to bottom,#faf6ee,#faf6ee 1px,#ede3ce 1px,#ede3ce 2px);
    border-right: 1px solid #d4c3a3;
    transform: rotateY(90deg) translateZ(5px);
    transform-origin: left;
    box-shadow: inset 1px 0 3px #0003
}

.cover-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: #0006;
    opacity: 0
}

.cover-overlay:hover,.cover-overlay:focus-visible {
    opacity: 1
}

.cover-overlay span {
    background: white;
    color: var(--ink);
    font: 500 12px var(--sans);
    padding: 8px 14px;
    border-radius: 4px
}

.book-shadow {
    width: 90%;
    height: 24px;
    margin: 12px auto 0;
    border-radius: 100%;
    background: #00000059;
    filter: blur(12px);
    transform: skewX(-12deg)
}

.cover-actions {
    margin-top: 16px;
    font: 12px var(--sans);
    text-align: center;
    max-width: 100%
}

.upload-button {
    font: 12px var(--sans);
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid #d6cfc4;
    background: #ffffffe6;
    color: #57534e
}

.cover-actions p:empty {
    display: none
}

.cover-actions p {
    margin-top: 6px;
    color: #065f46
}

.lucy {
    background: #1e382b;
    color: white;
    padding: 80px 0
}

.lucy h2 {
    font-size: 36px;
    margin-bottom: 32px;
    line-height: 1.2
}

.lucy-copy {
    font: 18px/1.625 var(--serif)
}

.lucy-copy p:first-child {
    color: #f7faf8
}

.lucy-copy p+p {
    margin-top: 24px;
    color: #cbd8d0
}

.desktop-break {
    display: none
}

.memoir {
    padding: 80px 0
}

.memoir-grid {
    display: grid;
    gap: 48px;
    align-items: start
}

.memoir h2 {
    font-size: 36px;
    line-height: 1.1
}

.memoir .gold-rule {
    margin: 24px 0 32px
}

.chapter {
    display: flex;
    align-items: flex-start;
    gap: 24px
}

.chapter+.chapter {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid #e7e1d5
}

.chapter-number {
    font-size: 36px;
    line-height: 1;
    flex-shrink: 0;
    width: 48px;
    padding-top: 2px;
    color: #2e4d3c
}

.chapter h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.333
}

.chapter p {
    font: 16px/1.625 var(--serif);
    color: #44403c
}

.author {
    background: #dfe5dc;
    padding: 64px 0
}

.author-grid {
    display: grid;
    gap: 32px;
    align-items: center
}

.portrait-frame {
    width: 100%;
    max-width: 280px;
    margin: auto;
    padding: 8px;
    background: #ffffffe6;
    border-radius: 3px;
    border: 1px solid #cfd8cb;
    box-shadow: 0 1px 3px #0001
}

.portrait-frame img {
    width: 100%;
    height: auto;
    aspect-ratio: 4/5;
    object-fit: cover;
    border-radius: 2px;
    background: #cbd5e1
}

.author h2 {
    font-size: 30px;
    margin-bottom: 12px;
    line-height: 1.2
}

.author .gold-rule {
    margin-bottom: 24px
}

.author-copy p {
    max-width: 672px;
    font: 18px/1.625 var(--serif);
    color: #2c2826
}

.newsletter {
    padding: 64px 0
}

.newsletter-container {
    max-width: 1024px;
    margin: auto;
    padding: 0 24px
}

.newsletter-card {
    display: grid;
    gap: 32px;
    align-items: center;
    background: #fbf9f6;
    border: 1px solid #d6af5799;
    border-radius: 2px;
    padding: 32px;
    box-shadow: 0 1px 2px #0001
}

.newsletter .gold-rule {
    margin-bottom: 16px
}

.newsletter h2 {
    font-size: 30px;
    font-weight: 600;
    line-height: 1.18
}

.newsletter-copy {
    font: 16px/1.625 var(--serif);
    color: #44403c;
    margin-top: 12px
}

#newsletter-form label {
    display: block;
    font: 500 12px/1.5 var(--sans);
    margin-bottom: 6px;
    color: #44403c
}

input[type=email],input[type=url],input[type=text] {
    width: 100%;
    min-width: 0;
    background: white;
    border: 1px solid #d6cfc4;
    border-radius: 2px;
    padding: 10px 16px;
    font-size: 16px;
    color: var(--ink)
}

input::placeholder {
    color: #a8a29e
}

#newsletter-form .button {
    width: 100%;
    margin-top: 12px;
    font-size: 14px;
    padding: 10px 24px
}

.form-note {
    text-align: center;
    font: 12px/1.5 var(--sans);
    color: #78716c;
    margin-top: 12px
}

#newsletter-status {
    margin-top: 8px;
    font: 12px/1.5 var(--sans)
}

#newsletter-status:not(:empty) {
    padding: 12px;
    border: 1px solid #fcd34d;
    background: #fffbeb;
    color: #78350f
}

#newsletter-status.success {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46
}

#newsletter-status.error {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #9f1239
}

.site-footer {
    padding: 40px 0;
    border-top: 1px solid #e7e1d5
}

.footer-row {
    display: flex;
    flex-direction: column;
    gap: 24px;
    justify-content: space-between
}

.footer-book {
    font: italic 14px/1.5 var(--serif);
    color: #57534e
}

.site-footer nav {
    display: flex;
    gap: 12px;
    align-items: center;
    font: 14px var(--sans);
    color: #44403c
}

.site-footer a:hover {
    text-decoration: underline
}

.config-trigger {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 40;
    background: #1c1917e6;
    color: white;
    font: 12px var(--sans);
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid #ffffff33;
    box-shadow: 0 8px 15px #0002
}

.config-trigger:hover {
    transform: scale(1.05)
}

dialog {
    padding: 0;
    width: calc(100% - 32px);
    max-width: 512px;
    max-height: 90vh;
    overflow: auto;
    border: 1px solid #d6cfc4;
    border-radius: 6px;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    box-shadow: 0 25px 50px #0004
}

dialog::backdrop {
    background: #0009;
    backdrop-filter: blur(3px)
}

.dialog-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid #e7e1d5;
    background: white;
    position: sticky;
    top: 0;
    z-index: 1
}

.dialog-heading h3 {
    font: 600 18px var(--heading)
}

.dialog-heading button {
    font-size: 24px;
    background: transparent
}

#config-form {
    padding: 24px;
    font-size: 13px
}

fieldset {
    min-width: 0;
    margin: 20px 0;
    padding: 16px;
    border: 1px solid #e2dacf;
    background: white;
    border-radius: 4px
}

legend {
    font-weight: 500
}

#config-form label {
    display: block;
    margin: 8px 0 6px
}

#config-form input:not([type=checkbox]) {
    font: 12px var(--sans);
    padding: 8px 12px;
    background: var(--paper)
}

#config-form p {
    font-size: 12px;
    line-height: 1.5
}

fieldset p {
    margin-top: 8px;
    color: #78716c
}

.config-notice {
    padding: 12px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #78350f;
    border-radius: 4px
}

.config-cover {
    display: flex;
    gap: 16px;
    align-items: center
}

.config-cover img {
    width: 56px;
    height: 80px;
    object-fit: cover
}

.config-cover .button,.config-actions .button {
    font: 12px var(--sans);
    padding: 10px 16px
}

.text-button {
    background: transparent;
    text-decoration: underline;
    color: #57534e;
    font: 12px var(--sans);
    padding: 8px 0
}

.config-cover .text-button {
    display: block
}

.config-actions {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between
}

.production-mode .preview-only {
    display: none!important
}

@media(min-width: 640px) {
    h1 {
        font-size:48px
    }

    .synopsis {
        font-size: 20px
    }

    .secondary-link {
        font-size: 18px
    }

    .print-note {
        font-size: 14px
    }

    .book-container {
        max-width: 380px
    }

    .lucy h2,.memoir h2 {
        font-size: 48px
    }

    .lucy-copy {
        font-size: 20px
    }

    .desktop-break {
        display: inline
    }

    .chapter {
        gap: 32px
    }

    .chapter-number {
        font-size: 48px
    }

    .chapter h3 {
        font-size: 24px
    }

    .chapter p {
        font-size: 18px
    }

    .portrait-frame {
        max-width: 300px
    }

    .author h2,.newsletter h2 {
        font-size: 36px
    }

    .author-copy p {
        font-size: 20px
    }

    .newsletter-card {
        padding: 40px
    }

    .newsletter-copy {
        font-size: 18px
    }

    #newsletter-email {
        font-size: 14px
    }

    #newsletter-form .button {
        font-size: 16px
    }

    .footer-row {
        flex-direction: row;
        align-items: center
    }
}

@media(min-width: 768px) {
    .brand {
        font-size:20px
    }

    .hero {
        padding: 56px 0 96px
    }

    .kicker {
        font-size: 14px
    }

    .button-hero {
        font-size: 18px
    }

    .fade-horizontal {
        background: linear-gradient(to right,#faf8f5 ,#faf8f5e6 20%,transparent 70%);
    }

    .lucy {
        padding: 96px 0
    }

    .memoir {
        padding: 112px 0
    }

    .author,.newsletter {
        padding: 96px 0
    }

    .author-grid {
        grid-template-columns: 4fr 8fr;
        gap: 56px
    }

    .portrait-frame {
        margin: 0
    }

    .newsletter-card {
        padding: 56px
    }
}

@media(min-width: 1024px) {
    .desktop-nav {
        display:flex
    }

    .menu-toggle,.mobile-nav {
        display: none
    }

    .hero-grid {
        grid-template-columns: 7fr 5fr;
        gap: 32px
    }

    h1 {
        font-size: 54px
    }

    .book-column {
        align-items: flex-end
    }

    .book-container {
        max-width: 400px
    }

    .cover-actions {
        text-align: right
    }

    .lucy h2 {
        font-size: 52px
    }

    .lucy-copy {
        font-size: 22px
    }

    .memoir-grid {
        grid-template-columns: 5fr 7fr;
        gap: 64px
    }

    .memoir h2 {
        font-size: 54px
    }

    .chapters {
        border-left: 1px solid #e2dacf;
        padding-left: 48px
    }

    .author h2 {
        font-size: 44px
    }

    .author-copy p {
        font-size: 21px
    }

    .newsletter-card {
        grid-template-columns: 1fr 1fr;
        gap: 48px
    }

    .newsletter h2 {
        font-size: 42px
    }
}

@media(prefers-reduced-motion:reduce) {
    html {
        scroll-behavior: auto
    }

    *,*::before,*::after {
        transition: none!important;
        animation: none!important
    }
}
