/* ── Public map — full viewport ─────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

#map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ── Custom marker ───────────────────────────────────────────────────────────── */

.tmd-marker {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #e03c31;
  border: 2.5px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.tmd-marker:hover {
  transform: scale(1.35);
}

.tmd-marker:focus-visible {
  outline: 3px solid #0057b7;
  outline-offset: 3px;
}

/* ── Video modal ─────────────────────────────────────────────────────────────── */

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.video-modal.hidden {
  display: none;
}

.video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.video-modal-content {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.45);
  width: 100%;
  max-width: 720px;
  overflow: hidden;
}

.video-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid #e0e0e0;
}

.video-modal-meta {
  flex: 1;
  min-width: 0;
}

.video-modal-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.2rem;
  color: #1a1a1a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-modal-date {
  font-size: 0.82rem;
  color: #666;
  margin: 0 0 0.15rem;
}

.video-modal-video-title {
  font-size: 0.85rem;
  color: #444;
  margin: 0;
  font-style: italic;
}

.video-modal-close {
  flex-shrink: 0;
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  color: #666;
  cursor: pointer;
  padding: 0;
  margin: 0;
  transition: color 0.1s;
}

.video-modal-close:hover {
  color: #111;
}

.video-embed-wrap {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
}

.video-embed-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ── Mobile ─────────────────────────────────────────────────────────────────── */

@media (max-width: 480px) {
  .video-modal {
    padding: 0;
    align-items: flex-end;
  }

  .video-modal-content {
    border-radius: 12px 12px 0 0;
    max-width: 100%;
  }
}
