#announcementsBtn { display: inline-flex; align-items: center; gap: .35em; white-space: nowrap; }
#announcementsBtn[hidden] { display: none; }
#noticeCount:not([hidden]) { background: var(--accent); color: #172019; border-radius: 1em; padding: 0 .45em; font-size: .75em; line-height: 1.55; font-variant-numeric: tabular-nums; }
:root[data-theme="light"] #noticeCount { color: white; background: #416e52; }
#announcementsDialog { box-sizing: border-box; width: min(460px, calc(100vw - 28px)); max-height: 80dvh; overflow: auto; border: 1px solid var(--line); border-radius: 16px; padding: 22px; color: #e9edf4; background: #1b212c; }
:root[data-theme="light"] #announcementsDialog { color: #223d47; background: #f6fbfa; }
#announcementsDialog::backdrop { background: rgb(13 22 36 / .47); }
#announcementsDialog h2 { font-size: 1.2rem; overflow-wrap: anywhere; margin: 0; }
#announcementsDialog .library-heading { gap: 1rem; margin-bottom: 1rem; }
#announcementsDialog .quiet { white-space: nowrap; }
#announcementsDialog footer { display: flex; align-items: center; gap: 10px; }
#noticeRead { margin-left: auto; width: auto; }
#noticeBody, #noticeList { overflow-wrap: anywhere; }
#noticeBody { line-height: 1.65; }
#noticeBody img { max-width: 100%; height: auto; }
#noticeBody pre, #noticeBody table { display: block; overflow-x: auto; }
#noticeBody a { color: inherit; text-decoration: underline; }
#noticeStatus, #noticeDate, .notice-row small { font-size: .8rem; color: var(--muted); }
.notice-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; width: 100%; padding: 13px 2px; text-align: left; color: inherit; background: transparent; border: 0; border-bottom: 1px solid var(--line); }
.notice-row small { flex-shrink: 0; }
.notice-row.unread small { color: var(--accent); }
@media (max-width: 760px) {
  .topbar:has(#announcementsBtn:not([hidden])) .top-actions { min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .topbar:has(#announcementsBtn:not([hidden])) .top-actions > * { flex: none; white-space: nowrap; }
}
