/* 地图面板主题变量，地图底图仍由 Leaflet 保持地理可读性。 */
body.travel-page { --bg:#f4f1e9; --card:#fffdf7; --border:#d9d5c9; --text:#22251f; --text-secondary:#62675d; --text-tertiary:#8a8b80; --primary:#25493c; --primary-dark:#1d3b30; }
/* 旅行足迹 — 独立全屏记录页 */
body.travel-page {
  overflow: hidden;
  height: 100dvh;
  display: flex;
  flex-direction: column;
}
body.travel-page .site-header { position: relative; flex: none; z-index: 20; }
body.travel-page .container {
  flex: 1;
  min-height: 0;
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
body.travel-page .site-footer,
body.travel-page #backTop { display: none; }

#travel-app {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  background: #e6e6da;
}
#travel-app.is-panel-off { grid-template-columns: minmax(0, 1fr); }
#travel-app.is-panel-off .travel-panel { display: none; }

.travel-map-wrap { position: relative; min-width: 0; min-height: 0; }
#travel-map { width: 100%; height: 100%; background: #e8e7dc; }

.travel-progress {
  position: absolute; top: 0; left: 0; right: 0; z-index: 500;
  height: 3px; background: rgba(255,255,255,0.35); pointer-events: none;
}
.travel-progress i {
  display: block; height: 100%; width: 0;
  background: var(--primary);
  transition: width 0.35s ease;
}

.travel-map-tools {
  position: absolute; left: 12px; bottom: 18px; z-index: 500;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  max-width: calc(100% - 24px);
  pointer-events: none;
}
.travel-map-tools > * { pointer-events: auto; }
.travel-chip-btn {
  border: none; cursor: pointer; font-family: inherit;
  min-height: 40px; padding: 0 13px; border-radius: 4px;
  background: rgba(250,248,240,0.96); color: #22251f;
  box-shadow: 0 4px 16px rgba(34,37,31,0.12);
  font-size: 0.82rem; display: inline-flex; align-items: center; gap: 6px;
}
.travel-chip-btn:hover { color: var(--primary-dark); }
.travel-chip-btn.is-on {
  background: var(--primary); color: #fff;
}
.travel-chip-btn:disabled { opacity: 0.4; cursor: default; }
.travel-nav-chip {
  max-width: 148px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.travel-caption {
  background: rgba(250,248,240,0.96); border-radius: 4px;
  padding: 8px 12px; box-shadow: 0 4px 16px rgba(34,37,31,0.10);
  min-width: 160px;
}
.travel-caption .k { font-size: 0.7rem; color: var(--text-tertiary); letter-spacing: 0.04em; }
.travel-caption .v { font-size: 0.92rem; font-weight: 700; color: var(--text); margin-top: 1px; }
.travel-caption .s { font-size: 0.75rem; color: var(--text-secondary); }
.travel-caption .h { font-size: 0.72rem; color: var(--primary-dark); margin-top: 3px; }

.leaflet-tooltip.travel-tip {
  background: #22251f; color: #fff; border: none; border-radius: 8px;
  padding: 4px 8px; font-size: 0.78rem; box-shadow: none;
}
.leaflet-tooltip.travel-tip::before { border-top-color: #22251f; }

.leaflet-popup.travel-photo-popup .leaflet-popup-content-wrapper {
  padding: 0; border-radius: 12px; overflow: hidden;
  box-shadow: 0 12px 32px rgba(34,37,31,0.22);
}
.leaflet-popup.travel-photo-popup .leaflet-popup-content {
  margin: 0; width: 200px !important;
}
.leaflet-popup.travel-photo-popup .leaflet-popup-tip { background: #faf8f0; }
.travel-photo-pop img {
  width: 200px; height: 130px; object-fit: cover; display: block; background: #e8e7dc;
  cursor: zoom-in;
}
.travel-photo-pop .cap {
  padding: 7px 10px 8px; font-size: 0.82rem; font-weight: 700; color: #22251f;
}

.travel-pin { background: none !important; border: none !important; overflow: visible !important; }
.travel-pin-svg {
  width: 32px; height: 42px; display: block;
  filter: drop-shadow(0 3px 8px rgba(37,73,60,0.3));
}
.travel-pin-svg path { fill: #25493c; stroke: #fff; stroke-width: 1.8; }
.travel-pin-svg circle { fill: #fff; }
.travel-pin.is-on .travel-pin-svg {
  transform: scale(1.22);
  transform-origin: 16px 40px;
  filter: drop-shadow(0 4px 10px rgba(182,83,54,0.35));
}
.travel-pin.is-on .travel-pin-svg path { fill: #b65336; }
.travel-pin.is-play .travel-pin-svg { animation: travelPulse 1.1s ease-out infinite; }
@keyframes travelPulse {
  0% { filter: drop-shadow(0 0 0 rgba(37,73,60,0.55)); }
  100% { filter: drop-shadow(0 0 18px rgba(37,73,60,0)); }
}

.travel-panel {
  display: flex; flex-direction: column; min-height: 0;
  background: #faf8f0; border-left: 1px solid var(--border);
}
.travel-sheet-handle {
  display: none; width: 100%; border: none; background: #faf8f0;
  padding: 8px 16px 4px; cursor: pointer; font-family: inherit; text-align: left;
}
.travel-sheet-handle .bar {
  width: 36px; height: 4px; border-radius: 2px; background: #c9c9bc;
  margin: 0 auto 8px;
}
.travel-sheet-handle .peek {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.88rem; color: var(--text); font-weight: 600;
}
.travel-dots { display: none; }
.travel-sheet-mask { display: none; }
.travel-share {
  border: none; background: none; color: var(--primary);
  font: inherit; font-size: 0.82rem; cursor: pointer; padding: 0;
}
.travel-share.is-ok { color: var(--text-secondary); }

.travel-panel-head { padding: 22px 20px 14px; flex: none; }
.travel-panel-title {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.travel-panel-head h1 {
  margin: 0; font: 600 1.55rem/1.4 Georgia, "Songti SC", "STSong", serif; letter-spacing: 0.02em;
}
.travel-panel-hide {
  border: 1px solid var(--border); background: #faf8f0; color: var(--text-secondary);
  border-radius: 3px; min-height: 36px; padding: 0 9px; cursor: pointer;
  font-family: inherit; font-size: 0.75rem; flex: none;
}
.travel-panel-hide:hover { color: var(--primary); border-color: var(--primary); }
.travel-stats-line {
  margin-top: 6px; font-size: 0.78rem; color: var(--text-secondary); line-height: 1.55;
}
.travel-years {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px;
}
.travel-years button {
  border: 1px solid var(--border); background: var(--bg); color: var(--text-secondary);
  border-radius: 3px; padding: 6px 10px; min-height: 36px; font-size: 0.75rem; cursor: pointer; font-family: inherit;
}
.travel-years button:hover { border-color: var(--primary); color: var(--primary); }
.travel-years button.is-on { background: var(--primary); border-color: var(--primary); color: #fff; }

.travel-search { padding: 0 16px 10px; flex: none; }
.travel-search input {
  width: 100%; padding: 0.48rem 0.85rem; border: 1px solid var(--border);
  border-radius: 3px; font-size: 0.86rem; color: var(--text); font-family: inherit; outline: none; background: var(--bg);
}
.travel-search input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,73,60,0.14); }

.travel-list { flex: 1; overflow-y: auto; padding: 0 12px 16px; min-height: 0; }
.travel-year-label {
  position: sticky; top: 0; z-index: 1;
  font-size: 0.72rem; font-weight: 700; color: var(--text-tertiary);
  letter-spacing: 0.08em; padding: 8px 6px 6px; background: #faf8f0;
}
.travel-place {
  display: grid; grid-template-columns: 56px 1fr; gap: 10px; align-items: center;
  width: 100%; text-align: left; font: inherit; color: inherit;
  padding: 12px 8px; margin-bottom: 0; border-radius: 3px; cursor: pointer;
  border: 1px solid transparent; border-bottom-color: var(--border); background: #faf8f0;
}
.travel-place:hover { background: var(--bg); }
.travel-place.is-on { background: rgba(37,73,60,0.1); border-color: rgba(37,73,60,0.35); }
.travel-place img, .travel-place .ph {
  width: 56px; height: 56px; border-radius: 3px; object-fit: cover; background: #e8e7dc;
}
.travel-place .ph {
  display: flex; align-items: center; justify-content: center;
  color: var(--primary); font-weight: 700; font-size: 0.95rem;
}
.travel-place .t { font-weight: 700; font-size: 0.92rem; }
.travel-place .d { font-size: 0.75rem; color: var(--text-secondary); margin-top: 2px; }
.travel-place .g { font-size: 0.72rem; color: var(--text-tertiary); margin-top: 2px; }
.travel-empty { text-align: center; color: var(--text-secondary); padding: 2rem 1rem; font-size: 0.88rem; }

.travel-detail { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 16px 20px; display: none; }
.travel-detail.is-show { display: block; }
.travel-list.is-hide { display: none; }
.travel-back {
  border: none; background: none; color: var(--primary); cursor: pointer;
  font-family: inherit; font-size: 0.82rem; padding: 0 0 10px; display: inline-flex; align-items: center; gap: 4px;
}
.travel-detail h2 { margin: 0 0 8px; font: 600 1.7rem/1.4 Georgia, "Songti SC", "STSong", serif; }
.travel-detail-meta { font-size: 0.82rem; color: var(--text-secondary); display: flex; flex-wrap: wrap; gap: 8px 14px; }
.travel-detail-desc { margin: 12px 0; line-height: 1.75; color: var(--text); }
.travel-detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.travel-detail-tags span {
  background: rgba(37,73,60,0.12); color: var(--primary-dark);
  font-size: 0.75rem; padding: 3px 9px; border-radius: 999px;
}
.travel-gallery {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.travel-gallery img {
  width: 100%; height: 110px; object-fit: cover; border-radius: 3px; cursor: zoom-in;
  background: #e8e7dc;
}
.travel-gallery img:first-child {
  grid-column: 1 / -1; height: 180px;
}
.travel-pager {
  display: flex; justify-content: space-between; gap: 8px; margin-top: 16px;
}
.travel-pager button {
  flex: 1; border: 1px solid var(--border); background: #faf8f0; border-radius: 3px;
  padding: 8px 10px; cursor: pointer; font-family: inherit; text-align: left;
}
.travel-pager button:disabled { opacity: 0.4; cursor: default; }
.travel-pager button:not(:disabled):hover { border-color: var(--primary); color: var(--primary); }
.travel-pager .lab { display: block; font-size: 0.68rem; color: var(--text-tertiary); }
.travel-pager .nm { font-size: 0.82rem; font-weight: 600; }

.travel-lightbox {
  display: none; position: fixed; inset: 0; z-index: 5000;
  background: rgba(22,27,22,0.94); align-items: center; justify-content: center;
}
.travel-lightbox.is-show { display: flex; }
.travel-lightbox img {
  max-width: min(92vw, 1100px); max-height: 82vh; border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
}
.travel-lb-close, .travel-lb-nav {
  position: absolute; border: none; background: rgba(255,255,255,0.12); color: #fff;
  cursor: pointer; border-radius: 50%;
}
.travel-lb-close { top: 18px; right: 18px; width: 40px; height: 40px; font-size: 1.3rem; }
.travel-lb-nav { top: 50%; transform: translateY(-50%); width: 44px; height: 44px; font-size: 1.4rem; }
.travel-lb-nav.prev { left: 16px; }
.travel-lb-nav.next { right: 16px; }
.travel-lb-count {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,0.85); font-size: 0.85rem;
}
.travel-lb-close:hover, .travel-lb-nav:hover { background: rgba(255,255,255,0.22); }

@media (prefers-reduced-motion: reduce) {
  .travel-pin.is-play .travel-pin-svg { animation: none; }
}

@media (max-width: 640px) {
  #travel-app {
    --sheet-h: 52px;
    --sheet-pad: env(safe-area-inset-bottom, 0px);
    display: block;
    position: relative;
    overflow: hidden;
  }
  #travel-app.is-sheet-open {
    --sheet-h: min(38dvh, 300px);
  }
  .travel-map-wrap {
    position: absolute;
    inset: 0;
    height: auto;
    z-index: 1;
  }
  .leaflet-bottom { margin-bottom: calc(var(--sheet-h) + var(--sheet-pad)); }
  #travel-app.is-sheet-open .travel-sheet-mask {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 550;
    border: 0;
    margin: 0;
    padding: 0;
    background: rgba(34,37,31,0.08);
    cursor: pointer;
  }
  .travel-panel {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    top: auto;
    width: 100%;
    z-index: 600;
    border-left: none;
    border-top: 1px solid var(--border);
    border-radius: 18px 18px 0 0;
    height: calc(var(--sheet-h) + var(--sheet-pad));
    max-height: calc(var(--sheet-h) + var(--sheet-pad));
    min-height: 0;
    overflow: hidden;
    box-shadow: 0 -10px 32px rgba(34,37,31,0.16);
    padding-bottom: var(--sheet-pad);
    box-sizing: border-box;
    transition: height 0.28s ease;
  }
  .travel-sheet-handle { display: block; flex: none; touch-action: none; }
  .travel-panel.is-open .peek { display: none; }
  .travel-panel:not(.is-open) .travel-panel-head,
  .travel-panel:not(.is-open) .travel-search,
  .travel-panel:not(.is-open) .travel-list,
  .travel-panel:not(.is-open) .travel-detail,
  .travel-panel:not(.is-open) .travel-dots { display: none; }
  .travel-dots {
    display: flex; flex-wrap: wrap; gap: 5px; padding: 0 16px 8px;
    flex: none;
  }
  .travel-dots button {
    width: 7px; height: 7px; padding: 0; border: none; border-radius: 50%;
    background: #c9c9bc; cursor: pointer;
  }
  .travel-dots button.is-on { transform: scale(1.4); box-shadow: 0 0 0 2px #fff; }
  .travel-panel-head h1, .travel-panel-hide, #travelShowPanel { display: none !important; }
  .travel-panel-head, .travel-search { flex: none; }
  .travel-panel-head { padding: 0 16px 8px; }
  .travel-stats-line { margin-top: 0; font-size: 0.72rem; }
  .travel-list, .travel-detail {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .travel-map-tools {
    left: 8px;
    bottom: calc(var(--sheet-h) + var(--sheet-pad) + 10px);
    z-index: 560;
    gap: 6px;
  }
  #travel-app.is-sheet-open .travel-map-tools {
    left: auto;
    right: 10px;
    top: 10px;
    bottom: auto;
    flex-direction: column;
    align-items: flex-end;
  }
  .travel-caption { display: none !important; }
  .travel-chip-btn { min-height: 40px; padding: 0 11px; font-size: 0.78rem; }
  .travel-search input { font-size: 16px; }
  .travel-nav-chip { display: none; }
  .travel-gallery img { height: 76px; }
  .travel-gallery img:first-child { height: 110px; }
  .travel-lb-nav { display: none; }
  .leaflet-popup.travel-photo-popup .leaflet-popup-content { width: 156px !important; }
  .travel-photo-pop img { width: 156px; height: 100px; }
  #travel-app.is-panel-off { grid-template-columns: unset; }
  #travel-app.is-panel-off .travel-panel { display: flex; }
}

/* 本地字体与纸面地图控件；底图保留原始地理配色。 */
#travel-app, #travel-app .leaflet-container { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; }
#travel-app button:focus-visible, #travel-app a:focus-visible { outline: 2px solid #b65336; outline-offset: 3px; }
#travel-app .leaflet-bar { border: 1px solid #c9c9bc; border-radius: 4px; box-shadow: 0 3px 12px rgba(34,37,31,0.1); }
#travel-app .leaflet-bar a { background: #faf8f0; color: #25493c; border-color: #d8d8cc; }
#travel-app .leaflet-bar a:hover { background: #e8ece2; }
#travel-app .leaflet-control-attribution { background: rgba(250,248,240,0.88); color: #666b5f; }
#travel-app .leaflet-control-attribution a { color: #25493c; }
