    /* =================== SCREEN 3: MAP =================== */
    #map-view {
      background: var(--map-ground);
      position: relative;
    }

    .map-header {
      position: absolute;
      top: max(16px, env(safe-area-inset-top));
      left: 18px;
      right: 18px;
      z-index: 20;
      display: flex;
      align-items: center;
      gap: 10px;
      transform: translateY(0);
      opacity: 1;
      transition: transform 0.44s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.36s ease;
      will-change: transform, opacity;
    }

    .map-header.map-ui-hidden {
      transform: translateY(-60px);
      opacity: 0;
      pointer-events: none;
    }

    .map-back-btn {
      width: 44px;
      height: 44px;
      background: var(--surface);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--ink);
      border: none;
      box-shadow: 0 4px 14px rgba(var(--shade-rgb), 0.22);
      cursor: pointer;
      flex-shrink: 0;
      transition: transform 0.15s;
    }

    .map-back-btn:active {
      transform: scale(0.92);
    }

    .map-search {
      flex: 1;
      height: 44px;
      background: var(--surface);
      border-radius: 22px;
      display: flex;
      align-items: center;
      padding: 4px 5px 4px 18px;
      box-shadow: 0 4px 14px rgba(var(--shade-rgb), 0.18);
    }

    .map-search input {
      border: none;
      outline: none;
      background: transparent;
      font-size: 13.5px;
      font-weight: 500;
      color: var(--ink);
      width: 100%;
    }

    .map-search .search-btn {
      width: 36px;
      height: 36px;
    }

    .vector-map {
      width: 100%;
      height: 100%;
      position: absolute;
      inset: 0;
      background: var(--map-ground);
      z-index: 0;
    }

    .vector-map .leaflet-control-attribution {
      font-size: 9px;
      background: rgba(255, 255, 255, 0.75);
    }

    .vector-map .leaflet-top {
      top: 76px;
    }

    .map-avatar-marker {
      position: absolute;
      top: var(--pin-top, 35%);
      left: 50%;
      transform: translate(-50%, -50%);
      z-index: 10;
      display: flex;
      flex-direction: column;
      align-items: center;
      cursor: pointer;
      opacity: 1;
      animation: floatPin 2.4s ease-in-out infinite alternate;
      transition: opacity 0.32s ease;
    }

    .map-avatar-marker.pin-anim-paused {
      animation: none !important;
    }

    .map-avatar-marker.pin-map-hidden {
      opacity: 0;
      pointer-events: none;
    }

    @keyframes floatPin {
      0% { transform: translate(-50%, -50%) translateY(0); }
      100% { transform: translate(-50%, -50%) translateY(-8px); }
    }

    .marker-avatar-bubble {
      width: var(--pin-size, 66px);
      height: var(--pin-size, 66px);
      border-radius: 50%;
      border: 3.5px solid var(--surface);
      box-shadow: 0 8px 22px rgba(var(--shade-rgb), 0.3);
      overflow: hidden;
      background: var(--marker-bg);
      position: relative;
    }

    .marker-pin-tail {
      width: 0;
      height: 0;
      border-left: 7px solid transparent;
      border-right: 7px solid transparent;
      border-top: 9px solid var(--surface);
      margin-top: -1px;
      filter: drop-shadow(0 2px 2px rgba(var(--shade-rgb), 0.22));
      transition: opacity 0.22s ease, transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
      transform-origin: top center;
    }

    .marker-pin-tail.tail-hidden {
      opacity: 0;
      transform: scale(0);
    }

    .map-bottom-sheet {
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      background: var(--surface);
      border-radius: var(--map-sheet-radius, 32px) var(--map-sheet-radius, 32px) 0 0;
      padding: 18px 20px max(18px, env(safe-area-inset-bottom));
      box-shadow: 0 -8px 25px rgba(var(--shade-rgb), 0.18);
      z-index: 25;
      transform: translateY(0);
      opacity: 1;
      transition: transform 0.48s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.38s ease;
      will-change: transform, opacity;
    }

    .map-bottom-sheet.map-ui-hidden {
      transform: translateY(105%);
      opacity: 0;
      pointer-events: none;
    }

    .map-sheet-title {
      color: var(--ink);
      margin-bottom: 12px;
    }

    .map-tag-scroll {
      display: flex;
      gap: 8px;
      overflow-x: auto;
      overscroll-behavior-x: contain;
      scrollbar-width: none;
      padding-bottom: 14px;
      flex-shrink: 0;
    }

    .map-tag-scroll::-webkit-scrollbar {
      display: none;
    }

    .map-tag {
      padding: 7px 18px;
      border-radius: 18px;
      font-size: 12px;
      font-weight: 600;
      color: var(--ink-3);
      background: var(--surface-2);
      border: none;
      white-space: nowrap;
      flex-shrink: 0;
      cursor: pointer;
      transition: all 0.2s;
    }

    .map-tag.active {
      background: var(--pill-bg);
      color: var(--pill-ink);
    }

    .map-poi-card {
      background: var(--surface);
      border: 1px solid var(--hairline);
      border-radius: 20px;
      padding: 10px 14px;
      display: flex;
      align-items: center;
      gap: 12px;
      box-shadow: 0 4px 15px rgba(var(--shade-rgb), 0.09);
    }

    .map-poi-thumb {
      width: var(--poi-thumb-size, 52px);
      height: var(--poi-thumb-size, 52px);
      border-radius: 14px;
      overflow: hidden;
      flex-shrink: 0;
    }

    .map-poi-thumb svg {
      width: 100%;
      height: 100%;
    }

    .map-poi-info {
      flex: 1;
    }

    .map-poi-name {
      color: var(--ink);
    }

    .map-poi-meta {
      font-size: 11px;
      color: var(--ink-3);
      margin-top: 2px;
      font-weight: 600;
    }

    /* A fixed height, not a max: the sheet is anchored to the bottom and grows
       upward, so a list that resized with the filter would drag the title and
       the filter row up and down with it. Only the rows inside change. */
    .map-poi-list {
      display: grid;
      align-content: start;
      gap: 8px;
      height: 34vh;
      overflow-y: auto;
      overscroll-behavior: contain;
      scrollbar-width: none;
    }

    .map-poi-list::-webkit-scrollbar {
      display: none;
    }

    .map-poi-card {
      cursor: pointer;
      transition: transform 0.15s ease;
    }

    .map-poi-card:active {
      transform: scale(0.98);
    }

    .map-empty {
      text-align: center;
      color: var(--ink-3);
      font-size: 12.5px;
      font-weight: 600;
      padding: 18px 8px;
    }

    .map-header .menu-btn {
      flex-shrink: 0;
    }

