#coam-sat-overlay,
#coam-event-load-notice,
#coam-traffic-notice {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px))
    max(20px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#coam-sat-overlay,
#coam-event-load-notice {
  z-index: 2147483000;
  background: #dc291c;
}

#coam-event-load-notice {
  z-index: 2147482999;
}

#coam-traffic-notice {
  z-index: 2147483001;
  background: #dc291c;
}

#coam-sat-overlay[hidden] {
  display: none !important;
}

.coam-sat-box {
  width: 100%;
  max-width: 440px;
  margin: auto;
  flex-shrink: 0;
  text-align: center;
  color: #fff;
}

.coam-sat-logo-wrap {
  margin: 0 auto 28px;
  max-width: min(240px, 72vw);
}

.coam-sat-box img.coam-sat-logo {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.12));
}

.coam-sat-box h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 12px;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: #fff;
  text-wrap: balance;
}

.coam-sat-box p#coam-sat-msg {
  margin: 0 0 16px;
  font-size: 1rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
  text-wrap: pretty;
}

.coam-sat-count {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin: 8px 0 16px;
  font-variant-numeric: tabular-nums;
}

.coam-sat-sub {
  font-size: 0.9rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.88);
}

.coam-sat-sub span {
  display: block;
  margin-bottom: 10px;
}

.coam-sat-web-links {
  margin: 14px 0 0;
  font-size: 0.9rem;
}

.coam-sat-web-links a {
  color: #fff;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.coam-sat-web-links a:hover {
  color: rgba(255, 255, 255, 0.85);
}

.coam-sat-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  margin: 16px auto;
  animation: coamSatSpin 0.8s linear infinite;
}

#coam-event-load-notice .coam-sat-box {
  max-width: 480px;
}

#coam-event-load-notice .coam-sat-actions {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

#coam-event-load-notice button.coam-sat-btn-primary {
  background: #fff;
  color: #dc291c;
  border: 0;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

#coam-event-load-notice button.coam-sat-btn-ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.65);
  padding: 12px 20px;
  border-radius: 6px;
  font-size: 0.95rem;
  cursor: pointer;
}

@keyframes coamSatSpin {
  to {
    transform: rotate(360deg);
  }
}

#coam-traffic-notice .coam-sat-box {
  max-width: 520px;
}

#coam-traffic-notice .coam-traffic-body {
  text-align: left;
  margin: 0 0 8px;
}

#coam-traffic-notice .coam-traffic-p {
  margin: 0 0 12px;
  font-size: 0.95rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
}

#coam-traffic-notice .coam-sat-actions {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

#coam-traffic-notice button.coam-sat-btn-primary {
  background: #fff;
  color: #dc291c;
  border: 0;
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
}

#coam-traffic-notice a.coam-sat-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.65);
  padding: 12px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.95rem;
}

#coam-traffic-notice h2 {
  text-wrap: balance;
  line-height: 1.3;
}

#coam-traffic-notice .coam-traffic-title-line {
  display: block;
  margin-top: 0.4em;
  font-size: 0.95em;
  font-weight: 600;
}

@media (max-width: 480px) {
  .coam-sat-logo-wrap {
    margin-bottom: 20px;
    max-width: min(200px, 68vw);
  }

  .coam-sat-box h2 {
    font-size: 1.125rem;
  }

  .coam-sat-box p#coam-sat-msg,
  #coam-traffic-notice .coam-traffic-p {
    font-size: 0.9375rem;
  }

  .coam-sat-count {
    font-size: 1.75rem;
  }

  #coam-event-load-notice .coam-sat-actions,
  #coam-traffic-notice .coam-sat-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  #coam-event-load-notice button.coam-sat-btn-primary,
  #coam-event-load-notice button.coam-sat-btn-ghost,
  #coam-traffic-notice button.coam-sat-btn-primary,
  #coam-traffic-notice a.coam-sat-btn-ghost {
    width: 100%;
    box-sizing: border-box;
  }
}

@media (max-height: 700px) {
  .coam-sat-logo-wrap {
    margin-bottom: 16px;
    max-width: min(180px, 60vw);
  }

  .coam-sat-box h2 {
    margin-bottom: 8px;
  }

  .coam-sat-box p#coam-sat-msg {
    margin-bottom: 12px;
  }

  .coam-sat-count {
    font-size: 1.5rem;
    margin: 4px 0 10px;
  }

  .coam-sat-spinner {
    margin: 10px auto;
  }
}
