/* Literature layouts retain ArtistCove's sea-blue and mint palette. */
.literature-hero {
    padding: clamp(24px, 5vw, 60px);
    border: 1px solid #34515a;
    border-radius: 18px;
    background: radial-gradient(ellipse at right top, #244d55, transparent 65%), #142329;
}
.literature-hero h1 { font-size: clamp(34px, 5vw, 58px); line-height: 1.12; margin: 18px 0; }
.literature-hero > p { max-width: 720px; line-height: 1.7; }
.category-chips { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.category-chips a { max-width: 100%; overflow-wrap: anywhere; padding: 10px 14px; border: 1px solid #456066; border-radius: 24px; text-decoration: none; }
.category-chips a:hover, .category-chips a:focus-visible { background: #8de1ca24; }
.literature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin: 20px 0; }
.literature-card {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 20px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel);
}
.literature-card h2 { font-size: 23px; line-height: 1.25; margin: 8px 0; overflow-wrap: anywhere; }
.literature-card h2 a { text-decoration: none; }
.literature-card p { margin: 8px 0; line-height: 1.55; overflow-wrap: anywhere; }
.literature-meta, .literature-card small { color: var(--muted); font-size: 12px; }
.literature-card .literature-byline { font-size: 13px; }
.book-cover { display: grid; place-items: center; align-self: start; aspect-ratio: 2 / 3; border-radius: 5px; background: linear-gradient(140deg,#36616a,#19353f); overflow: hidden; text-decoration: none; }
.book-cover span { color: #b5efdc; font: 52px Georgia, serif; }
.book-cover img { width: 100%; height: 100%; object-fit: contain; display: block; }
.literature-warnings { border-left: 3px solid #86bcb3; padding-left: 12px; color: #bcd4d2; font-size: 14px; }
.literature-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.literature-filters { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; margin: 20px 0 30px; }
.literature-filters > div { flex: 1 1 150px; }
.literature-filters > div:first-child { flex-basis: 230px; }
.editor-cover, .literature-reader-cover { max-width: 140px; max-height: 210px; object-fit: contain; margin: 16px 0; display: block; }
.literature-reader .story-body { line-height: 1.85; font-size: 18px; }
.literature-reader .story-body p { margin: 1.1em 0; }
body > header .account-nav > .create-link { background: #8de1ca30; border-color: #6fb8a5; color: #dcfff4; }
.literature-grid .story-card { max-width: 100%; }
:where(a,button,summary,input,select,textarea):focus-visible { outline: 2px solid var(--a); outline-offset: 3px; }
@media (max-width: 900px) {
    .literature-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    main { padding-inline: 16px; }
    .literature-card { grid-template-columns: 76px minmax(0, 1fr); padding: 14px; gap: 14px; }
    .literature-card h2 { font-size: 20px; }
    .literature-fields { grid-template-columns: 1fr; gap: 0; }
    .literature-reader .story-body { font-size: 17px; }
    .category-chips a { font-size: 13px; padding: 9px 12px; }
}

/* Cover shelves for the signed-in homepage. */
.books-hero { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,1fr); align-items:center; gap:40px; overflow:hidden; }
.books-hero-copy { min-width:0; }
.books-hero h1 { font-size:clamp(34px,4.5vw,56px); }
.books-hero-copy > p { line-height:1.7; }
.hero-import { font-size:14px; color:var(--muted); }
.books-hero-stack { display:flex; align-items:center; justify-content:center; padding:20px 0; min-width:0; }
.books-hero-stack .shelf-book { width:34%; min-width:0; flex:none; }
.books-hero-stack .shelf-book:first-child { transform:rotate(-9deg) translateX(12px); }
.books-hero-stack .shelf-book:nth-child(2) { transform:translateY(-18px); z-index:1; }
.books-hero-stack .shelf-book:nth-child(3) { transform:rotate(9deg) translateX(-12px); }
.books-hero-stack .shelf-book > :not(.shelf-cover) { display:none; }
.books-hero-stack .shelf-cover { box-shadow:0 18px 35px #0008; }
.books-hero-words { display:grid; gap:8px; justify-content:center; font:italic clamp(35px,5vw,64px) Georgia,serif; color:#8de1ca; opacity:.65; }
.archive-description { margin-top:24px; line-height:1.7; max-width:800px; }
.fandom-strip { margin:38px 0; }
.book-shelf { margin:44px 0; min-width:0; }
.book-shelf h2 { font-size:28px; }
.book-shelf .cove-post-heading { justify-content:space-between; }
.shelf-more { font-size:14px; white-space:nowrap; }
.shelf-description { color:var(--muted); margin:-4px 0 18px; font-size:14px; }
.book-shelf-track { display:grid; grid-auto-flow:column; grid-auto-columns:clamp(142px,16vw,180px); align-items:start; gap:22px; overflow-x:auto; overscroll-behavior-inline:contain; scroll-snap-type:x proximity; padding:5px 3px 20px; scrollbar-color:#42656b #142329; }
.shelf-book { min-width:0; scroll-snap-align:start; }
.shelf-cover { aspect-ratio:2/3; display:block; background:linear-gradient(150deg,#396773,#173139); border:1px solid #587d81; border-radius:7px; overflow:hidden; box-shadow:0 6px 14px #0004; text-decoration:none; }
.shelf-cover img { width:100%; height:100%; object-fit:contain; display:block; }
.shelf-cover-text { display:flex; flex-direction:column; align-items:center; justify-content:space-between; gap:14px; height:100%; padding:18px 12px; text-align:center; color:#e0f3ee; }
.shelf-cover-text strong { font:clamp(17px,2vw,21px) Georgia,serif; overflow-wrap:anywhere; display:-webkit-box; -webkit-line-clamp:5; -webkit-box-orient:vertical; overflow:hidden; }
.shelf-cover-text > span { font-size:10px; overflow-wrap:anywhere; }
.shelf-cover-mark { color:#b5efdc; border-top:1px solid #8de1ca66; border-bottom:1px solid #8de1ca66; padding:6px 10px; letter-spacing:4px; }
.shelf-book h3 { font-size:15px; line-height:1.4; margin:7px 0 4px; overflow-wrap:anywhere; }
.shelf-book h3 a { text-decoration:none; color:#eef4f2; }
.shelf-book .literature-meta { margin:12px 0 4px; }
.shelf-author,.shelf-warning { font-size:12px; color:var(--muted); margin:5px 0; overflow-wrap:anywhere; }
.shelf-warning { line-height:1.5; }
.shelf-empty-note { color:var(--muted); margin:24px 0; font-size:14px; }
@media(max-width:760px) {
    .books-hero { grid-template-columns:1fr; gap:22px; }
    .books-hero-stack { max-width:390px; width:100%; justify-self:center; }
    .books-hero-words { display:none; }
    .book-shelf-track { grid-auto-columns:145px; gap:16px; }
    .book-shelf { margin:32px 0; }
    .book-shelf h2 { font-size:24px; }
}

.monthly-challenge-banner {
    display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap;
    gap:20px; margin:32px 0; padding:24px;
    border:1px solid #648c86; border-radius:12px;
    background:linear-gradient(120deg,#21403d,#172b34);
}
.monthly-challenge-banner > div { flex:1 1 300px; min-width:0; }
.monthly-challenge-banner h2 { margin:8px 0; overflow-wrap:anywhere; }
.monthly-challenge-banner p { line-height:1.6; overflow-wrap:anywhere; }
.monthly-challenge-banner > a { white-space:normal; }
.story-challenge-option { margin:24px 0; padding:18px; border:1px solid #456066; border-radius:8px; }
.story-challenge-option legend { color:var(--a); padding:0 8px; }

.monthly-challenge-page h1, .monthly-challenge-page .bio { overflow-wrap:anywhere; }

/* One shared cover, with a readable chapter list on desktop and mobile. */
.book-page { max-width: 1060px; }
.book-overview { display:grid; grid-template-columns:180px minmax(0,1fr); gap:2rem; align-items:start; margin:1.5rem 0 2.5rem; }
.book-overview h1 { overflow-wrap:anywhere; margin:.3rem 0 1rem; }
.book-overview-cover { aspect-ratio:2/3; display:flex; align-items:center; justify-content:center; border:1px solid var(--line,#29464b); border-radius:12px; overflow:hidden; background:linear-gradient(145deg,#164958,#183034); color:#a1edd7; font:4rem Georgia,serif; }
.book-overview-cover img { width:100%; height:100%; object-fit:contain; }
.book-chapter-list { list-style:none; padding:0; margin:1rem 0 2rem; border:1px solid var(--line,#29464b); border-radius:12px; overflow:hidden; }
.book-chapter-list li { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:1rem 1.2rem; background:#142126; }
.book-chapter-list li + li { border-top:1px solid var(--line,#29464b); }
.book-chapter-list a { min-width:0; overflow-wrap:anywhere; }
.book-chapter-list .muted { flex-shrink:0; font-size:.85rem; }
.book-breadcrumb { padding:.8rem 1rem; border-left:3px solid #82dabe; background:#142126; border-radius:4px; }
.book-page .edit-image { margin:1.5rem 0; }
@media(max-width:600px) {
 .book-overview { grid-template-columns:100px minmax(0,1fr); gap:1rem; }
 .book-overview h1 { font-size:1.7rem; }
 .book-overview-cover { font-size:2.5rem; }
 .book-chapter-list li { padding:.9rem; align-items:start; }
 .book-page .cove-post-heading { flex-wrap:wrap; gap:.75rem; }
}
@media(max-width:380px) { .book-overview { grid-template-columns:1fr; } .book-overview-cover { width:140px; } }
