/* 原图沉浸式版式：页面内容即设计稿长图，视觉与图片一致。
   交互全部由透明热区承担，不额外绘制任何可见 UI。 */
:root {
  --blue: #0a4f9e;
  --halo: rgba(255, 159, 28, .9);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  color: #1b2c40;
  background: radial-gradient(circle at 12% 8%, #eaf4ff 0, #f5faff 34%, #e7f0fa 100%);
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; }
[hidden] { display: none !important; }

.shell {
  max-width: 520px;
  min-height: 100vh;
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 0 60px rgba(12, 65, 130, .12);
  overflow: hidden;
}
.view { outline: none; animation: fade .24s ease both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* 长图按宽度铺满，高度按原始比例，确保与设计稿逐像素对应 */
.page { position: relative; width: 100%; line-height: 0; }
.page-img { display: block; width: 100%; height: auto; }

/* ---------- 透明热区 ---------- */
.hotzone {
  position: absolute;
  border: 0;
  padding: 0;
  background: transparent;
  color: transparent;
  font-size: 0;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
}
.hotzone::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  pointer-events: none;
  transition: border-color .16s, box-shadow .16s;
}
.hotzone.dot {
  left: var(--x);
  top: var(--y);
  width: var(--w);
  aspect-ratio: 1 / 1;
  height: auto;
  transform: translate(-50%, -50%);
  z-index: 2;
}
.hotzone.dot::after { border-radius: 50%; inset: -1px; }
.hotzone.row { z-index: 2; }
.hotzone.row::after { border-radius: 10px; }
.hotzone.back { z-index: 3; }

.hotzone:hover, .hotzone:focus-visible { z-index: 8; }
.hotzone:hover::after, .hotzone:focus-visible::after {
  border-color: rgba(255, 255, 255, .9);
  box-shadow: 0 0 0 2px rgba(10, 79, 158, .35), 0 0 14px rgba(66, 165, 255, .55);
}
.hotzone:active::after { border-color: #ffd166; }
.hotzone.focused { z-index: 7; }
.hotzone.focused::after {
  border-color: var(--halo);
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 160, 30, .65), 0 0 0 2px var(--halo); }
  50% { box-shadow: 0 0 0 9px rgba(255, 160, 30, 0), 0 0 0 2px var(--halo); }
}

/* ---------- 蓝色虚线路线：透明命中带 ---------- */
.route-zone {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}
.route-zone polyline { fill: none; stroke-linejoin: round; stroke-linecap: round; }
/* 仅供 animateMotion 引用的路径，绝不可见 */
.route-zone .route-path { fill: none; stroke: none; }
.route-zone .route-target {
  stroke: transparent;
  stroke-width: 13px;
  pointer-events: stroke;
  cursor: pointer;
  vector-effect: non-scaling-stroke;
}
.route-zone .route-target:hover { stroke: rgba(255, 255, 255, .16); }
/* 虚线游走：白色流光沿路线流动，方向与图上的箭头一致 */
.route-zone .route-glow {
  stroke: rgba(255, 255, 255, .98);
  stroke-width: 3.5px;
  stroke-dasharray: 6 20;
  opacity: .82;
  pointer-events: none;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 5px rgba(70, 170, 255, .95));
  animation: routeFlow 11s linear infinite;
}
/* 跟着图上箭头方向沿路线游走的导向箭头 */
.route-zone .route-arrow {
  fill: #0a6fd4;
  stroke: #fff;
  stroke-width: 2.5px;
  stroke-linejoin: round;
  pointer-events: none;
  filter: drop-shadow(0 0 6px rgba(90, 190, 255, 1));
}
/* 编号圆呼吸光圈：一圈光晕由小到大扩散闪耀，18 个点位错峰 */
body.glow .hotzone.dot::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  border: 2px solid rgba(150, 215, 255, .85);
  box-shadow: 0 0 8px 2px rgba(80, 180, 255, .55);
  animation: haloBreath 2.8s ease-out infinite;
  animation-delay: var(--d, 0s);
}
@keyframes haloBreath {
  0% { transform: scale(.78); opacity: .95; }
  55% { opacity: .4; }
  100% { transform: scale(2.15); opacity: 0; }
}
@keyframes routeFlow { to { stroke-dashoffset: -330; } }

/* ---------- 大图查看 / 提示 ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(5, 22, 44, .95);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.lightbox-stage { min-height: 100%; display: flex; align-items: flex-start; justify-content: center; padding: 52px 8px 24px; }
.lightbox-stage img { width: 100%; max-width: 900px; height: auto; border-radius: 8px; box-shadow: 0 12px 40px rgba(0, 0, 0, .5); }
.lightbox-close {
  position: fixed; z-index: 2; top: calc(10px + env(safe-area-inset-top)); right: 12px;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .5); background: rgba(255, 255, 255, .16);
  color: #fff; font-size: 24px; line-height: 1;
}
.toast {
  position: fixed; z-index: 120; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom));
  transform: translate(-50%, 16px);
  background: rgba(9, 40, 78, .94); color: #fff;
  font-size: 12.5px; padding: 10px 16px; border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  max-width: 86vw; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .hotzone.focused::after, body.glow .hotzone.dot::before,
  .route-zone .route-glow { animation: none !important; }
}
