* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --bg: #1a1a2e;
  --surface: #16213e;
  --primary: #4fc3f7;
  --text: #e8e8f0;
  --text-muted: #8888aa;
  --border: rgba(255, 255, 255, 0.1);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
  --radius: 14px;
}

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: var(--tg-theme-bg-color, var(--bg));
  color: var(--tg-theme-text-color, var(--text));
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
  font-size: 15px;
}

/* ─── SPLASH SCREEN ──────────────────────────── */
#splash-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(14, 14, 42, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#splash-screen.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

#splash-assist {
  width: 180px;
  opacity: 0;
  transform: translateY(-12px);
  animation: splashAssist 0.6s ease 0.2s forwards;
}

#splash-logo {
  width: 220px;
  opacity: 0;
  transform: scale(0.85);
  animation: splashLogo 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s forwards;
}

@keyframes splashAssist {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes splashLogo {
  to { opacity: 1; transform: scale(1); }
}

#splash-loading-text {
  margin-top: 28px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.3px;
  opacity: 0;
  animation: splashTextFade 0.5s ease 0.3s forwards;
}

#splash-loading-text .dot {
  opacity: 0;
  animation: splashDotBlink 1.4s infinite;
}

#splash-loading-text .dot:nth-child(2) { animation-delay: 0.25s; }
#splash-loading-text .dot:nth-child(3) { animation-delay: 0.5s; }

@keyframes splashTextFade {
  to { opacity: 1; }
}

@keyframes splashDotBlink {
  0%, 80%, 100% { opacity: 0; }
  40% { opacity: 1; }
}

/* ─── MAP ─────────────────────────────────────── */
#map {
  position: fixed;
  inset: 0;
  z-index: 0;
}

/* ─── LAYER TOGGLE — standalone top-right ─────── */
.map-layer-btn {
  position: fixed;
  top: 14px;
  right: 10px;
  z-index: 1003;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* ─── RIGHT MAP CONTROLS ──────────────────────── */
#map-controls {
  position: fixed;
  right: 10px;
  top: 72px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: auto;
}

.map-ctrl-btn {
  width: 48px;
  height: 48px;
  background: rgba(26, 26, 46, 0.88);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
  color: #c8c8dc;
  transition: background 0.15s, transform 0.1s, color 0.15s;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.map-ctrl-btn svg {
  width: 20px;
  height: 20px;
}

.map-ctrl-btn:active {
  transform: scale(0.91);
  background: rgba(40, 40, 68, 0.95);
}

.map-ctrl-btn.active {
  background: rgba(123, 47, 190, 0.85);
  color: #fff;
}

.map-ctrl-zoom {
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
  color: #d0d0e8;
  letter-spacing: -1px;
}

/* ─── MAP SEARCH BAR ─────────────────────────── */
#map-search-bar {
  position: fixed;
  top: 14px;
  left: 12px;
  right: 68px;
  height: 44px;
  z-index: 1002;
  background: rgba(22, 22, 46, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 8px;
}

#map-search-icon {
  width: 18px;
  height: 18px;
  color: #7878a0;
  flex-shrink: 0;
  pointer-events: none;
}

#map-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #e8e8f0;
  font-size: 14px;
  min-width: 0;
  caret-color: #4fc3f7;
}

#map-search-input::placeholder {
  font-size: 13px;
  color: #7070a0;
}

#map-search-clear {
  background: none;
  border: none;
  color: #7878a0;
  cursor: pointer;
  font-size: 15px;
  padding: 4px 2px;
  line-height: 1;
  touch-action: manipulation;
}

#map-search-submit {
  width: 30px;
  height: 30px;
  background: rgba(108, 92, 231, 0.85);
  border: none;
  border-radius: 9px;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.1s, background 0.15s;
}

#map-search-submit svg {
  width: 18px;
  height: 18px;
}

#map-search-submit:active {
  transform: scale(0.9);
  background: rgba(90, 74, 200, 0.95);
}

#map-search-go {
  position: fixed;
  top: 66px;
  left: 12px;
  z-index: 1002;
  height: 34px;
  padding: 0 14px;
  background: rgba(108, 92, 231, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: none;
  border-radius: 11px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(108, 92, 231, 0.5);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.1s, opacity 0.1s;
}

#map-search-go:active {
  transform: scale(0.95);
}

/* ─── LONG-TAP POPUP ──────────────────────────── */
.longtap-popup {
  position: fixed;
  top: calc(50% + 36px);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1500;
  pointer-events: none;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12px 12px 0;
}

.longtap-popup:not(.hidden) {
  pointer-events: auto;
}

.longtap-popup.hidden {
  display: none;
}

.longtap-popup-card {
  width: 100%;
  max-width: 360px;
  background: rgba(22, 22, 42, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: longtap-popup-in 0.2s ease;
}

@keyframes longtap-popup-in {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(-8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.longtap-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.longtap-popup-coords {
  font-size: 14px;
  font-family: ui-monospace, monospace;
  color: var(--tg-theme-text-color, var(--text));
  word-break: break-all;
}

.longtap-popup-close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: var(--tg-theme-hint-color, var(--text-muted));
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  touch-action: manipulation;
}

.longtap-popup-close:hover,
.longtap-popup-close:active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--tg-theme-text-color, var(--text));
}

.longtap-popup-close i {
  font-size: 22px;
}

.longtap-popup-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px 14px;
}

.longtap-popup-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 14px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  touch-action: manipulation;
}

.longtap-popup-btn i {
  font-size: 18px;
}

.longtap-popup-btn-copy {
  background: var(--tg-theme-secondary-bg-color, #1e1e36);
  border: 1.5px solid rgba(123, 47, 190, 0.35);
  color: #a066d3;
}

.longtap-popup-btn-copy:active {
  background: rgba(123, 47, 190, 0.2);
  transform: scale(0.98);
}

.longtap-popup-btn-route {
  background: rgba(79, 195, 247, 0.2);
  border: 1px solid rgba(79, 195, 247, 0.4);
  color: #4fc3f7;
}

.longtap-popup-btn-route:active {
  background: rgba(79, 195, 247, 0.35);
  transform: scale(0.98);
}

.longtap-popup-btn-add {
  background: rgba(108, 92, 231, 0.25);
  border: 1px solid rgba(108, 92, 231, 0.45);
  color: #a78bfa;
}

.longtap-popup-btn-add:active {
  background: rgba(108, 92, 231, 0.4);
  transform: scale(0.98);
}

.longtap-marker-wrap {
  position: relative;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.longtap-marker-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  margin: -24px 0 0 -24px;
  border: 2px solid rgba(108, 92, 231, 0.55);
  border-radius: 50%;
  animation: longtap-marker-ring 1.4s ease-out infinite;
  pointer-events: none;
}

@keyframes longtap-marker-ring {
  0% {
    transform: scale(0.35);
    opacity: 0.9;
  }
  100% {
    transform: scale(1);
    opacity: 0;
  }
}

.longtap-marker-pin {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6c5ce7;
  font-size: 28px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.longtap-marker-icon .longtap-marker-pin i {
  font-size: inherit;
}

/* ─── AMENITY ICON CHIPS ─────────────────────── */
.amenity-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.amenity-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}

.amenity-chip input[type="checkbox"] {
  display: none;
}

.amenity-icon {
  width: 58px;
  height: 58px;
  background: var(--tg-theme-secondary-bg-color, #2a2a42);
  border: 2px solid var(--border);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9090bb;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.amenity-icon svg {
  width: 26px;
  height: 26px;
}

.amenity-icon i[data-lucide] {
  width: 26px;
  height: 26px;
}

.amenity-label {
  font-size: 12px;
  color: var(--tg-theme-hint-color, #9090bb);
  text-align: center;
  transition: color 0.15s;
}

.amenity-chip.checked .amenity-icon {
  background: rgba(123, 47, 190, 0.18);
  border-color: #7B2FBE;
  color: #a066d3;
}

.amenity-chip.checked .amenity-label {
  color: #a066d3;
}

/* Settings/locate group — anchored just above bottom route bar */
#map-controls-bottom {
  position: fixed;
  right: 10px;
  bottom: 160px;
  z-index: 1003;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: auto;
}

/* ─── BOTTOM ROUTE BAR ────────────────────────── */
#bottom-route-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(16, 18, 38, 0.55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.35);
  padding: 6px 0 4px;
  overflow: hidden;
  touch-action: manipulation;
}

.route-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
}

.route-bar-divider {
  height: 1px;
  background: var(--border);
  margin: 0 16px 0 44px;
}

/* Route dot indicators */
.route-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.route-dot-to {
  background: transparent;
  border: 2px solid #8888aa;
}

/* near_me icon used as "from" indicator */
.route-from-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FF8C00;
}

.route-from-icon svg {
  width: 20px;
  height: 20px;
}

.route-row input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 15px;
  color: var(--tg-theme-text-color, #e8e8f0);
  min-width: 0;
}

.route-row input::placeholder {
  color: var(--tg-theme-hint-color, #7777aa);
}

.route-icon-btn {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.07);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #8888aa;
  transition: background 0.15s;
}

.route-icon-btn svg {
  width: 16px;
  height: 16px;
}

.route-locate-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
}

.route-icon-btn:active {
  background: rgba(255, 255, 255, 0.13);
}

.route-go-btn {
  width: 36px;
  height: 36px;
  background: #7B2FBE;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  box-shadow: 0 2px 8px rgba(123, 47, 190, 0.45);
  transition: opacity 0.15s, transform 0.1s;
}

.route-go-btn svg {
  width: 18px;
  height: 18px;
}

.route-go-btn:active {
  opacity: 0.8;
  transform: scale(0.93);
}

.route-clear-btn {
  display: block;
  width: calc(100% - 24px);
  margin: 4px 12px 8px;
  padding: 9px 16px;
  background: var(--tg-theme-button-color, #2196F3);
  color: var(--tg-theme-button-text-color, #fff);
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition: opacity 0.15s, transform 0.1s;
  box-shadow: 0 2px 8px rgba(33, 150, 243, 0.35);
}

.route-clear-btn:active {
  opacity: 0.8;
  transform: scale(0.97);
}

/* ─── ROUTE LOADING OVERLAY ──────────────────── */
#route-loading {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.route-loading-box {
  background: rgba(22, 25, 46, 0.96);
  border-radius: 18px;
  padding: 28px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  color: #e8e8f0;
  font-size: 15px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.route-loading-box p {
  margin: 0;
}

.route-spinner {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: #4fc3f7;
  border-radius: 50%;
  animation: routeSpin 0.75s linear infinite;
}

@keyframes routeSpin {
  to { transform: rotate(360deg); }
}

/* ─── FLOATING PANELS ─────────────────────────── */
.floating-panel {
  position: fixed;
  top: 60px;
  left: 10px;
  right: 64px;
  bottom: 120px;
  z-index: 1001;
  background: rgba(22, 22, 42, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 -4px 32px rgba(0, 0, 0, 0.45);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;

  /* Анимация появления */
  opacity: 0;
  transform: scale(0.95) translateY(-10px);
  transform-origin: top left;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.26s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.floating-panel.visible {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

/* ─── PANEL TABS ──────────────────────────────── */
#panel-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.panel-tab {
  flex: 1;
  background: var(--tg-theme-secondary-bg-color, #2a2a42);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 0;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  color: var(--tg-theme-hint-color, var(--text-muted));
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.panel-tab.active {
  background: var(--tg-theme-button-color, #2196F3);
  border-color: transparent;
  color: var(--tg-theme-button-text-color, #fff);
}

/* ─── DIMS GRID ───────────────────────────────── */
.dims-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.dims-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--tg-theme-hint-color, var(--text-muted));
}

.dims-input {
  background: var(--tg-theme-secondary-bg-color, #2a2a42);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 15px;
  color: var(--tg-theme-text-color, var(--text));
  width: 100%;
  outline: none;
}

.dims-input:focus {
  border-color: var(--primary);
}

.panel-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--tg-theme-text-color, var(--text));
}

/* ─── FILTER SECTIONS (redesigned) ───────────── */
#pane-filters {
  overflow-y: visible;
}

.filter-section {
  margin-bottom: 16px;
}

.filter-section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tg-theme-hint-color, #6b6b8a);
  margin-bottom: 8px;
}

/* ─── NEW FILTER CHIPS (fchip) ─────────────── */
.filter-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.fchip {
  background: var(--tg-theme-secondary-bg-color, #24243a);
  border: 1.5px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: var(--tg-theme-text-color, #d0d0e8);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.12s cubic-bezier(0.34, 1.56, 0.64, 1);
  min-height: 36px;
  white-space: nowrap;
}

.fchip:active {
  transform: scale(0.91);
}

.fchip img {
  flex-shrink: 0;
}

.fchip svg {
  flex-shrink: 0;
}

.fchip i[data-lucide] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.fchip.active {
  background: rgba(123, 47, 190, 0.25);
  border-color: #7B2FBE;
  color: #c085ff;
}

/* Payment filter buttons */
.fchip.pay-btn.active[data-paid="false"] {
  background: rgba(41, 182, 246, 0.2);
  border-color: #29B6F6;
  color: #29B6F6;
}
.fchip.pay-btn.active[data-paid="true"] {
  background: rgba(34, 197, 94, 0.2);
  border-color: #22C55E;
  color: #22C55E;
}

/* keep legacy .chip for old selectors */
.chip {
  background: var(--tg-theme-secondary-bg-color, #2a2a42);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 13px;
  cursor: pointer;
  color: var(--tg-theme-text-color, var(--text));
  display: flex;
  align-items: center;
  gap: 2px;
  transition: background 0.15s, border-color 0.15s;
  min-height: 36px;
}
.chip.active {
  background: var(--tg-theme-button-color, #2196F3);
  border-color: transparent;
  color: var(--tg-theme-button-text-color, #fff);
}

/* Filter clear button */
.filter-clear-btn-panel {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px;
  background: transparent;
  color: var(--tg-theme-hint-color, #6b6b8a);
  border: 1.5px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s;
}
.filter-clear-btn-panel:active { opacity: 0.7; }

/* Payment filter (add modal) */
.pay-btn-add.active[data-paid="false"] {
  background: #29B6F6;
  border-color: #29B6F6;
  color: #fff;
}
.pay-btn-add.active[data-paid="true"] {
  background: #22C55E;
  border-color: #22C55E;
  color: #fff;
}

/* ─── ROUTE DOTS ──────────────────────────────── */
.route-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
}

.route-dot.green { background: #4CAF50; }
.route-dot.red   { background: #F44336; }

/* ─── BUTTONS ─────────────────────────────────── */
.primary-btn {
  display: block;
  width: 100%;
  padding: 14px;
  background: var(--tg-theme-button-color, #2196F3);
  color: var(--tg-theme-button-text-color, #fff);
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  min-height: 50px;
  transition: opacity 0.15s;
  text-align: center;
}

.primary-btn:active {
  opacity: 0.8;
}

.secondary-btn {
  display: block;
  width: 100%;
  padding: 12px;
  background: transparent;
  color: var(--tg-theme-hint-color, var(--text-muted));
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
  cursor: pointer;
  min-height: 44px;
  margin-top: 8px;
  transition: opacity 0.15s;
}

.secondary-btn:active {
  opacity: 0.7;
}

/* ─── SHEET HEADER RIGHT ──────────────────────── */
#sheet-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-top: 2px;
}

.sheet-admin-btn {
  background: rgba(239, 68, 68, 0.15);
  border: 1.5px solid rgba(239, 68, 68, 0.3);
  border-radius: 10px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
  color: rgba(239, 68, 68, 0.9);
}
.sheet-admin-btn:active { background: rgba(239,68,68,0.3); }
.sheet-admin-btn i {
  font-size: 20px;
  line-height: 1;
}
.sheet-admin-btn.parking-action-hide {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.36);
  color: rgba(245, 158, 11, 0.95);
}
.sheet-admin-btn.parking-action-hide:active {
  background: rgba(245, 158, 11, 0.3);
}
.sheet-admin-btn.parking-action-delete {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: rgba(239, 68, 68, 0.9);
}
.sheet-admin-btn.parking-action-delete:active {
  background: rgba(239,68,68,0.3);
}

.sheet-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #8f90a8;
  transition: background 0.15s, color 0.15s;
}
.sheet-close-btn i {
  font-size: 20px;
  line-height: 1;
}
.sheet-close-btn:active {
  background: rgba(255, 255, 255, 0.12);
  color: #b9bad0;
}
#parking-edit-btn {
  background: rgba(108, 92, 231, 0.15);
  border-color: rgba(108, 92, 231, 0.35);
  color: rgba(108, 92, 231, 0.9);
}
#parking-edit-btn:active { background: rgba(108,92,231,0.3); }

/* ─── RATING SUMMARY ──────────────────────────── */
#parking-rating-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 14px;
}
#parking-rating-stars { color: #FFB300; font-size: 16px; }
#parking-rating-count { color: var(--tg-theme-hint-color, #6b6b8a); font-size: 12px; }

/* ─── SHEET DIVIDER ───────────────────────────── */
.sheet-divider {
  height: 1px;
  background: rgba(255,255,255,0.07);
  margin: 14px -16px;
}

/* ─── MAPS BUTTON ─────────────────────────────── */
.sheet-maps-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background: rgba(33, 150, 243, 0.12);
  color: #4FC3F7;
  border: 1.5px solid rgba(79, 195, 247, 0.25);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 10px;
  transition: background 0.15s, transform 0.12s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.sheet-maps-btn:active { background: rgba(33,150,243,0.22); transform: scale(0.97); }

/* ─── REVIEWS SECTION ─────────────────────────── */
#reviews-section { padding-top: 2px; }

.review-item {
  background: var(--tg-theme-secondary-bg-color, #22223a);
  border-radius: 12px;
  padding: 11px 13px;
  margin-bottom: 8px;
  position: relative;
}
.review-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.review-item-stars { color: #FFB300; font-size: 14px; letter-spacing: 1px; }
.review-item-meta  { font-size: 11px; color: var(--tg-theme-hint-color, #6b6b8a); }
.review-item-text  { font-size: 13px; color: var(--tg-theme-text-color, #d0d0e8); line-height: 1.4; }
.review-item-delete {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  opacity: 0.5;
  flex-shrink: 0;
}
.review-item-delete:active { opacity: 1; }
.review-item-action-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  opacity: 0.45;
  flex-shrink: 0;
  color: var(--tg-theme-text-color, #d0d0e8);
  display: flex;
  align-items: center;
}
.review-item-action-btn:active { opacity: 1; }

/* Review form */
.review-form-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--tg-theme-hint-color, #6b6b8a);
  margin-bottom: 10px;
}
#review-stars-input {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}
.star-input {
  font-size: 26px;
  color: rgba(255,179,0,0.25);
  cursor: pointer;
  transition: color 0.12s, transform 0.1s;
  user-select: none;
}
.star-input.selected { color: #FFB300; }
.star-input:hover    { transform: scale(1.15); }

#review-comment {
  width: 100%;
  background: var(--tg-theme-secondary-bg-color, #22223a);
  border: 1.5px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--tg-theme-text-color, #d0d0e8);
  resize: none;
  outline: none;
  box-sizing: border-box;
  margin-bottom: 10px;
  font-family: inherit;
}
#review-comment:focus { border-color: #7B2FBE; }
#review-comment::placeholder { color: var(--tg-theme-hint-color, #6b6b8a); }

.review-submit-btn {
  display: block;
  width: 100%;
  padding: 12px;
  background: #7B2FBE;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.12s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.review-submit-btn:active { opacity: 0.85; transform: scale(0.96); }
.review-submit-btn:disabled { opacity: 0.5; cursor: default; }

.maps-btn {
  margin-top: 4px;
  font-size: 16px;
}

/* ─── BOTTOM SHEET ────────────────────────────── */
#bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1100;
  background: rgba(22, 22, 42, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -6px 32px rgba(0, 0, 0, 0.45);
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.34, 1.1, 0.64, 1);
  padding-bottom: max(env(safe-area-inset-bottom), 16px);
  max-height: 80vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

#bottom-sheet.visible {
  transform: translateY(0);
}

#sheet-drag-handle {
  display: flex;
  justify-content: center;
  padding: 12px 20px 6px;
  cursor: pointer;
}

#sheet-handle {
  width: 40px;
  height: 4px;
  background: var(--tg-theme-hint-color, #444466);
  border-radius: 2px;
}

#sheet-content {
  padding: 4px 16px 20px;
}

#sheet-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

#parking-name {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.25;
  flex: 1;
}

.distance-badge {
  background: var(--tg-theme-button-color, #2196F3);
  color: var(--tg-theme-button-text-color, #fff);
  padding: 4px 11px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 3px;
}

#parking-coords-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

#parking-coords-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--tg-theme-secondary-bg-color, #1e1e36);
  border: 1.5px solid rgba(123, 47, 190, 0.35);
  border-radius: 10px;
  padding: 8px 12px;
  min-width: 0;
}

.coords-pin-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: #7B2FBE;
  opacity: 0.85;
}

#parking-coords {
  font-size: 13px;
  color: var(--tg-theme-text-color, #d0d0e8);
  font-family: monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.copy-btn {
  background: var(--tg-theme-secondary-bg-color, #1e1e36);
  border: 1.5px solid rgba(123, 47, 190, 0.35);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  color: #a066d3;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, transform 0.15s;
  touch-action: manipulation;
}

.copy-btn:active {
  background: rgba(123, 47, 190, 0.2);
  transform: scale(0.93);
}

#parking-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 14px;
  font-size: 14px;
  color: var(--tg-theme-text-color, var(--text));
}

#parking-description-row {
  margin-bottom: 14px;
}

#parking-description-row.sheet-row .sheet-label {
  display: block;
  font-size: 12px;
  color: var(--tg-theme-hint-color, var(--text-muted));
  margin-bottom: 4px;
}

#parking-description-row .sheet-description {
  font-size: 14px;
  line-height: 1.45;
  color: var(--tg-theme-text-color, var(--text));
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

#parking-description-row .sheet-description.description-truncated {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

#parking-description-row .description-toggle {
  margin-top: 6px;
  padding: 0;
  font-size: 13px;
  color: var(--primary, #4fc3f7);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
}

#parking-description-row .description-toggle:hover {
  opacity: 0.85;
}

#parking-rating::before { content: ""; }

#services-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 16px;
}

.service-tag {
  background: var(--tg-theme-secondary-bg-color, #2a2a42);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--tg-theme-text-color, var(--text));
}

.service-tag.paid {
  background: rgba(244, 67, 54, 0.15);
}

.service-tag.free {
  background: rgba(76, 175, 80, 0.15);
}

/* ─── CUSTOM MAP MARKERS ──────────────────────── */
.parking-marker {
  width: 34px;
  height: 34px;
  background: #1976D2;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  border: 3px solid #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: transform 0.15s;
  user-select: none;
}

.parking-marker:hover {
  transform: scale(1.12);
}

.parking-marker.route-highlight {
  background: #FF8C00;
  border-color: #fff;
}

/* ─── TYPED PARKING MARKERS ────────────────────── */
.pm {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  border: 3px solid #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: transform 0.15s;
  user-select: none;
  line-height: 1.1;
}

.pm:hover {
  transform: scale(1.12);
}

.pm-стоянка {
  background: #1565C0;
  font-size: 18px;
}

.pm-spot {
  background: #fff;
  border-radius: 6px;
  border-color: #90A4AE;
  color: #37474F;
  font-size: 11px;
  font-weight: 900;
}

.pm-spot .pm-sub {
  font-size: 6px;
  font-weight: 700;
  letter-spacing: 0.5px;
  opacity: 0.8;
}

.pm-prom {
  background: #2D4A5A;
  font-size: 13px;
}

.pm-autohof {
  background: #22C55E;
  font-size: 8px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.2px;
}

.pm-paid {
  background: #22C55E !important;
  border-color: #fff !important;
}

.pm-spot.pm-paid {
  color: #fff !important;
}

.pm.route-highlight {
  background: #FF8C00 !important;
}

.user-marker {
  width: 16px;
  height: 16px;
  background: #4CAF50;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 0 0 5px rgba(76, 175, 80, 0.25);
  position: relative;
}

.user-marker::before,
.user-marker::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1.5px solid rgba(76, 175, 80, 0.45);
  opacity: 0;
  animation: userLocPulse 2.4s ease-out infinite;
}

.user-marker::before {
  width: 28px;
  height: 28px;
}

.user-marker::after {
  width: 42px;
  height: 42px;
  animation-delay: 0.9s;
}

@keyframes userLocPulse {
  0%   { opacity: 0.55; transform: translate(-50%, -50%) scale(0.7); }
  70%  { opacity: 0;    transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0;    transform: translate(-50%, -50%) scale(1); }
}

/* ─── SEARCH RESULT MARKER ───────────────────── */
.search-result-marker {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.srm-dot {
  width: 16px;
  height: 16px;
  background: #e53935;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(229, 57, 53, 0.5);
  position: relative;
  z-index: 2;
}

.srm-dot::before,
.srm-dot::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2.5px solid #e53935;
  opacity: 0;
  animation: srmPulse 2s ease-out infinite;
}

.srm-dot::after {
  animation-delay: 0.75s;
}

@keyframes srmPulse {
  0%   { opacity: 0.9; transform: translate(-50%, -50%) scale(0.6); }
  80%  { opacity: 0;   transform: translate(-50%, -50%) scale(2.2); }
  100% { opacity: 0;   transform: translate(-50%, -50%) scale(2.2); }
}

.route-end-pin {
  position: relative;
  font-size: 30px;
  line-height: 1;
  transform: translateY(-2px);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45));
  user-select: none;
}

/* ─── ROUTE PARKING NAVIGATOR ────────────────── */
#route-parking-nav {
  position: fixed;
  bottom: 158px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1100;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--tg-theme-bg-color, #1e1e30);
  border-radius: 24px;
  padding: 6px 20px;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
  font-size: 15px;
  font-weight: 500;
  color: var(--tg-theme-text-color, #e8e8f0);
  white-space: nowrap;
  pointer-events: all;
}

#route-parking-nav.hidden {
  display: none;
}

.route-nav-arrow {
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: var(--tg-theme-button-color, #2196F3);
  cursor: pointer;
  padding: 0 2px;
  touch-action: manipulation;
  user-select: none;
}

.route-nav-arrow:active {
  opacity: 0.6;
}

/* ─── LEAFLET OVERRIDES ───────────────────────── */
.leaflet-control-zoom {
  border: none !important;
  box-shadow: var(--shadow) !important;
}

.leaflet-control-zoom a {
  background: var(--tg-theme-bg-color, #1e1e30) !important;
  color: var(--tg-theme-text-color, var(--text)) !important;
  border-color: var(--border) !important;
  width: 36px !important;
  height: 36px !important;
  line-height: 36px !important;
  font-size: 18px !important;
}

.leaflet-control-attribution {
  background: rgba(0, 0, 0, 0.4) !important;
  color: #888 !important;
  font-size: 10px !important;
}

.leaflet-marker-icon.cluster-icon .parking-marker {
  width: 38px;
  height: 38px;
  font-size: 13px;
  background: #0D47A1;
}

/* ─── ACTIVE MARKER ──────────────────────────────── */
.map-marker-wrap {
  position: relative;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: markerAppear 0.32s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}

@keyframes markerAppear {
  0%   { opacity: 0; transform: scale(0.35) translateY(6px); }
  60%  { opacity: 1; transform: scale(1.12) translateY(-2px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.map-marker-wrap img {
  width: 38px;
  height: 38px;
  display: block;
}

.map-marker-wrap.map-marker-active {
  transform: scale(1.35);
  z-index: 1000;
  filter: drop-shadow(0 0 6px rgba(123, 47, 190, 0.9));
}

.map-marker-wrap.map-marker-active::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2.5px solid #a855f7;
  animation: markerPulse 1.4s ease-out infinite;
  pointer-events: none;
}

@keyframes markerPulse {
  0%   { opacity: 1;   transform: scale(1); }
  70%  { opacity: 0;   transform: scale(1.6); }
  100% { opacity: 0;   transform: scale(1.6); }
}

/* ─── ADD PARKING FAB ─────────────────────────────── */
#add-parking-btn {
  position: fixed;
  bottom: 126px;
  left: 16px;
  z-index: 999;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--tg-theme-button-color, #2196F3);
  color: var(--tg-theme-button-text-color, #fff);
  border: none;
  font-size: 26px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.94;
  transition: transform 0.15s, opacity 0.15s;
}

#add-parking-btn:active {
  transform: scale(0.92);
  opacity: 0.85;
}

/* ─── ADD PARKING MODAL ────────────────────────────── */
#add-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
}

#add-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

#add-modal-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(22, 22, 42, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 20px 20px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 -6px 32px rgba(0, 0, 0, 0.45);
  max-height: 88vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: max(env(safe-area-inset-bottom), 16px);
  pointer-events: auto;

  /* Анимация slide up */
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.46s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.28s ease;
}

#add-modal-content.open {
  transform: translateY(0);
  opacity: 1;
}

#add-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  background: rgba(22, 22, 42, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  z-index: 1;
}

#add-modal-header h3 {
  font-size: 16px;
  font-weight: 700;
}

#add-modal-close {
  background: transparent;
  border: none;
  color: var(--tg-theme-hint-color, var(--text-muted));
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
}

#add-modal-body {
  padding: 14px 16px;
}

.add-coords-hint {
  font-size: 12px;
  color: var(--tg-theme-hint-color, #8888aa);
  margin: 6px 0 12px 0;
  line-height: 1.35;
  display: block;
}

.form-group {
  margin-bottom: 16px;
}

.form-group > label {
  display: block;
  font-size: 13px;
  color: var(--tg-theme-hint-color, var(--text-muted));
  margin-bottom: 6px;
  font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group textarea {
  width: 100%;
  background: var(--tg-theme-secondary-bg-color, #2a2a42);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 15px;
  color: var(--tg-theme-text-color, var(--text));
  outline: none;
  box-sizing: border-box;
  resize: vertical;
  font-family: inherit;
  -webkit-appearance: none;
}

.form-group input[type="text"]::placeholder,
.form-group input[type="number"]::placeholder,
.form-group textarea::placeholder {
  color: var(--tg-theme-hint-color, var(--text-muted));
}

.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus,
.form-group textarea:focus {
  border-color: var(--tg-theme-button-color, #2196F3);
  outline: none;
}

.services-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.service-check {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--tg-theme-secondary-bg-color, #2a2a42);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 7px 13px;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s, border-color 0.15s;
}

.service-check input[type="checkbox"] {
  display: none;
}

.service-check.checked {
  background: var(--tg-theme-button-color, #2196F3);
  border-color: transparent;
  color: var(--tg-theme-button-text-color, #fff);
}

.service-check svg {
  flex-shrink: 0;
}

.service-check i[data-lucide] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.service-tag .svc-lucide {
  width: 14px;
  height: 14px;
  display: inline-block;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.toggle-switch {
  position: relative;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

.toggle-switch input { display: none; }

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--tg-theme-secondary-bg-color, #2a2a42);
  border-radius: 13px;
  cursor: pointer;
  transition: background 0.2s;
  border: 1px solid var(--border);
}

.toggle-slider::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: transform 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--tg-theme-button-color, #2196F3);
  border-color: transparent;
}

.toggle-switch input:checked + .toggle-slider::after {
  transform: translateX(22px);
}


/* ─── ADD MODAL — NEW STYLE ──────────────────── */

/* Coordinates row with action buttons */
.coords-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.coords-row input {
  flex: 1;
}

.coords-action-btn {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: var(--tg-theme-secondary-bg-color, #2a2a42);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9090bb;
  transition: background 0.15s, color 0.15s;
}

.coords-action-btn svg {
  width: 20px;
  height: 20px;
}

.coords-action-btn:active {
  background: rgba(255, 255, 255, 0.1);
}

.coords-action-btn.locate {
  color: #FF8C00;
  border-color: rgba(255, 140, 0, 0.3);
}

/* Type chips — 2-column grid with icon + label */
.type-chips-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.type-chip-add {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--tg-theme-secondary-bg-color, #2a2a42);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
  color: var(--tg-theme-text-color, var(--text));
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.type-chip-add span {
  font-weight: 500;
}

.type-chip-add.active {
  background: #7B2FBE;
  border-color: #7B2FBE;
  color: #fff;
}

.type-chip-add:active {
  opacity: 0.8;
}

/* Pay toggle row */
.pay-toggle-row {
  display: flex;
  gap: 8px;
}

.pay-btn-add {
  flex: 1;
  padding: 10px 0;
  background: var(--tg-theme-secondary-bg-color, #2a2a42);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--tg-theme-text-color, var(--text));
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.pay-btn-add.active[data-paid="false"] {
  background: #29B6F6;
  border-color: #29B6F6;
  color: #fff;
}

.pay-btn-add.active[data-paid="true"] {
  background: #22C55E;
  border-color: #22C55E;
  color: #fff;
}

/* Submit button */
.add-submit-styled {
  display: block;
  width: 100%;
  height: 50px;
  margin-top: 8px;
  background: var(--tg-theme-button-color, #2196F3);
  color: var(--tg-theme-button-text-color, #fff);
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.3px;
  box-shadow: 0 3px 12px rgba(33, 150, 243, 0.4);
  transition: opacity 0.15s, transform 0.1s;
}

.add-submit-styled:active {
  opacity: 0.85;
  transform: scale(0.98);
}

/* ─── TOAST ────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 100px;
  left: 16px;
  right: 16px;
  z-index: 3000;
  background: #3a2e00;
  border: 1px solid #f59e0b;
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 14px;
  color: #fcd34d;
  box-shadow: var(--shadow);
  text-align: center;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ─── PRO ACCESS WALL ─────────────────────────── */
#pro-wall,
#network-error {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

#pro-wall-content {
  max-width: 340px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

#pro-wall-icon {
  font-size: 56px;
  line-height: 1;
  filter: drop-shadow(0 0 20px rgba(252, 211, 77, 0.5));
}

#pro-wall-title {
  font-size: 24px;
  font-weight: 700;
  color: #fcd34d;
  letter-spacing: 0.5px;
}

#pro-wall-text {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.5;
}

#pro-wall-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid var(--border);
}

.pro-wall-feature {
  font-size: 14px;
  color: var(--text);
  text-align: left;
}

#pro-wall-btn {
  width: 100%;
  padding: 14px 24px;
  background: #fcd34d;
  color: #1a1a2e;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}

#pro-wall-btn:active {
  opacity: 0.85;
  transform: scale(0.98);
}

#pro-wall-hint {
  font-size: 13px;
  color: var(--text-muted);
}

/* ─── UTILITY ─────────────────────────────────── */
.hidden {
  display: none !important;
}

/* ─── SKELETON LOADER ─────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -500px 0; }
  100% { background-position: 500px 0; }
}

.skeleton-line {
  border-radius: 8px;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.05) 25%,
    rgba(255,255,255,0.12) 50%,
    rgba(255,255,255,0.05) 75%
  );
  background-size: 1000px 100%;
  animation: shimmer 1.5s infinite linear;
  margin-bottom: 10px;
}

.skeleton-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.05) 25%,
    rgba(255,255,255,0.12) 50%,
    rgba(255,255,255,0.05) 75%
  );
  background-size: 1000px 100%;
  animation: shimmer 1.5s infinite linear;
}

.skeleton-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

/* ─── SHEET CONTENT STAGGER ───────────────────── */
@keyframes sheetItemIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.sheet-animate > * {
  animation: sheetItemIn 0.3s cubic-bezier(0.25, 1, 0.5, 1) both;
}
.sheet-animate > *:nth-child(1) { animation-delay: 0.04s; }
.sheet-animate > *:nth-child(2) { animation-delay: 0.09s; }
.sheet-animate > *:nth-child(3) { animation-delay: 0.13s; }
.sheet-animate > *:nth-child(4) { animation-delay: 0.17s; }
.sheet-animate > *:nth-child(5) { animation-delay: 0.20s; }
.sheet-animate > *:nth-child(n+6) { animation-delay: 0.23s; }
