:is(.home-notice-header-button, .home-notice-modal) {
  --home-notice-primary: var(--primary, #0f2855);
  --home-notice-secondary: var(--primary-hover, #1e90ff);
  --home-notice-rgb: var(--primary-rgb, 15, 40, 85);
}
.home-notice-modal .modal-dialog { width: min(94vw, 540px); }
.home-notice-modal .modal-content {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--user-border, #dfe6ef);
  border-radius: 24px;
  color: var(--user-text, #102033);
  background: var(--user-surface, #fff);
  box-shadow: 0 28px 80px rgba(8, 26, 45, .25);
}

.home-notice-modal.show .modal-content {
  animation: home-notice-modal-in .35s cubic-bezier(.2, .75, .2, 1) both;
}

.home-notice-accent {
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--home-notice-primary), var(--home-notice-secondary));
}

.home-notice-header {
  position: relative;
  align-items: center;
  padding: 1.35rem 1.35rem 1rem;
  border: 0;
  background:
    radial-gradient(circle at 92% 0%, rgba(var(--home-notice-rgb), .12), transparent 34%),
    linear-gradient(120deg, rgba(var(--home-notice-rgb), .1), transparent 58%);
}

.home-notice-heading { display: flex; align-items: center; gap: .85rem; min-width: 0; }
.home-notice-icon {
  position: relative;
  width: 52px;
  min-width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(var(--home-notice-rgb), .16);
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(145deg, var(--home-notice-primary), var(--home-notice-secondary));
  box-shadow: 0 10px 24px rgba(var(--home-notice-rgb), .23);
  font-size: 1.45rem;
}
.home-notice-icon::after {
  content: "";
  position: absolute;
  inset: -6px;
  border: 1px solid rgba(var(--home-notice-rgb), .17);
  border-radius: 20px;
  animation: home-notice-pulse 2.2s ease-out infinite;
}
.home-notice-header .modal-title {
  margin: 0;
  color: var(--user-text, #102033);
  font-size: 1.25rem;
  font-weight: 950;
  line-height: 1.15;
}
.home-notice-close {
  width: 38px;
  min-width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--user-border, #dfe6ef);
  border-radius: 12px;
  color: var(--user-muted, #66758a);
  background: var(--user-surface, #fff);
  font-size: 1.4rem;
  transition: color .18s ease, transform .18s ease, background .18s ease;
}
.home-notice-close:hover { color: var(--home-notice-secondary); background: rgba(var(--home-notice-rgb), .08); transform: rotate(5deg); }

.home-notice-body { padding: .4rem 1.35rem 1.2rem; }
.home-notice-content {
  position: relative;
  overflow-wrap: anywhere;
  padding: 1rem 1rem 1rem 1.15rem;
  border: 1px solid var(--user-border, #dfe6ef);
  border-radius: 16px;
  color: var(--user-text, #102033);
  background: var(--user-surface-soft, #f7f9fc);
  font-size: .88rem;
  line-height: 1.7;
}
.home-notice-content::before {
  content: "";
  position: absolute;
  inset: .8rem auto .8rem 0;
  width: 4px;
  border-radius: 0 5px 5px 0;
  background: linear-gradient(var(--home-notice-primary), var(--home-notice-secondary));
}
.home-notice-content > :first-child { margin-top: 0; }
.home-notice-content > :last-child { margin-bottom: 0; }
.home-notice-content h1,
.home-notice-content h2,
.home-notice-content h3,
.home-notice-content h4 {
  margin: 0 0 .55rem;
  color: var(--user-text, #102033);
  font-size: 1rem;
  font-weight: 950;
}
.home-notice-content ul, .home-notice-content ol { margin: .4rem 0; padding-left: 1.25rem; }
.home-notice-content li + li { margin-top: .32rem; }
.home-notice-content img { max-width: 100%; height: auto; border-radius: 12px; }
.home-notice-content a { color: var(--home-notice-secondary); font-weight: 750; text-decoration: underline; }
.home-notice-content table { display: block; max-width: 100%; overflow-x: auto; }

.home-notice-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  padding: 0 1.35rem 1.35rem;
  border: 0;
}
.home-notice-reminder { display: flex; align-items: center; gap: .35rem; color: var(--user-muted, #66758a); font-size: .7rem; }
.home-notice-confirm {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding-inline: 1rem;
  border: 0;
  border-radius: 12px;
  color: #fff !important;
  background: linear-gradient(135deg, var(--home-notice-primary), var(--home-notice-secondary)) !important;
  box-shadow: 0 10px 22px rgba(var(--home-notice-rgb), .2);
  font-weight: 900;
}
.home-notice-confirm:hover { transform: translateY(-1px); }

.home-notice-modal + .modal-backdrop,
.modal-backdrop.show { backdrop-filter: blur(3px); }

html[data-theme-mode="dark"] .home-notice-modal .modal-content { box-shadow: 0 28px 80px rgba(0, 0, 0, .5); }
html[data-theme-mode="dark"] .home-notice-content { background: rgba(255, 255, 255, .035); }
html[data-theme-mode="dark"] .home-notice-header { background: linear-gradient(120deg, rgba(var(--home-notice-rgb), .08), transparent 58%); }

@keyframes home-notice-modal-in {
  from { opacity: 0; transform: translateY(18px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes home-notice-pulse {
  0% { opacity: .8; transform: scale(.92); }
  75%, 100% { opacity: 0; transform: scale(1.22); }
}

@media (max-width: 575.98px) {
  .home-notice-modal .modal-dialog { width: 100%; max-width: none; min-height: 100%; align-items: flex-end; margin: 0; }
  .home-notice-modal .modal-content { max-height: calc(100vh - 1rem); overflow-y: auto; border-width: 1px 0 0; border-radius: 22px 22px 0 0; }
  .home-notice-header { padding: 1.15rem .95rem .85rem; }
  .home-notice-icon { width: 45px; min-width: 45px; height: 45px; border-radius: 14px; font-size: 1.2rem; }
  .home-notice-header .modal-title { font-size: 1.08rem; }
  .home-notice-close { width: 35px; min-width: 35px; height: 35px; border-radius: 10px; }
  .home-notice-body { padding: .3rem .95rem .9rem; }
  .home-notice-content { padding: .85rem .8rem .85rem 1rem; border-radius: 13px; font-size: .8rem; }
  .home-notice-footer { align-items: stretch; flex-direction: column; padding: 0 .95rem max(.95rem, env(safe-area-inset-bottom)); }
  .home-notice-reminder { justify-content: center; text-align: center; }
  .home-notice-confirm { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .home-notice-modal.show .modal-content,
  .home-notice-icon::after { animation: none; }
}

/* Header notification trigger */
.home-notice-header-element {
  flex: 0 0 auto;
}

.home-notice-header-button {
  position: relative;
  border: 0;
  color: var(--home-notice-primary) !important;
  background: transparent;
  cursor: pointer;
}

.home-notice-header-button .header-link-icon {
  color: inherit !important;
  font-size: 1.25rem;
}

.home-notice-header-button:hover,
.home-notice-header-button:focus-visible {
  color: var(--home-notice-secondary) !important;
  background: rgba(var(--home-notice-rgb), .08);
}

.home-notice-header-dot {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--user-surface, #fff);
  border-radius: 50%;
  background: var(--home-notice-secondary);
  box-shadow: 0 0 0 3px rgba(var(--home-notice-rgb), .13);
}

html[data-theme-mode="dark"] .home-notice-header-dot {
  border-color: var(--user-surface, #171c24);
}

@media (max-width: 575.98px) {
  .home-notice-header-button .header-link-icon { font-size: 1.15rem; }
  .home-notice-header-dot { top: 8px; right: 8px; }
}