/* «Мой город» — блокировка rubber-band страницы на маршруте #/places (ставит router класс на html/body/#app). */
html.route-places-scroll-lock,
body.route-places-scroll-lock {
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
}

#app.route-places-scroll-lock {
  height: 100%;
  max-height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
}

/* «Мой город» — Leaflet + маркеры метро */

.places-page {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  overscroll-behavior: none;
}

.places-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 56px;
  padding: var(--s-2) var(--s-3);
  padding-top: calc(var(--s-2) + env(safe-area-inset-top));
  position: relative;
  z-index: 1200;
  background: rgba(250, 247, 242, 0.94);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
}

.places-header__back,
.places-header__filter {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  border: none;
  border-radius: var(--s-4);
  font-size: 22px;
  line-height: 1;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  color: var(--text);
}

.places-header__back:active,
.places-header__filter:active {
  transform: translateY(-50%) scale(0.96);
}

.places-header__back {
  left: 10px;
}

.places-header__filter {
  right: 10px;
}

.places-header__title {
  margin: 0;
  font-size: var(--text-xl);
  line-height: var(--leading-xl);
  font-weight: 700;
  color: var(--text);
}

.places-map-wrap {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
  overscroll-behavior: none;
}

.map-loading {
  position: absolute;
  inset: 0;
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  background: var(--surface);
  font-family: inherit;
  font-size: var(--text-lg);
  line-height: var(--leading-lg);
  font-weight: 700;
  color: var(--accent);
}

.map-loading__spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--surface-2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: places-map-spin 1s linear infinite;
}

@keyframes places-map-spin {
  to {
    transform: rotate(360deg);
  }
}

.map-loading__text {
  text-align: center;
  padding: 0 var(--s-4);
}

#places-map {
  flex: 1;
  width: 100%;
  min-height: 0;
  /* Leaflet сам выставляет touch-action; pan-x/y на #places-map провоцировали iOS: скролл страницы вместо панорама карты */
  touch-action: none;
  background: var(--surface-2);
}

.leaflet-container {
  font-family: inherit;
  overscroll-behavior: none;
  touch-action: none;
}

.leaflet-tile-pane {
  /* filter здесь давал расхождение маркеров и тайлов при зуме (отдельный compositor layer) */
  opacity: 0.92;
}

.places-zoom-bar {
  position: absolute;
  bottom: calc(80px + env(safe-area-inset-bottom));
  right: 14px;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.places-zoom-btn {
  width: 52px;
  height: 52px;
  border: none;
  border-radius: var(--r-lg);
  font-size: 28px;
  font-weight: 800;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  line-height: 1;
  color: var(--text);
  transition:
    transform var(--dur-fast) var(--ease),
    box-shadow var(--dur-fast) var(--ease);
}

.places-zoom-btn:active {
  transform: scale(0.94);
}

.fab-my-places {
  position: absolute;
  bottom: calc(20px + env(safe-area-inset-bottom));
  right: 14px;
  z-index: 1100;
  min-height: 52px;
  padding: 0 var(--s-5);
  border: none;
  border-radius: var(--r-full);
  font-size: var(--text-base);
  font-weight: 700;
  font-family: inherit;
  background: var(--accent);
  color: var(--accent-text);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  white-space: nowrap;
  transition:
    background var(--dur-fast) var(--ease),
    transform var(--dur-fast) var(--ease);
}

.fab-my-places:active {
  transform: scale(0.96);
  background: var(--accent-hover);
}

.metro-dot .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
}

.metro-dot .dot.visited,
.metro-circle .circle.visited,
.metro-large-wrap .large.visited {
  box-shadow:
    0 0 0 2px #ffd700,
    0 2px 4px rgba(0, 0, 0, 0.4);
}

.metro-large-wrap .large.visited {
  box-shadow:
    0 0 0 3px #ffd700,
    0 3px 8px rgba(0, 0, 0, 0.35);
}

.metro-dot .station-star {
  position: absolute;
  top: -7px;
  right: -9px;
  font-size: 12px;
  line-height: 1;
  pointer-events: none;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

/* Не задавать position на корне divIcon — он же .leaflet-marker-icon (должен остаться absolute). */

.metro-circle .station-star,
.metro-large-wrap > .station-star {
  position: absolute;
  top: -4px;
  right: -6px;
  font-size: 14px;
  line-height: 1;
  pointer-events: none;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.metro-large-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.metro-large-inner .station-star {
  position: absolute;
  top: -6px;
  right: -4px;
  font-size: 18px;
  line-height: 1;
  pointer-events: none;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.metro-circle .circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2.5px solid white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 12px;
  font-family: inherit;
  position: relative;
}

.metro-large-wrap .large {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 18px;
  position: relative;
}

.metro-large-inner--labeled {
  width: 40px;
  min-height: 60px;
  box-sizing: border-box;
  position: relative;
}

.metro-large--with-label .large {
  width: 40px;
  height: 40px;
  font-size: 20px;
}

.metro-large--with-label .station-name {
  position: absolute;
  top: 44px;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 0;
  text-align: center;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  color: #2c3e50;
  background: rgba(255, 248, 231, 0.92);
  padding: 1px 5px;
  border-radius: 6px;
  white-space: nowrap;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.metro-station-ghost {
  opacity: 0;
  pointer-events: none;
}

.bottom-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 85vh;
  background: var(--surface);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  box-shadow: var(--shadow-lg);
  padding: var(--s-2) var(--s-5) calc(var(--s-6) + env(safe-area-inset-bottom));
  z-index: 1600;
  transform: translateY(0);
  transition: transform var(--dur-slow) var(--ease);
  overflow-y: auto;
  overscroll-behavior: contain;
  font-family: inherit;
}

.bottom-sheet.bottom-sheet--uploading {
  overflow: hidden;
}

.bottom-sheet.hidden {
  transform: translateY(100%);
  pointer-events: none;
}

.sheet-upload-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: rgba(250, 247, 242, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
}

.sheet-upload-overlay__box {
  padding: var(--s-4) var(--s-6);
  background: var(--surface);
  border-radius: var(--r-md);
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--accent);
  box-shadow: var(--shadow-md);
}

.sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: var(--r-full);
  margin: var(--s-2) auto var(--s-3);
}

.place-sheet-avatar {
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
  font-weight: 700;
  background: var(--cat-place-bg);
  color: var(--cat-place);
  line-height: 1;
}

.place-sheet-avatar--metro {
  box-shadow: 0 0 0 2px var(--metro-line, var(--border));
}

.sheet-header {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  margin-bottom: var(--s-4);
}

.sheet-titles {
  flex: 1;
  min-width: 0;
}

.sheet-titles h2 {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text);
  line-height: var(--leading-lg);
}

.sheet-line-label {
  font-size: 13px;
  font-weight: 400;
  margin-top: var(--s-1);
  color: var(--text-soft);
  line-height: 1.35;
}

.sheet-line-label:empty {
  display: none;
}

.sheet-close-btn {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  border-radius: var(--r-full) !important;
  background: var(--surface-2) !important;
  font-size: 17px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.sheet-close-btn:active {
  transform: scale(0.96);
}

.sheet-body {
  padding-bottom: var(--s-2);
}

.sheet-loading {
  text-align: center;
  padding: var(--s-5);
  color: var(--text-muted);
  font-size: var(--text-base);
}

.empty-state {
  text-align: center;
  padding: var(--s-6) var(--s-4);
}

.empty-state p {
  font-size: var(--text-base);
  color: var(--text-muted);
  margin: 0 0 var(--s-4);
  line-height: var(--leading-base);
}

.place-sheet-desc-wrap {
  position: relative;
  margin-top: var(--s-4);
}

.place-sheet-desc {
  margin: 0;
  padding-right: 48px;
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  color: var(--text);
  white-space: pre-wrap;
}

.place-sheet-desc--empty {
  margin-top: var(--s-4);
  font-style: italic;
  color: var(--text-soft);
  padding-right: 0;
}

/* Галерея карточки места — scroll-snap, без JS-свайпа */
.place-photo-gallery {
  margin-bottom: var(--s-4);
}

.place-sheet-delete-photo-btn {
  width: 100%;
  margin-top: var(--s-3);
}

.place-gallery-stage {
  position: relative;
}

.gallery-viewport.gallery-viewport--place {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  touch-action: pan-x;
  overscroll-behavior-y: contain;
  border-radius: var(--r-md);
  background: var(--surface-2);
  outline: none;
}

.gallery-viewport.gallery-viewport--place::-webkit-scrollbar {
  display: none;
}

.gallery-viewport.gallery-viewport--place:focus-visible {
  box-shadow: 0 0 0 3px rgba(232, 121, 74, 0.35);
}

.gallery-track {
  display: flex;
  height: 100%;
}

.gallery-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  background: var(--border);
  overflow: hidden;
}

.gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.gallery-counter {
  position: absolute;
  bottom: var(--s-3);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.92);
  padding: var(--s-1) var(--s-3);
  border-radius: var(--r-full);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-soft);
  pointer-events: none;
  box-shadow: var(--shadow-sm);
}

.place-gallery-thumbs {
  display: flex;
  gap: var(--s-2);
  margin-top: 10px;
  flex-wrap: nowrap;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding-bottom: var(--s-1);
}

.photo-thumb {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: var(--s-3);
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
  background: var(--surface-2);
}

.photo-thumb:focus-visible {
  outline: none;
}

.photo-thumb--active {
  border-color: var(--accent);
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-2);
  margin-bottom: var(--s-4);
}

.photo-tile {
  aspect-ratio: 1;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface-2);
  cursor: pointer;
  border: none;
  padding: 0;
  display: block;
  width: 100%;
}

.photo-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.place-sheet-empty-photos {
  padding: var(--s-6);
  text-align: center;
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  font-weight: 400;
  color: var(--text-muted);
  background: var(--surface-2);
  border-radius: var(--r-md);
  margin-bottom: var(--s-4);
}

.sheet-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: var(--s-4);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(43, 38, 32, 0.42);
  z-index: 2200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s-4);
}

.modal {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  width: 100%;
  max-width: 400px;
  font-family: inherit;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.modal h3 {
  margin: 0 0 var(--s-4);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text);
  line-height: var(--leading-lg);
}

.modal label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-muted);
  margin: var(--s-3) 0 var(--s-2);
}

.modal textarea,
.modal input[type='date'] {
  width: 100%;
  padding: var(--s-3) var(--s-3);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-family: inherit;
  font-size: var(--text-sm);
  background: var(--surface);
  color: var(--text);
  box-sizing: border-box;
}

.modal textarea {
  resize: vertical;
  min-height: 80px;
}

.modal-actions {
  display: flex;
  gap: var(--s-2);
  margin-top: var(--s-5);
}

.modal-actions button {
  flex: 1;
  min-height: 48px;
}

.place-sheet-error-msg {
  text-align: center;
  padding: var(--s-4);
  margin: 0;
  color: var(--text-muted);
  font-size: var(--text-base);
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 12px;
  object-fit: contain;
}

.lightbox-caption {
  color: white;
  font-family: inherit;
  font-size: 16px;
  margin-top: 16px;
  text-align: center;
  max-width: 600px;
}

.lightbox-close {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top));
  right: 16px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 22px;
  cursor: pointer;
}

.lightbox-close:active {
  transform: scale(0.95);
}

/* Озвучка описания в шите места */
.speak-btn {
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: var(--r-full);
  border: none;
  background: var(--cat-thing);
  color: var(--accent-text);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--dur-fast) var(--ease),
    filter var(--dur-fast) var(--ease);
}

.speak-btn.playing {
  animation: places-speak-pulse 1s ease infinite;
}

@keyframes places-speak-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}

.custom-place-marker-wrap.leaflet-div-icon {
  background: transparent !important;
  border: none !important;
}

.cpm-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  pointer-events: auto;
}

.cpm-bubble {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: white;
  border: 3px solid #ffb347;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.cpm-label {
  font-family: inherit;
  font-weight: 700;
  font-size: 11px;
  max-width: 100px;
  color: #2c3e50;
  margin-top: 2px;
  text-shadow:
    -1px -1px 0 #fff,
    1px -1px 0 #fff,
    -1px 1px 0 #fff,
    1px 1px 0 #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.create-place-modal {
  max-width: 480px;
}

.create-place-overlay {
  z-index: 2100;
}

.create-place-modal input[type='text'] {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #e0e8f0;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  box-sizing: border-box;
}

.create-place-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

@media (max-width: 420px) {
  .create-place-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.create-place-type {
  min-height: 80px;
  min-width: 0;
  border-radius: 14px;
  border: 2px solid #e8eef4;
  background: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px;
  transition:
    transform 0.08s,
    border-color 0.15s,
    box-shadow 0.15s;
}

.create-place-type:active {
  transform: scale(0.96);
}

.create-place-type--picked {
  border-color: #ffb347;
  box-shadow: 0 3px 10px rgba(255, 179, 71, 0.35);
}

.create-place-type__emoji {
  font-size: 30px;
  line-height: 1;
}

.create-place-type__lbl {
  font-size: 12px;
  font-weight: 700;
  color: #34495e;
  line-height: 1.1;
}

.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(50, 50, 50, 0.92);
  color: white;
  padding: 12px 20px;
  border-radius: 24px;
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.25s,
    transform 0.25s;
  max-width: 80vw;
  text-align: center;
}

.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* —— Список «Мои места» (боттомшит) —— */
.fav-sheet-root {
  position: fixed;
  inset: 0;
  z-index: 1585;
  pointer-events: none;
  font-family: inherit;
}

.fav-sheet-root--visible {
  pointer-events: auto;
}

.fav-sheet-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  margin: 0;
  background: rgba(43, 38, 32, 0.35);
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--dur-slow) var(--ease);
  touch-action: none;
  overscroll-behavior: none;
}

.fav-sheet-root--visible .fav-sheet-backdrop {
  opacity: 1;
}

.fav-sheet-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 75vh;
  max-height: 75vh;
  background: var(--surface);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform var(--dur-slow) var(--ease);
  padding: var(--s-3) 0 calc(var(--s-5) + env(safe-area-inset-bottom));
  box-sizing: border-box;
  touch-action: pan-y;
  overscroll-behavior: contain;
}

.fav-sheet-root--visible .fav-sheet-panel {
  transform: translateY(0);
}

.fav-sheet-close {
  position: absolute;
  top: var(--s-3);
  right: var(--s-3);
  z-index: 2;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border: none;
  border-radius: var(--r-full);
  background: var(--surface-2);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
  transition:
    background var(--dur-fast) var(--ease),
    transform var(--dur-fast) var(--ease);
}

.fav-sheet-close:active {
  transform: scale(0.96);
  background: var(--border);
}

.fav-sheet-close:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.fav-sheet-inner {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0 var(--s-3);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.fav-sheet-head {
  text-align: center;
  padding: calc(var(--s-10) + var(--s-2)) var(--s-4) var(--s-3);
  flex-shrink: 0;
}

.fav-sheet-title {
  margin: 0;
  font-size: var(--text-xl);
  line-height: var(--leading-xl);
  font-weight: 700;
  color: var(--text);
}

.fav-sheet-head__meta {
  margin: var(--s-2) 0 0;
  display: flex;
  justify-content: center;
}

.fav-sheet-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: var(--s-5);
  text-align: center;
}

.fav-sheet-empty__icon {
  font-size: 56px;
  line-height: 1;
  filter: grayscale(1);
  opacity: 0.45;
}

.fav-sheet-empty__text {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text);
  max-width: 280px;
}

.fav-sheet-empty__hint {
  margin: 0;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
  line-height: var(--leading-sm);
  max-width: 300px;
}

.fav-sheet-list {
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  flex: 1;
  min-height: 0;
}

.fav-place-card {
  display: flex;
  align-items: stretch;
  gap: 0;
  min-height: 88px;
  margin-bottom: var(--s-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow: visible;
  transition:
    transform var(--dur-fast) var(--ease),
    box-shadow var(--dur-fast) var(--ease);
}

.fav-place-card:active {
  transform: scale(0.99);
  box-shadow: none;
}

.fav-place-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-1) var(--s-3) var(--s-3);
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: var(--r-lg);
  font: inherit;
  text-align: left;
}

.fav-place-main:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.fav-place-thumb-placeholder {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.fav-place-thumb-placeholder--loading {
  background: linear-gradient(
    90deg,
    var(--surface-2) 0%,
    var(--border) 40%,
    var(--surface-2) 80%
  );
  background-size: 200% 100%;
  animation: fav-thumb-shimmer 1.3s ease-in-out infinite;
}

.fav-place-thumb-placeholder--photo {
  padding: 0;
  background: var(--surface-2);
}

.fav-place-thumb-placeholder img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--r-md);
  display: block;
}

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

  100% {
    background-position: -100% 0;
  }
}

.fav-ph-ico {
  font-size: 28px;
  line-height: 1;
  opacity: 0.88;
}

.fav-place-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
}

.fav-place-name {
  font-size: var(--text-base);
  line-height: var(--leading-base);
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fav-place-sub {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  color: var(--text-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fav-place-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: var(--s-1);
  flex-shrink: 0;
  padding: var(--s-2) var(--s-3) var(--s-2) var(--s-2);
}

.fav-place-icon-btn {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border: none;
  border-radius: var(--s-3);
  padding: 0;
  margin: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: inherit;
  box-sizing: border-box;
  color: var(--text-muted);
  transition:
    background var(--dur-fast) var(--ease),
    color var(--dur-fast) var(--ease),
    transform var(--dur-fast) var(--ease);
}

.fav-place-icon-emoji {
  font-size: 18px;
  line-height: 1;
}

.fav-place-icon-btn:active {
  transform: scale(0.94);
  background: var(--surface-2);
}

.fav-place-icon-btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.fav-place-icon-btn--trash:hover,
.fav-place-icon-btn--trash:focus-visible {
  background: var(--danger-bg);
  color: var(--danger);
}

.fav-place-icon-btn--pin:hover,
.fav-place-icon-btn--pin:focus-visible {
  background: var(--cat-place-bg);
  color: var(--cat-place);
}

.fav-remove-overlay {
  z-index: 10050;
}

.fav-remove-modal {
  max-width: 360px;
}

.fav-remove-modal__text {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  text-align: center;
}

.fav-remove-modal .modal-actions {
  margin-top: 22px;
}

/* Пульсация маркера на карте (после «Показать на карте») ~1.5 с */
@keyframes leaflet-marker-pulse-kf {
  0%,
  100% {
    transform: scale(1);
  }

  25% {
    transform: scale(1.28);
  }

  50% {
    transform: scale(1);
  }

  72% {
    transform: scale(1.22);
  }
}

.leaflet-marker-pulse {
  animation: leaflet-marker-pulse-kf 1.5s ease-in-out forwards;
  transform-origin: center center;
}
