/* 图片、PDF 当前页弹框查看（10-19，viewer.js）。看图用深底，和页面主题无关 */
.vw { --vw-bg: oklch(0.14 0.01 250 / 0.55); --vw-bar: oklch(0.2 0.01 250 / 0.92); --vw-fg: oklch(0.96 0.005 250); --vw-mute: oklch(0.75 0.01 250); --vw-line: oklch(1 0 0 / 0.14);
  position: fixed; inset: 0; z-index: 1000; display: none; flex-direction: column; background: var(--vw-bg); color: var(--vw-fg);
  font: 14px/1.4 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; }
.vw.on { display: flex; }
/* 电脑上是居中的弹出框，后面半透明蒙版（10-19 用户），点框外关掉；手机上铺满 */
.vw-box { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; background: oklch(0.17 0.01 250 / 0.97); }
@media (min-width: 721px) {
  .vw { align-items: center; justify-content: center; padding: 3vh 3vw; cursor: zoom-out; }
  .vw-box { flex: none; width: min(1280px, 100%); height: min(92vh, 100%); border-radius: 14px; overflow: hidden; cursor: default;
    box-shadow: 0 24px 70px oklch(0.1 0.01 250 / 0.5), 0 0 0 1px oklch(1 0 0 / 0.08); }
}
html.vw-lock, html.vw-lock body { overflow: hidden; }
.vw-top { display: flex; align-items: center; gap: 6px; padding: 8px 10px; padding-top: max(8px, env(safe-area-inset-top)); background: var(--vw-bar); border-bottom: 1px solid var(--vw-line); flex: none; }
.vw-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.vw-n { color: var(--vw-mute); font-variant-numeric: tabular-nums; white-space: nowrap; }
.vw-g { flex: 1; }
.vw-b { appearance: none; border: 1px solid var(--vw-line); background: transparent; color: var(--vw-fg); border-radius: 8px; padding: 0 10px; min-width: 36px; height: 34px;
  font: inherit; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; }
.vw-b:hover { background: oklch(1 0 0 / 0.08); }
.vw-b:focus-visible, .vw-nav:focus-visible { outline: 2px solid oklch(0.8 0.12 85); outline-offset: 1px; }
.vw-b[hidden], .vw-nav[hidden] { display: none; }
.vw-x { font-size: 16px; }
/* 下载后的一句提示（U-312）：浮在图片下方，不挡按钮 */
.vw-tip { position: absolute; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 3; width: max-content; max-width: calc(100% - 32px); box-sizing: border-box;
  padding: 9px 14px; border-radius: 10px; background: oklch(0.24 0.01 250 / 0.94); color: var(--vw-fg); box-shadow: 0 6px 20px oklch(0 0 0 / 0.35);
  font-size: 14px; text-align: center; opacity: 0; pointer-events: none; transition: opacity .15s ease-out; }
.vw-tip.on { opacity: 1; }
.vw-st { position: relative; flex: 1; min-height: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; touch-action: none; user-select: none; }
.vw-st > img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform .15s ease-out; cursor: zoom-in; transform-origin: center; }
.vw-st > img.zoomed { cursor: grab; }
.vw-st > video { max-width: 100%; max-height: 100%; }
.vw-st.vw-page { background: oklch(0.97 0.003 250); }
.vw-st > iframe { border: 0; width: 100%; height: 100%; background: oklch(0.98 0.003 250); }
.vw-st.vw-pdf { overflow: auto; align-items: flex-start; touch-action: pan-x pan-y pinch-zoom; user-select: auto; }
.vw-pages { width: 100%; margin: 0 auto; padding: 12px 12px 40px; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.vw-pages img { width: 100%; max-width: calc(980px * var(--z, 1)); height: auto; background: oklch(0.99 0 0); box-shadow: 0 2px 10px oklch(0 0 0 / 0.35); }
.vw-pg { color: var(--vw-mute); font-size: 12px; margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.vw-msg { color: var(--vw-mute); }
.vw-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 64px; border: 0; border-radius: 10px; background: oklch(0.2 0.01 250 / 0.6); color: var(--vw-fg);
  font-size: 30px; line-height: 1; cursor: pointer; z-index: 2; }
.vw-p { left: 10px; } .vw-nx { right: 10px; }
.vw-nav:hover { background: oklch(0.3 0.01 250 / 0.8); }
@media (pointer: coarse), (max-width: 600px) {
  .vw-b[data-a="in"], .vw-b[data-a="out"], .vw-b[data-a="fit"] { display: none; } /* 手机上双指缩放 */
  .vw-nav { width: 36px; height: 52px; font-size: 26px; }
  .vw-p { left: 4px; } .vw-nx { right: 4px; }
}
