/* ============================================
   San Juan Islands Guide — v2.0
   Nautical Modern Design System
   ============================================ */

/* Hide feedback button on map tab (default) — shown via JS on tab switch */
#mps-fb-btn { display: none !important; }

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Source+Serif+4:ital,opsz,wght@0,8..60,300;0,8..60,400;0,8..60,600;0,8..60,700;1,8..60,400&display=swap');

:root {
  /* PNW Editorial palette — warm, nature-forward */
  --color-primary: #1a2e35;
  --color-primary-mid: #2d4a54;
  --color-primary-light: #4e7a7f;
  --color-accent: #4e7a7f;
  --color-accent-light: #89aaa6;
  --color-accent-hover: #3d6368;

  /* Neutrals — warmer */
  --color-bg: #faf9f7;
  --color-card: #ffffff;
  --color-text: #1a2024;
  --color-text-mid: #4a5560;
  --color-text-light: #7d8a92;
  --color-border: #e8e5e0;
  --color-border-light: #f2efeb;

  /* Surfaces — warm naturals */
  --color-surface-warm: #f6f4f0;
  --color-surface-cool: #f0eeea;

  /* Heading font */
  --font-heading: 'Source Serif 4', Georgia, 'Times New Roman', serif;

  /* System */
  --radius: 8px;
  --radius-sm: 5px;
  --radius-lg: 12px;
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.03);
  --shadow: 0 1px 3px rgba(0,0,0,0.04), 0 2px 8px rgba(0,0,0,0.02);
  --shadow-md: 0 2px 6px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.03);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.05), 0 16px 40px rgba(0,0,0,0.05);
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --header-height: 56px;

  /* Marina category colors — muted, earthy */
  --marina-home: #a04e42;
  --marina-state: #b47d45;
  --marina-public: #6b6298;
  --marina-resort: #3d7e8a;
  --marina-special: #4a7d62;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* === HEADER === */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 2000;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.site-header::after {
  display: none;
}

.site-header .logo {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  color: var(--color-primary);
  text-decoration: none;
  cursor: pointer;
}

.site-header .logo h1 {
  font: inherit;
  letter-spacing: inherit;
  margin: 0;
}

.site-header .logo span {
  font-weight: 300;
  color: var(--color-text-light);
}

/* === WEATHER BUTTON (header) === */
.weather-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-surface-cool);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
  flex-shrink: 0;
  position: relative;
}

.weather-btn:hover {
  background: var(--color-border-light);
  border-color: var(--color-accent-light);
}

.weather-btn svg {
  flex-shrink: 0;
}

/* Live pulse dot */
.weather-btn::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4e9a7a;
  flex-shrink: 0;
  animation: wx-pulse 2s ease-in-out infinite;
  box-shadow: 0 0 3px 1px rgba(78, 154, 122, 0.4);
}

@keyframes wx-pulse {
  0%, 100% {
    box-shadow: 0 0 3px 1px rgba(78, 154, 122, 0.4);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 6px 3px rgba(78, 154, 122, 0.2);
    transform: scale(1.3);
  }
}

@media (max-width: 400px) {
  .weather-btn-label { display: none; }
  .weather-btn { padding: 7px 10px; }
}

/* === TAB NAVIGATION === */
.tab-nav {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  z-index: 1500;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.tab-nav::-webkit-scrollbar { display: none; }

.tab-btn {
  flex: 1 0 auto;
  padding: 13px 22px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: none;
  color: var(--color-text-light);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--transition), border-color var(--transition);
  text-align: center;
}

.tab-btn:hover {
  color: var(--color-text);
}

.tab-btn.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  font-weight: 600;
}

/* === MAIN CONTENT === */
.main-content {
  margin-top: calc(var(--header-height) + 44px);
}

.tab-panel {
  display: none;
  animation: fadeIn 0.35s ease;
}
.tab-panel.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === MAP PANEL === */
#map-container {
  width: 100%;
  height: calc(100vh - var(--header-height) - 48px);
  position: relative;
}

#map {
  width: 100%;
  height: 100%;
}

/* Leaflet overrides */
.leaflet-control-zoom a {
  border-radius: var(--radius-sm) !important;
  border: none !important;
  box-shadow: var(--shadow) !important;
  width: 34px !important;
  height: 34px !important;
  line-height: 34px !important;
  font-size: 16px !important;
  color: var(--color-primary) !important;
}

.leaflet-control-zoom {
  border: none !important;
  box-shadow: none !important;
}

.leaflet-control-zoom a + a { margin-top: 4px !important; }

.map-legend {
  position: absolute;
  bottom: 24px;
  left: 12px;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 14px 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 800;
  font-size: 0.78rem;
  border: 1px solid var(--color-border-light);
}

.map-legend h4 {
  margin-bottom: 10px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-light);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0;
  color: var(--color-text-mid);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.9), 0 1px 3px rgba(0,0,0,0.15);
}


/* === MAP CARD (Airbnb-style compact card) === */
.map-card {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(15,43,60,0.18);
  overflow: hidden;
  z-index: 1000;
  cursor: pointer;
  transform: translateY(calc(100% + 24px));
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, opacity;
}

.map-card.visible {
  transform: translateY(0);
  opacity: 1;
}

.map-card-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: none;
  background: rgba(0,0,0,0.45);
  color: white;
  border-radius: 50%;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.map-card-close:hover {
  background: rgba(0,0,0,0.65);
}

.map-card-photo {
  width: 110px;
  min-height: 90px;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  background-color: var(--color-surface-cool);
}

.map-card-body {
  flex: 1;
  padding: 12px 40px 12px 14px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.map-card-name {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-primary);
  margin: 0 0 6px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.map-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--color-text-light);
}

.map-card-meta .category-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.64rem;
  font-weight: 600;
  color: white;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

/* Desktop: constrain width, position bottom-right */
@media (min-width: 1024px) {
  .map-card {
    left: auto;
    right: 16px;
    width: 380px;
  }
}

.info-caution {
  background: #fffbf5;
  border-left: 3px solid var(--color-accent);
  padding: 10px 14px;
  margin-top: 10px;
  margin-bottom: 10px;
  font-size: 0.82rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--color-text-mid);
  line-height: 1.5;
}

/* === SECTION HEADERS === */
.section-header {
  padding: 40px 20px 20px;
  max-width: 1080px;
  margin: 0 auto;
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 600;
  color: var(--color-primary);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.section-header p {
  color: var(--color-text-light);
  font-size: 0.88rem;
  margin-top: 6px;
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* === ISLAND CARDS GRID === */
.island-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  padding: 0 20px 40px;
  max-width: 1080px;
  margin: 0 auto;
}

.island-card {
  background: var(--color-card);
  border-radius: var(--radius);
  border: 1px solid var(--color-border-light);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow var(--transition-slow), border-color var(--transition), transform var(--transition-slow);
}

.island-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-border);
  transform: translateY(-2px);
}

.island-card-banner {
  display: none;
}

.island-card-body {
  padding: 20px 22px;
}

.island-card h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 3px;
  letter-spacing: -0.01em;
}

.island-card .tagline {
  font-size: 0.8rem;
  color: var(--color-text-light);
  font-weight: 400;
  margin-bottom: 10px;
  font-style: italic;
}

.island-card p {
  font-size: 0.84rem;
  color: var(--color-text-mid);
  margin-bottom: 14px;
  line-height: 1.6;
}

.island-card .highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.island-card .highlight-tag {
  font-size: 0.68rem;
  padding: 3px 9px;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  color: var(--color-text-mid);
  font-weight: 500;
}

.island-card .badge {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-ferry {
  background: transparent;
  color: var(--color-accent);
  border: 1px solid var(--color-accent-light);
}

.badge-boat {
  background: transparent;
  color: var(--color-text-light);
  border: 1px solid var(--color-border);
}

/* === ISLAND DETAIL VIEW === */
.island-detail {
  display: none;
  padding: 0 20px 48px;
  max-width: 800px;
  margin: 0 auto;
}

.island-detail.active { display: block; }

.island-detail-header {
  padding: 24px 0;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 24px;
}

.island-detail-header .back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  color: var(--color-text-light);
  background: none;
  border: none;
  cursor: pointer;
  margin-bottom: 16px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color var(--transition);
}

.island-detail-header .back-btn:hover {
  color: var(--color-accent);
}

.island-detail-header h2 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--color-primary);
  letter-spacing: -0.02em;
}

.island-detail-header .tagline {
  color: var(--color-text-light);
  font-weight: 400;
  margin-top: 4px;
  font-style: italic;
  font-size: 0.88rem;
}

.detail-section {
  margin-bottom: 32px;
}

.detail-section h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border-light);
}

/* === ACTIVITY LIST CARDS === */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.activity-card {
  background: var(--color-card);
  border-radius: var(--radius);
  padding: 18px 22px;
  border: 1px solid var(--color-border-light);
  transition: box-shadow var(--transition-slow), border-color var(--transition), transform var(--transition-slow);
}

.activity-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--color-border);
  transform: translateY(-1px);
}

.activity-card h4 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
}

.activity-card .meta {
  font-size: 0.76rem;
  color: var(--color-text-light);
  margin-bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.activity-card .meta span {
  margin-right: 4px;
}

.activity-card .meta span::after {
  content: '\00b7';
  margin-left: 8px;
  color: var(--color-border);
}

.activity-card .meta span:last-child::after {
  content: none;
}

.activity-card p {
  font-size: 0.86rem;
  color: var(--color-text-mid);
  line-height: 1.6;
}

/* === CATEGORY BROWSE PANELS === */
.category-filter-bar {
  padding: 8px 20px 16px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  max-width: 1080px;
  margin: 0 auto;
}
.category-filter-bar::-webkit-scrollbar { display: none; }

.cat-filter-btn {
  padding: 7px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.76rem;
  font-weight: 500;
  border: 1px solid var(--color-border-light);
  border-radius: 20px;
  background: transparent;
  color: var(--color-text-light);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
  letter-spacing: 0.02em;
}

.cat-filter-btn:hover {
  border-color: var(--color-border);
  color: var(--color-text);
  background: var(--color-surface-warm);
}

.cat-filter-btn.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.activity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
  padding: 0 20px 48px;
  max-width: 1080px;
  margin: 0 auto;
}

/* === LOGISTICS PANEL === */
.logistics-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px 48px;
}

.logistics-card {
  background: var(--color-card);
  border-radius: var(--radius);
  padding: 22px 24px;
  border: 1px solid var(--color-border-light);
  margin-bottom: 16px;
  transition: border-color var(--transition);
}

.logistics-card:hover {
  border-color: var(--color-border);
}

.logistics-card h3 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border-light);
  letter-spacing: -0.01em;
}

.logistics-card p,
.logistics-card li {
  font-size: 0.88rem;
  color: var(--color-text-mid);
  line-height: 1.7;
}

.logistics-card ul {
  padding-left: 0;
  margin-top: 4px;
  list-style: none;
}

.logistics-card li {
  margin-bottom: 8px;
  padding-left: 16px;
  position: relative;
}

.logistics-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-accent);
}

.logistics-card strong {
  color: var(--color-text);
  font-weight: 600;
}

/* Route card special styling */
.logistics-card .route-arrow {
  color: var(--color-accent);
}

/* === MAIN FLEX GROW === */
.main-content {
  flex: 1;
}

/* === FOOTER === */
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-top: 1px solid var(--color-border-light);
  background: var(--color-surface-warm);
  font-size: 0.74rem;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  letter-spacing: 0.01em;
}

.footer-copy {
  color: var(--color-text-light);
}

.footer-credit {
  color: var(--color-text-light);
}

.footer-credit a {
  color: #9e5a3c;
  font-weight: 500;
  text-decoration: none;
}

.footer-credit a:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .site-footer {
    justify-content: center;
    text-align: center;
    padding: 14px 16px;
    gap: 4px;
  }
}

/* === RESPONSIVE === */
@media (max-width: 640px) {
  .site-header { padding: 0 16px; }
  .site-header .logo { font-size: 1rem; }
  .tab-btn { padding: 11px 14px; font-size: 0.74rem; }
  .main-content { margin-top: calc(var(--header-height) + 40px); }
  .section-header { padding: 32px 16px 14px; }
  .section-header h2 { font-size: 1.35rem; }
  .island-grid { grid-template-columns: 1fr; gap: 14px; padding: 0 16px 28px; }
  .activity-grid { grid-template-columns: 1fr; padding: 0 16px 32px; }
  .category-filter-bar { padding: 6px 16px 14px; }
  .logistics-section { padding: 0 16px 32px; }
}

@media (min-width: 1024px) {
  .tab-btn { padding: 14px 28px; }
  .island-grid { grid-template-columns: repeat(3, 1fr); }
  .activity-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1200px) {
  .section-header { padding: 48px 0 22px; }
  .island-grid { padding: 0 0 40px; }
  .activity-grid { padding: 0 0 52px; }
  .category-filter-bar { padding: 8px 0 20px; }
  .logistics-section { padding: 0 0 52px; }
}

/* === DETAIL MODAL === */
.detail-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 43, 60, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 3000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.detail-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.detail-modal {
  background: white;
  width: 100%;
  max-height: 90dvh;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
  position: relative;
}

.detail-modal-overlay.active .detail-modal {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
  border-radius: 50%;
  font-size: 1.4rem;
  color: var(--color-text-mid);
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  transition: all var(--transition);
}

.modal-close:hover {
  background: white;
  color: var(--color-text);
  box-shadow: var(--shadow-md);
}

/* Modal photos — carousel */
.modal-photos {
  margin-top: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
  opacity: 0;
}

.modal-photos.loaded {
  max-height: 400px;
  opacity: 1;
}

.modal-photos-placeholder {
  height: 8px;
  background: var(--color-surface-cool);
}

.modal-carousel {
  position: relative;
  overflow: hidden;
  background: var(--color-surface-cool);
}

.carousel-track {
  display: flex;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
  width: 100%;
  min-width: 100%;
  height: 280px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--color-surface-cool);
}

.carousel-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 5;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
}

.carousel-dot.active {
  background: white;
  transform: scale(1.2);
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(4px);
  border-radius: 50%;
  font-size: 1.3rem;
  color: var(--color-text);
  cursor: pointer;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  transition: all var(--transition);
  line-height: 1;
}

.carousel-arrow:hover {
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.carousel-prev { left: 10px; }
.carousel-next { right: 10px; }


/* Modal body */
.modal-body {
  padding: 20px 24px 32px;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 8px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.modal-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-size: 0.82rem;
  color: var(--color-text-light);
  margin-bottom: 16px;
}

.modal-meta span {
  margin-right: 4px;
}

.modal-meta span::after {
  content: '\00b7';
  margin-left: 8px;
  color: var(--color-border);
}

.modal-meta span:last-child::after {
  content: none;
}

.modal-description {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--color-text-mid);
  margin-bottom: 16px;
}

.modal-extra {
  font-size: 0.86rem;
  color: var(--color-text-mid);
  margin-bottom: 8px;
  line-height: 1.6;
}

.modal-address {
  font-size: 0.82rem;
  color: var(--color-text-light);
  margin-bottom: 12px;
}

.modal-places-loading {
  margin: 16px 0;
}

/* Fade-in for Places content */
#modalPlacesContent,
#mapPlacesContent {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

#modalPlacesContent.loaded,
#mapPlacesContent.loaded {
  opacity: 1;
  transform: translateY(0);
}

/* Smooth shimmer-to-content */
.map-places-loading,
.modal-places-loading {
  transition: opacity 0.25s ease, max-height 0.25s ease;
  overflow: hidden;
}

.map-places-loading.hidden,
.modal-places-loading.hidden {
  opacity: 0;
  max-height: 0;
}

/* === CARD ENHANCEMENTS === */

/* Modal trigger cards */
.modal-trigger {
  cursor: pointer;
  position: relative;
}

.modal-trigger:hover {
  border-color: var(--color-accent-light);
}

/* Card top row with title + badge */
.card-top-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.card-top-row h4 {
  flex: 1;
}

/* Price badges */
.price-badge {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 10px;
  letter-spacing: 0.02em;
}

.price-badge.price-1 {
  background: #ecfdf5;
  color: #059669;
}

.price-badge.price-2 {
  background: #eff6ff;
  color: #2563eb;
}

.price-badge.price-3 {
  background: #fdf4ff;
  color: #9333ea;
}

/* Dock walk badge */
.dock-badge {
  font-weight: 600;
  color: var(--color-primary-light) !important;
}

/* Hours line */
.card-hours {
  font-size: 0.76rem;
  color: var(--color-text-light);
  margin-top: 6px;
  font-style: italic;
}

/* Difficulty pill */
.difficulty-pill {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 10px;
  letter-spacing: 0.02em;
}

/* Discover pass badge */
.discover-pass-badge {
  color: #e65100 !important;
  font-weight: 600 !important;
}

/* View Details button (map panel) */
.view-details-btn {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 12px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.view-details-btn:hover {
  background: var(--color-primary-mid);
  box-shadow: 0 2px 8px rgba(15,43,60,0.2);
}

/* === PLACES ENRICHMENT (shared) === */

.places-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}

.rating-stars {
  display: flex;
  gap: 1px;
}

.star.full { color: #f59e0b; }
.star.half { color: #fbbf24; opacity: 0.7; }
.star.empty { color: var(--color-border); }

.rating-text {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--color-text);
}

.rating-count {
  font-size: 0.82rem;
  color: var(--color-text-light);
}

/* Action buttons */
.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 20px;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
}

.action-directions {
  background: var(--color-primary);
  color: white;
}

.action-directions:hover {
  background: var(--color-primary-mid);
  box-shadow: 0 2px 8px rgba(15,43,60,0.2);
}

.action-phone {
  background: var(--color-surface-cool);
  color: var(--color-primary);
  border: 1px solid var(--color-border);
}

.action-phone:hover {
  background: var(--color-border-light);
}

.action-website {
  background: var(--color-surface-cool);
  color: var(--color-primary);
  border: 1px solid var(--color-border);
}

.action-website:hover {
  background: var(--color-border-light);
}

/* Loading shimmer */
.loading-shimmer {
  height: 12px;
  background: linear-gradient(90deg, var(--color-surface-cool) 25%, var(--color-border-light) 50%, var(--color-surface-cool) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
  margin-bottom: 8px;
}

.loading-shimmer.short {
  width: 60%;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* === RESPONSIVE === */
@media (max-width: 640px) {
  .detail-modal {
    max-height: 85dvh;
    border-radius: var(--radius) var(--radius) 0 0;
  }

  .carousel-slide {
    height: 200px;
  }

  .carousel-arrow {
    width: 30px;
    height: 30px;
    font-size: 1.1rem;
  }

  .modal-body {
    padding: 16px 20px calc(28px + env(safe-area-inset-bottom, 0px));
  }

  .action-buttons {
    flex-direction: column;
  }

  .action-btn {
    justify-content: center;
  }

}

@media (min-width: 768px) {
  .detail-modal {
    max-width: 560px;
    max-height: 85vh;
    border-radius: var(--radius-lg);
    margin-bottom: 0;
    align-self: center;
  }

  .detail-modal-overlay {
    align-items: center;
  }

  .carousel-slide {
    height: 320px;
  }
}

/* ============================================
   WEATHER MODAL
   ============================================ */
.weather-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 43, 60, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 3500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.weather-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.weather-modal {
  background: white;
  width: 100%;
  max-height: 92dvh;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
  position: relative;
  display: flex;
  flex-direction: column;
}

.weather-modal-overlay.active .weather-modal {
  transform: translateY(0);
}

.weather-modal .modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
}

.weather-modal-header {
  padding: 24px 24px 0;
  flex-shrink: 0;
}

.weather-modal-header h2 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-primary);
  letter-spacing: -0.02em;
}

.weather-subtitle {
  font-size: 0.82rem;
  color: var(--color-text-light);
  margin-top: 2px;
}

.weather-modal-body {
  padding: 16px 24px 8px;
  flex: 1;
  overflow-y: auto;
}

/* Weather sections */
.wx-section {
  margin-bottom: 20px;
}

.wx-section-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--color-border-light);
}

/* Alert cards */
.wx-alert {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-left: 4px solid #ef4444;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 10px;
}

.wx-alert-event {
  font-size: 0.86rem;
  font-weight: 700;
  color: #dc2626;
  margin-bottom: 4px;
}

.wx-alert-headline {
  font-size: 0.82rem;
  color: #7f1d1d;
  line-height: 1.5;
}

.wx-alert-details {
  font-size: 0.78rem;
  color: #991b1b;
  margin-top: 8px;
  line-height: 1.6;
  max-height: 120px;
  overflow-y: auto;
}

/* Wind card */
.wx-wind-card {
  background: var(--color-surface-cool);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.wx-wind-compass {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

.wx-wind-arrow {
  width: 24px;
  height: 24px;
  color: var(--color-primary);
  transition: transform 0.5s ease;
}

.wx-wind-compass::before {
  content: 'N';
  position: absolute;
  top: 2px;
  font-size: 0.5rem;
  font-weight: 700;
  color: var(--color-text-light);
}

.wx-wind-info {
  flex: 1;
}

.wx-wind-speed {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.2;
}

.wx-wind-speed small {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--color-text-light);
  margin-left: 2px;
}

.wx-wind-detail {
  font-size: 0.82rem;
  color: var(--color-text-mid);
  margin-top: 2px;
}

.wx-wind-station {
  font-size: 0.72rem;
  color: var(--color-text-light);
  margin-top: 4px;
}

/* Pressure & air temp row */
.wx-conditions-row {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.wx-condition-chip {
  flex: 1;
  background: var(--color-surface-cool);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  text-align: center;
}

.wx-condition-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-primary);
}

.wx-condition-label {
  font-size: 0.68rem;
  color: var(--color-text-light);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Tide cards */
.wx-tides {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.wx-tide {
  flex: 1;
  min-width: 100px;
  background: var(--color-surface-cool);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  text-align: center;
}

.wx-tide-type {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.wx-tide-type.high { color: #2563eb; }
.wx-tide-type.low { color: #d97706; }

.wx-tide-height {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary);
}

.wx-tide-height small {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--color-text-light);
}

.wx-tide-time {
  font-size: 0.76rem;
  color: var(--color-text-mid);
  margin-top: 2px;
}

.wx-tide-station {
  font-size: 0.72rem;
  color: var(--color-text-light);
  margin-top: 8px;
}

/* Marine forecast */
.wx-forecast-period {
  margin-bottom: 12px;
}

.wx-forecast-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 2px;
}

.wx-forecast-text {
  font-size: 0.82rem;
  color: var(--color-text-mid);
  line-height: 1.6;
}

/* Footer / attribution */
.weather-modal-footer {
  padding: 12px 24px 16px;
  border-top: 1px solid var(--color-border-light);
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.noaa-attribution {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  color: var(--color-text-light);
}

.noaa-badge {
  font-size: 0.72rem;
  color: var(--color-text-light);
}

.noaa-badge strong {
  color: var(--color-text-mid);
  font-weight: 700;
}

/* No-data state */
.wx-no-data {
  text-align: center;
  padding: 32px 16px;
  color: var(--color-text-light);
  font-size: 0.86rem;
}

/* Weather loading */
.weather-loading {
  padding: 20px 0;
}

.weather-loading .loading-shimmer {
  margin-bottom: 12px;
}

/* Responsive */
@media (max-width: 640px) {
  .weather-modal {
    max-height: 88dvh;
    border-radius: var(--radius) var(--radius) 0 0;
  }
  .weather-modal-header { padding: 20px 20px 0; }
  .weather-modal-body { padding: 14px 20px 8px; }
  .weather-modal-footer {
    padding: 10px 20px calc(14px + env(safe-area-inset-bottom, 0px));
    flex-direction: column;
    align-items: flex-start;
  }
  .wx-conditions-row { flex-direction: column; }
}

@media (min-width: 768px) {
  .weather-modal {
    max-width: 620px;
    max-height: 88vh;
    border-radius: var(--radius-lg);
    margin-bottom: 0;
    align-self: center;
  }
  .weather-modal-overlay {
    align-items: center;
  }
}

/* ============================================
   WELCOME MODAL
   ============================================ */
.welcome-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 43, 60, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.welcome-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.welcome-modal {
  background: white;
  width: 100%;
  max-width: 400px;
  border-radius: var(--radius-lg);
  padding: 36px 32px 32px;
  text-align: center;
  position: relative;
  transform: scale(0.95) translateY(8px);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-lg);
}

.welcome-modal-overlay.active .welcome-modal {
  transform: scale(1) translateY(0);
}

.welcome-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--color-text-light);
  border-radius: 50%;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition), background var(--transition);
}

.welcome-close:hover {
  color: var(--color-text);
  background: var(--color-surface-cool);
}

.welcome-modal h2 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-primary);
  letter-spacing: -0.02em;
  line-height: 1.4;
  margin-bottom: 12px;
}

.welcome-modal > p {
  font-size: 0.84rem;
  line-height: 1.65;
  color: var(--color-text-mid);
  margin-bottom: 18px;
}

.welcome-hints {
  background: var(--color-surface-warm);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 18px;
}

.welcome-hints p {
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--color-text-mid);
  margin: 0;
}

.welcome-hints strong {
  color: var(--color-text);
  font-weight: 600;
}

.welcome-list {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}

.welcome-list li {
  font-size: 0.78rem;
  color: var(--color-text-mid);
  line-height: 1.5;
  padding: 4px 0 4px 16px;
  position: relative;
}

.welcome-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 11px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-accent-light);
}

.welcome-list strong {
  color: var(--color-text);
  font-weight: 600;
}

.welcome-weather {
  background: var(--color-surface-warm);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 18px;
  text-align: left;
  min-height: 40px;
}

.welcome-weather-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--color-text-mid);
  line-height: 1.5;
}

.welcome-weather-summary svg {
  flex-shrink: 0;
  color: var(--color-accent);
}

.welcome-weather-summary strong {
  color: var(--color-text);
  font-weight: 600;
}

.welcome-weather-loading {
  padding: 4px 0;
}

.welcome-cta {
  display: block;
  width: 100%;
  padding: 12px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition);
}

.welcome-cta:hover {
  background: var(--color-primary-mid);
  box-shadow: 0 2px 10px rgba(26, 46, 53, 0.2);
}

@media (max-width: 640px) {
  .welcome-modal {
    padding: 32px 24px 28px;
    max-width: 100%;
  }
  .welcome-modal h2 {
    font-size: 1.35rem;
  }
}
