/* landmarks 文化遗产图层框架样式（lm-* 前缀，独立模块，不影响其他图层样式）。 */

/* 覆盖整个视口（inset:0）：绝对定位子元素可定位到顶栏下方；pointer-events:none 不拦截地图点击。
   z-index 35：高于图例（~9），低于空间助手聊天层（40–48），不再遮挡 gm-chat-fab / gm-chat-panel。
   loading(50)/export(60) 仍高于聊天层。面板/抽屉保持底部，不得阻塞聊天命中测试（由 35 保证堆叠）。 */
.lm-root { position: fixed; z-index: 35; inset: 0; pointer-events: none;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif; }
.lm-root[hidden] { display: none; }
.lm-drawer[hidden] { display: none; }   /* display:flex 压过 UA 的 [hidden] 隐藏，需显式关闭 */

/* 顶部工具条：列表 / 路线 / 五千年时间轴（顶栏下方贴顶定位，不再 bottom 钉底 -46px；
   面板/抽屉仍在底部且不得阻塞聊天命中测试——z-index 35 已低于聊天层） */
.lm-bar { pointer-events: auto; position: absolute; top: calc(56px + env(safe-area-inset-top, 0px)); left: 12px; right: 12px;
  display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #d0d7de;
  border-radius: 12px; padding: 6px 10px; box-shadow: 0 1px 8px rgba(22,28,38,.10); flex-wrap: wrap; }
.lm-btn { border: 1px solid #d0d7de; background: #fff; border-radius: 14px; padding: 5px 12px;
  font-size: 13px; cursor: pointer; color: #1d232b; }
.lm-btn:hover { background: #f3f4f6; }
.lm-axis { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 180px; }
.lm-sl { flex: 1; min-width: 70px; accent-color: #b45309; }
.lm-axl { font-size: 11px; color: #6b7280; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lm-count { font-size: 11px; color: #6b7280; white-space: nowrap; }

/* 列表 / 路线面板 */
.lm-panel { pointer-events: auto; position: absolute; bottom: 8px; left: 12px; width: min(340px, calc(100vw - 24px));
  max-height: 52vh; overflow: auto; background: #fff; border: 1px solid #d0d7de; border-radius: 14px;
  box-shadow: 0 2px 14px rgba(22,28,38,.14); padding: 10px; }
.lm-p-h { font-size: 13px; font-weight: 700; margin: 2px 2px 8px; color: #1d232b; }

/* 小卡：缩略图 / 名字 / 年份；未 ready 明示“叙事制作中” */
.lm-card { display: flex; gap: 8px; align-items: center; width: 100%; text-align: left; border: 1px solid #e5e7eb;
  border-radius: 10px; background: #fff; padding: 6px; margin-bottom: 6px; cursor: pointer; }
.lm-card:hover { background: #f9fafb; }
.lm-card img, .lm-noimg { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex: none;
  background: #e5e7eb; display: block; }
.lm-c-t { min-width: 0; }
.lm-c-t b { display: block; font-size: 13px; color: #1d232b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lm-c-t i { font-style: normal; font-size: 11px; color: #6b7280; font-variant-numeric: tabular-nums; }
.lm-draft-tag, .lm-hdraft { display: inline-block; margin-left: 4px; font-size: 10px; font-style: normal;
  background: #fdf2e3; color: #a35a00; border-radius: 8px; padding: 1px 6px; }
.lm-card:not(.ready) { opacity: .82; }
.lm-shake { animation: lm-shake .4s; }
@keyframes lm-shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }

/* 西班牙路线章节 */
.lm-ch { border-top: 1px dashed #e5e7eb; padding: 8px 2px; font-size: 12px; }
.lm-ch b { font-size: 12.5px; color: #1d232b; }
.lm-ch i { display: block; font-style: normal; color: #6b7280; margin: 2px 0; }
.lm-ch-p { color: #4b5563; margin: 2px 0 6px; }
.lm-ch-s { display: flex; flex-wrap: wrap; gap: 6px; }
.lm-next { margin-top: 6px; border: none; background: none; color: #1f5fa8; font-size: 12px; cursor: pointer; padding: 0; }

/* 详情：桌面右抽屉 / 手机底部层（拆分滚动层：外层裁切白底圆角，内层 .lm-drawer-body 滚动，× 不随内容滚走） */
.lm-drawer { pointer-events: auto; position: absolute; bottom: 8px; right: 12px; width: min(380px, calc(100vw - 24px));
  max-height: 64vh; overflow: hidden; display: flex; flex-direction: column; background: #fff;
  border: 1px solid #d0d7de; border-radius: 14px;
  box-shadow: 0 4px 20px rgba(22,28,38,.18); padding: 14px; }
.lm-drawer-body { flex: 1 1 auto; min-height: 0; overflow: auto; }
@media (max-width: 640px) {
  .lm-drawer { left: 8px; right: 8px; width: auto; bottom: 8px; border-radius: 16px 16px 12px 12px; }
  .lm-panel { left: 8px; width: calc(100vw - 16px); }
}
.lm-drawer h3 { margin: 0 26px 4px 0; font-size: 17px; color: #1d232b; }
.lm-drawer .lm-en { font-size: 12px; color: #8a919c; font-weight: 400; }
.lm-x { position: absolute; top: 8px; right: 10px; border: none; background: none; font-size: 20px;
  color: #6b7280; cursor: pointer; line-height: 1; }
.lm-meta { font-size: 12px; color: #6b7280; margin-bottom: 8px; }
.lm-imgbox img { width: 100%; border-radius: 10px; display: block; }
.lm-credit { font-size: 11px; color: #8a919c; margin: 4px 0 8px; }
.lm-credit a { color: #1f77b4; }
.lm-hook { font-size: 14px; font-weight: 600; color: #1d232b; margin: 8px 0; }
.lm-story { font-size: 13px; line-height: 1.75; color: #374151; margin: 8px 0; text-indent: 0; }
.lm-look b, .lm-contrast b, .lm-chapter b, .lm-rel b { display: block; font-size: 12px; color: #92400e; margin: 10px 0 4px; }
.lm-look ul { margin: 0; padding-left: 18px; }
.lm-look li { font-size: 13px; line-height: 1.7; color: #374151; }
.lm-contrast p { font-size: 13px; line-height: 1.7; color: #374151; margin: 0; }
.lm-chapter { font-size: 12.5px; color: #4b5563; background: #faf7f2; border-radius: 10px; padding: 8px 10px; margin-top: 10px; }
.lm-rel .lm-chip { margin: 4px 6px 0 0; }
.lm-chip { border: 1px solid #d0d7de; background: #fff; border-radius: 12px; padding: 3px 10px;
  font-size: 12px; cursor: pointer; color: #1d232b; }
.lm-chip:hover { background: #f3f4f6; }
.lm-sources { margin-top: 12px; font-size: 11px; color: #8a919c; line-height: 1.8; word-break: break-all; }
.lm-sources a { color: #1f77b4; margin-right: 4px; }
.lm-video-btn { border: 1px solid #d0d7de; background: #111827; color: #fff; border-radius: 10px;
  padding: 7px 14px; font-size: 13px; cursor: pointer; margin: 6px 0; }
.lm-draft-note { font-size: 14px; color: #a35a00; background: #fdf2e3; border-radius: 10px; padding: 12px; }
.lm-hover { background: rgba(29,35,43,.92); color: #fff; font-size: 12px; border-radius: 8px; padding: 4px 9px; }
.lm-hover .lm-hy { color: #fbbf24; font-variant-numeric: tabular-nums; }
.lm-root.lm-en button, .lm-root.lm-en .lm-p-h { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }

/* 覆盖度与未收录标记（审校子集 20261108d+） */
.lm-count { font-weight: 600; }
.lm-excluded-note { font-size: 11.5px; color: #8a919c; background: #f9fafb; border-radius: 8px;
  padding: 7px 9px; margin-top: 6px; line-height: 1.6; }
.lm-chip-off { display: inline-flex; align-items: center; gap: 5px; border: 1px dashed #d0d7de; color: #6b7280;
  border-radius: 12px; padding: 3px 10px; font-size: 12px; margin: 4px 6px 0 0;
  cursor: default; user-select: none; }
.lm-chip-off em { font-style: normal; font-size: 10px; color: #a35a00; background: #fdf2e3;
  border-radius: 8px; padding: 0 6px; }
.lm-ch-a { color: #4b5563; margin: 2px 0; }

/* 小卡（openCard）：缩略图 + 名称 + 年份 + hook + 展开按钮；展开才进抽屉 */
.lm-mini { pointer-events: auto; position: absolute; bottom: 8px; right: 12px; width: min(300px, calc(100vw - 24px));
  background: #fff; border: 1px solid #d0d7de; border-radius: 14px;
  box-shadow: 0 4px 20px rgba(22,28,38,.16); padding: 12px; }
.lm-mini-h { display: flex; gap: 9px; align-items: center; }
.lm-mini-h img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex: none; background: #e5e7eb; display: block; }
.lm-mini-h .lm-noimg { width: 56px; height: 56px; }
.lm-mini-t { min-width: 0; }
.lm-mini-t b { display: block; font-size: 14.5px; color: #1d232b; }
.lm-mini-t i { font-style: normal; font-size: 11.5px; color: #6b7280; font-variant-numeric: tabular-nums; }
.lm-mini-hook { font-size: 12.5px; line-height: 1.65; color: #374151; margin: 8px 0 10px; }
.lm-mini-xp { width: 100%; text-align: center; background: #f8f5ef; border-color: #e2d5bd; color: #7c4a03; }
.lm-mini-xp:hover { background: #f1e9da; }
@media (max-width: 640px) {
  .lm-mini { left: 8px; right: 8px; width: auto; bottom: 8px; }
}

/* 抽屉内五千年 mini 轴：本站年份 + 当前年标记 */
.lm-ax5000 { margin: 2px 0 10px; }
.lm-ax-track { position: relative; height: 6px; background: #eceff3; border-radius: 3px; }
.lm-ax-dot { position: absolute; top: -3px; width: 12px; height: 12px; border-radius: 50%;
  background: #b45309; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.35); transform: translateX(-6px); }
.lm-ax-now { position: absolute; top: -2px; width: 10px; height: 10px; border-radius: 50%;
  background: #1e88e5; border: 2px solid #fff; transform: translateX(-5px); }
.lm-ax-lab { display: flex; justify-content: space-between; font-size: 10.5px; color: #8a919c;
  font-variant-numeric: tabular-nums; margin-top: 4px; }
.lm-ax-key { font-size: 11px; color: #6b7280; margin-top: 3px; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.lm-k-dot, .lm-k-now { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.lm-k-dot { background: #b45309; }
.lm-k-now { background: #1e88e5; }

/* 视频：点击后才建 iframe/video；来源不在白名单时禁用并说明 */
.lm-video-off { display: inline-block; font-size: 11.5px; color: #8a919c; background: #f3f4f6;
  border-radius: 10px; padding: 7px 12px; margin: 6px 0; }
.lm-video-frame { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 10px; display: block; margin: 6px 0; background: #111827; }

/* 首条路线（routeGo(n)）：游历顺序站列表，非章节序；未收录站保留标缺 */
.lm-p-h2 { margin-top: 12px; color: #7c4a03; }
.lm-route-note { font-size: 11.5px; color: #6b7280; margin: 4px 0 6px; }
.lm-stops { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.lm-stop { margin: 0; }
.lm-stop-go { display: flex; gap: 8px; align-items: center; width: 100%; text-align: left;
  background: #fff; border: 1px solid #e5e1d8; border-radius: 10px; padding: 7px 9px; cursor: pointer; }
.lm-stop-go:hover { background: #faf6ee; border-color: #d9cdb4; }
.lm-stop.cur .lm-stop-go { background: #fdf2e3; border-color: #d9a441; }
.lm-stop-n { flex: none; font-size: 11px; font-weight: 700; color: #b45309; background: #fdf2e3;
  border-radius: 8px; padding: 1px 7px; font-variant-numeric: tabular-nums; }
.lm-stop-t { min-width: 0; }
.lm-stop-t b { display: block; font-size: 13px; color: #1d232b; }
.lm-stop-t i { font-style: normal; font-size: 10.5px; color: #8a919c; }
.lm-stop-off { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: #9aa1ac;
  padding: 5px 9px; border: 1px dashed #e5e1d8; border-radius: 10px; }
.lm-stop-off em { font-style: normal; font-size: 10px; color: #a35a00; background: #fdf2e3;
  border-radius: 8px; padding: 0 6px; margin-left: auto; }
.lm-route-next { width: 100%; text-align: center; margin-top: 6px; }
.lm-route-end { font-size: 11.5px; color: #6b7280; text-align: center; margin-top: 6px; }
