* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  font-family: "Inter", sans-serif;
  background: #1a1217;
  color: #fff7fb;
}

#app,
#map {
  width: 100vw;
  height: 100dvh;
}

#app {
  position: relative;
  overflow: hidden;
}

#map {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;

}

.topbar {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  pointer-events: none;
}

.hero {
  pointer-events: auto;
  width: min(520px, calc(100% - 72px));
  padding: 14px 18px;
  border-radius: 22px;
  background: rgba(45, 22, 35, 0.52);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.eyebrow {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #f3c6d8;
  margin-bottom: 6px;
}

.title {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.8rem, 1.1rem + 2vw, 2.8rem);
  line-height: 0.92;
  font-weight: 600;
  margin-bottom: 6px;
}

.subtitle {
  font-size: 0.92rem;
  line-height: 1.4;
  color: #f7dfe8;
  max-width: 32ch;
}

.burger {
  pointer-events: auto;
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 16px;
  background: rgba(45, 22, 35, 0.68);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff7fb;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.burger span,
.burger span::before,
.burger span::after {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  content: "";
  position: relative;
}

.burger span::before {
  position: absolute;
  top: -7px;
}

.burger span::after {
  position: absolute;
  top: 7px;
}

.status-chip,
.summary-chip {
  position: absolute;
  left: 16px;
  z-index: 18;
  max-width: min(420px, calc(100vw - 32px));
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(33, 16, 26, 0.66);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f6dee7;
  font-size: 0.88rem;
  line-height: 1.4;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}

.status-chip {
  bottom: 16px;
  display: none;
}

.summary-chip {
  bottom: 74px;
  display: none;
}

.backdrop {
  position: absolute;
  inset: 0;
  z-index: 29;
  background: rgba(0, 0, 0, 0.26);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.sidebar {
  position: absolute;
  top: 16px;
  right: 16px;
  bottom: 16px;
  width: min(390px, calc(100vw - 24px));
  z-index: 30;
  border-radius: 28px;
  background: rgba(34, 17, 28, 0.9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
  transform: translateX(calc(100% + 24px));
  transition: transform 0.28s cubic-bezier(.2, .8, .2, 1);
  display: flex;
  flex-direction: column;
}

.sidebar.open {
  transform: translateX(0);
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.sidebar-text {
  font-size: 0.92rem;
  line-height: 1.45;
  color: #ecd7df;
}

.close-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff7fb;
  cursor: pointer;
  flex: 0 0 auto;
}

.sidebar-body {
  padding: 18px;
  display: grid;
  gap: 16px;
  overflow: auto;
}

.widget {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.widget h3 {
  font-size: 0.96rem;
  margin-bottom: 8px;
}

.widget p {
  font-size: 0.9rem;
  line-height: 1.45;
  color: #ecd7df;
}

.form-group {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.form-group:last-child {
  margin-bottom: 0;
}

label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff3f8;
}

.field-help {
  font-size: 0.82rem;
  line-height: 1.35;
  color: #e7cfd8;
}

.value-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.value-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff7fb;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;
}

input[type="range"] {
  width: 100%;
  accent-color: #f08cb2;
  cursor: pointer;
}

select {
  width: 100%;
  border: none;
  outline: none;
  padding: 12px 14px;
  border-radius: 14px;
  font: inherit;
  color: #fff7fb;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #f08cb2;
  flex: 0 0 auto;
}

.checkbox-row label {
  font-size: 0.92rem;
  font-weight: 500;
  color: #fff5fa;
  cursor: pointer;
}

.start-point {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.9rem;
  line-height: 1.45;
  color: #fff0f6;
}

.start-point.empty {
  color: #e6cdd7;
  font-style: italic;
}

.row-actions {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

button.primary-btn,
button.ghost-btn {
  width: 100%;
  border: none;
  padding: 12px 14px;
  border-radius: 14px;
  font: inherit;
  cursor: pointer;
}

button.primary-btn {
  background: linear-gradient(135deg, #ff8db6, #e86e9f);
  color: #2d0f1f;
  font-weight: 700;
}

button.ghost-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #fff7fb;
  text-align: left;
}

.poi-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  max-height: 180px;
  overflow: auto;
}

.poi-item {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.88rem;
  color: #f8e7ee;
}

.leaflet-top.leaflet-left,
.leaflet-top.leaflet-right {
  top: 84px;
}

.leaflet-control-zoom {
  border: none !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18) !important;
  overflow: hidden;
  border-radius: 16px !important;
}

.leaflet-control-zoom a {
  width: 40px !important;
  height: 40px !important;
  line-height: 40px !important;
  background: rgba(45, 22, 35, 0.82) !important;
  color: #fff7fb !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.leaflet-control-attribution {
  display: none !important;
}

.start-marker {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #ff7cab;
  border: 3px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 8px rgba(255, 124, 171, 0.18);
}

.poi-marker {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #ffe1ec;
  border: 2px solid #da5f92;
  box-shadow: 0 0 0 6px rgba(255, 225, 236, 0.1);
}

@media (max-width: 680px) {
  .topbar {
    top: 12px;
    left: 12px;
    right: 12px;
    gap: 10px;
  }

  .hero {
    width: calc(100% - 62px);
    padding: 12px 14px;
    border-radius: 18px;
  }

  .title {
    font-size: clamp(1.5rem, 1.1rem + 2vw, 2.2rem);
  }

  .subtitle {
    font-size: 0.88rem;
    max-width: 26ch;
  }

  .burger {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }

  .sidebar {
    top: 12px;
    right: 12px;
    bottom: 12px;
  }

  .status-chip,
  .summary-chip {
    left: 12px;
    right: 12px;
    max-width: none;
  }

  .status-chip {
    bottom: 12px;
  }

  .summary-chip {
    bottom: 66px;
  }

  .row-actions {
    grid-template-columns: 1fr;
  }

  .leaflet-top.leaflet-left,
  .leaflet-top.leaflet-right {
    top: 76px;
  }
}

.loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at center, rgba(255, 141, 182, 0.10), transparent 38%),
    rgba(15, 8, 12, 0.28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.24s ease,
    visibility 0.24s ease;
}

.loading-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.loading-card {
  width: min(360px, calc(100vw - 32px));
  padding: 22px 20px;
  border-radius: 24px;
  background: rgba(39, 18, 30, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
  display: grid;
  justify-items: center;
  gap: 16px;
  text-align: center;
}

.spinner-orbit {
  position: relative;
  width: 84px;
  height: 84px;
}

.spinner-ring {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 2px solid transparent;
}

.ring-a {
  border-top-color: #ff9ec0;
  border-right-color: rgba(255, 158, 192, 0.55);
  animation: spinClockwise 1.1s linear infinite;
}

.ring-b {
  inset: 10px;
  border-bottom-color: #ffd6e5;
  border-left-color: rgba(255, 214, 229, 0.45);
  animation: spinCounter 1.5s linear infinite;
}

.spinner-core {
  position: absolute;
  inset: 27px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 35% 35%, #ffe7f0, #ff8fb6 62%, #db5d92 100%);
  box-shadow:
    0 0 24px rgba(255, 143, 182, 0.35),
    0 0 0 10px rgba(255, 143, 182, 0.08);
  animation: pulseCore 1.8s ease-in-out infinite;
}

.loading-text {
  display: grid;
  gap: 6px;
}

.loading-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.7rem;
  line-height: 1;
  color: #fff5fa;
}

.loading-subtitle {
  font-size: 0.95rem;
  line-height: 1.45;
  color: #f0d8e1;
  max-width: 26ch;
}

button.primary-btn.is-loading {
  opacity: 0.82;
  pointer-events: none;
  filter: saturate(0.92);
}

@keyframes spinClockwise {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes spinCounter {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

@keyframes pulseCore {
  0%, 100% {
    transform: scale(0.92);
    box-shadow:
      0 0 24px rgba(255, 143, 182, 0.28),
      0 0 0 10px rgba(255, 143, 182, 0.08);
  }
  50% {
    transform: scale(1);
    box-shadow:
      0 0 30px rgba(255, 143, 182, 0.42),
      0 0 0 14px rgba(255, 143, 182, 0.12);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ring-a,
  .ring-b,
  .spinner-core {
    animation: none;
  }
}

.share-fab {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 22;
  height: 56px;
  padding: 0 18px;
  border: none;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 10px;

  
  background: rgba(45, 22, 35, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff7fb;
  
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.24),
    0 0 0 1px rgba(255, 255, 255, 0.18) inset;
  transform: translateY(16px) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.22s ease,
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.share-fab svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.share-fab.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.share-fab:hover {
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.22) inset;
}

.share-fab:active {
  transform: translateY(1px) scale(0.985);
}

@media (max-width: 680px) {
  .share-fab {
    right: 12px;
    bottom: 12px;
    height: 52px;
    padding: 0 16px;
    gap: 8px;
  }

  .share-fab span {
    font-size: 0.92rem;
  }
}

.status-chip,
.summary-chip {
  max-width: min(420px, calc(100vw - 112px));
}

@media (max-width: 680px) {
  .status-chip,
  .summary-chip {
    left: 12px;
    right: 72px;
    max-width: none;
  }
} 

.custom-poi-popup .leaflet-popup-content-wrapper {
  border-radius: 18px;
  background: rgba(34, 17, 28, 0.96);
  color: #fff6fa;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

.custom-poi-popup .leaflet-popup-tip {
  background: rgba(34, 17, 28, 0.96);
}

.custom-poi-popup .leaflet-popup-content {
  margin: 0;
  width: 280px !important;
}

.poi-popup {
  overflow: hidden;
  border-radius: 18px;
}

.poi-popup-image {
  display: block;
  width: 100%;
  height: 168px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.06);
}

.poi-popup-body {
  padding: 12px 14px 14px;
}

.poi-popup-title {
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.25;
  color: #fff7fb;
  margin-bottom: 6px;
}

.poi-popup-meta {
  font-size: 0.84rem;
  line-height: 1.4;
  color: #e9d2dc;
}