/* Compact announcements share the existing account header. */
.xw-notifications { position: relative; flex: 0 0 auto; }
#xw-notification-button { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 36px; padding: 0; border: 0; border-radius: 7px; background: transparent; color: var(--directory-accent, #7dd3fc); cursor: pointer; }
#xw-notification-button:hover, #xw-notification-button[aria-expanded="true"] { background: rgba(125, 211, 252, .1); }
#xw-notification-button svg { width: 19px; height: 19px; }
.xw-notifications [hidden] { display: none !important; }
.xw-notification-panel { position: absolute; top: calc(100% + 8px); right: 0; z-index: 9998; display: flex; flex-direction: column; width: 340px; max-height: min(65vh, 460px); max-height: min(65dvh, 460px); border: 1px solid var(--border, #334155); border-radius: 12px; background: var(--surface, #1e293b); color: var(--text, #f1f5f9); box-shadow: 0 14px 38px rgba(2, 6, 23, .32); font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif; }
.xw-notification-heading { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .75rem .85rem .6rem; border-bottom: 1px solid var(--border, #334155); }
#xw-notification-title { margin: 0; font-size: .95rem; font-weight: 700; line-height: 1.4; }
.xw-notification-actions { display: flex; align-items: center; gap: .3rem; }
.xw-notifications button { font-family: inherit; }
.xw-notification-close { width: 32px; height: 32px; padding: 0; border: 0; border-radius: 5px; background: transparent; color: var(--muted, #94a3b8); font-size: 1.15rem; cursor: pointer; }
.xw-notification-close:hover { background: rgba(148, 163, 184, .1); }
.xw-notice-list { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 .85rem; }
.xw-notice { padding: .7rem 0; }
.xw-notice + .xw-notice { border-top: 1px solid var(--border, #334155); }
.xw-notice-open { display: block; width: 100%; padding: .25rem; border: 0; border-radius: 6px; background: transparent; text-align: left; color: inherit; cursor: pointer; }
.xw-notice-open:hover { background: rgba(125, 211, 252, .06); }
.xw-notice-title { display: block; font-size: .9rem; font-weight: 600; line-height: 1.5; }
.xw-notice-meta { display: flex; align-items: center; gap: .6rem; margin-top: .35rem; }
.xw-notice-version { padding: .12rem .4rem; border-radius: 4px; background: rgba(125, 211, 252, .12); color: var(--directory-accent, #7dd3fc); font-size: .68rem; font-weight: 600; }
.xw-notice time { color: var(--muted, #94a3b8); font-size: .68rem; }
.xw-notice-summary { display: block; margin: .45rem 0 0; color: var(--muted, #94a3b8); font-size: .78rem; line-height: 1.7; overflow-wrap: anywhere; }
.xw-notice-more { display: block; margin-top: .45rem; color: var(--directory-accent, #7dd3fc); font-size: .75rem; }
.xw-notice-detail { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: .5rem .85rem .85rem; }
.xw-notice-back { border: 0; border-radius: 5px; padding: .3rem 0; min-height: 32px; background: transparent; color: var(--directory-accent, #7dd3fc); font-size: .75rem; cursor: pointer; }
.xw-notice-detail time { color: var(--muted, #94a3b8); font-size: .68rem; }
.xw-notice-detail p { margin: .4rem 0 0; color: var(--muted, #94a3b8); font-size: .78rem; line-height: 1.7; overflow-wrap: anywhere; }
.xw-notice-section { margin-top: .7rem; }
.xw-notice-section h3 { margin: 0; font-size: .8rem; font-weight: 600; }
.xw-notice a { display: inline-flex; align-items: center; min-height: 32px; margin-top: .25rem; color: var(--directory-accent, #7dd3fc); font-size: .75rem; text-decoration: none; }
.xw-notification-empty { margin: 0; padding: 1rem 0; color: var(--muted, #94a3b8); font-size: .8rem; }
.xw-notifications :is(button, a):focus-visible { outline: 2px solid #7dd3fc; outline-offset: 2px; }
@media (max-width: 600px) {
  .xw-notification-panel { position: fixed; top: 52px; right: 10px; left: 10px; width: auto; max-height: calc(100vh - 72px); max-height: min(65dvh, 460px); }
}
@media (max-width: 420px) {
  #xw-topnav:has(.xw-notifications) { padding-right: .65rem; padding-left: .65rem; gap: .3rem; }
  #xw-topnav:has(.xw-notifications) .xw-nav-right > div { gap: .2rem !important; }
}
@media (max-width: 360px) {
  #xw-topnav:has(.xw-notifications) .xw-brand { font-size: .85rem; }
  #xw-topnav:has(.xw-notifications) .xw-btn-register { padding-right: .45rem; padding-left: .45rem; }
}
@media (max-width: 340px) {
  #xw-topnav:has(.xw-notifications) { padding-right: .5rem; padding-left: .5rem; }
  #xw-topnav:has(.xw-notifications) .xw-btn-feedback > span:last-child { display: none; }
  #xw-topnav:has(.xw-notifications) .xw-btn-account { padding-right: .45rem; padding-left: .45rem; }
}
@media print { .xw-notifications { display: none; } }
