:root {
  --header-height: 72px;
  --brand-yellow: rgb(253, 115, 46);
  --brand-red: rgb(228, 66, 39);
  --text-dark: #212121;
  --card-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Helvetica Neue", Arial, sans-serif;
  color: var(--text-dark);
  background: #f7f7f7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.menu-open {
  overflow: hidden;
}

.app-header {
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  height: var(--header-height);
  background: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  height: 52px;
  width: auto;
}

.back-button {
  flex: 1;
  border: 0;
  background: none;
  color: var(--text-dark);
  font-size: 18px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.back-button:focus-visible,
.menu-button:focus-visible,
.locate-button:focus-visible,
.popup-close:focus-visible,
.popup-direction:focus-visible,
.popup-scan:focus-visible {
  outline: 2px solid #1e6bff;
  outline-offset: 2px;
}

.menu-button {
  margin-left: auto;
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  border: 0;
  background: none;
  cursor: pointer;
  padding: 8px 0;
}

.menu-button span {
  display: block;
  width: 26px;
  height: 3px;
  background: #000;
  border-radius: 999px;
}

main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

@supports (height: 100dvh) {
  body {
    min-height: 100dvh;
  }
}

.map-wrapper {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  background: #fff;
}

#map {
  flex: 1 1 auto;
  min-height: 360px;
}

.locate-button {
  position: absolute;
  right: 30px;
  bottom: 24px;
  z-index: 1000;
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--card-shadow);
  display: grid;
  place-items: center;
  cursor: pointer;
}


.target-icon {
  position: relative;
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 3px solid #ff2d55;
}

.target-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 9px;
  margin: -4.5px 0 0 -4.5px;
  border-radius: 50%;
  background: #ff2d55;
}

.instructions {
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 24px 28px 40px;
  margin: 0;
  background: #fff;
  flex-shrink: 0;
}

.menu-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: flex-end;
  background: rgba(0, 0, 0, 0.35);
  z-index: 4500;
}

.menu-overlay[hidden] {
  display: none;
}

.menu-panel {
  width: min(340px, 88vw);
  height: 100%;
  background: #fff;
  box-shadow: -18px 0 40px rgba(0, 0, 0, 0.14);
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 28px 24px 36px;
}

.menu-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.menu-title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
}

.menu-close {
  border: 0;
  background: var(--brand-red);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.18);
}

.location-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1 1 auto;
  overflow-y: auto;
}

.location-item {
  border: 0;
  border-radius: 18px;
  padding: 14px 18px;
  background: #fff3eb;
  color: var(--brand-red);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out;
  text-align: left;
}

.location-item:hover,
.location-item:active {
  transform: translateY(1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.location-item:focus-visible {
  outline: 2px solid #1e6bff;
  outline-offset: 2px;
}

.leaflet-container {
  font-family: inherit;
}

.restaurant-icon {
  width: 35px;
  height: 35px;
  background:rgb(253, 115, 46);
  border-radius: 50% 50% 50% 50%;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  color: rgb(94, 90, 80);
  font-weight: 500;
  letter-spacing: -0.5px;
}

.restaurant-icon span {
  font-size: 18px;
}

.restaurant-popup-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease-out;
  z-index: 4000;
}

.restaurant-popup-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.restaurant-popup-overlay.hidden {
  display: none;
}

.restaurant-popup {
  position: relative;
  width: min(360px, 100%);
  background: var(--brand-yellow);
  border-radius: 36px;
  box-shadow: 0 28px 48px rgba(0, 0, 0, 0.25);
  padding: 28px 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-align: center;
}

.popup-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0;
  background: var(--brand-red);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.popup-header {
  margin-top: 8px;
}

.popup-title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.popup-image img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.popup-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.popup-city {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.popup-direction,
.popup-scan {
  border-radius: 14px;
  border: 0;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease-out;
}

.popup-direction {
  background: #fff;
  color: var(--brand-red);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.08);
}

.popup-direction:hover,
.popup-direction:active {
  transform: translateY(1px);
}

.popup-scan {
  background: var(--brand-red);
  color: #fff;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.18);
}

.popup-scan:hover,
.popup-scan:active {
  transform: translateY(1px);
}

.popup-note,
.popup-hint {
  margin: 0;
  font-size: 13px;
  color: rgba(33, 33, 33, 0.8);
}

.popup-hint {
  font-size: 12px;
  font-weight: 500;
}

@media (max-width: 520px) {
  .brand img {
    height: 25px;
  }

  .back-button {
    font-size: 16px;
  }

  .instructions {
    font-size: 14px;
  }

  .popup-title {
    font-size: 18px;
  }

  .popup-image img {
    height: 160px;
  }
}
