/* Keep the original stanza breaks when switching from the excerpt to the full text. */
.classic-reading-verse { display: block; min-width: 0; }
.classic-reading-verse:has(details[open]) > .classic-reading-lines,
.poem-card-body:has(.poem-card-rest:not([hidden])) > .poem-card-preview { display: none; }

.classic-reading-verse details[open],
.poem-card-body .poem-card-rest { margin-block-start: 0; }

.classic-reading-card header h3,
[data-poem-card] .poem-card-title-row h2,
article.poem .poem-heading h1,
article.poem .random-title {
    font-weight: 700;
}
.classic-reading-card header h3 { margin-block-end: 0; }
.classic-reading-card .poem-title-rule { margin-block: 12px 16px; }

@media screen and (max-width: 760px) {
    :is(.library-works, .library-content-panel, .library-sought-section):has(.classic-reading-list) {
        background: none;
        border-color: transparent;
        border-radius: 0;
        box-shadow: none;
    }
    .classic-reading-card header h3 { font-size: 27px; }
    .poem-card .poem-card-summary, article.poem .poem-summary { border-radius: 0; }

    /* Lists can be nested inside padded library, search and profile panels. */
    #main-content :is(article[data-classic-card], article.poem-card[data-poem-card], article.poem:has(.poem-body)) {
        box-sizing: border-box;
        width: auto;
        max-width: none;
        margin-inline: calc(50% - 50vw);
        padding-inline: max(14px, env(safe-area-inset-left)) max(14px, env(safe-area-inset-right));
        border-inline: 0;
        border-radius: 0;
        box-shadow: none;
        transform: none;
        overflow-wrap: anywhere;
    }
    .classic-reading-card .classic-reading-content { grid-template-columns: minmax(0, 1fr); }
}
