html,
body {
  height: 100%;
  margin: 0;
}

.map-wrap {
  --map-overlay-top: 78px;
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  margin: 0;
  box-sizing: border-box;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 250, 251, 0.96)),
    #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  position: relative;
  z-index: 10;
}

#map {
  width: 100%;
  height: 100%;
}

input[type='text'] {
  min-width: 0;
  flex: 1;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #fff;
  color: #111827;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
  box-sizing: border-box;
  font-size: 15px;
  outline: none;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background-color 0.16s ease;
}

input[type='text']::placeholder {
  color: #94a3b8;
}

input[type='text']:focus {
  border-color: #2563eb;
  background: #fff;
  box-shadow:
    0 0 0 4px rgba(37, 99, 235, 0.12),
    inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.toolbar button {
  flex: 0 0 auto;
  height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  font-weight: 800;
  line-height: 1;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    background-color 0.16s ease,
    border-color 0.16s ease;
}

#btnSearch {
  min-width: 68px;
  border: 1px solid #2563eb;
  background: #2563eb;
  color: #fff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.24);
}

#btnSearch:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.3);
}

#btnHome {
  min-width: 54px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #374151;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}

#btnHome:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.toolbar button:active {
  transform: translateY(1px);
}

.hidden {
  display: none !important;
}

.confirm-panel {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 1000;
  max-width: 560px;
  width: calc(100% - 24px);
}

.search-area-btn {
  position: fixed;
  left: 50%;
  top: var(--map-overlay-top);
  transform: translateX(-50%);
  z-index: 800;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
  font-weight: 700;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    filter 0.16s ease;
}

.search-area-btn::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.22);
}

.search-area-btn:hover {
  background: #2563eb;
  filter: brightness(1.04);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.34);
}

.search-area-btn:active {
  transform: translateX(-50%) translateY(1px);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.28);
}

.map-search-notice {
  position: fixed;
  left: 50%;
  top: var(--map-overlay-top);
  transform: translateX(-50%);
  z-index: 820;
  max-width: calc(100% - 24px);
  padding: 9px 14px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: #111827;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  word-break: keep-all;
}

.my-location-btn {
  position: fixed;
  right: 16px;
  bottom: 88px;
  z-index: 850;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 50%;
  background: #fff;
  color: #2563eb;
  box-shadow:
    0 10px 22px rgba(15, 23, 42, 0.14),
    0 2px 6px rgba(15, 23, 42, 0.08);
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    background-color 0.16s ease;
}

.my-location-btn:hover {
  background: #eff6ff;
  box-shadow:
    0 12px 26px rgba(37, 99, 235, 0.18),
    0 3px 8px rgba(15, 23, 42, 0.08);
}

.my-location-btn:active {
  transform: translateY(1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.my-location-icon {
  width: 20px;
  height: 20px;
  display: block;
}

.restaurant-card {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 900;
  max-width: 560px;
  width: calc(100% - 24px);
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  padding: 14px;
  box-sizing: border-box;
}

.restaurant-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.restaurant-card-category {
  color: #2563eb;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 2px;
}

.restaurant-card-name {
  color: #111827;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.3;
}

.restaurant-card-close {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 10px;
  line-height: 1;
}

.restaurant-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  color: #374151;
  font-size: 14px;
  margin-bottom: 8px;
}

.restaurant-card-address {
  color: #6b7280;
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 12px;
  word-break: keep-all;
}

.restaurant-card .btn-primary {
  width: 100%;
}

.cp-body {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  padding: 14px;
}

.cp-title {
  font-weight: 700;
  margin-bottom: 4px;
}

.cp-sub {
  color: #6b7280;
  font-size: 14px;
  margin-bottom: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cp-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.btn {
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid transparent;
  background: #fff;
}

.btn-outline {
  border-color: #e5e7eb;
}

.btn-outline:hover {
  background-color: #f9fafb;
}

.btn-primary {
  background: #2563eb;
  color: #fff;
}

.btn-primary:hover {
  filter: brightness(0.95);
}

button {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

button:hover {
  background: #f5f5f5;
}

.icon-pin-neo {
  width: 18px;
  height: 18px;
  position: relative;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: #2563eb;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.icon-pin-neo::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  transform: translate(-50%, -50%) rotate(45deg);
  background: #fff;
  border-radius: 50%;
}

.icon-dot {
  width: 16px;
  height: 16px;
  position: relative;
  border-radius: 50%;
  background: #2563eb;
  border: 2px solid #fff;
  box-shadow: 0 0 0 calc(8px) color-mix(in oklab, #2563eb 25%, transparent);
}

.icon-dot::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid #2563eb;
  transform: translate(-50%, -50%) scale(1);
  opacity: 0.75;
  animation: pulse 1.8s ease-out infinite;
}

.icon-restaurant-marker {
  width: 26px;
  height: 26px;
  position: relative;
  border: 2px solid #fff;
  border-radius: 50% 50% 50% 0;
  background: #f97316;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.24);
  transform: rotate(-45deg);
}

.icon-restaurant-marker::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%) rotate(45deg);
}

.icon-restaurant-marker.is-active {
  background: #ea580c;
  box-shadow:
    0 6px 18px rgba(249, 115, 22, 0.42),
    0 0 0 6px rgba(249, 115, 22, 0.18);
  transform: rotate(-45deg) scale(1.16);
}

@keyframes pulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.75;
  }
  70% {
    transform: translate(-50%, -50%) scale(2.6);
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
