body {
    margin: 0;
    padding: 0;
  }
  #map {
    top: 0;
    height: 100vh;
    width: 100%;
    position: fixed;
  }

  #story {
    max-width: 100vw;
    overflow-x: hidden;
  }
  

  #intro-section {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
  }
  
  #intro-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 1;
  }
  
  #intro-text {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80%;
    max-width: 600px;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.6); /* 半透明黑色背景 */
    color: white;
    padding: 30px;
    text-align: center;
    border-radius: 10px;
    z-index: 2;
  }
  
  #intro-text h1 {
    font-size: 36px;
    margin-bottom: 15px;
  }
  
  #intro-text h2 {
    font-size: 20px;
    font-weight: normal;
    margin-bottom: 10px;
  }
  
  .byline {
    font-size: 14px;
    color: #ccc;
  }

  
  #header {
    margin: auto;
    min-height: 100vh;
    width: 100%;
    position: relative;
    z-index: 5;
    padding: 2vh 0vh 5vh 0vh;
  }
  
  #features {
    padding-top: 80vh;
    padding-bottom: 10vh;
  }
  @media (max-width: 750px) {
    #features {
      width: 90vw;
      margin: 0 auto;
    }
  }
  
  #footer {
    min-height: 2vh;
    text-align: left;
    line-height: 25px;
    width: 100%;
    position: relative;
    z-index: 5;
  }
  
  #header h1 {
    font-weight: 700;
    text-transform: uppercase;
    font-family: "Merriweather", serif;
    text-align: left;
    margin: auto;
    max-width: 600px;
  }
  #header h4 {
    font-family: "Roboto Condensed", sans-serif;
    font-weight: 300;
    margin-bottom: 0.5em;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
    max-width: 600px;
  }
  #header p.byline {
    font-weight: 300;
    font-size: 0.9em;
    margin: 0.5em auto 0.8em auto;
  }
  #header p {
    font-family: "Roboto Condensed", sans-serif;
    font-weight: 400;
    text-align: left;
    font-size: 1.2em;
    max-width: 600px;
    margin: 1em auto 1em auto;
  }
  #features h3 {
    font-weight: 700;
    text-transform: uppercase;
    font-family: "Merriweather", serif;
    text-align: left;
    max-width: 50vw;
  }
  #features p {
    font-family: "Roboto Condensed", sans-serif;
    text-align: left;
    font-size: 1.2em;
    max-width: 50vw;
  }
  #features .imageCredit {
    font-size: 0.9em;
    margin-top: -5px;
  }
  #footer p {
    font-family: "Roboto Condensed", sans-serif;
    font-size: 0.9em;
    max-width: 600px;
    padding: 0.75em 0em;
    margin: 0px auto;
  }
  
  a,
  a:hover,
  a:visited {
    color: #696969;
  }
  
  .hidden {
    visibility: hidden;
  }
  .centered {
    width: 50vw;
    margin: 0 auto;
  }
  .lefty {
    width: 33vw;
    margin-left: 5vw;
  }
  .righty {
    width: 33vw;
    margin-left: 62vw;
  }
  .fully {
    width: 100%;
    margin: auto;
  }
  .light {
    color: #444;
    background-color: #ffffff;
  }
  .dark {
    color: #fafafa;
    background-color: #444;
  }
  .step {
    padding-bottom: 50vh;
    opacity: 0.15;
  }
  .step.active {
    opacity: 0.99;
  }
  .step div {
    padding: 25px 50px;
    line-height: 25px;
    font-size: 13px;
  }
  .step img {
    width: 100%;
  }
  @media (max-width: 750px) {
    .centered,
    .lefty,
    .righty,
    .fully {
      width: 90vw;
      margin: 0 auto;
    }
  }
  /* Fix issue on mobile browser where scroll breaks  */
  .mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate.mapboxgl-touch-drag-pan,
  .mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate.mapboxgl-touch-drag-pan
    .mapboxgl-canvas {
    touch-action: unset;
  }

  #legend {
    position: fixed;
    top: 30px;
    right: 30px;
    background-color: white;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    line-height: 1.6em;
    z-index: 10000;
  }
  
  .dot {
    display: inline-block;
    height: 10px;
    width: 10px;
    border-radius: 50%;  /* ✅ 保证是圆形 */
    margin-right: 6px;
  }
  
  
  
  .legend h4 {
    margin: 0 0 6px;
  }
  .legend div {
    display: flex;
    align-items: center;
    gap: 6px;
  }
 


  #flushing-scroll-container {
    position: relative;
    height: 100vh;
    overflow: hidden;
  }
  
  #flushing-scroll-image {
    position: absolute;
    height: 100vh; /* ✅ 高度充满屏幕 */
    left: 0;
    top: 0;
    will-change: transform;
    transition: transform 0.1s ease-out;
  }

  .photo-marker {
    background-size: cover;
    background-position: center;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    border: 2px solid white;
    transition: opacity 10s ease;
  }

  #floating-person {
  position: fixed;       /* 固定在屏幕上 */
  top: 60%;              /* 离顶部60%的位置 */
  left: 63.5%;             /* 居中 */
  transform: translate(-50%, -50%); /* 以中心为准居中对齐 */
  width: 30px;           /* 小人的宽度，可自己调整 */
  z-index: 30;           /* 保证在长图上方显示 */
}

.floating-item {
  position: absolute;
  transform: translate(-50%, 0);
  z-index: 10;
  border-radius: 0px;
  box-shadow: 0 2px 10px rgba(64, 29, 29, 0.3);
  opacity: 0;  /* 👈 初始隐藏 */
  transition: opacity 1.2s ease;  /* 👈 添加淡入淡出动画 */
}

.floating-item.visible {
  opacity: 1;  /* 👈 出现时淡入 */
}

.floating-caption {
  position: absolute;
  max-width: 390px;                  /* ✅ 限制最大宽度 */
  background: rgba(255, 255, 255, 0.95);
  padding: 1px 1px;
  font-size: 14px;
  color: #333;
  border-radius: 6px;
  line-height: 1.4em;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  z-index: 11;
  transform: translate(-50%, 0);
  opacity: 0;
  transition: opacity 1.2s ease;

  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;               /* ✅ 强制自动换行 */
}
.floating-caption.visible {
  opacity: 1;
}
.floating-caption p {
  margin: 0;  /* ✅ 解决白边问题的关键 */
}