/* Live USGS M5.0+ earthquake ticker — above clock / disaster row */
#yg-usgs-quakes.yg-usgs-quakes {
  display: block;
  width: 100%;
  margin: 0;
  padding: 10px 16px 12px;
  box-sizing: border-box;
  background: linear-gradient(90deg, #140808 0%, #2a0c0c 40%, #1a1218 75%, #0c1018 100%);
  border-bottom: 3px solid #ffe566;
  color: #f5f5f5;
  font-family: system-ui, -apple-system, sans-serif;
  overflow: hidden;
}

.yg-usgs-quakes-inner {
  max-width: 1600px;
  margin: 0 auto;
}

.yg-usgs-quakes-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  margin: 0 0 8px;
}

.yg-usgs-quakes-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 10px;
  border-radius: 6px;
  background: #8b1a1a;
  color: #ffe566;
  font: 800 12px/1.2 Georgia, "Times New Roman", serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 0 0 1px rgba(255, 229, 102, 0.35);
}

.yg-usgs-quakes-live::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff4d4d;
  box-shadow: 0 0 8px #ff4d4d;
  animation: yg-usgs-pulse 1.4s ease-in-out infinite;
}

@keyframes yg-usgs-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(0.85);
  }
}

.yg-usgs-quakes-title {
  margin: 0;
  color: #ffe566;
  font: 700 clamp(13px, 1.8vw, 17px) / 1.25 Georgia, "Times New Roman", serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.yg-usgs-quakes-count {
  color: #d7d7d7;
  font: 600 13px/1.3 system-ui, sans-serif;
}

.yg-usgs-quakes-count strong {
  color: #fff;
  font-weight: 800;
}

.yg-usgs-quakes-source {
  margin-left: auto;
  color: #8a93a3;
  font: 500 11px/1.3 system-ui, sans-serif;
}

.yg-usgs-quakes-source a {
  color: #9ec1ff;
  text-decoration: none;
}

.yg-usgs-quakes-source a:hover {
  text-decoration: underline;
}

.yg-usgs-quakes-track-wrap {
  position: relative;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
}

.yg-usgs-quakes-track {
  display: flex;
  width: max-content;
  gap: 10px;
  animation: yg-usgs-scroll 90s linear infinite;
  will-change: transform;
}

.yg-usgs-quakes-track-wrap:hover .yg-usgs-quakes-track {
  animation-play-state: paused;
}

@keyframes yg-usgs-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .yg-usgs-quakes-track {
    animation: none;
    flex-wrap: wrap;
    width: auto;
    max-width: 100%;
  }

  .yg-usgs-quakes-track-wrap {
    mask-image: none;
    -webkit-mask-image: none;
  }
}

.yg-usgs-quake {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.4);
  white-space: nowrap;
  color: inherit;
  text-decoration: none;
}

a.yg-usgs-quake:hover {
  border-color: rgba(255, 229, 102, 0.55);
  background: rgba(40, 20, 10, 0.55);
}

.yg-usgs-mag {
  font: 800 15px/1 system-ui, sans-serif;
  letter-spacing: 0.02em;
}

.yg-usgs-mag.is-m5 {
  color: #ffe566;
}

.yg-usgs-mag.is-m6 {
  color: #ff9f43;
}

.yg-usgs-mag.is-m7 {
  color: #ff5c5c;
}

.yg-usgs-place {
  color: #f0f0f0;
  font: 600 13px/1.2 system-ui, sans-serif;
}

.yg-usgs-meta {
  color: #9aa3b2;
  font: 500 12px/1.2 system-ui, sans-serif;
}

.yg-usgs-notable {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin: 8px 0 0;
}

.yg-usgs-notable-item {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 92, 92, 0.45);
  background: rgba(80, 10, 10, 0.45);
  color: #ffc9c9;
  font: 600 11px/1.3 system-ui, sans-serif;
}

.yg-usgs-notable-item strong {
  color: #ffe566;
  font-weight: 800;
}

.yg-usgs-notable-item.is-major {
  border-color: rgba(255, 229, 102, 0.75);
  background: rgba(120, 40, 10, 0.55);
  color: #ffe9a8;
  box-shadow: 0 0 0 1px rgba(255, 229, 102, 0.2);
}

.yg-usgs-notable-item.is-major strong {
  color: #fff3a0;
}

.yg-usgs-quakes-loading,
.yg-usgs-quakes-empty {
  margin: 0;
  color: #bbb;
  font: 500 13px/1.4 system-ui, sans-serif;
}

@media (max-width: 700px) {
  #yg-usgs-quakes.yg-usgs-quakes {
    padding: 10px 12px;
  }

  .yg-usgs-quakes-source {
    margin-left: 0;
    width: 100%;
  }
}
