.webcam-intro p {
  margin: 0.75rem 0 0;
}

.webcam-directory {
  font-weight: 700;
}

.webcam-note {
  color: var(--muted);
  font-size: 0.95rem;
}

.webcam-section {
  margin: 0 0 0.75rem;
  color: var(--sea);
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
}

.webcam-section-note {
  margin: 0 0 1rem;
}

.webcam-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.webcam-card {
  margin: 0;
  background: var(--foam);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(11, 61, 92, 0.08);
}

.webcam-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #d5dde3;
}

.webcam-card figcaption {
  padding: 0.9rem 1rem 1.1rem;
}

.webcam-card h3 {
  margin: 0 0 0.35rem;
  color: var(--sea);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
}

.webcam-card p {
  margin: 0.35rem 0 0;
  line-height: 1.45;
}

.webcam-card__credit {
  color: var(--muted);
  font-size: 0.9rem;
}

.webcam-card a {
  display: inline-block;
  margin-top: 0.65rem;
  font-weight: 700;
}

.webcam-card__offline {
  display: none;
  margin: 0;
  padding: 0.9rem 1rem 0;
  color: var(--muted);
}

.webcam-card__captured {
  margin: 0;
  padding: 0.45rem 1rem 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
}

.webcam-live .webcam-card__captured {
  padding: 0.45rem 0 0;
}

.webcam-card.is-offline img {
  display: none;
}

.webcam-card.is-offline .webcam-card__offline {
  display: block;
}

.webcam-live__player {
  margin: 1rem 0;
  background: #0b1220;
  border-radius: 0.5rem;
  overflow: hidden;
}
.webcam-live__video {
  display: block;
  width: 100%;
  max-height: 70vh;
  background: #000;
}
.webcam-live__error {
  color: #8a1c1c;
  font-weight: 600;
}
.webcam-live__back {
  margin-bottom: 0.5rem;
}

/* Last-frame cache: keep the media box occupied while a fresh still loads. */
.webcam-card img.is-loading {
  opacity: 0.92;
}

.webcam-card img.is-cached {
  filter: none;
}

.webcam-live__video:not([src]):not(.hls-attached) {
  min-height: 40vh;
  background: #0b1220 center / cover no-repeat;
}

.webcam-card__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 1rem;
  box-sizing: border-box;
  background: linear-gradient(160deg, #c5d0d8 0%, #9aadb8 100%);
  color: #0b3d5c;
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
}

.webcam-card__placeholder-hint {
  font-weight: 500;
  font-size: 0.85rem;
  color: #34586c;
}
