.opening-hours {
  margin-top: 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  line-height: 1.4;
  white-space: pre;
}

.beach-type-badge {
  display: inline-block;
  margin-top: 7px;
  padding: 4px 7px;
  border-radius: 8px;
  background: #e2f5fb;
  color: #086b8e;
  font-size: .82rem;
  font-weight: 700;
}

.opening-hours .today {
  font-weight: 700;
  color: #0f7c82;
}

body.map-page {
  background: #d9e8ef;
}

#map {
  position: fixed;
  top: var(--top-nav-height, 88px);
  left: 0;
  width: 100%;
  height: calc(100dvh - var(--top-nav-height, 88px));
  z-index: 1;
}

.map-controls-toggle {
  position: fixed;
  left: 18px;
  bottom: 22px;
  z-index: 2200;
  min-height: 50px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.94);
  color: #22313f;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 18px 34px rgba(34, 49, 63, 0.18);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.map-focus-notice {
  position: fixed;
  top: calc(var(--top-nav-height, 88px) + 18px);
  right: 18px;
  z-index: 2050;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(440px, calc(100vw - 36px));
  padding: 10px 12px;
  border: 1px solid rgba(15, 124, 130, 0.25);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.94);
  color: #22313f;
  box-shadow: 0 16px 34px rgba(34, 49, 63, 0.16);
  backdrop-filter: blur(12px);
}

.map-focus-notice strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-focus-notice button {
  flex: 0 0 auto;
  min-height: 36px;
  border: 1px solid rgba(15, 124, 130, 0.28);
  border-radius: 999px;
  padding: 6px 10px;
  background: #0f7c82;
  color: #fff;
  font: inherit;
  font-size: .8rem;
  font-weight: 750;
  cursor: pointer;
}

.map-controls-panel {
  position: fixed;
  top: calc(var(--top-nav-height, 88px) + 14px);
  left: 18px;
  z-index: 2100;
  width: min(340px, calc(100vw - 36px));
  max-height: calc(100dvh - var(--top-nav-height, 88px) - 100px);
  overflow-y: auto;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 24px;
  background: rgba(255, 253, 248, 0.94);
  color: #22313f;
  box-shadow: 0 26px 56px rgba(34, 49, 63, 0.2);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(0.98);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.map-controls-panel.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.map-controls-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.map-controls-header strong {
  font-size: 1rem;
}

.map-controls-header button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: rgba(34, 49, 63, 0.08);
  color: #22313f;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.map-search-input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(34, 49, 63, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  color: #22313f;
  font: inherit;
  font-size: 15px;
}

.search-hint {
  margin: 6px 0 0;
  color: #6f7b88;
  font-size: 0.74rem;
}

.map-control-group {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(34, 49, 63, 0.1);
}

.offline-download p {
  margin: 7px 0;
}

.offline-download button {
  min-height: 38px;
  margin: 4px 4px 0 0;
  padding: 7px 11px;
  border: 1px solid rgba(15, 124, 130, .35);
  border-radius: 999px;
  background: #0f7c82;
  color: #fff;
  font: inherit;
  font-size: .82rem;
  font-weight: 750;
  cursor: pointer;
}

.offline-download #removeOfflineMap {
  background: transparent;
  color: #0a6267;
}

.map-category-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.map-category-actions {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.map-category-action {
  min-height: 32px;
  padding: 5px 9px;
  border: 1px solid rgba(15, 124, 130, 0.28);
  border-radius: 999px;
  background: rgba(15, 124, 130, 0.08);
  color: #0a6267;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 750;
  cursor: pointer;
}

.map-category-action:hover:not(:disabled) {
  background: rgba(15, 124, 130, 0.16);
}

.map-category-action:disabled {
  cursor: default;
  opacity: 0.48;
}

.map-controls-panel button:focus-visible,
.map-search-input:focus-visible,
.map-controls-panel input:focus-visible {
  outline: 3px solid #ff9f43;
  outline-offset: 3px;
}

.map-categories {
  display: grid;
  gap: 9px;
  margin-top: 10px;
}

.map-categories label,
.map-control-group label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  color: #31414f;
}

.map-visible-count {
  margin: 8px 0 0;
  color: #0a6267;
  font-size: .8rem;
  font-weight: 750;
}

.category-count {
  margin-left: auto;
  min-width: 1.8em;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(15, 124, 130, .1);
  color: #0a6267;
  font-size: .76rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

body.map-page #weather {
  position: fixed;
  right: 18px;
  bottom: 22px;
  z-index: 2050;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: min(360px, calc(100vw - 36px));
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 20px;
  background: rgba(255, 253, 248, 0.92);
  color: #22313f;
  box-shadow: 0 18px 34px rgba(34, 49, 63, 0.16);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.weather-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffd06a, #ff9f43);
  color: #fff;
  font-size: 16px;
  line-height: 1;
}

.leaflet-control-zoom {
  left: 16px !important;
  bottom: 92px !important;
  top: auto !important;
  right: auto !important;
}

.map-pin-wrapper {
  background: transparent;
  border: 0;
}

.map-pin {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--marker-color, #3d7a98);
  border: 2px solid #fff;
  box-shadow: 0 10px 18px rgba(34, 49, 63, 0.28);
  color: #fff;
  transform-origin: center;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.map-pin::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 12px;
  height: 12px;
  background: inherit;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: translateX(-50%) rotate(45deg);
  border-radius: 0 0 4px 0;
  z-index: -1;
}

.map-pin-ring {
  position: absolute;
  inset: -5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  opacity: 0;
  transform: scale(0.84);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.map-pin-glyph {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}

.map-pin-glyph svg {
  width: 18px;
  height: 18px;
  overflow: visible;
}

.map-pin-wrapper.is-selected .map-pin,
.map-pin-wrapper:hover .map-pin {
  transform: scale(1.14);
  box-shadow: 0 16px 28px rgba(22, 30, 41, 0.34);
  filter: saturate(1.06);
}

.map-pin-wrapper.is-selected .map-pin-ring,
.map-pin-wrapper:hover .map-pin-ring {
  opacity: 1;
  transform: scale(1);
}

.map-cluster-wrapper {
  background: transparent;
  border: 0;
}

.map-cluster {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 3px solid rgba(255, 255, 255, 0.96);
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.3), transparent 55%),
    linear-gradient(135deg, #0f7c82, #1c5d99);
  color: #fff;
  box-shadow: 0 16px 32px rgba(19, 42, 61, 0.26);
}

.map-cluster.is-medium {
  width: 52px;
  height: 52px;
}

.map-cluster.is-large {
  width: 58px;
  height: 58px;
}

.map-cluster-count {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}

.reserve-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 999px;
  background: #0f7c82;
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
}

.reserve-btn:hover {
  background: #0a6267;
}

body.map-page .modal {
  z-index: 5000 !important;
}

@media (max-width: 899px) {
  #map {
    top: var(--top-nav-height, 88px);
    height: calc(100dvh - var(--top-nav-height, 88px));
  }

  .map-controls-toggle {
    left: 12px;
    bottom: 16px;
    min-height: 52px;
  }

  .map-focus-notice {
    top: calc(var(--top-nav-height, 88px) + 10px);
    left: 12px;
    right: 12px;
    max-width: none;
  }

  .map-controls-panel {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    max-height: min(72dvh, 640px);
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    border-radius: 26px 26px 0 0;
    padding: 18px 16px 22px;
    transform: translateY(22px);
  }

  .map-controls-panel.is-open {
    transform: translateY(0);
  }

  body.map-tools-open .map-controls-toggle {
    display: none;
  }

  body.map-tools-open #weather {
    display: none !important;
  }

  body.map-page #weather {
    right: 12px;
    bottom: 78px;
    max-width: calc(100vw - 24px);
    padding: 8px 10px;
    font-size: 12px;
  }

  .leaflet-control-zoom {
    bottom: 84px !important;
  }

  .map-pin {
    width: 32px;
    height: 32px;
  }

  .map-cluster {
    width: 42px;
    height: 42px;
  }

  .map-cluster.is-medium {
    width: 48px;
    height: 48px;
  }

  .map-cluster.is-large {
    width: 54px;
    height: 54px;
  }

  .map-categories {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .map-category-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .map-category-actions {
    justify-content: flex-start;
  }

  .map-categories {
    grid-template-columns: 1fr;
  }
}
