.map-content {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    height: 100vh;
}

#map-events {
    background: #222;
}

.list-events-map {
    background: #f5f5f5;
    overflow-y: auto;
}










    /* Верхняя панель */
    .topbar{
      position: sticky;
      top: 0;
      z-index: 10;
      background: rgba(246, 247, 251, 0.85);
      backdrop-filter: blur(10px);
      border-bottom: 1px solid var(--border);
    }
    .topbar__inner{
      max-width: 1200px;
      margin: 0 auto;
      padding: 14px 16px;
      display: grid;
      grid-template-columns: 1fr;
      gap: 10px;
    }
    .brand{
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }
    .brand__left{
      display: flex;
      align-items: center;
      gap: 10px;
      min-width: 0;
    }
    .brand h1{
      font-size: 16px;
      margin: 0;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .brand p{
      margin: 0;
      color: var(--muted);
      font-size: 12px;
    }

    .controls{
      display: grid;
      grid-template-columns: 1fr;
      gap: 10px;
    }
    @media (min-width: 860px){
      .topbar__inner{ grid-template-columns: 1.2fr 1fr; align-items: center; }
      .controls{ grid-template-columns: 1fr auto auto; }
    }

    .input{
      display: flex;
      align-items: center;
      gap: 10px;
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 10px 12px;
      box-shadow: 0 6px 18px rgba(17,24,39,.06);
    }
    .input input{
      width: 100%;
      border: 0;
      outline: none;
      font-size: 14px;
      background: transparent;
      color: var(--text);
    }
    .pill{
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 10px 12px;
      border-radius: 999px;
      border: 1px solid var(--border);
      background: var(--card);
      box-shadow: 0 6px 18px rgba(17,24,39,.06);
      cursor: pointer;
      user-select: none;
      font-size: 13px;
      color: var(--text);
    }
    .pill:active{ transform: translateY(1px); }
    .pill--accent{
      border-color: rgba(79,70,229,.25);
    }

    /* Layout */
    .wrap{
      max-width: 1200px;
      margin: 0 auto;
      padding: 14px 16px 22px;
      display: grid;
      gap: 14px;
    }
    @media (min-width: 980px){
      .wrap{
        grid-template-columns: 1fr 360px;
        align-items: start;
      }
    }

    /* Карта */
    .map-card{
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      overflow: hidden;
      box-shadow: var(--shadow);
    }
    #map{
      width: 100%;
      height: 62vh;
      min-height: 420px;
    }

    /* Сайдбар */
    .side{
      display: grid;
      gap: 12px;
    }
    .panel{
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      padding: 14px;
    }
    .panel h2{
      margin: 0 0 10px;
      font-size: 14px;
    }
    .hint{
      color: var(--muted);
      font-size: 12px;
      margin: 0 0 10px;
      line-height: 1.35;
    }

    .list{
      display: grid;
      gap: 10px;
      max-height: 52vh;
      overflow: auto;
      padding-right: 4px;
    }

    .event-row{
      display: grid;
      grid-template-columns: 72px 1fr;
      gap: 10px;
      border: 1px solid var(--border);
      border-radius: 16px;
      overflow: hidden;
      cursor: pointer;
      background: #fff;
      transition: transform .12s ease, box-shadow .12s ease;
    }
    .event-row:hover{
      transform: translateY(-1px);
      box-shadow: 0 10px 22px rgba(17,24,39,.10);
    }
    .thumb{
      width: 72px; height: 72px;
      background: #eef2ff;
      position: relative;
      overflow: hidden;
    }
    .thumb img{
      width: 100%; height: 100%;
      object-fit: cover;
      display: block;
    }
    .row-body{
      padding: 10px 10px 10px 0;
      display: grid;
      gap: 4px;
      align-content: center;
      min-width: 0;
    }
    .row-title{
      font-size: 13px;
      font-weight: 650;
      margin: 0;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .row-meta{
      margin: 0;
      font-size: 12px;
      color: var(--muted);
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }
    .badge{
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 11px;
      color: #0f172a;
      background: #f1f5f9;
      border: 1px solid #e2e8f0;
      padding: 4px 8px;
      border-radius: 999px;
      width: fit-content;
    }
    .badge--green{
      background: rgba(34,197,94,.10);
      border-color: rgba(34,197,94,.25);
    }

    /* Leaflet marker (баннер как точка) */
    .banner-marker{
      width: 56px;
      height: 56px;
      border-radius: 16px;
      border: 2px solid #fff;
      box-shadow: 0 10px 25px rgba(17,24,39,.25);
      overflow: hidden;
      background: #fff;
      transform: translateY(-2px);
      position: relative;
    }
    .banner-marker img{
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }
    .banner-marker::after{
      content: "";
      position: absolute;
      inset: 0;
      border-radius: 16px;
      box-shadow: inset 0 0 0 1px rgba(17,24,39,.08);
      pointer-events: none;
    }

    /* Popup style */
    .ua-popup{
      width: 280px;
    }
    .ua-popup__cover{
      width: 100%;
      height: 130px;
      border-radius: 16px;
      overflow: hidden;
      border: 1px solid var(--border);
      background: #eef2ff;
    }
    .ua-popup__cover img{
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }
    .ua-popup__title{
      margin: 10px 0 6px;
      font-size: 14px;
      font-weight: 750;
      line-height: 1.2;
    }
    .ua-popup__meta{
      margin: 0 0 10px;
      color: var(--muted);
      font-size: 12px;
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }
    .ua-popup__actions{
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 10px;
      align-items: center;
    }
    .btn{
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      border: 1px solid var(--border);
      background: #fff;
      color: var(--text);
      padding: 10px 12px;
      border-radius: 14px;
      cursor: pointer;
      font-size: 13px;
      font-weight: 650;
    }
    .btn--primary{
      background: linear-gradient(135deg, var(--accent), #7c3aed);
      border-color: rgba(79,70,229,.25);
      color: #fff;
      box-shadow: 0 10px 25px rgba(79,70,229,.25);
    }
    .btn:active{ transform: translateY(1px); }

    /* Leaflet popup tweaks */
    .leaflet-popup-content{ margin: 12px; }
    .leaflet-popup-content-wrapper{
      border-radius: 18px;
      box-shadow: 0 18px 40px rgba(17,24,39,.18);
    }
    .leaflet-popup-tip{ box-shadow: 0 18px 40px rgba(17,24,39,.10); }