.notice-banner {
  display: flex;
  justify-content: center;
  margin: 12px 0 0;
  padding: 0;
  /* Road-sign yellow block; the icon sits in a black strip on the left */
  background: linear-gradient(to right, #1a1400 0 52px, #ffcc00 52px);
  border: none;
  border-radius: 6px;
  color: #1a1400;
  animation: noticeBannerIn 0.25s var(--ease-spring, ease-out);
}

.notice-banner[hidden] {
  display: none !important;
}

.notice-banner-inner {
  display: flex;
  align-items: center;
  gap: 27px;
  width: 100%;
  padding: 14px 10px 14px 15px;
  text-align: left;
}

.notice-banner-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: #ffcc00;
}

.notice-banner-text {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
  white-space: pre-line;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.notice-banner-link {
  color: #1a1400;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.notice-banner-link:hover,
.notice-banner-link:focus-visible {
  color: #4a3b00;
}

.notice-banner-close {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: #1a1400;
  cursor: pointer;
  transition: background var(--transition-fast, 0.12s), color var(--transition-fast, 0.12s);
}

.notice-banner-close:hover {
  background: rgba(26, 20, 0, 0.12);
  color: #1a1400;
}

.notice-banner-close:focus-visible {
  outline: 2px solid #1a1400;
  outline-offset: 2px;
}

/* Light theme: the icon strip is a deeper yellow instead of black, with a dark icon */
html[data-theme="light"] .notice-banner {
  background: linear-gradient(to right, #f0b000 0 52px, #ffcc00 52px);
}

html[data-theme="light"] .notice-banner-icon {
  color: #1a1400;
}

/* Phone: compact, finger-sized close button */
@media (max-width: 640px) {
  .notice-banner {
    margin-top: 10px;
    border-radius: 6px;
    background: linear-gradient(to right, #1a1400 0 44px, #ffcc00 44px);
  }
  html[data-theme="light"] .notice-banner {
    background: linear-gradient(to right, #f0b000 0 44px, #ffcc00 44px);
  }
  .notice-banner-inner {
    gap: 22px;
    padding: 10px 4px 10px 12px;
  }
  .notice-banner-text {
    font-size: 13px;
    line-height: 1.5;
  }
  .notice-banner-icon {
    width: 20px;
    height: 20px;
  }
  .notice-banner-close {
    width: 44px;
    height: 44px;
    margin: -10px 0 -10px 0;
  }
}

@keyframes noticeBannerIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .notice-banner {
    animation: none;
  }
}
