/* ==========================================================================
 * 我的足迹 - 插件自带 CSS
 *
 * 命名空间：`mfp*`，与任何 Halo 主题样式互不冲突。
 * 通过 reverseProxy.yaml 配置暴露路径：
 *   /plugins/Footprint/assets/...
 * 通过模板中的 <link rel="stylesheet"> 引入。
 *
 * 设计哲学：
 *   - 用 CSS Variables，便于外层覆盖（但不强迫任何主题覆盖）
 *   - 高度自包含，不依赖主题字体 / reset / 媒体查询
 *   - 移动端友好
 * ========================================================================== */
:root {
  --mfp-color-fg: #1f2328;
  --mfp-color-fg-soft: #4b5563;
  --mfp-color-bg: #ffffff;
  --mfp-color-bg-soft: #f8fafc;
  --mfp-color-accent: #2563eb;
  --mfp-color-pin: #e74c3c;
  --mfp-color-border: rgba(31, 35, 40, 0.1);
  --mfp-radius: 12px;
  --mfp-radius-sm: 6px;
  --mfp-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  --mfp-shadow-strong: 0 12px 32px rgba(0, 0, 0, 0.16);
  --mfp-font: -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Microsoft YaHei", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* 地图主题 → 页面 UI 适配。由 JS 在 settings.mapStyle 加载时给 #mfpRoot 加 data-mfp-theme 属性。
     standard 不写属性，走 :root 默认；其它三套对应 高德 normal/darkblue/light/fresh。
     JS 同时把同一属性挂到 <html>，下方的 html[data-mfp-theme] 让整个 body 背景也跟着切换，
     避免 Halo 主题的留白与窄版 .mfp 形成「白圈包黑块」对比。 */
}

/* 当 html 上挂了 data-mfp-theme 时，把 body / html 自身的背景色切到主题底色。
     用 transition 让主题切换平滑。 */
html[data-mfp-theme] {
  background-color: var(--mfp-color-bg);
  transition: background-color 0.3s ease;
}
html[data-mfp-theme] body {
  background-color: var(--mfp-color-bg);
  transition: background-color 0.3s ease;
}

/* 午夜黑 / 深色：地图暗，UI 走纯黑灰系（无蓝调，纯中性灰底 + 浅文字 + 亮蓝 accent 作唯一彩色锚点）
   两者共用同一套深色 UI 变量，区别只在地图底图样式（darkblue 极夜蓝 / dark 幻影黑）。 */
[data-mfp-theme="dark"],
[data-mfp-theme="night"] {
  --mfp-color-fg: #e6e6e6;
  --mfp-color-fg-soft: #8a8a8a;
  --mfp-color-bg: #161616;
  --mfp-color-bg-soft: #242424;
  --mfp-color-accent: #5aa9ff;
  --mfp-color-border: rgba(255, 255, 255, 0.10);
  --mfp-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  --mfp-shadow-strong: 0 12px 32px rgba(0, 0, 0, 0.7);
}
/* 午夜黑 / 深色：侧边栏底色改为 #242424（= 主题 bg-soft），仍保留 82% 半透 + blur(12px) 毛玻璃效果 */
[data-mfp-theme="dark"] .mfpFull .mfpHeader,
[data-mfp-theme="dark"] .mfpFull .mfpBody,
[data-mfp-theme="night"] .mfpFull .mfpHeader,
[data-mfp-theme="night"] .mfpFull .mfpBody {
  background: color-mix(in srgb, var(--mfp-color-bg-soft) 82%, transparent);
}
/* 深色主题：两枚浮动按钮底色与侧边栏取同一个值（bg-soft 82% 半透 + 毛玻璃），
   否则按钮用 bg 55% 会比侧边栏更暗，浮在侧边栏旁显得是两个颜色。
   刻意写在 .mfpHomeBtn:hover 之前，让 hover 的 accent 混色仍能正常生效。 */
[data-mfp-theme="dark"] .mfpFull > .mfpHomeBtn,
[data-mfp-theme="dark"] .mfpFull > .mfpThemeBtn,
[data-mfp-theme="night"] .mfpFull > .mfpHomeBtn,
[data-mfp-theme="night"] .mfpFull > .mfpThemeBtn {
  background: color-mix(in srgb, var(--mfp-color-bg-soft) 82%, transparent);
}

/* 清新蓝：地图亮蓝白，UI 保持亮色但带冷调、accent 改为亮蓝 */
[data-mfp-theme="light"] {
  --mfp-color-fg: #0c2a4d;
  --mfp-color-fg-soft: #4a6585;
  --mfp-color-bg: #f5f9ff;
  --mfp-color-bg-soft: #e6f0fc;
  --mfp-color-accent: #1890ff;
  --mfp-color-border: rgba(12, 42, 77, 0.12);
  --mfp-shadow: 0 4px 14px rgba(24, 144, 255, 0.12);
  --mfp-shadow-strong: 0 12px 32px rgba(24, 144, 255, 0.22);
}

/* 远山黛：地图水墨绿，UI 走淡灰绿调 + 墨绿 accent */
[data-mfp-theme="fresh"] {
  --mfp-color-fg: #2d3a2e;
  --mfp-color-fg-soft: #5d6f5e;
  --mfp-color-bg: #f5f7f5;
  --mfp-color-bg-soft: #ebf0ec;
  --mfp-color-accent: #4a7c59;
  --mfp-color-border: rgba(45, 58, 46, 0.12);
  --mfp-shadow: 0 4px 14px rgba(74, 124, 89, 0.12);
  --mfp-shadow-strong: 0 12px 32px rgba(74, 124, 89, 0.22);
}

* {
  box-sizing: border-box;
}
.mfp {
  /* 防止主题的全局 p、h1 预设被踩，让插件自身决定 */
  margin: 0 auto;
  padding: 24px 16px 64px;
  max-width: 1180px;
  font-family: var(--mfp-font);
  color: var(--mfp-color-fg);
  line-height: 1.6;
  font-size: 15px;
  /* 整个插件区域跟随主题色，避免 Halo 主题的白 body 透过容器露出来 */
  background: var(--mfp-color-bg);
  border-radius: var(--mfp-radius);
}
.mfp *, .mfp *::before, .mfp *::after { box-sizing: border-box; }

/* 页面主题（后台「显示设置 → 主题」）：
   窄版 narrow = 默认，限宽 1180px 居中；
   全屏 full   = 地图铺满整个视口作底层，
                 标题/统计/搜索/分类/卡片收进右侧浮动侧边栏。 */
.mfpNarrow { max-width: 1180px; }
.mfpFull {
  max-width: none;
  position: fixed;
  inset: 0;
  margin: 0;
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr minmax(340px, 400px);
  grid-template-rows: auto minmax(0, 1fr);
  column-gap: 20px;
  overflow: hidden;
  border-radius: 0;
  /* 全屏下：地图已在底层铺满，背景色不需要（透出地图本身） */
  background: transparent;
}
/* —— 侧边栏进场动画 ——
   打开页面时侧边栏整体从右侧滑入（头部与主体同步，无错落）。
   渲染完成后 JS 给根元素加 .is-ready 触发动画（避免首帧闪现）。 */
.mfpFull .mfpHeader,
.mfpFull .mfpBody {
  opacity: 0;
}
.mfpFull.is-ready .mfpHeader,
.mfpFull.is-ready .mfpBody {
  animation: mfpSidebarIn 0.55s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
@keyframes mfpSidebarIn {
  from { opacity: 0; transform: translateX(100%); }
  to   { opacity: 1; transform: translateX(0); }
}
/* 进场动画跑完就摘掉：animation-fill-mode:both 会把终态 transform 永久锁住，
   优先级高于内联样式，后面的竖屏手势(下滑收起面板)就再也移不动面板了。
   这里补回动画的终态（基础规则里是 opacity:0），transform 交回内联样式控制。 */
.mfpFull.is-intro-done .mfpHeader,
.mfpFull.is-intro-done .mfpBody {
  animation: none;
  opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  .mfpFull .mfpHeader,
  .mfpFull .mfpBody { opacity: 1; }
  .mfpFull.is-ready .mfpHeader,
  .mfpFull.is-ready .mfpBody { animation: none; }
}
.mfpFull .mfpMap {
  grid-column: 1 / -1;
  grid-row: 1 / 3;
  margin: -20px; /* 反向吃掉容器 padding，让地图铺满整个视口 */
  border-radius: 0;
  z-index: 0;
}
.mfpFull .mfpMapInner { height: 100%; }
/* —— 右侧浮动侧边栏：标题区（面板头部） —— */
.mfpFull .mfpHeader {
  grid-column: 2;
  grid-row: 1;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  text-align: left;
  padding: 20px 20px 10px;
  /* 侧边栏半透明毛玻璃。跟随 --mfp-color-bg，dark 主题下自动变深色半透。 */
  background: color-mix(in srgb, var(--mfp-color-bg) 82%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-radius: 16px 16px 0 0;
  box-shadow: var(--mfp-shadow);
}
.mfpFull .mfpHeaderTitle { order: 1; font-size: 22px; letter-spacing: 0; }
.mfpFull .mfpHeaderStats { order: 2; margin: 0 0 0 auto; gap: 8px; }
.mfpFull .mfpHeaderSub { order: 3; width: 100%; margin: 2px 0 0; font-size: 13px; }
.mfpFull .mfpStat {
  background: color-mix(in srgb, var(--mfp-color-accent) 10%, transparent);
  border-radius: 999px;
  padding: 2px 12px;
  font-size: 12px;
}
/* —— 右侧浮动侧边栏：搜索 + 分类 + 卡片（面板主体，内部滚动） —— */
.mfpFull .mfpBody {
  grid-column: 2;
  grid-row: 2;
  z-index: 1;
  margin-top: 0;
  min-height: 0;
  /* 主体自身不滚动：搜索 + 分类固定，只有下面的卡片列表滚动 */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative; /* 「到底了」悬浮层的定位基准 */
  padding: 12px 20px 20px;
  /* 侧边栏半透明毛玻璃。跟随 --mfp-color-bg，dark 主题下自动变深色半透。 */
  background: color-mix(in srgb, var(--mfp-color-bg) 82%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-radius: 0 0 16px 16px;
}
.mfpFull .mfpToolbar {
  flex: 0 0 auto;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 10px;
  margin-bottom: 14px;
}
.mfpFull .mfpSearch { flex: 1 1 auto; min-width: 0; } /* 首页按钮 + 搜索框同一行 */
.mfpFull .mfpTypeFilter { flex: 1 1 100%; min-width: 0; } /* 分类独占第二行，避免挤窄搜索框 */
.mfpFull .mfpGrid {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  /* 关键：grid 作为定高滚动容器时，auto 行会被压缩成等高塞满容器
     （卡片被压成 82px、缩略图变 0）。显式 max-content 让行按内容高度撑开并溢出滚动。 */
  align-content: start;
  grid-auto-rows: max-content;
  grid-template-columns: 1fr;
  gap: 14px;
  /* 隐藏滚动条（仍可滚动） */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.mfpFull .mfpGrid::-webkit-scrollbar { width: 0; height: 0; display: none; }
@media (max-width: 720px) {
  .mfpFull { grid-template-columns: 1fr; padding: 12px; }
  .mfpFull .mfpMap { margin: -12px; }
  .mfpFull .mfpHeader, .mfpFull .mfpBody { grid-column: 1; }
}

/* 标题区 */
.mfpHeader { text-align: center; padding: 24px 0 16px; }
.mfpHeaderTitle {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.mfpHeaderSub {
  margin: 8px 0 0;
  color: var(--mfp-color-fg-soft);
  font-size: 14px;
}
.mfpHeaderStats {
  margin-top: 16px;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  font-size: 13px;
  color: var(--mfp-color-fg-soft);
}
.mfpStat b {
  color: var(--mfp-color-accent);
  font-weight: 700;
  font-size: 16px;
}

/* 地图 */
.mfpMap {
  margin: 24px 0;
  border-radius: var(--mfp-radius);
  overflow: hidden;
  background: var(--mfp-color-bg-soft);
}
/* 午夜黑主题下：地图瓦片也走黑灰系。用 CSS filter 对瓦片 canvas 去色+降亮，
   高德内置 darkblue 是深蓝调，filter 把它压成纯黑灰。注意：覆盖物（标记点、
   圆圈、信息窗）一起变灰，这是黑灰主题的合理副作用。 */
[data-mfp-theme="dark"] .mfpMap {
  filter: grayscale(1) contrast(1.05) brightness(0.78);
}
.mfpMapInner {
  width: 100%;
  height: 480px;
  background: var(--mfp-color-bg-soft);
}

/* 工具栏 */
.mfpBody { margin-top: 24px; }
.mfpToolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 18px;
}
.mfpSearch {
  flex: 1 1 240px;
  border: 1px solid var(--mfp-color-border);
  background: var(--mfp-color-bg-soft);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
}
.mfpSearch:focus { border-color: var(--mfp-color-accent); }
.mfpTypeFilter {
  display: flex;
  /* 分类一律横排一行，超出横向滑动（不再换行）。
     之前是 wrap：分类一多就折成两行，把工具栏撑高；
     chip 又被 flex-shrink 压窄，窄屏上「全部」两个字会折行成两行。 */
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  /* 缺这两行，分类一多会把容器撑破（flex item 的 min-width:auto 撑到 min-content），
     横屏侧边栏会从 360px 被顶到 1000px+，页面横向溢出 */
  min-width: 0;
  max-width: 100%;
}
.mfpTypeFilter::-webkit-scrollbar { display: none; }

/* 返回首页 / 深浅色切换：同规格圆形半透明（毛玻璃）按钮。
   - 窄版：固定浮在内容列右侧、距内容右边缘 20px；深浅色按钮在最下(bottom:40px)，返回首页在其上方 10px。
   - 全屏横屏：见下方 .mfpFull > ...，改为贴在右侧侧边栏左侧 20px 处，两枚上下叠放。
   主题自适应（底色取 --mfp-color-bg 半透明，图标取 --mfp-color-fg，悬停变主题蓝并微上浮）。
   无阴影。z-index 低于弹窗(10000)。 */
.mfpHomeBtn,
.mfpThemeBtn {
  position: fixed;
  left: 20px;
  bottom: 40px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--mfp-color-bg) 55%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: none;
  color: var(--mfp-color-fg);
  text-decoration: none;
  cursor: pointer;
  transition: color .15s ease, background .15s ease, transform .15s ease;
}
/* 深浅色按钮占据原先返回首页的位置（bottom:40px），返回首页上移一层：
   40(底距) + 32(按钮高) + 10(间距) = 82px。 */
.mfpHomeBtn { bottom: 82px; }
/* <button> 需要清掉浏览器默认外观，才能和 <a> 版返回首页按钮长得一样 */
.mfpThemeBtn {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  font: inherit;
  line-height: 1;
}
/* 全屏（桌面/横屏）：把按钮放进地图列(col1)右下角。
   靠网格 column-gap:20px 自然形成「距右侧侧边栏 20px」；靠 .mfpFull 的 20px padding + 本处 margin-bottom:20px 形成「距底边 40px」。
   position:relative 让其留在网格流内（grid 定位生效）同时拿到 z-index 浮在地图之上。 */
.mfpFull > .mfpHomeBtn,
.mfpFull > .mfpThemeBtn {
  position: relative;
  z-index: 60;
  grid-column: 1;
  grid-row: 2;
  justify-self: end;
  align-self: end;
  left: auto;
  bottom: auto;
  margin-bottom: 20px;
  box-shadow: none;
}
/* 同「窄版」逻辑：深浅色按钮在最下（margin-bottom:20px），返回首页上移一层：20 + 32 + 10 = 62px */
.mfpFull > .mfpHomeBtn { margin-bottom: 62px; }
/* 窄版（单栏居中）：两枚按钮从视口左下角改到「内容列右侧」，与内容右边缘保持 20px 间距。
   内容列右边缘 = 视口中线 + (1180/2 - 16px padding) = 50% + 574px，再往外 +20px → 50% + 594px。
   视口窄到放不下时（<1292px）退回左下角，避免按钮被挤出屏幕。 */
.mfpNarrow > .mfpHomeBtn,
.mfpNarrow > .mfpThemeBtn {
  left: calc(50% + 594px);
  right: auto;
}
@media (max-width: 1291px) {
  .mfpNarrow > .mfpHomeBtn,
  .mfpNarrow > .mfpThemeBtn {
    left: 20px;
    right: auto;
  }
}
/* 竖屏：侧边栏沉到屏幕底部 → 按钮移到「底部侧边栏的右上角」，即地图行底部贴右、距侧边栏 20px。
   （与横屏「距右侧侧边栏 20px」对称：横屏距右边栏、竖屏距底边栏，都是 20px 贴边。） */
@media (orientation: portrait) {
  .mfpFull > .mfpHomeBtn,
  .mfpFull > .mfpThemeBtn {
    position: relative;
    grid-column: 1;
    grid-row: 1;
    justify-self: end;
    align-self: end;
    left: auto;
    bottom: auto;
    margin-bottom: 20px;
    box-shadow: none;
  }
  .mfpFull > .mfpHomeBtn { margin-bottom: 62px; }
}
.mfpHomeBtn:hover,
.mfpHomeBtn:active,
.mfpHomeBtn:focus-visible,
.mfpThemeBtn:hover,
.mfpThemeBtn:active,
.mfpThemeBtn:focus-visible {
  color: var(--mfp-color-accent);
  background: color-mix(in srgb, var(--mfp-color-bg) 38%, var(--mfp-color-accent) 20%);
  outline: none;
  transform: translateY(-2px);
}
.mfpHomeIcon,
.mfpThemeIcon { display: block; width: 15px; height: 15px; }
.mfpChip {
  border: 1px solid var(--mfp-color-border);
  background: var(--mfp-color-bg);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  color: var(--mfp-color-fg);
  transition: all 0.12s ease;
  /* 不参与收缩、文字不换行：宽度不够就让容器横滑，而不是把 chip 压变形 */
  flex: 0 0 auto;
  white-space: nowrap;
}
.mfpChip:hover { background: var(--mfp-color-bg-soft); }
.mfpChip.is-active {
  background: var(--mfp-color-accent);
  color: #fff;
  border-color: var(--mfp-color-accent);
}

/* 滚动到底提示 */
.mfpEnd {
  display: none;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--mfp-color-fg-soft);
  padding: 14px 0 10px;
  pointer-events: none;
}
.mfpEnd.is-visible { display: block; }
/* 悬浮在滚动区底部：不能占文档流，否则「显示提示 → 滚动区变矮 → 判定未到底
   → 隐藏 → 又到底」会形成死循环闪烁。用绝对定位 + 渐变遮底不影响 scrollHeight。 */
.mfpFull .mfpEnd {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  /* 渐变跟随 --mfp-color-bg（深色主题下底色也是深色） */
  background: linear-gradient(to bottom,
    color-mix(in srgb, var(--mfp-color-bg) 0%, transparent),
    color-mix(in srgb, var(--mfp-color-bg) 94%, transparent) 60%);
}
.mfpEndMedia,
.mfpFull .mfpEndMedia {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  background: linear-gradient(to bottom, rgba(248, 250, 252, 0), rgba(248, 250, 252, 0.95) 60%);
}

/* 列表网格 */
.mfpGrid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.mfpCard {
  /* 基础：实心背景 var(--mfp-color-bg) + 1px border——standard/light/fresh 主题下看得清卡片边界。
     dark 主题单加 [data-mfp-theme="dark"] 覆写为透明（v1.0.140 的"整平面一个颜色"设计）。*/
  background: var(--mfp-color-bg);
  border: 1px solid var(--mfp-color-border);
  border-radius: var(--mfp-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}
/* dark / 深色 主题单独恢复 v1.0.140 的"卡片融入整平面"透明设计 */
[data-mfp-theme="dark"] .mfpCard,
[data-mfp-theme="night"] .mfpCard {
  background: transparent;
}
.mfpCard:hover,
.mfpCard:active,
.mfpCard.is-selected {
  /* 选中/划过：和标签按钮(mfpChip.is-active)同款蓝——边框用 accent，
     背景用 accent 10% 淡染，既显蓝又不遮挡卡片文字（solid 蓝会让深色标题看不清） */
  background: color-mix(in srgb, var(--mfp-color-accent) 10%, var(--mfp-color-bg));
  box-shadow: none;
  border-color: var(--mfp-color-accent);
}
.mfpCardThumb {
  height: 180px;
  background-color: var(--mfp-color-bg-soft);
  background-size: cover;
  background-position: center;
  position: relative;
}
.mfpCardPin {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--mfp-color-pin);
  color: #fff;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.mfpCardType {
  position: absolute;
  left: 10px; top: 10px;
  background: rgba(31, 35, 40, 0.7);
  color: #fff;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
}
.mfpCardBody { padding: 14px 16px 12px; flex: 1; }
.mfpCardTitle {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 600;
}
.mfpCardTime {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--mfp-color-fg-soft);
}
.mfpCardTags {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.mfpCardTag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--mfp-color-bg-soft);
  border: 1px solid var(--mfp-color-border);
  color: var(--mfp-color-fg-soft);
}

/* 详情弹窗 */
.mfpModal {
  position: fixed;
  inset: 0;
  /* 蒙层：固定中性深灰 rgb(15,15,15)（去蓝调），所有主题统一深色蒙层（还原之前的样子）。
     不能用 var(--mfp-color-bg)——standard 主题下 bg=#ffffff 会变成白色蒙层。*/
  background: rgba(15, 15, 15, 0.6);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.mfpModal.is-open { display: flex; }
.mfpModalPanel {
  position: relative;
  background: var(--mfp-color-bg);
  border-radius: var(--mfp-radius);
  width: min(880px, 100%);
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  box-shadow: var(--mfp-shadow-strong);
}
@media (max-width: 640px) {
  /* 手机浏览器竖屏时上层地址栏会吃掉 fixed 容器的顶部 24px 间隙，
     导致城市卡片弹窗上边距为 0、与顶部连在一起。改为顶部对齐 + 安全区上边距，
     保证任何浏览器下弹窗都与顶端留有可见间距（不再居中时被地址栏盖住）。 */
  .mfpModal {
    align-items: flex-start;
    padding-top: max(24px, env(safe-area-inset-top));
  }
  .mfpModalPanel { grid-template-columns: 1fr; }
}
.mfpModalClose {
  position: absolute;
  right: 14px; top: 14px;
  z-index: 2;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none;
  background: color-mix(in srgb, var(--mfp-color-bg-soft) 92%, transparent);
  font-size: 20px;
  cursor: pointer;
  box-shadow: var(--mfp-shadow);
}

/* 加载/错误状态 */
.mfpLoading,
.mfpError {
  padding: 32px;
  text-align: center;
  color: var(--mfp-color-fg-soft);
  font-size: 14px;
}
.mfpError { color: #b91c1c; }

/* ===== 三级地区筛选（国家 / 省份 / 城市） ===== */
.mfpFilter {
  max-width: 1100px;
  margin: 0 auto 14px;
  padding: 0 20px;
}
.mfpFilterRow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: center;
}
.mfpSelect {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--mfp-color-border);
  border-radius: var(--mfp-radius-sm);
  padding: 8px 10px;
  font-size: 14px;
  font-family: inherit;
  color: var(--mfp-color-fg);
  background: var(--mfp-color-bg);
  cursor: pointer;
}
.mfpSelect:focus {
  outline: 2px solid var(--mfp-color-accent);
  outline-offset: -1px;
  border-color: var(--mfp-color-accent);
}
.mfpReset {
  padding: 8px 14px;
  border-radius: var(--mfp-radius-sm);
  border: 1px solid var(--mfp-color-border);
  background: var(--mfp-color-bg);
  color: var(--mfp-color-fg-soft);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.mfpReset:hover { background: var(--mfp-color-bg-soft); }
.mfpFilterHint {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--mfp-color-fg-soft);
}

/* ===== 城市足迹列表弹窗（点击地图蓝色蒙版） ===== */
.mfpModalPanelList {
  /* 城市足迹列表弹窗：1500 × 900（小屏自动收敛，避免溢出视口） */
  width: min(1500px, calc(100vw - 48px)) !important;
  max-width: min(1500px, calc(100vw - 48px)) !important;
  height: min(900px, calc(100vh - 48px));
  max-height: min(900px, calc(100vh - 48px));
  overflow: auto;
  padding: 35px 35px;
  grid-template-columns: 1fr !important; /* 单列：标题在上、卡片在下平铺（覆盖基类 2 列网格） */
  align-content: start; /* 关键：面板固定高 → 网格 auto 行默认被 stretch 撑高，导致标题被拉到几百 px 高 */
}
.mfpModalCitytitle {
  margin: 0 0 15px 5px;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 600;
  color: var(--mfp-color-fg);
}
.mfpCitylist {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 一排 4 个 */
  gap: 16px;
  align-items: start;
}
@media (max-width: 1300px) {
  .mfpCitylist { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 920px) {
  .mfpCitylist { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .mfpCitylist { grid-template-columns: 1fr; }
}
.mfpCityitem {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--mfp-color-border);
  border-radius: var(--mfp-radius-sm);
  cursor: pointer;
  transition: background .12s ease, box-shadow .12s ease;
}
.mfpCityitem:hover {
  background: var(--mfp-color-bg-soft);
  box-shadow: var(--mfp-shadow);
}
.mfpCityitemThumb {
  width: 72px;
  height: 56px;
  flex: 0 0 72px;
  border-radius: var(--mfp-radius-sm);
  background-color: var(--mfp-color-bg-soft);
  background-size: cover;
  background-position: center;
}
.mfpCityitemBody { min-width: 0; }
.mfpCityitemBody h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--mfp-color-fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mfpCityitemBody p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--mfp-color-fg-soft);
}

@media (max-width: 640px) {
  .mfpFilterRow { grid-template-columns: 1fr 1fr; }
  .mfpReset { grid-column: 1 / -1; }
}

/* ==========================================================================
 * 详情弹窗（新版）：左侧故事 / 到访时间轴 / 相关文章 + 右侧图片瀑布流
 * ========================================================================== */
.mfpModalPanelDetail {
  width: min(1500px, 100%);
  height: min(900px, calc(100vh - 48px));
  display: block;
}
.mfpDetail {
  display: grid;
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  height: 100%;
  min-height: 0;
}
.mfpDetailSide {
  background: var(--mfp-color-bg);
  min-height: 0;
  border-right: 1px solid var(--mfp-color-border);
}
.mfpDetailMedia {
  background: var(--mfp-color-bg-soft);
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative; /* 「到底了」悬浮层的定位基准 */
}
/* 相册区：隐藏滚动条（仍可滚动） */
.mfpDetailMedia .mfpDetailScroll {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.mfpDetailMedia .mfpDetailScroll::-webkit-scrollbar { width: 0; height: 0; display: none; }
.mfpDetailScroll {
  height: 100%;
  overflow-y: auto;
  padding: 30px 28px;
  scrollbar-width: thin;
}

.mfpCrumb {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: #94a3b8;
  margin-bottom: 12px;
}
.mfpDetailCity {
  margin: 0;
  font-size: 30px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.mfpDetailAddr {
  margin: 6px 0 0;
  font-size: 12.5px;
  color: #94a3b8;
}
.mfpDetailStory {
  margin: 18px 0 0;
  font-size: 14px;
  line-height: 1.9;
  color: #374151;
  white-space: pre-wrap;
}
.mfpDetailTags {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mfpSec {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--mfp-color-border);
}
.mfpSecTitle {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #94a3b8;
}
.mfpSec .mfpSecTitle + .mfpTl { margin-bottom: 0; }
.mfpSec h4.mfpSecTitle ~ h4.mfpSecTitle { margin-top: 22px; }
.mfpSecCount {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--mfp-color-bg-soft);
  color: var(--mfp-color-fg-soft);
  font-size: 11px;
  letter-spacing: 0;
  font-weight: 500;
}

/* 到访时间轴：日期前带圆点（本次到访为蓝色实心，曾到访为灰色空心环） */
.mfpTl {
  --mfp-tl-gap: 20px;      /* 与 padding-left 一致：圆点轨道距内容左边缘 */
  --mfp-tl-dot: 9px;       /* 圆点直径（含边框） */
  --mfp-tl-dot-top: 7px;   /* 圆点顶部相对条目顶部的偏移 */
  --mfp-tl-axis: calc(var(--mfp-tl-dot) / 2 - var(--mfp-tl-gap)); /* 圆点圆心，连线与圆点共用 */
  position: relative;
  padding-left: var(--mfp-tl-gap);
}
.mfpTlItem {
  position: relative;
  padding-bottom: 16px;
}
.mfpTlItem:last-child { padding-bottom: 0; }
.mfpTlDot {
  position: absolute;
  left: var(--mfp-tl-axis);
  top: var(--mfp-tl-dot-top);
  width: var(--mfp-tl-dot);
  height: var(--mfp-tl-dot);
  box-sizing: border-box;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--mfp-color-bg);
  border: 2px solid #cbd5e1;
}
.mfpTlItem.is-current .mfpTlDot {
  background: var(--mfp-color-accent);
  border-color: var(--mfp-color-accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--mfp-color-accent) 14%, transparent);
}
.mfpTlDate {
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.4;
}
.mfpTlNote {
  margin: 3px 0 0;
  font-size: 12.5px;
  color: var(--mfp-color-fg-soft);
}

/* 时间轴日期后面的类型标签：跟着主题走，dark 主题下 accent 会自动变亮蓝 */
.mfpTlTag {
  display: inline-block;
  margin-left: 8px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: none;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  vertical-align: 1px;
  white-space: nowrap;
  color: var(--mfp-color-fg-soft);
}
.mfpTlTag::before {
  content: "· ";
}
.mfpTlItem[data-name] { cursor: pointer; }
.mfpTlItem[data-name]:hover .mfpTlDate { color: var(--mfp-color-accent); }

/* 曾到访 ≥2 条时，用一条竖线把各圆点连起来（最后一条不画）；left 与圆点共用 --mfp-tl-axis 保证居中对齐 */
.mfpTlLinked .mfpTlItem::before {
  content: "";
  position: absolute;
  left: var(--mfp-tl-axis);
  transform: translateX(-50%);
  top: calc(var(--mfp-tl-dot-top) + var(--mfp-tl-dot)); /* 从本条圆点底部起 */
  bottom: -7px;                                          /* 到下一个圆点顶部止 */
  width: 2px;
  border-radius: 1px;
  background: var(--mfp-color-bg-soft);
}
.mfpTlLinked .mfpTlItem:last-child::before { display: none; }

/* 相关文章 */
.mfpPosts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mfpPost {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--mfp-color-border);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  background: var(--mfp-color-bg);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.mfpPost:hover {
  border-color: var(--mfp-color-accent);
  transform: translateX(2px);
}
.mfpPostTitle {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mfpPostDate {
  font-size: 12px;
  color: #94a3b8;
  flex-shrink: 0;
}
.mfpPostArrow {
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}

/* 右侧图片瀑布流 */
.mfpWaterfall {
  columns: 3;
  column-gap: 12px;
  padding: 18px;
}
.mfpWfItem {
  margin: 0 0 12px;
  break-inside: avoid;
  border-radius: 6px;
  overflow: hidden;
  background: var(--mfp-color-bg-soft);
  cursor: zoom-in;
}
/* 只有一两张图时不要把图片拉成三条细柱子 */
.mfpWaterfall[data-count="1"] { columns: 1; }
.mfpWaterfall[data-count="2"] { columns: 2; }
.mfpWfItem img {
  display: block;
  width: 100%;
  height: auto;
}

/* —— 相册样式（后台「显示设置 → 相册样式」）——
   瀑布流 = 默认，CSS columns 错落排列，图片保持原始比例；
   卡片式 card = 固定 3:2 宽高比、一排三张、图片裁切填满。 */
.mfpWaterfallCard {
  columns: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
/* 只有 1~2 张时按数量收敛列数，避免出现空列 */
.mfpWaterfallCard[data-count="1"] { grid-template-columns: 1fr; }
.mfpWaterfallCard[data-count="2"] { grid-template-columns: repeat(2, 1fr); }
.mfpWaterfallCard .mfpWfItem {
  margin: 0;
  aspect-ratio: 3 / 2;
}
.mfpWaterfallCard .mfpWfItem img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* 按到访日期分组的相册 */
.mfpWfGroup { break-inside: avoid; margin: 0 0 18px; }
.mfpWfGroup:last-child { margin-bottom: 0; }
.mfpWfGroupTitle {
  grid-column: 1 / -1;
  font-size: 20px; font-weight: 600; color: var(--mfp-color-fg, #1f2937);
  margin: 0 0 10px; padding: 15px 0; border-bottom: 1px solid var(--mfp-color-border, #e5e7eb);
}
.mfpWfEmpty { font-size: 13px; color: var(--mfp-color-fg-soft, #9ca3af); margin: 4px 0 0; }
/* card 模式：分组 section 不生成盒子，让标题与图片回到 3 列网格里 */
.mfpWaterfallCard .mfpWfGroup { display: contents; }
/* 大图预览 */
.mfpLightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  /* 灯箱蒙层：固定中性深灰 rgb(15,15,15)（去蓝调），所有主题统一深色蒙层。
     不能用 var(--mfp-color-bg)——standard 主题下会变成白色蒙层。*/
  background: rgba(15, 15, 15, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 70px;
}
.mfpLightbox.is-open { display: flex; }
/* 竖屏（侧边栏沉到页面底部）下，灯箱四周留白收窄到 15px，放大图更铺满；横屏保持 70px */
@media (orientation: portrait) {
  .mfpLightbox { padding: 15px; }
}
.mfpLightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  box-shadow: var(--mfp-shadow-strong);
}
.mfpLightboxClose {
  position: absolute;
  top: 16px;
  right: 22px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.mfpLightboxClose:hover { background: rgba(255, 255, 255, 0.26); }
.mfpLightboxNav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}
.mfpLightboxNav:hover { background: rgba(255, 255, 255, 0.26); }
.mfpLightboxNavPrev { left: 18px; }
.mfpLightboxNavNext { right: 18px; }
.mfpLightboxCounter {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.6);
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.5px;
  z-index: 2;
}

@media (max-width: 860px) {
  .mfpModalPanelDetail {
    height: auto;
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
  }
  .mfpDetail { grid-template-columns: 1fr; }
  .mfpDetailSide { border-right: none; border-bottom: 1px solid var(--mfp-color-border); }
  .mfpDetailScroll { height: auto; overflow: visible; padding: 24px 20px; }
  .mfpWaterfall,
  .mfpWaterfall[data-count="2"] { columns: 2; }
  .mfpWaterfallCard,
  .mfpWaterfallCard[data-count="2"] { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .mfpWaterfall,
  .mfpWaterfall[data-count="2"] { columns: 1; }
  .mfpWaterfallCard,
  .mfpWaterfallCard[data-count="2"] { grid-template-columns: 1fr; }
}

/* ============================================================
   竖屏适配：侧边栏 从「右侧竖栏」→「页面底部横向面板」，城市卡片横向手动滑动
   ------------------------------------------------------------
   原布局（横屏/桌面）：地图铺底 + 右侧 400px 浮动侧边栏。
   竖屏下这 400px 会吃掉 iPad(768) 52% 的宽度，地图只剩 348px；
   改到底部横向铺开后，地图拿到完整宽度，卡片改为左右手动滑动浏览。
   面板总高按视口高度自适应：长屏手机约 34%，平板约 33%。
   ============================================================ */
@media (orientation: portrait) {
  .mfpFull {
    grid-template-columns: 1fr;
    /* 三行：地图(吃掉剩余空间) / 标题栏 / 工具栏+卡片。
       但地图用 grid-row: 1 / -1 横跨全部三行铺满整格，
       header/body 靠 z-index 浮在地图之上——和横屏侧边栏是同一套关系。
       （之前地图只占 row1，被面板挤成 672px，面板四周的 padding
         会露出页面底色，就是那块白底。） */
    grid-template-rows: minmax(0, 1fr) auto auto;
    /* 底部加大到 24px：竖屏下面板压在窗口底部，12px 显得太贴 */
    padding: 12px 12px 24px;
  }
  .mfpFull .mfpMap {
    grid-column: 1;
    grid-row: 1 / -1;
    /* 负 margin 抵消 padding，让地图真正铺到容器四边 */
    margin: -12px -12px -24px;
    border-radius: 0;
  }
  .mfpFull .mfpMapInner { height: 100%; }

  /* 底部面板：header 与 body 上下拼成一条 */
  .mfpFull .mfpHeader {
    grid-column: 1;
    grid-row: 2;
    padding: 10px 14px 4px;
    border-radius: 16px 16px 0 0;
  }
  .mfpFull .mfpHeaderTitle { font-size: 18px; }
  .mfpFull .mfpHeaderSub { font-size: 12px; margin: 0; line-height: 1.35; }

  /* 竖屏：头部上下滑动手势 —— 下滑收起卡片区(mfpBody)，上滑再展开。
     手势区是 header 本身，设 touch-action:none 交给 JS 接管，避免
     触摸时浏览器先拿去当页面滚动。 */
  .mfpFull .mfpHeader { touch-action: none; }
  .mfpFull .mfpBody {
    transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1),
                margin-top 0.3s cubic-bezier(0.22, 0.61, 0.36, 1),
                opacity 0.25s ease;
  }
  /* 跟手阶段关掉过渡，否则手指每帧都被缓动拉住，拖不动 */
  .mfpFull .mfpBody.is-no-anim { transition: none; }
  /* 收起后不再拦截点击，让地图可以操作 */
  .mfpFull.is-panel-collapsed .mfpBody { pointer-events: none; }
  /* 收起态：body 已滑出，header 变成独立浮层，下面两角也收圆（和上面两角一致）；
     同时把下边距补到和上边距一样（10px），默认是 4px（紧贴上方的 body）。 */
  .mfpFull .mfpHeader {
    transition: border-radius 0.3s cubic-bezier(0.22, 0.61, 0.36, 1),
                padding-bottom 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
  }
  .mfpFull.is-panel-collapsed .mfpHeader {
    border-radius: 16px;
    padding-bottom: 10px;
  }
  .mfpFull .mfpBody {
    grid-column: 1;
    grid-row: 3;
    padding: 6px 14px 12px;
    border-radius: 0 0 16px 16px;
    /* 面板高度由内容自己决定（工具栏 + 卡片行 + 内边距）。
       之前用 min(27vh,420px) 硬卡：卡片行本身是 min(21vh,220px)，
       窗口高度 <1000px 时 21vh+工具栏+内边距 就超过 27vh，
       多出来的部分被 body 的 overflow:hidden 直接裁掉
       —— 表现就是卡片底边贴着面板底边，加底部 padding 也没用。 */
    max-height: none;
  }

  /* 工具栏横向排成一行：搜索框 + 分类，节省垂直空间 */
  .mfpFull .mfpToolbar {
    flex-direction: row;
    /* 必须 nowrap：窄屏上「搜索框 + 4 个分类 chip」会换行成两行，
       工具栏从 34px 涨到 76px，直接吃掉卡片区的高度。 */
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
  }
  .mfpFull .mfpSearch { flex: 0 1 132px; min-width: 96px; }
  .mfpFull .mfpTypeFilter {
    flex: 1 1 auto;
    min-width: 0;
    /* 分类 chip 排一行，超出横向滚动 */
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .mfpFull .mfpTypeFilter::-webkit-scrollbar { display: none; }

  /* 城市卡片：横向手动滑动 */
  .mfpFull .mfpGrid {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    /* iOS/iPadOS 惯性滚动：缺这行滑动会发涩、不像原生 */
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    padding-bottom: 2px;
    /* 给卡片区一个下限，否则卡片高度会被内容压成 thumb(min)+文字，
       平板明明有空间却只显示 64px 的缩略图 */
    min-height: min(19vh, 210px);
    min-height: min(19dvh, 210px);
  }
  .mfpFull .mfpCard {
    flex: 0 0 clamp(170px, 60vw, 260px);
    scroll-snap-align: start;
  }
  .mfpFull .mfpCardBody {
    /* 关键：基础规则里 body 是 flex:1，会和缩略图的 flex:1 平分剩余高度，
       两行文字也占掉卡片一半，显得很空。这里改成不吸收剩余高度，
       让缩略图吃掉文字以外的全部空间。 */
    flex: 0 0 auto;
    padding: 15px;
  }
  .mfpFull .mfpCardThumb {
    /* 卡片撑满卡片区高度，缩略图吃掉文字之外的剩余空间。
       用固定高度在矮面板上会溢出，flex 自适应则任何屏高都不会挤爆。 */
    height: auto;
    flex: 1 1 auto;
    min-height: 58px;
  }
  /* 鼠标拖拽横滑：JS 检测到确实可横向滚动时才加 .mfpGridDraggable */
  .mfpFull .mfpGrid.mfpGridDraggable { cursor: grab; }
  .mfpFull .mfpGrid.mfpGridDragging {
    cursor: grabbing;
    /* 拖动时不选中文字，否则会一边滚一边刷蓝 */
    user-select: none;
    -webkit-user-select: none;
    /* 拖拽过程中关掉吸附：否则每帧被 snap 往回拉，手感发顿 */
    scroll-snap-type: none;
  }
  .mfpFull .mfpGrid.mfpGridDragging * { -webkit-user-drag: none; }
  /* 横向滑动没有「到底了」的概念 */
  .mfpFull .mfpEnd { display: none; }
}

/* 平板竖屏（iPad 768×1024 等）：垂直空间比手机充裕，
   在守住 ~1/3 屏高的前提下把卡片放大，缩略图不至于被压成细条。 */
@media (orientation: portrait) and (min-width: 721px) {
  .mfpFull .mfpGrid { min-height: min(21vh, 220px); min-height: min(21dvh, 220px); }
}

/* 手机端（≤520px 竖屏）：容器底边距加大，避免卡片离屏幕下缘太近；
   桌面/平板竖屏仍保持 12px 与左右一致。env() 主题未开 viewport-fit=cover
   时取 0，按 24px 兜底，将来开了自动适配 iPhone 底部安全区。 */
@media (orientation: portrait) and (max-width: 520px) {
  .mfpFull {
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }
  .mfpFull .mfpMap {
    /* 负 margin 同步抵消，地图仍铺满视口 */
    margin-bottom: calc(-24px - env(safe-area-inset-bottom));
  }
  /* 手机端日期行离地点名称更近一点 */
  .mfpFull .mfpCardTime { margin: 2px 0 0; }
}
