/* ============================================================
   全屏查看器 .gv · 独立样式（2026-10-31 从 style.css 第 15.2 节抽出）
   ------------------------------------------------------------
   为啥抽出来：**官网详情页和员工端条目页共用同一个查看器**
   （assets/js/gallery.js 的 .gv），但两端加载的皮肤不同
   （官网 style.css / 员工端 office.css）—— 样式留在 style.css 里，
   员工端就没有 .gv 的规矩，弹出来是一坨没排版的裸 DOM。

   ⚠️ 只放**查看器**（.gv*）。相册框（.gal*）留在 style.css 第 15.1 节：
      官网上才有相册框，员工端不用。
   ⛔ 别在两端各写一份 —— 这正是抽这个文件的原因。
   ============================================================ */
/* ---------- 15.2 全屏查看器 ----------
   与老灯箱（第 13 节）分开写、互不影响：老灯箱留给 materials.html。
   查看器**不套边框**（用户 2026-10-30 口径）：深色满屏，图 contain 居中。
   ⚠️ [hidden] 必须补 display:none —— 下面的 display:flex 会盖掉 UA 样式。 */
.gv {
  position: fixed; inset: 0; z-index: 320;
  background: #0E2511;
}
.gv[hidden] { display: none; }
.gv-thumbs[hidden] { display: none; }

/* 顶栏：3 / 11 ＋ ✕（浮在图上，不占版式） */
.gv-top {
  position: absolute; top: 0; left: 0; right: 0; height: 56px; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; pointer-events: none;
}
.gv-top > * { pointer-events: auto; }
.gv-count {
  font-family: var(--font-latin, -apple-system, "Segoe UI", sans-serif); font-size: .8125rem; letter-spacing: .08em;
  color: rgba(255, 255, 255, .72); font-variant-numeric: tabular-nums;
}
.gv-close {
  width: 40px; height: 40px; padding: 0; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .08); color: #fff;
  font-size: 1.5rem; line-height: 1; cursor: pointer;
  transition: background var(--dur-fast, .16s) var(--ease, cubic-bezier(.4,0,.2,1));
}
.gv-close:hover { background: rgba(255, 255, 255, .18); }

.gv-stage { position: absolute; inset: 0; }
/* 主图区：**铺满**（用户 2026-10-31 口径「不要上下左右边框，尽量让图片铺满」）。
   只留顶部 56px 给页码 / 关闭 —— 底部不再留缩略图的高度，缩略图直接压在图上。
   ⚠️ 图本身无边框/无圆角；max-* 保证 contain 不变形。 */
.gv-fig {
  position: absolute; inset: 0; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 56px 10px 10px;
}
.gv-img {
  max-width: 100%; max-height: 100%; display: block;
  object-fit: contain; border: 0; border-radius: 0;
  -webkit-user-drag: none; user-select: none;
}
/* [hidden] 会被上面的 display:block 盖掉 —— 铁律，必须补这一条 */
.gv-img[hidden] { display: none !important; }
.gv.is-single .gv-fig { padding: 56px 10px 10px; }

/* ---------- 全景档（2026-10-31）----------
   切到全景项时，这块整屏铺满，里面挂 Pannellum（拖动环视）。
   ⚠️ 它盖在 .gv-fig 之上，但**不挡**顶栏 / 箭头 / 缩略图（那三样 z-index 更高）。 */
.gv-pano { position: absolute; inset: 56px 0 0; z-index: 1; background: #0B1D0E; }
.gv-pano[hidden] { display: none !important; }
.gv-pano-err { position: absolute; inset: 0; display: grid; place-items: center;
  color: rgba(255,255,255,.6); font-size: .875rem; }

/* 箭头：压在图内两侧（截图那颗 ‹ ›） */
.gv-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 4;
  width: 46px; height: 46px; padding: 0 0 3px;
  display: grid; place-items: center;
  border-radius: 50%; border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .1); color: #fff;
  font-size: 1.5rem; line-height: 1; cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background var(--dur-fast, .16s) var(--ease, cubic-bezier(.4,0,.2,1));
}
.gv-nav:hover { background: rgba(255, 255, 255, .22); }
.gv-prev { left: 16px; }
.gv-next { right: 16px; }
.gv.is-single .gv-nav { display: none; }

/* 底部缩略图带（2026-10-31 用户口径）：
     · 压在图上（不再单独占一条）
     · **居中**，**两排**：上排普通照片、下排全景
     · 底下一层渐变遮罩，保证小图在亮画面上也看得清 */
.gv-thumbs {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
  display: flex; flex-direction: column; gap: 6px; align-items: center;
  padding: 34px 14px 12px;
  background: linear-gradient(180deg, rgba(11, 29, 14, 0) 0%, rgba(11, 29, 14, .78) 55%);
  pointer-events: none;                 /* 只有小图自己收事件，遮罩不吃点击 */
}
.gv-thumbs::-webkit-scrollbar { display: none; }
.gv-row {
  display: flex; gap: 8px; align-items: center;
  max-width: 100%; overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
  /* 居中且**溢出时仍能滚到最左**（safe 关键字就是干这个的） */
  justify-content: safe center;
  pointer-events: auto;
}
.gv-row:empty { display: none; }
.gv-row::-webkit-scrollbar { display: none; }
.gv-thumb {
  position: relative; flex: 0 0 auto;
  width: 76px; height: 52px; padding: 0;
  border: 1.5px solid transparent; border-radius: 6px;
  background: rgba(255, 255, 255, .06); cursor: pointer; overflow: hidden;
  opacity: .55; transition: opacity var(--dur-fast, .16s) var(--ease, cubic-bezier(.4,0,.2,1)), border-color var(--dur-fast, .16s) var(--ease, cubic-bezier(.4,0,.2,1));
}
.gv-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gv-thumb:hover { opacity: .85; }
.gv-thumb.is-on { opacity: 1; border-color: var(--accent-on-dark, #9FE3C0); }
/* 全景小图中间那行提示（用户口径：**不做角标**，就中间一行淡淡的字，不用太显眼） */
.gv-thumb-tip {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: 0 4px; text-align: center;
  font-size: 9.5px; line-height: 1.25; color: rgba(255, 255, 255, .92);
  background: rgba(11, 29, 14, .38); letter-spacing: .02em;
}

/* 页内相册框里的全景图：同样只压一行提示（与查看器里同一句话） */
.gal-it { position: relative; }
.gal-pano-tip {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: .8125rem; color: rgba(255, 255, 255, .9); letter-spacing: .04em;
  background: rgba(14, 37, 17, .22); pointer-events: none;
}

@media (max-width: 640px) {
  .gv-top { height: 48px; padding: 0 12px; }
  .gv-close { width: 34px; height: 34px; font-size: 1.25rem; }
  .gv-fig { padding: 48px 6px 6px; }
  .gv-pano { inset: 48px 0 0; }
  .gv-nav { width: 38px; height: 38px; font-size: 1.25rem; }
  .gv-prev { left: 8px; }
  .gv-next { right: 8px; }
  .gv-thumbs { padding: 28px 8px 8px; gap: 5px; }
  .gv-row { gap: 6px; }
  .gv-thumb { width: 60px; height: 42px; }
  .gv-thumb-tip { font-size: 8.5px; }
}
