.system-notice-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(2, 9, 14, .78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.system-notice-dialog {
  width: min(590px, 100%);
  max-height: min(86vh, 760px);
  overflow-y: auto;
  padding: 26px;
  border: 1px solid #e5484d;
  border-top: 6px solid #e5484d;
  border-radius: 20px;
  background: #0f2333;
  color: #eaf2f8;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .48);
}

.system-notice-dialog.is-warning { border-color: #e4aa33; }
.system-notice-dialog.is-info { border-color: #96e1ff; }
.system-notice-badge {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(229, 72, 77, .17);
  color: #ff9b9b;
  font-size: .76rem;
  font-weight: 850;
  letter-spacing: .05em;
}
.is-warning .system-notice-badge { background: rgba(228, 170, 51, .17); color: #ffd477; }
.is-info .system-notice-badge { background: rgba(150, 225, 255, .14); color: #96e1ff; }
.system-notice-dialog h2 {
  display: block;
  margin: 18px 0 10px;
  padding: 0;
  border: 0;
  color: #fff;
  font-size: clamp(1.45rem, 5vw, 2rem);
  line-height: 1.2;
  letter-spacing: -.02em;
  text-transform: none;
}
.system-notice-message {
  margin: 0;
  color: #c5d5df;
  font-size: 1rem;
  line-height: 1.65;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.system-notice-period {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid #29485d;
  color: #96e1ff;
  font-weight: 750;
}
.system-notice-confirm {
  width: 100%;
  min-height: 50px;
  margin-top: 22px;
  padding: 10px 18px;
  border: 0;
  border-radius: 12px;
  background: #ffe32e;
  color: #0a1620;
  font: inherit;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
}
.system-notice-confirm:focus-visible { outline: 3px solid #96e1ff; outline-offset: 3px; }

@media (max-width: 600px) {
  .system-notice-overlay { padding: 12px; }
  .system-notice-dialog { padding: 21px 17px; border-radius: 16px; }
  .system-notice-confirm { font-size: 16px; }
}

@media (prefers-reduced-motion: no-preference) {
  .system-notice-dialog { animation: system-notice-in .2s ease-out both; }
  @keyframes system-notice-in {
    from { opacity: 0; transform: translateY(12px) scale(.985); }
    to { opacity: 1; transform: none; }
  }
}

/* Information does not interrupt the current task or take keyboard focus. */
.system-info-banner { display:flex; align-items:flex-start; gap:16px; width:min(1180px,calc(100% - 32px)); margin:16px auto; padding:16px 18px; border:1px solid #52778e; border-left:4px solid #96e1ff; border-radius:12px; background:#172e3e; color:#f0f7fa; font:400 .9rem/1.5 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif; }
.system-info-banner > div { flex:1; min-width:0; overflow-wrap:anywhere; }
.system-info-banner strong { display:block; margin-bottom:4px; }
.system-info-banner p { margin:0; color:#c5d8e1; white-space:pre-line; }
.system-info-banner button { flex:0 0 auto; min-height:44px; padding:8px 12px; border:1px solid #52778e; border-radius:8px; background:transparent; color:#96e1ff; font:inherit; cursor:pointer; }
.system-info-banner button:focus-visible { outline:3px solid #ffe32e; outline-offset:3px; }
@media(max-width:500px) { .system-info-banner { flex-direction:column; gap:10px; } .system-info-banner button { align-self:flex-end; } }

/* Native dialog keeps focus and background interaction inside the notice. */
dialog.system-notice-dialog { box-sizing:border-box; margin:auto; width:min(590px,calc(100% - 24px)); max-height:calc(100dvh - 40px); }
dialog.system-notice-dialog::backdrop { background:rgba(2,9,14,.72); backdrop-filter:blur(7px); -webkit-backdrop-filter:blur(7px); }
.system-notice-center { border-color:#52778e; }
.system-notice-history-item { padding:20px 0; border-bottom:1px solid #52778e; }
.system-notice-history-item h2 { font-size:1.25rem; }
.system-notice-entry { margin:12px 0; text-align:center; }
.system-notice-entry button { padding:10px 16px; min-height:44px; border:1px solid #52778e; background:#172e3e; color:#96e1ff; border-radius:10px; font:inherit; cursor:pointer; }
.system-notice-entry button:focus-visible { outline:3px solid #ffe32e; outline-offset:3px; }
@media(prefers-reduced-transparency:reduce) { dialog.system-notice-dialog::backdrop { background:rgba(2,9,14,.95); backdrop-filter:none; } }
