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

html,
body,
#app {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC",
    "Microsoft YaHei", sans-serif;
  background: #f3f0e8;
}

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

.toolbar {
  position: absolute;
  left: 12px;
  right: 12px;
  top: calc(12px + env(safe-area-inset-top, 0px));
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toolbar > * {
  pointer-events: auto;
}

.title-bar {
  align-self: flex-start;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  font-size: 14px;
  font-weight: 600;
  color: #2c2416;
}

.category-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.category-scroll::-webkit-scrollbar {
  display: none;
}

.category-btn {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #4a4030;
  font-size: 13px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  cursor: pointer;
}

.category-btn img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.category-btn.active {
  background: #33b056;
  color: #fff;
}

.status {
  position: absolute;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 200;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 12px;
  max-width: calc(100% - 32px);
  text-align: center;
}

/* POI markers – simplified from original marker-custom */
.marker-custom {
  position: relative;
  width: 44px;
  height: 44px;
}

.marker-custom .marker-custom-icon {
  width: 44px;
  height: 44px;
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center bottom;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  line-height: 44px;
}

.marker-custom.cluster .marker-custom-icon {
  background-image: url("https://qydldt-cdn.kfqmshy.com/upload_resource/img/20240204110513M3SEDKEG6NZ9C3QYMYPZ.png");
  background-size: 100%;
}

.marker-custom .marker-custom-label {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 120px;
  padding: 0 10px;
  height: 22px;
  line-height: 22px;
  background: rgba(246, 241, 231, 0.88);
  border-radius: 11px;
  box-shadow: 0 2px 6px rgba(56, 21, 13, 0.15);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #4a4030;
}

/* Bottom POI card */
.poi-panel {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 220;
  display: none;
  padding: 14px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}

.poi-panel.show {
  display: block;
}

.poi-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: #999;
  cursor: pointer;
  z-index: 1;
}

.poi-card-top {
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
  padding-right: 24px;
}

.poi-thumb {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  background: #f0ebe0;
  flex-shrink: 0;
}

.poi-meta h3 {
  font-size: 16px;
  margin-bottom: 4px;
  color: #2c2416;
}

.poi-address {
  font-size: 12px;
  color: #888;
}

.poi-intro {
  font-size: 13px;
  line-height: 1.5;
  color: #666;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.poi-actions {
  display: flex;
  gap: 10px;
}

.btn {
  flex: 1;
  height: 40px;
  border: none;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.btn-nav {
  background: linear-gradient(90deg, #33b056, #2a9a49);
  color: #fff;
}

.btn-detail {
  background: #f3f0e8;
  color: #4a4030;
}

.info-window-nav {
  padding: 4px;
}

.info-window-nav .btn-nav {
  min-width: 88px;
  height: 36px;
}

.poi-detail-panel {
  position: absolute;
  inset: 0;
  z-index: 230;
  display: none;
  padding: 20px 16px;
  padding-top: calc(20px + env(safe-area-inset-top, 0px));
  background: rgba(0, 0, 0, 0.35);
}

.poi-detail-panel.show {
  display: flex;
  flex-direction: column;
}

.poi-detail-panel > h3,
.poi-detail-panel > p {
  background: #fff;
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 8px;
}

.poi-detail-panel > h3 {
  font-size: 18px;
  color: #2c2416;
  margin-top: 40px;
}

.poi-detail-panel > p {
  font-size: 14px;
  line-height: 1.6;
  color: #555;
}

.loading {
  position: absolute;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f0e8;
  color: #666;
  font-size: 14px;
}

.loading.hidden {
  display: none;
}
