.library-controls { min-width: 0; }
.library-split { display: grid; grid-template-columns: minmax(0, 3fr) minmax(44px, 1fr); }
.library-split form { min-width: 0; margin: 0; }
.book-actions .library-split .button { min-height: 46px; height: 100%; }
.library-split form:first-child .button { border-radius: 6px 0 0 6px; }
.library-split .library-bell { border-radius: 0 6px 6px 0; border-left: 0; }
.library-bell[aria-pressed="true"] { background: var(--surface); color: var(--accent); }
.library-bell span { display: inline-flex; }
.library-bell span[hidden] { display: none; }
.library-split button:disabled { cursor: default; opacity: .5; }
.library-status { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 8px 0 0; }
.library-status:empty { display: none; }
[data-panel-toggle="header-notifications"] { position: relative; }
.notification-badge { position: absolute; top: 0; right: -4px; min-width: 17px; padding: 2px 4px; border-radius: 10px; background: var(--selected-bg); color: var(--selected-text); font-size: 10px; line-height: 1.2; font-weight: 700; font-variant-numeric: tabular-nums; }
#header-notifications { max-height: min(620px, calc(100dvh - 100px)); overflow-y: auto; overscroll-behavior: contain; }
.chapter-notifications { list-style: none; margin: 0; padding: 0; }
.chapter-notification { border-bottom: 1px solid var(--line); }
.notification-open { display: flex; align-items: center; width: 100%; min-width: 0; min-height: 44px; padding: 10px 4px; color: var(--text); font-size: 14px; line-height: 1.5; text-decoration: none; border-radius: 4px; }
.notification-open:hover { background: var(--hover-surface); text-decoration: underline; text-underline-offset: 3px; }
.notification-open:focus-visible, .library-split button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; position: relative; z-index: 1; }
.notification-book { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notification-chapter { flex-shrink: 0; white-space: pre; font-variant-numeric: tabular-nums; }
.is-unread .notification-open { font-weight: 600; }
.notification-view-all { display: flex; align-items: center; justify-content: space-between; min-height: 44px; margin-top: 8px; color: var(--text); font-size: 14px; font-weight: 600; }
.notification-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 12px; }
.notification-toolbar p { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.notification-toolbar .text-button { min-height: 44px; font-size: 13px; }
.notification-toolbar .text-button:disabled { color: var(--muted); cursor: default; }
@media (max-width: 640px) {
    .book-actions > .library-controls { grid-column: 1 / -1; }
    .book-actions > .button { grid-column: 1 / -1; }
    .book-actions .library-split .button { font-size: 13px; }
}
