.global-notice {
  position: fixed;
  inset: max(12px, env(safe-area-inset-top)) auto auto 50%;
  z-index: 2147483647;
  transform: translateX(-50%);
  box-sizing: border-box;
  width: max-content;
  max-width: min(520px, calc(100vw - 28px));
  margin: 0;
  padding: 10px 16px;
  border: 1px solid #d6e1fb;
  border-radius: 9px;
  background: #f3f7ff;
  color: #1b4284;
  box-shadow: 0 5px 20px #21385e24;
  font: 600 14px/1.5 system-ui, "Microsoft YaHei", sans-serif;
  text-align: center;
  overflow-wrap: anywhere;
  pointer-events: none;
}

.global-notice[data-type="success"] { border-color: #bfe3d3; background: #effaf4; color: #176347; }
.global-notice[data-type="error"] { border-color: #ecc7ce; background: #fff2f4; color: #952237; }
.global-notice[hidden] { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .global-notice:not([hidden]) { animation: notice-appear 140ms ease-out; }
  @keyframes notice-appear {
    from { opacity: 0; transform: translate(-50%, -5px); }
    to { opacity: 1; transform: translate(-50%, 0); }
  }
}
