:root {
  --ink: #1f2328;
  --muted: #687076;
  --blue: #2761ad;
  --red: #d84d4d;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scrollbar-width: none;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}
body {
  margin: 0;
  font-family: "LXGW WenKai Screen", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: #fff;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  scrollbar-width: none;
}

a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; padding: 0; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #f3f4f6;
}
.navbar__brand {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
}
.navbar__links {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
}
.navbar__link {
  padding: 6px 12px;
  border-radius: 6px;
  color: #6b7280;
  transition: color 0.15s, background-color 0.15s;
}
.navbar__link:hover { color: var(--blue); }
.navbar__link.is-active {
  background: #111827;
  color: #fff;
}

/* ---------- Views ---------- */
.view { display: none; }
.view.is-active { display: block; }

/* ---------- Map ---------- */
.map-section {
  position: fixed;
  left: 0; right: 0;
  top: 56px; bottom: 0;
  background: #eef1f3;
  overflow: hidden;
}
.map-chart,
.map-canvas {
  width: 100%;
  height: 100%;
}
.map-canvas {
  display: block;
  touch-action: none;
}

.map-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.map-loading__inner {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #9ca3af;
  font-size: 14px;
}
.map-loading__spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #d1d5db;
  border-top-color: var(--blue);
  border-radius: 9999px;
  animation: spin 0.8s linear infinite;
}

.map-card {
  position: absolute;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  border: 1px solid #f3f4f6;
}

.map-stats {
  bottom: 16px; left: 16px;
  padding: 10px 16px;
}
.map-stats__label { font-size: 12px; color: #9ca3af; }
.map-stats__value {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}
.map-stats__unit {
  font-size: 14px;
  font-weight: 400;
  color: #9ca3af;
}

/* ---------- Album ---------- */
.album {
  padding: 80px 24px 64px;
  background: #fff;
  min-height: 100vh;
}
.album__inner { max-width: 1024px; margin: 0 auto; }
.album__head { text-align: center; margin-bottom: 48px; }
.album__title {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
  margin: 0;
}
.album__sub {
  font-size: 14px;
  color: #9ca3af;
  margin: 8px 0 0;
}

.album__list { display: flex; flex-direction: column; gap: 40px; }

.place {
  scroll-margin-top: 80px;
  border-radius: 12px;
  transition: all 0.5s;
}
.place.is-highlight {
  box-shadow: 0 0 0 2px rgba(216, 77, 77, 0.5);
  background: rgba(254, 242, 242, 0.4);
  margin: 0 -12px;
  padding: 12px;
}
.place__head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
}
.place__name {
  font-size: 16px;
  font-weight: 500;
  color: #374151;
  margin: 0;
}
.place__count { font-size: 12px; color: #9ca3af; }

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.thumb {
  display: block;
  overflow: hidden;
  border-radius: 8px;
  background: #f3f4f6;
  aspect-ratio: 4 / 3;
  position: relative;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
  display: block;
}
.thumb:hover img { transform: scale(1.05); }
.thumb__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background-color 0.15s;
}
.thumb:hover .thumb__overlay { background: rgba(0, 0, 0, 0.1); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.2s ease-out;
}
.lightbox__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 56px;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.9);
}
.lightbox__title { display: flex; align-items: baseline; gap: 8px; }
.lightbox__place { font-size: 16px; font-weight: 500; }
.lightbox__counter {
  color: rgba(255, 255, 255, 0.4);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.lightbox__close {
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 24px;
  line-height: 1;
  transition: color 0.15s, background-color 0.15s;
}
.lightbox__close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.lightbox__main {
  flex: 1;
  min-height: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
}
.lightbox__img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  animation: fadeIn 0.25s ease-out;
}
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 24px;
  backdrop-filter: blur(8px);
  transition: background-color 0.2s;
}
.lightbox__nav:hover { background: rgba(255, 255, 255, 0.2); }
.lightbox__nav--prev { left: 8px; }
.lightbox__nav--next { right: 8px; }

.lightbox__strip {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  overflow-x: auto;
}
.lightbox__thumb {
  flex-shrink: 0;
  width: 64px; height: 48px;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 0 0 2px transparent;
  opacity: 0.5;
  transition: opacity 0.2s, box-shadow 0.2s;
}
.lightbox__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lightbox__thumb:hover { opacity: 0.9; }
.lightbox__thumb.is-active {
  box-shadow: 0 0 0 2px #fff;
  opacity: 1;
}
html.no-scroll,
body.no-scroll { overflow: hidden; }

@media (min-width: 768px) {
  .grid { gap: 12px; }
  .lightbox__top { padding: 0 32px; }
  .lightbox__nav--prev { left: 24px; }
  .lightbox__nav--next { right: 24px; }
}
