:root {
    --ink: #1f1a24;
    --paper: #fbf8f4;
    --accent: #a8324a;
    --accent-soft: #f4dfe3;
    --muted: #6b6470;
    --line: #e4ddd6;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    background: var(--paper);
    color: var(--ink);
    line-height: 1.55;
}

a { color: var(--accent); }

.site-header, .site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--line);
}

.site-footer { border-top: 1px solid var(--line); border-bottom: none; margin-top: 3rem; font-size: 0.85rem; color: var(--muted); }

.brand { font-weight: bold; font-size: 1.3rem; text-decoration: none; color: var(--ink); }

.nav-links a { margin-left: 1rem; text-decoration: none; color: var(--ink); }

main { max-width: 880px; margin: 0 auto; padding: 1.5rem; }

.banner {
    padding: 0.6rem 1.5rem;
    background: #fff3cd;
    border-bottom: 1px solid #e2c56d;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
}

.link-button {
    background: none; border: none; color: var(--accent); text-decoration: underline; cursor: pointer; font: inherit; padding: 0;
}

.penname-header { text-align: center; margin-bottom: 2rem; }
.penname-avatar { width: 128px; height: 128px; border-radius: 50%; object-fit: cover; margin-bottom: 1rem; }
.genre-tags { display: flex; gap: 0.4rem; justify-content: center; flex-wrap: wrap; margin-top: 0.5rem; }
.genre-tag { background: var(--accent-soft); color: var(--accent); padding: 0.15rem 0.6rem; border-radius: 999px; font-size: 0.8rem; }

.featured-update { background: var(--accent-soft); border-radius: 10px; padding: 1.25rem; margin-bottom: 2rem; }

.series-block { margin-bottom: 2rem; }
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1rem; }
.book-card { text-align: center; }
.book-cover { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 6px; background: var(--line); }
.book-title { font-size: 0.9rem; margin-top: 0.4rem; }

.retailer-links { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.5rem 0; }
.retailer-link-btn {
    display: inline-block; padding: 0.5rem 1rem; border: 1px solid var(--accent); border-radius: 6px;
    text-decoration: none; color: var(--accent); font-size: 0.9rem;
}

.mailing-list-cta { text-align: center; margin: 2rem 0; }
.mailing-list-cta a {
    display: inline-block; padding: 0.7rem 1.6rem; background: var(--accent); color: #fff; border-radius: 999px; text-decoration: none;
}

details.bio summary { cursor: pointer; font-weight: bold; }

table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; font-size: 0.9rem; }
th, td { text-align: left; padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--line); }

.form-grid { display: grid; gap: 0.6rem; max-width: 480px; margin-bottom: 1.5rem; }
.form-grid input, .form-grid textarea, .form-grid select {
    padding: 0.45rem; border: 1px solid var(--line); border-radius: 4px; font: inherit;
}
button, input[type=submit] {
    padding: 0.45rem 1rem; border: 1px solid var(--accent); background: var(--accent); color: #fff;
    border-radius: 4px; cursor: pointer; font: inherit;
}
button.secondary { background: none; color: var(--accent); }
button.danger { background: #7a1f2b; border-color: #7a1f2b; }

.pen-name-tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.pen-name-tabs a { padding: 0.35rem 0.8rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); }
.pen-name-tabs a.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.flash-error { background: #f8d7da; border: 1px solid #f1aeb5; padding: 0.6rem 1rem; border-radius: 6px; margin-bottom: 1rem; }
.flash-notice { background: #d1e7dd; border: 1px solid #a3cfbb; padding: 0.6rem 1rem; border-radius: 6px; margin-bottom: 1rem; }

section { margin-bottom: 2.5rem; }
h2 { border-bottom: 1px solid var(--line); padding-bottom: 0.3rem; }
