/* Small, dismissible notifications share the header's quiet icon treatment. */
#notice:not([hidden]) {
  position: fixed; top: 88px; right: 16px; z-index: 130;
  display: flex; align-items: center; gap: 8px;
  width: min(340px, calc(100vw - 32px)); max-width: none; margin: 0; padding: 6px 6px 6px 12px;
  border: 1px solid #c4d7e7; border-radius: 10px; background: #f2f8ff; color: #173a5c;
  box-shadow: 0 6px 20px #173a5c26; font-size: 12px; font-weight: 500; line-height: 1.4;
  touch-action: pan-y; transition: transform 150ms ease, opacity 150ms ease;
}
#notice-message { flex: 1; min-width: 0; overflow-wrap: anywhere; }
#notice:not([hidden])::before { content: '✓'; flex: none; color: #17669e; font-size: 16px; font-weight: 600; }
#notice.error:not([hidden]) { border-color: #dfbdb2; background: #fff5f1; color: #733328; }
#notice.error:not([hidden])::before { content: '!'; color: #ae4935; }
#notice .notice-dismiss, #close-notification-history {
  display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; min-height: 36px;
  padding: 0; margin: 0; border: 0; border-radius: 0; background: transparent; color: #536b80; box-shadow: none;
}
#notice .notice-dismiss:hover, #close-notification-history:hover { background: transparent; color: #173a5c; box-shadow: none; }
.notice-dismiss svg, #close-notification-history svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
#notice.is-dragging { transition: none; user-select: none; }
.notice-dismissed { position: fixed; top: 88px; right: 16px; z-index: 131; display: flex; align-items: center; gap: 12px; max-width: calc(100vw - 32px); padding: 3px 10px; border: 1px solid #d4e0ea; border-radius: 8px; background: #fff; color: #536b80; box-shadow: 0 4px 14px #173a5c1a; font-size: 11px; }
#undo-notice-dismissal { min-height: 36px; padding: 0 4px; border: 0; background: transparent; color: #155d99; box-shadow: none; font-size: 12px; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.header-right .notification-history-toggle { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; min-height: 44px; padding: 0; border: 1px solid #b6c8da; border-radius: 50%; background: #fff; color: #173a5c; }
.notification-history-toggle svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.notification-history { inset: 0 0 0 auto; margin: 0; width: min(380px, calc(100vw - 24px)); max-width: none; height: 100dvh; max-height: none; padding: 0; border: 0; background: #f6f9fc; color: #173a5c; }
.notification-history::backdrop { background: #102b464d; }
.notification-history-sheet { min-height: 100%; padding: max(16px, env(safe-area-inset-top)) 14px max(16px, env(safe-area-inset-bottom)); }
.notification-history-head { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 16px; }
.notification-history-head > div { flex: 1; min-width: 0; }
.notification-history-head h2 { margin: 0 0 5px; font-size: 17px; font-weight: 600; }
.notification-history-head p, .notification-history-foot { margin: 0; color: #63768a; font-size: 11px; line-height: 1.5; }
.notification-history-foot { margin-top: 16px; }
.notification-history-empty { font-size: 13px; line-height: 1.5; color: #63768a; }
#notification-history-list { display: grid; gap: 8px; }
.notification-history-item { border: 1px solid #d6e2ec; border-radius: 9px; background: #fff; }
.notification-history-item summary { display: flex; align-items: flex-start; gap: 9px; min-height: 44px; padding: 12px; cursor: pointer; list-style: none; }
.notification-history-item summary::-webkit-details-marker { display: none; }
.notification-history-item summary::marker { content: ''; }
.notification-history-item summary:focus-visible { outline: 2px solid #2781c5; outline-offset: 2px; border-radius: 8px; }
.notification-history-mark { color: #17669e; }
.notification-history-mark.is-error { color: #ae4935; }
.notification-history-copy { display: grid; gap: 5px; min-width: 0; }
.notification-history-copy > span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12px; overflow-wrap: anywhere; }
.notification-history-copy time { color: #718297; font-size: 10px; }
.notification-history-item[open] > summary { background: #eaf3fb; border-radius: 8px 8px 0 0; }
.notification-history-detail { padding: 0 12px 10px; }
.notification-history-detail p { font-size: 12px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.notification-history-detail small { display: block; margin-bottom: 8px; color: #63768a; overflow-wrap: anywhere; }
.notification-history-detail button { margin: 0 8px 3px 0; min-height: 36px; padding: 6px 9px; font-size: 11px; font-weight: 500; }
.notification-history-detail .notification-history-review { border: 0; color: #155d99; background: transparent; box-shadow: none; }
body.notification-history-open { overflow: hidden; }
.notification-history { width: min(440px, calc(100vw - 20px)); }
.notification-search-panel { margin-bottom: 12px; border-bottom: 1px solid #d6e2ec; }
.notification-search-panel > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; list-style: none; font-size: 12px; font-weight: 500; }
.notification-search-panel > summary::-webkit-details-marker { display: none; }
.notification-search-panel > summary::marker { content: ''; }
.notification-search-panel > summary:focus-visible { outline: 2px solid #2781c5; outline-offset: 2px; border-radius: 5px; }
.notification-search-panel > summary svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.notification-search-panel > summary .notification-search-chevron { margin-left: auto; width: 14px; height: 14px; }
.notification-search-panel[open] > summary .notification-search-chevron { transform: rotate(90deg); }
.notification-history-filters { display: grid; gap: 8px; margin: 4px 0 12px; }
.notification-history-filters label { display: grid; gap: 4px; min-width: 0; font-size: 10px; font-weight: 500; color: #536b80; }
.notification-history-filters input, .notification-history-filters select { width: 100%; min-width: 0; min-height: 36px; padding: 6px 7px; font-size: 12px; border: 1px solid #c7d7e5; border-radius: 7px; background: #fff; }
.notification-filter-row { display: flex; gap: 7px; align-items: end; }
.notification-filter-row > label { flex: 1; }
.notification-filter-row button { min-height: 36px; padding: 5px 8px; font-size: 10px; font-weight: 500; }
#notification-history-refresh { display: grid; place-items: center; width: 36px; flex: none; padding: 0; }
#notification-history-refresh svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.6; fill: none; }
#notification-history-status, #notification-history-count { margin: 5px 0; font-size: 10px; line-height: 1.4; color: #63768a; }
#notification-history-count { margin-bottom: 10px; }
.notification-date-group > summary { padding: 10px 2px; cursor: pointer; font-size: 12px; font-weight: 600; color: #254f73; }
.notification-date-records { display: grid; gap: 7px; }
.notification-history-copy strong { font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.notification-history-copy > span { font-size: 11px; }
#notification-history-more { width: 100%; margin-top: 12px; font-size: 12px; }
@media (max-width: 800px) {
  .mobile-build-navigation #notice:not([hidden]), .mobile-build-navigation .notice-dismissed { top: calc(56px + env(safe-area-inset-top)); }
  .mobile-build-navigation .header-right .notification-history-toggle { border: 0; border-radius: 6px; background: transparent; box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) { #notice:not([hidden]) { transition: none; } }
