/* Shared manuscript component rules; edition palettes/assets live beside profile themes. */
#top[data-manuscript-theme]{background:var(--mp-bg);color:var(--mp-ink);font-family:var(--mp-body-font)}
#top[data-manuscript-theme] .mp-main{background:var(--mp-bg)}
#top[data-manuscript-theme] .mp-book-hero{position:relative;isolation:isolate;border-bottom:1px solid var(--mp-line);margin-bottom:32px}
#top[data-manuscript-theme] .mp-book-hero::before{content:"";position:absolute;inset:0 -24px;z-index:-1;background:var(--mp-art) center 35%/cover;opacity:.12;pointer-events:none;mask-image:linear-gradient(#000,transparent);-webkit-mask-image:linear-gradient(#000,transparent)}
#top[data-manuscript-theme] .mp-book-hero::after{content:"";position:absolute;inset:0;z-index:-1;background:var(--mp-ornament) center/cover;opacity:.15;pointer-events:none}
#top[data-manuscript-theme] :is(.mp-book-title,.mp-book h1,.mp-book h2,.mp-unavailable h1){font-family:var(--mp-heading-font);color:var(--mp-ink);font-weight:500}
#top[data-manuscript-theme] .mp-synopsis{color:var(--mp-ink)}
#top[data-manuscript-theme] :is(.mp-eyebrow,.mp-byline a,.mp-author h2 a,.mp-world-body h2 a){color:var(--mp-link)}
#top[data-manuscript-theme] :is(.mp-metadata,.mp-chapter-symbols,.mp-share-status,.mp-author-bio){color:var(--mp-muted)}
#top[data-manuscript-theme] :is(.mp-author,.mp-world-card,.mp-engagement,.mp-settings,.mp-reading-nav,.mp-focus-controls){background:var(--mp-panel);color:var(--mp-ink);border-color:var(--mp-line)}
#top[data-manuscript-theme] .mp-cover{background:var(--mp-panel);border-color:var(--mp-line);box-shadow:8px 8px 0 var(--mp-hover)}
#top[data-manuscript-theme] .mp-chapter-list a{color:var(--mp-ink)}
#top[data-manuscript-theme] .mp-chapter-list a:is(:hover,:focus-visible,:active),#top[data-manuscript-theme] .mp-chapter-list a[aria-current]{color:var(--mp-link)!important;background:var(--mp-hover);text-decoration:none!important}
#top[data-manuscript-theme] .mp-chapter-list a[aria-current]{box-shadow:inset 3px 0 var(--mp-link)}
#top[data-manuscript-theme] .mp-author-social a{color:var(--mp-link)}
#top[data-manuscript-theme] :is(.mp-author-social a,.mp-byline a,.mp-world-body h2 a):hover{color:var(--mp-link)!important;text-decoration:underline}
#top[data-manuscript-theme] :is(.mp-button,.mp-reading-nav button,.mp-settings button,.mp-focus-controls button){background:var(--mp-panel);color:var(--mp-ink);border-color:var(--mp-line)}
#top[data-manuscript-theme] :is(.mp-button,.mp-reading-nav button,.mp-settings button,.mp-focus-controls button):is(:hover,:focus-visible){background:var(--mp-hover);color:var(--mp-ink)!important;text-decoration:none!important}
#top[data-manuscript-theme] :is(.mp-primary,.mp-follow,.mp-world-follow a){background:var(--mp-action);border-color:var(--mp-action);color:var(--mp-action-ink)!important;box-shadow:inset 0 1px 0 #ffffff20}
#top[data-manuscript-theme] :is(.mp-primary,.mp-follow,.mp-world-follow a):is(:hover,:focus-visible){background:var(--mp-action);color:var(--mp-action-ink)!important;box-shadow:inset 0 0 0 2px var(--mp-action-ink);text-decoration:none!important}
#top[data-manuscript-theme] .mp-follow:disabled{opacity:.7}
#top[data-manuscript-theme] :is(.mp-reading-nav>a,.mp-reader-contents>summary){color:var(--mp-link)!important}
#top[data-manuscript-theme] .mp-reader-contents{color:var(--mp-ink)}
#top[data-manuscript-theme] .mp-reader-contents.is-takeover[open]{background:var(--mp-bg);color:var(--mp-ink)}
#top[data-manuscript-theme] .mp-contents-heading{background:var(--mp-panel);color:var(--mp-ink);border-color:var(--mp-line)}
#top[data-manuscript-theme] .mp-contents-heading button{background:var(--mp-panel);color:var(--mp-ink);border-color:var(--mp-line)}
#top[data-manuscript-theme] .mp-settings [aria-pressed=true]{background:var(--mp-action);color:var(--mp-action-ink);border-color:var(--mp-action)}
#top[data-manuscript-theme] .mp-engagement a:not(.mp-love),#top[data-manuscript-theme] .mp-engagement .mp-share-actions button{background:var(--mp-hover);color:var(--mp-ink);border-color:var(--mp-line)}
#top[data-manuscript-theme] .mp-engagement a:not(.mp-love):is(:hover,:focus-visible),#top[data-manuscript-theme] .mp-share-actions button:is(:hover,:focus-visible){background:var(--mp-action);color:var(--mp-action-ink)!important;border-color:var(--mp-action)}
#top[data-manuscript-theme] .mp-engagement .homer-part-likes-container a,#top[data-manuscript-theme] .mp-engagement .mp-love{background:linear-gradient(135deg,#a42145,#74152f);border-color:#d65b79;color:#fff!important}
#top[data-manuscript-theme] .mp-engagement .homer-part-likes-container a:is(:hover,:focus-visible),#top[data-manuscript-theme] .mp-engagement .mp-love:is(:hover,:focus-visible){background:linear-gradient(135deg,#bf2c53,#921b3c);border-color:#f38ba4;color:#fff!important}
#top[data-manuscript-theme] .mp-after-reading :is(.ibox,.ibox-content,.comment-box-content,.comment-box,.comment-form){background:var(--mp-panel)!important;color:var(--mp-ink)!important;border-color:var(--mp-line)}
#top[data-manuscript-theme] .mp-after-reading :is(textarea,input:not([type=submit]):not([type=button]),.form-control){background:var(--mp-bg)!important;color:var(--mp-ink)!important;border-color:var(--mp-line)}
#top[data-manuscript-theme] .mp-after-reading :is(textarea,input)::placeholder{color:var(--mp-muted);opacity:1}
#top[data-manuscript-theme] #mp-comments{color:var(--mp-ink)}
#top[data-manuscript-theme] #mp-comments h2{font-family:var(--mp-heading-font)}
#top[data-manuscript-theme] #mp-comments a{color:var(--mp-link)!important}
#top[data-manuscript-theme] #mp-comments :is(.text-muted,small){color:var(--mp-muted)!important}
#top[data-manuscript-theme] #mp-comments :is(button,.btn){background:var(--mp-action);color:var(--mp-action-ink)!important;border-color:var(--mp-line)}
#top[data-manuscript-theme] :is(a,button,select,summary,input,textarea):focus-visible{outline-color:var(--mp-link)}
/* Reading surface and manuscript covers remain reader/author controlled. */
.page-manuscript-showcase.mp-focus #profile-style-trigger,.page-manuscript-showcase.mp-contents-open #profile-style-trigger{display:none}
.page-manuscript-showcase #profile-style-trigger{right:16px}
@media(max-width:600px){#top[data-manuscript-theme] .mp-book-hero::before{inset-inline:-16px}}
#top[data-manuscript-theme] :is(.mp-byline a,.mp-author h2 a,.mp-world-body h2 a,.mp-author-social a){color:var(--mp-link)!important}

#top[data-manuscript-theme] .mp-reading-nav{--mp-nav-bg:var(--mp-panel)}
