/* 校园全景导览 — 样式 */
:root {
  --ink: #1a1a1a;
  --red: #c0392b;
  --paper: #f5f2ec;
  --dim: rgba(0, 0, 0, 0.55);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
  background: var(--ink);
  color: #fff;
}

/* ==========================================================
   欢迎页
   调子:深夜纸墨 + 朱砂。只有朱砂出声,其余全靠层次。
   ========================================================== */
.welcome {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2.5rem 1.5rem 1.5rem;
  position: relative;
  overflow: hidden;
  /* 高原夜色:深靛蓝打底,朱砂只在两处发暖光。
     比原来的深褐更透,白字和朱砂键的对比也更清楚。 */
  background:
    radial-gradient(72% 44% at 50% 104%, rgba(196,72,52,0.30) 0%, transparent 68%),
    radial-gradient(86% 52% at 16% 4%,   rgba(140,31,40,0.24) 0%, transparent 62%),
    radial-gradient(130% 90% at 50% 0%,  #1d2739 0%, #141a27 46%, #0a0d14 100%);
}
/* 地平线:一道极淡的雪山剪影,给高原一点交代,不放实景照 */
.welcome::after {
  content: "";
  position: absolute;
  left: -6%; right: -6%; bottom: 0;
  height: 34vh;
  pointer-events: none;
  background:
    linear-gradient(to top, rgba(10,13,20,0.9) 0%, transparent 100%),
    /* 三重折线拼出山脊 */
    conic-gradient(from 148deg at 22% 100%, transparent 0 42%, rgba(126,146,178,0.11) 42% 50%, transparent 50%),
    conic-gradient(from 154deg at 54% 100%, transparent 0 41%, rgba(126,146,178,0.14) 41% 50%, transparent 50%),
    conic-gradient(from 150deg at 84% 100%, transparent 0 43%, rgba(126,146,178,0.09) 43% 50%, transparent 50%);
}
/* 细网格:压住大面积渐变的空,又不抢注意力 */
.welcome__grid {
  position: absolute; inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(150,178,214,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(150,178,214,0.05) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(70% 60% at 50% 45%, #000 0%, transparent 100%);
  -webkit-mask-image: radial-gradient(70% 60% at 50% 45%, #000 0%, transparent 100%);
}
.welcome__card {
  position: relative;
  z-index: 2;              /* 压在山影(::after)之上 */
  max-width: 480px;
  width: 100%;
}
/* 靛蓝底比原来的深褐冷,朱砂要提亮一档才跳得出来。
   只在欢迎页内覆盖,不动全站的 --red。 */
.welcome { --red-lit: #d94f3d; }
.welcome__eyebrow {
  letter-spacing: 0.35em;
  font-size: 0.64rem;
  color: rgba(217,79,61,0.9);
  margin-bottom: 0.9rem;
}
/* 标题分两行:校名当上款(小、偏灰、字距拉开),副题是主角(大、亮) */
.welcome__title {
  line-height: 1.3;
  text-shadow: 0 2px 14px rgba(0,0,0,0.55);
}
.welcome__t1, .welcome__t2 { display: block; }
.welcome__t1 {
  font-size: clamp(0.92rem, 3.9vw, 1.12rem);
  font-weight: 500;
  letter-spacing: 0.3em;
  text-indent: 0.3em;              /* 抵掉末字多出的字距,视觉才居中 */
  color: rgba(255,255,255,0.66);
  margin-bottom: 0.42rem;
}
.welcome__t2 {
  font-size: clamp(1.6rem, 7.6vw, 2.3rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-indent: 0.06em;
  color: #fff;
}
/* 标题下一道短朱砂线,当印章边的界 */
.welcome__title::after {
  content: "";
  display: block;
  width: 46px; height: 2px;
  margin: 0.85rem auto 0;
  background: var(--red-lit, var(--red));
  opacity: 0.9;
}
.welcome__subtitle {
  margin: 0.7rem 0 0;
  color: rgba(196,212,232,0.66);
  font-size: 0.9rem;
}

/* ---------- 导览员打招呼 ---------- */
.welcome__guide {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 1.4rem 0 1.5rem;
  text-align: left;
}
.welcome__pet {
  width: 96px; height: 96px;
  object-fit: contain;
  flex: 0 0 auto;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.55));
  animation: petBob 3.8s ease-in-out infinite;
}
.welcome__hi {
  font-size: 0.84rem;
  line-height: 1.6;
  color: #3a3021;
  background: #fdf3c8;                 /* 跟全景里的便利贴同一张纸 */
  padding: 0.6rem 0.85rem;
  border-radius: 10px 10px 10px 3px;
  box-shadow: 0 3px 12px rgba(0,0,0,0.4);
}

/* ---------- 校区二选 ---------- */
.campusPick {
  display: flex;
  gap: 0.7rem;
  justify-content: center;
}
.campusBtn {
  flex: 1 1 0;
  max-width: 190px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 0.7rem 0.6rem;
  border-radius: 12px;
  text-decoration: none;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s, border-color 0.15s;
}
.campusBtn b { font-size: 1.02rem; font-weight: 600; }
.campusBtn i { font-style: normal; font-size: 0.66rem; opacity: 0.78; }
/* 已开放 */
.campusBtn--on {
  background: linear-gradient(160deg, #d94f3d 0%, #a52a24 100%);
  border: 1px solid rgba(255,150,130,0.35);
  color: #fff;
  box-shadow: 0 5px 20px rgba(180,50,38,0.45), inset 0 1px 0 rgba(255,255,255,0.18);
}
.campusBtn--on:active { transform: scale(0.97); filter: brightness(0.92); }
/* 灰掉的:冷调,跟靛蓝底同族,不抢戏 */
.campusBtn--off {
  background: rgba(150,178,214,0.06);
  border: 1px dashed rgba(150,178,214,0.24);
  color: rgba(190,206,228,0.4);
  cursor: not-allowed;
}
.campusPick__note {
  margin: 0.6rem 0 0;
  font-size: 0.68rem;
  color: rgba(170,190,214,0.4);
}
.welcome__hint {
  margin-top: 1.2rem;
  font-size: 0.74rem;
  color: rgba(170,190,214,0.44);
}

/* ---------- 声明区 ---------- */
.welcome__foot {
  position: relative;
  z-index: 2;              /* 同上,别被山影压住 */
  margin-top: auto;
  padding-top: 1.6rem;
  max-width: 520px;
  width: 100%;
}
.decl {
  border-top: 1px solid rgba(150,178,214,0.14);
  padding-top: 0.85rem;
}
.decl__line {
  font-size: 0.66rem;
  line-height: 1.75;
  color: rgba(178,196,218,0.46);
  margin: 0;
}
.decl__line b {
  color: rgba(214,228,244,0.72);
  font-weight: 600;
}
.decl__line--dim {
  margin-top: 0.35rem;
  color: rgba(170,190,214,0.36);
}
.decl__sign {
  margin: 0.9rem 0 0;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: rgba(217,79,61,0.8);
}

@media (max-width: 380px) {
  .welcome__guide { gap: 0.35rem; }
  .welcome__pet { width: 76px; height: 76px; }
  .welcome__hi { font-size: 0.76rem; padding: 0.5rem 0.7rem; }
  .campusBtn b { font-size: 0.94rem; }
}

/* ---------- 全景舞台 ---------- */
.tour { overflow: hidden; }
#panorama {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  background: #000;
}
.panorama--missing::after {
  content: "该场景全景图待放入 (assets/pano/)。整套交互已就绪。";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  color: rgba(255, 255, 255, 0.7);
  background: repeating-linear-gradient(45deg, #1c1a18, #1c1a18 20px, #211f1c 20px, #211f1c 40px);
}

/* ---------- 顶栏 ---------- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1rem;
  z-index: 20;
  background: linear-gradient(to bottom, rgba(0,0,0,0.55), transparent);
}
.topbar__back, .topbar__map {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.9rem;
}
.topbar__back {
  width: 38px; height: 38px;
  font-size: 1.2rem;
  text-decoration: none;
  display: grid; place-items: center;
}
.topbar__map { padding: 0.5rem 1rem; margin-left: auto; }
.topbar__name {
  font-size: 1.05rem;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

/* ---------- 底部场景胶囊 ---------- */
.scenebar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  display: flex;
  gap: 0.5rem;
  padding: 1rem;
  z-index: 20;
  background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
  /* ⚠ 不能开 overflow —— 站点列表要向上弹出,一开就被裁掉。
     折叠后只剩四枚区名键,横向放得下,不需要滚动。 */
  flex-wrap: wrap;
  scrollbar-width: none;
}
.scenebar::-webkit-scrollbar { display: none; }
/* ---------- 功能区:可折叠 ----------
   默认只露四枚区名键,点开才展出站点。19 个站平铺会滚出屏幕,
   折叠后一眼看得完;当前所在区由 JS 自动展开。 */
.scenebar__group {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
/* 区名键 */
.scenebar__zone {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.26);
  color: rgba(255,255,255,0.9);
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  font-size: 0.84rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}
.scenebar__zone:hover { background: rgba(0,0,0,0.68); }
.scenebar__caret {
  font-style: normal;
  font-size: 0.9rem;
  line-height: 1;
  opacity: 0.7;
  transition: transform 0.18s;
}
.scenebar__group.is-open .scenebar__zone {
  background: rgba(140,31,40,0.72);
  border-color: rgba(192,57,43,0.9);
}
/* 收起时箭头朝上(提示往上弹),展开后转回朝下(提示可收) */
.scenebar__caret { transform: rotate(-90deg); }
.scenebar__group.is-open .scenebar__caret { transform: rotate(90deg); }

/* 站点列表:从区名键正上方竖着弹出,不再向右挤 */
.scenebar__group { position: relative; }
.scenebar__items {
  position: absolute;
  left: 0; bottom: calc(100% + 8px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  max-height: 46vh;
  overflow-y: auto;
  scrollbar-width: none;
  /* 成组托底,免得竖排胶囊散在画面上 */
  padding: 0.5rem;
  border-radius: 12px;
  background: rgba(12,10,9,0.72);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 6px 20px rgba(0,0,0,0.45);
  /* 收起态:缩到底边、淡出、不可点 */
  transform: scaleY(0.6) translateY(12px);
  transform-origin: left bottom;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s cubic-bezier(.3,1.2,.5,1), opacity 0.16s;
}
.scenebar__items::-webkit-scrollbar { display: none; }
.scenebar__group.is-open .scenebar__items {
  transform: none;
  opacity: 1;
  pointer-events: auto;
}
/* 弹出层里的胶囊要各自贴左、宽度自适应 */
.scenebar__items .scenebar__item { flex: 0 0 auto; }
.scenebar__item {
  flex: 0 0 auto;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.scenebar__item.is-active {
  background: var(--red);
  border-color: var(--red);
}

/* ---------- 热点 ----------
   两类分明:走过去的(朱砂圆环+箭头,常带文字) / 看说明的(小小的 i,不抢戏) */
.hs__dot {
  width: 42px; height: 42px;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform .16s;
}
/* ① 可走过去:双层圆环 + 中间箭头,像地面上的一枚落脚点
   ⚠ Pannellum 把 cssClass 和 tooltip 回调作用在同一个 div 上,
   所以这里必须是复合选择器(.a.b),写成后代(.a .b)会全部失效。 */
.hs--scene.hs__dot {
  background: radial-gradient(circle,
              rgba(140,31,40,0.96) 0 44%,
              rgba(255,255,255,0.92) 45% 58%,
              rgba(140,31,40,0.34) 59% 100%);
  box-shadow: 0 2px 10px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.25);
  animation: hsBreath 2.6s ease-in-out infinite;
}
.hs--scene.hs__dot::before {
  content: "";
  width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 8px solid #fff;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.5));
  transform: translateY(-1px);
}
/* ② 信息点:明显收小,半透明的 i */
.hs--info.hs__dot {
  width: 26px; height: 26px;
  background: rgba(28,32,40,0.62);
  border: 2px solid rgba(255,255,255,0.8);
  box-shadow: 0 1px 6px rgba(0,0,0,0.35);
  animation: none;
}
.hs--info.hs__dot::before {
  content: "i";
  font: italic 700 14px/1 Georgia, serif;
  color: #fff;
}
.hs__dot:hover { transform: scale(1.16); }
@keyframes hsBreath {
  0%,100% { box-shadow: 0 2px 10px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.25),
                        0 0 0 5px rgba(140,31,40,0.22); }
  50%     { box-shadow: 0 2px 10px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.25),
                        0 0 0 13px rgba(140,31,40,0.02); }
}
/* 文字标签:场景点常显(告诉新生这条路通哪),信息点只在悬停时显 */
.hs__label {
  position: absolute;
  left: 50%; top: -30px;
  transform: translateX(-50%);
  white-space: nowrap;
  background: rgba(20,18,16,0.82);
  color: #fff;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  pointer-events: none;
  backdrop-filter: blur(3px);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.hs--info .hs__label {
  opacity: 0; transition: opacity .15s;
  top: -26px; font-size: 0.74rem; max-width: 62vw;
  white-space: normal; text-align: center;
}
.hs--info:hover .hs__label { opacity: 1; }

/* ---------- 校准模式:标签上标出目标 + 独立跳转键 ---------- */
/* 标签整体本是 pointer-events:none,校准时要能点到「进」,得单独放开 */
.is-calib .hs__label { pointer-events: auto; }
.hs__to { font-style: normal; opacity: 0.66; font-size: 0.72rem; }
.hs__ok { color: #7ee08a; font-weight: 700; }
.hs__go {
  margin-left: 7px;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.4);
  color: #fff;
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 0.72rem;
  cursor: pointer;
  vertical-align: middle;
}
.hs__go:hover { background: var(--red); border-color: var(--red); }
/* 非校准模式不出现 */
.hs__go, .hs__to, .hs__ok { display: none; }
.is-calib .hs__go, .is-calib .hs__to, .is-calib .hs__ok { display: inline; }
.is-calib .hs__go { display: inline-block; }

/* 校准模式下「导出」按钮上移,避开右下角的小地图 */
.is-calib .calibExport { bottom: 178px; }
/* 校准时不走动线,侧边翻站按钮收起来免得误触 */
.is-calib .stepBtn { display: none; }

/* ==========================================================
   导览层:指北针 / 小地图 / 上下站 / 桌宠
   各占一角,互不遮挡;底部留出胶囊条的高度。
   ========================================================== */

/* ---------- 顶栏站数 ---------- */
.topbar__count {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.62);
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0,0,0,0.32);
  white-space: nowrap;
  /* 顶栏「地图」按钮已删,右侧留白给右上角小地图,计数别贴上去 */
  margin-right: 210px;
}
@media (max-width: 480px) {
  .topbar__count { margin-right: 132px; font-size: 0.66rem; }
}

/* ---------- 指北针(左上,顶栏下方;右上让给小地图)---------- */
.compass {
  position: fixed;
  top: 64px; left: 12px;
  width: 76px; height: 76px;
  z-index: 18;
  pointer-events: none;
  filter: drop-shadow(0 3px 8px rgba(0,0,0,0.55));
}
.compass__dial {
  width: 100%; height: 100%;
  transition: transform 0.06s linear;
}
.compass__ring {
  fill: rgba(16,14,12,0.82);
  stroke: rgba(255,255,255,0.6);
  stroke-width: 2;
}
.compass__c {
  font-size: 12px;
  font-weight: 700;
  fill: #fff;
  text-anchor: middle;
  dominant-baseline: middle;
}
.compass__nd { fill: var(--red); }          /* 指北:朱砂 */
.compass__sd { fill: rgba(255,255,255,0.72); }
/* 只是推算值的场景(没实测过正北)略微压暗提示,但仍要看得清 */
.compass.is-unknown { opacity: 0.62; }

/* ---------- 当前位置小地图(左上,顶栏下方,与右上指北针对称)----------
   圆形裁切:底图是 2400x2700 的竖图,用 cover 填满圆面,
   定位点按百分比落在**未裁切**的图上,所以圆内看到的是中心区域。 */
.minimap {
  position: fixed;
  top: 3px; right: 3px;          /* 紧贴右上角 */
  width: 196px; height: 196px;
  z-index: 22;                   /* 压在顶栏之上,否则会被顶栏渐变盖住 */
  border: 2px solid rgba(255,255,255,0.45);
  border-radius: 50%;
  /* contain 而非 cover:整张图完整装进圆内,定位点按百分比才落得准 */
  background: rgba(247,244,238,0.92) center/contain no-repeat;
  background-image: url("../assets/map.png");
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.45);
}
.minimap:hover { border-color: var(--red); }
.minimap__dot {
  position: absolute;
  width: 9px; height: 9px;
  margin: -4.5px 0 0 -4.5px;
  border-radius: 50%;
  background: var(--red);
  border: 1.5px solid #fff;
  box-shadow: 0 0 0 3px rgba(192,57,43,0.3);
  animation: dotpulse 1.8s infinite;
}
.minimap__tip { display: none; }        /* 圆形盘面放不下文字,靠 title 兜底 */

/* ---------- 上一站 / 下一站(左右竖中)---------- */
.stepBtn {
  position: fixed;
  top: 50%; transform: translateY(-50%);
  width: 34px; height: 56px;
  z-index: 18;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}
.stepBtn--prev { left: 0; border-radius: 0 999px 999px 0; border-left: none; }
.stepBtn--next { right: 0; border-radius: 999px 0 0 999px; border-right: none; }
.stepBtn:hover:not(:disabled) { background: var(--red); border-color: var(--red); }
.stepBtn:disabled { opacity: 0.2; cursor: default; }

/* ---------- 桌宠 / 便利贴(左下)---------- */
.pet {
  position: fixed;
  left: 8px; bottom: 84px;       /* 让开底部胶囊条 */
  z-index: 19;
  display: flex;
  align-items: center;           /* 气泡与角色中部齐平,不贴脚 */
  gap: 4px;
}
/* 角色是透明底的立绘,不裁圆、不加底色,直接站在画面上 */
.pet__body {
  flex: 0 0 auto;
  position: relative;
  width: 78px; height: 78px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  animation: petBob 3.4s ease-in-out infinite;
}
.pet__body:active { transform: scale(0.94); }
.pet__img {
  width: 100%; height: 100%;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.5));
  pointer-events: none;
}
/* 校准模式下「这页写过备注」的角标 */
.pet__face {
  position: absolute;
  right: -2px; bottom: 2px;
  font-size: 0.7rem;
  line-height: 1;
  color: #fff;
  background: var(--red);
  border-radius: 999px;
  padding: 2px 5px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.pet__face:empty { display: none; }
@keyframes petBob {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-4px); }
}
/* 便利贴气泡:淡黄纸、右下角微微翘起 */
.pet__note {
  /* 最长一句 58 字,窄了会堆成很高一叠,所以给到 66vw */
  max-width: min(66vw, 340px);
  background: #fdf3c8;
  color: #3a3021;
  border-radius: 10px 10px 10px 3px;
  padding: 9px 12px;
  font-size: 0.8rem;
  line-height: 1.5;
  box-shadow: 0 3px 12px rgba(0,0,0,0.35);
  transform-origin: left center;
  transform: scale(0.7);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.18s cubic-bezier(.3,1.4,.5,1), opacity 0.18s;
}
.pet__note.is-on { transform: scale(1); opacity: 1; pointer-events: auto; }
.pet__input { display: none; }
/* 校准模式:气泡里换成输入框 */
.is-calib .pet__text { display: none; }
.is-calib .pet__input {
  display: block;
  width: min(52vw, 270px);
  background: transparent;
  border: none;
  border-bottom: 1px dashed rgba(58,48,33,0.4);
  color: #3a3021;
  font: 0.8rem/1.5 -apple-system, "Microsoft YaHei", sans-serif;
  outline: none;
  padding: 2px 0;
}
.is-calib .pet__input::placeholder { color: rgba(58,48,33,0.42); }

/* 窄屏:组件缩一档,免得糊在一起 */
@media (max-width: 480px) {
  .compass { width: 60px; height: 60px; top: 60px; }
  .minimap { width: 132px; height: 132px; top: 2px; right: 2px; }
  .pet__body { width: 62px; height: 62px; }
  .pet__note { max-width: 46vw; font-size: 0.74rem; }
  .stepBtn { width: 28px; height: 46px; font-size: 1.2rem; }
}

/* ---------- 地图浮层 ---------- */
[hidden] { display: none !important; }
.mapModal {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.82);
  display: grid; place-items: center;
  z-index: 40; padding: 2vh 2vw;
}
.mapModal__inner {
  background: var(--paper);
  color: var(--ink);
  border-radius: 16px;
  padding: 1rem 1.2rem;
  width: 96vw; max-width: 900px;
  height: 96vh;
  display: flex; flex-direction: column;
  position: relative;
}
.mapModal__title { margin-bottom: 0.3rem; font-size: 1.1rem; }
.mapModal__hint { margin: 0 0 0.8rem; font-size: 0.78rem; color: #888; line-height: 1.4; }
/* 存图按钮:放在标题行右侧,关闭键左边 */
.mapDl {
  position: absolute;
  top: 0.7rem; right: 2.6rem;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.34rem 0.9rem;
  font-size: 0.76rem;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.mapDl:hover { background: #a83224; }
.mapDl:active { transform: scale(0.96); }

.mapModal__close {
  position: absolute; top: 0.6rem; right: 0.8rem;
  background: none; border: none;
  font-size: 1.6rem; cursor: pointer; color: var(--ink);
}
/* 缩放视口:裁剪容器,占满标题下方剩余空间 */
.mapViewport {
  position: relative;
  flex: 1;
  overflow: hidden;
  border-radius: 10px;
  background: #f7f4ee;   /* 与 SVG 纸色一致,缩放时不露出异色边 */
  touch-action: none;   /* 让双指手势归我们处理 */
  cursor: grab;
}
.mapCanvas {
  position: absolute;
  top: 0; left: 0;
  /* 锁定图片比例,高度占满视口,宽度按比例;点用百分比定位到它上面就精准 */
  height: 100%;
  aspect-ratio: 2400 / 2700;
  max-width: 100%;
  background-size: 100% 100%;
  background-repeat: no-repeat;
}
.mapCanvas--img { background-color: transparent; }

/* SVG 校园地图:按 2400x2700 的真实比例撑满视口高度。
   ⚠ 别把 aspect-ratio 设成 auto —— 基类的 max-width:100% 会先掐死宽度,
   svg 再按被掐过的宽度算高,整张图就缩成左上角一小块。 */
.mapCanvas--svg {
  background: #f7f4ee;
  overflow: visible;
  aspect-ratio: 2400 / 2700;
  height: 100%;
  width: auto;
  max-width: none;
}
.mapCanvas--svg svg { width: 100%; height: 100%; display: block; }

/* ---------- 矢量底图:整栋楼可点,不再画定位点 ---------- */
.blk--live { cursor: pointer; }
.blk--live rect, .blk--live circle, .blk--live polygon { transition: filter .14s; }
/* 悬停:整块泛朱砂 */
.blk--live:hover rect { filter: brightness(0.955) saturate(1.15); }
.blk--live:hover > rect:first-of-type { stroke: var(--red); stroke-width: 5; }
/* 没全景的楼:点了给提示,但不作视觉强调 */
.blk--soon { cursor: pointer; }
.blk--soon:hover rect { filter: brightness(0.97); }

/* 路口环:比建筑轻,悬停才明显 */
.blk--via { cursor: pointer; }
.blk--via circle { transition: r .14s, fill-opacity .14s; }
.blk--via:hover circle:first-of-type { fill-opacity: 0.42; }

/* 当前所在:朱砂描边 + 呼吸 */
.blk.is-active > rect:first-of-type,
.blk.is-active > circle:first-of-type {
  stroke: var(--red) !important;
  stroke-width: 6 !important;
}
.blk.is-active { animation: blkpulse 1.9s ease-in-out infinite; }
@keyframes blkpulse { 0%,100% { opacity: 1 } 50% { opacity: 0.62 } }

/* 触屏第一下先亮出来 */
.blk.is-peek > rect:first-of-type,
.blk.is-peek > circle:first-of-type {
  stroke: var(--red) !important;
  stroke-width: 6 !important;
}
/* 地图定位点(原「蓝点」)整套已删除:底图本就印着建筑名,叠一堆点又密又乱;
   讲解归桌宠,跳转归 SVG 建筑块。dotpulse 保留 —— 左上角小地图的定位点在用。 */
@keyframes dotpulse {
  0%,100% { box-shadow: 0 0 0 4px rgba(192,57,43,0.26), 0 1px 4px rgba(0,0,0,0.3); }
  50%     { box-shadow: 0 0 0 9px rgba(192,57,43,0.08), 0 1px 4px rgba(0,0,0,0.3); }
}

/* ---------- 校准模式(默认隐藏,body.is-calib 才显示)---------- */
.calib, .calibReadout { display: none; }
.is-calib .calib {
  position: fixed; inset: 0; z-index: 25; pointer-events: none;
  display: block;
}
.is-calib .calib__v {
  position: absolute; left: 50%; top: 0; bottom: 0;
  width: 2px; margin-left: -1px; background: rgba(255,60,60,0.8);
}
.is-calib .calib__h {
  position: absolute; top: 50%; left: 0; right: 0;
  height: 2px; margin-top: -1px; background: rgba(255,60,60,0.8);
}
.is-calib .calibReadout {
  display: block;
  position: fixed; left: 50%; bottom: 182px; transform: translateX(-50%);
  z-index: 26; background: rgba(0,0,0,0.8); color: #ffcf3f;
  font: 13px/1.5 monospace; padding: 8px 16px; border-radius: 8px;
  max-width: 94vw; text-align: center; pointer-events: none;
}
/* 定位成功的浮动提示 */
.calibToast { display: none; }
.is-calib .calibToast {
  display: block;
  position: fixed; left: 50%; top: 72px; transform: translateX(-50%);
  z-index: 28; background: rgba(30,140,60,0.95); color: #fff;
  font: 14px/1.5 -apple-system, "Microsoft YaHei", sans-serif;
  padding: 9px 18px; border-radius: 999px; pointer-events: none;
  opacity: 0; transition: opacity .18s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.35);
}
.is-calib .calibToast.is-on { opacity: 1; }
/* 导出按钮 */
.calibExport { display: none; }
.is-calib .calibExport {
  display: block;
  position: fixed; right: 14px; bottom: 84px; z-index: 28;
  background: var(--red); color: #fff; border: none;
  padding: 10px 18px; border-radius: 999px; cursor: pointer;
  font: 14px/1 -apple-system, "Microsoft YaHei", sans-serif;
  box-shadow: 0 3px 12px rgba(0,0,0,0.4);
}
.calibOut { display: none; }
.is-calib .calibOut[hidden] { display: none; }
.is-calib .calibOut {
  display: block;
  position: fixed; left: 50%; top: 50%; transform: translate(-50%,-50%);
  z-index: 32; width: min(92vw, 620px); height: 46vh;
  background: #14120f; color: #d6f5c8; border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px; padding: 14px; font: 12px/1.6 monospace;
  resize: none;
}

/* ---------- 信息卡 ---------- */
.infoCard {
  position: fixed;
  left: 50%; bottom: 90px;
  transform: translateX(-50%);
  z-index: 30;
  width: min(90%, 420px);
  background: rgba(20, 18, 16, 0.92);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 14px;
  padding: 1.1rem 1.2rem;
  backdrop-filter: blur(6px);
}
.infoCard__text { line-height: 1.6; margin-bottom: 0.8rem; }
.infoCard__close {
  background: var(--red);
  color: #fff; border: none;
  padding: 0.5rem 1.2rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.9rem;
}
