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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  width: 100%;
  align-self: stretch;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
/* 地图瓦片/标注图不能套全局 max-width，否则底图错位或空白 */
.amap-container img,
.leaflet-container img {
  max-width: none;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.hidden { display: none !important; }
.loading {
  text-align: center;
  padding: 48px 20px;
  color: var(--color-text-muted);
  font-size: 15px;
}
.retry-link {
  background: none;
  border: none;
  color: var(--color-primary);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.section { padding: 40px 0; }
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}
.section-header h1,
.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.5vw, 28px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
  line-height: 1.2;
}
.section-hint {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-top: 4px;
}

.section-title-accent {
  position: relative;
  padding-left: 16px;
}
.section-title-accent::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 65%;
  border-radius: 2px;
  background: var(--color-primary);
}
.section-title-hot::before {
  background: linear-gradient(180deg, #fb923c, #ea580c);
}
.section-title-random::before {
  background: linear-gradient(180deg, #818cf8, #6366f1);
}

.link-more {
  color: var(--color-primary);
  font-size: 14px;
  font-weight: 500;
  transition: color var(--transition);
}
.link-more:hover { color: var(--color-primary-dark); }
.text-muted { color: var(--color-text-muted); font-size: 13px; }

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),
select,
textarea {
  font-family: inherit;
  font-size: 15px;
  color: var(--color-text);
}
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):focus,
select:focus,
textarea:focus {
  outline: none;
}
