/* Taste Map page (/map) — Dormant editorial palette & keep-rules. */
.map-hero {
  margin: 18px 0 14px;
}
.map-hero h1 {
  margin: 0 0 6px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.2;
}
.map-hero .sec-sub {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  max-width: 68ch;
}
.map-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 14px 0 12px;
}
.map-search-wrap {
  position: relative;
  flex: 1 1 260px;
  min-width: 0;
}
.map-search-input {
  width: 100%;
  box-sizing: border-box;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 10px 16px;
  min-height: 44px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
}
.map-search-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 30;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(27, 25, 23, 0.12);
  max-height: 300px;
  overflow-y: auto;
}
.map-search-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 8px 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--ink);
  cursor: pointer;
}
.map-search-opt:last-child {
  border-bottom: 0;
}
.map-search-opt:hover,
.map-search-opt:focus-visible {
  background: var(--ywash);
}
.map-search-opt-meta {
  font-size: 0.875rem;
  color: var(--muted);
  flex: none;
}
.map-mode-seg {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}
.map-mode-btn,
.map-reset-btn {
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
}
.map-mode-btn.on {
  background: var(--ywash);
  border-color: var(--amber-deep);
}
.map-status-bar {
  margin: 0 0 10px;
  font-size: 0.9375rem;
  color: var(--muted);
}
.map-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(290px, 1fr);
  gap: 16px;
  align-items: start;
}
@media (max-width: 900px) {
  .map-workspace {
    grid-template-columns: 1fr;
  }
}
.map-stage-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 12px;
  min-width: 0;
}
.map-canvas-wrap {
  position: relative;
  width: 100%;
  height: 500px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fffdf8;
  overflow: hidden;
}
@media (max-width: 640px) {
  .map-canvas-wrap {
    height: 62vh;
    min-height: 430px;
  }
}
#taste-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}
#taste-canvas.is-dragging {
  cursor: grabbing;
}
.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.map-legend-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.875rem;
  text-align: left;
  white-space: normal;
  line-height: 1.25;
  cursor: pointer;
}
.map-legend-btn.on {
  background: var(--ywash);
  border-color: var(--amber-deep);
  font-weight: 700;
}
.map-legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex: none;
}
.map-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 16px;
  min-width: 0;
}
.map-panel-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}
.map-detail-title {
  margin: 0 0 4px;
  font-size: 1.25rem;
  line-height: 1.25;
  overflow-wrap: break-word;
}
.map-detail-meta {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.9375rem;
}
.map-detail-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
}
.map-detail-pills .svc-pill {
  margin-left: 0;
}
.map-detail-cluster {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--wash);
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0 0 10px;
}
.map-detail-desc {
  margin: 0 0 12px;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--ink);
}
.map-detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}
.map-nb-group {
  margin: 12px 0 0;
}
.map-nb-group h3 {
  margin: 0 0 6px;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.map-nb-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.map-nb-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.9375rem;
  text-align: left;
  cursor: pointer;
}
.map-nb-btn:hover,
.map-nb-btn:focus-visible {
  background: var(--ywash);
  border-color: var(--amber-deep);
}
.map-nb-svcs {
  font-size: 0.875rem;
  color: var(--muted);
  text-align: right;
  flex-shrink: 0;
  max-width: 45%;
  overflow-wrap: break-word;
}
.map-tmdb-note {
  margin: 16px 0 0;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.45;
}

/* Suggestion chips: the first success needs no typing (all viewports,
   hidden once the visitor picks anything). */
.map-suggest {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  flex-basis: 100%;
}
.map-suggest.used {
  display: none;
}
.map-suggest-label {
  font-size: 0.875rem;
  color: var(--muted);
  font-weight: 600;
}
.map-suggest-chip {
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--ywash);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

/* One-time hint pill over the canvas (mobile v2). */
.map-hint {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1b1917;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 8px 8px 8px 14px;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(27, 25, 23, 0.25);
  white-space: nowrap;
  z-index: 5;
}
.map-hint-close {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

/* Sheet chrome: only exists on mobile; desktop keeps the static panel. */
.map-sheet-bar {
  display: none;
}

/* Mobile v2 (2026-11-23): bottom sheet replaces the below-the-fold panel.
   Peek / half / full detents, non-modal — the map stays tappable behind it.
   Neighbourhood names are drawn on the canvas, so the legend row goes. */
@media (max-width: 900px) {
  .map-hero {
    margin-bottom: 4px;
  }
  .map-hero .sec-sub {
    font-size: 0.9375rem;
    margin-top: 4px;
  }
  .map-status-bar {
    margin: 0 0 6px;
    font-size: 0.875rem;
  }
  .map-legend {
    display: none;
  }
  .map-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 28px rgba(27, 25, 23, 0.18);
    padding: 0 16px 16px;
    display: flex;
    flex-direction: column;
    transition: transform 0.28s ease, height 0.28s ease;
  }
  .map-panel.sheet-closed {
    transform: translateY(105%);
  }
  .map-panel.sheet-peek {
    height: 196px;
  }
  .map-panel.sheet-half {
    height: 56vh;
  }
  .map-panel.sheet-full {
    height: 92vh;
  }
  .map-panel-body {
    overflow-y: auto;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
  }
  .map-sheet-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: none;
    padding: 6px 0 2px;
  }
  .map-sheet-grab {
    flex: 1;
    min-height: 32px;
    border: 0;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 6px;
  }
  .map-sheet-handle {
    width: 44px;
    height: 5px;
    border-radius: 999px;
    background: var(--line);
  }
  .map-sheet-back {
    min-height: 36px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
  }
  .map-sheet-close {
    width: 36px;
    height: 36px;
    flex: none;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
  }
  /* Peek shows the essentials only: title, meta, services, first rail head. */
  .map-panel.sheet-peek .map-detail-desc,
  .map-panel.sheet-peek .map-detail-actions {
    display: none;
  }
}
