/* ============================================================
   在线查看作品集 —— 只在 portfolio.html 里引。
   PDF 每一页本来就是一整张 JPEG，这里直接把原图取出来竖排，
   不引 PDF 阅读器：手机上也能看，按需加载，画质零损失。
   ============================================================ */

.pv-head { padding-top: calc(46px + var(--u10)); padding-bottom: var(--u6); }
.pv-head .t-2 { margin-top: var(--u3); }
.pv-head .p-s { margin-top: var(--u2); }

.pv { padding: 0 var(--gut) var(--u16); }

/* 分段抬头：和首页 .head .bar 同一个写法 */
.pv-sec {
  max-width: 1280px; margin: var(--u12) auto var(--u4);
  display: flex; align-items: center; gap: var(--u3);
  padding-bottom: var(--u2); border-bottom: 1px solid var(--ink);
  scroll-margin-top: 62px;
}
.pv-sec:first-child { margin-top: 0; }
.pv-sec .fill { flex: 1; height: 1px; background: var(--rule); }
.pv-sec b { font-family: var(--display); font-weight: 400; font-size: 1.05rem; letter-spacing: -.01em; }

.pg { max-width: 1280px; margin: 0 auto; scroll-margin-top: 62px; }
.pg + .pg { margin-top: var(--u5); }
.pg-cap { display: flex; justify-content: space-between; align-items: baseline; gap: var(--u2); padding-bottom: 8px; }
.pg-cap .n { color: var(--ink); }
.pg-sheet {
  position: relative; overflow: hidden; aspect-ratio: 16 / 9;
  border: 1px solid var(--rule); background: var(--w-2);
}
.pg-sheet img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* 目录页（第 4 页）上的四行做成热区 —— 原稿上写着「点击可快速跳转到指定页面」 */
.pg-sheet .hot {
  position: absolute; left: 16%; width: 68%; height: 12%; z-index: 2;
  border: 1px solid transparent; transition: border-color .25s, background-color .25s;
}
.pg-sheet .hot:hover, .pg-sheet .hot:focus-visible {
  border-color: var(--pen-1); background: rgba(27,59,255,.05); outline: none;
}

/* ---- 右下角：快捷导览 ---- */
.qn-btn {
  position: fixed; right: var(--gut); bottom: 20px; z-index: 8900;
  display: inline-flex; align-items: center; gap: 12px;
  padding: 11px 15px; background: var(--w);
  border: 1px solid var(--ink); border-radius: 2px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; color: var(--ink);
  box-shadow: 0 8px 22px -12px rgba(17,17,20,.4);
  transition: background .25s, color .25s;
}
.qn-btn .no { color: var(--pen-1); transition: color .25s; }
.qn-btn:hover, .qn-btn[aria-expanded="true"] { background: var(--ink); color: var(--w); }
.qn-btn:hover .no, .qn-btn[aria-expanded="true"] .no { color: var(--pen-4); }

.qn {
  position: fixed; right: var(--gut); bottom: 68px; z-index: 8900;
  width: min(360px, calc(100vw - 2 * var(--gut)));
  max-height: min(72vh, 680px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--w); border: 1px solid var(--ink); border-radius: 2px;
  box-shadow: 0 24px 48px -24px rgba(17,17,20,.45);
  display: none;
}
.qn.open { display: block; animation: qnIn .32s var(--snap); }
@keyframes qnIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.qn-hd {
  position: sticky; top: 0; z-index: 1; background: var(--w);
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; border-bottom: 1px solid var(--ink);
}
.qn-hd button { font-family: var(--mono); font-size: 11px; color: var(--ink-3); padding: 2px 4px; }
.qn-hd button:hover { color: var(--pen-2); }

.qn-sec { padding: 14px 16px 4px; }
.qn-sec + .qn-sec { border-top: 1px solid var(--rule); }
.qn-sec > a {
  display: flex; align-items: center; gap: 10px; margin-bottom: 6px;
}
.qn-sec > a b { font-family: var(--display); font-weight: 500; font-size: .98rem; letter-spacing: -.01em; }
.qn-sec > a .lbl { margin-left: auto; }
.qn-sec > a:hover b { color: var(--pen-1); }
.qn ol { list-style: none; }
.qn li a {
  display: grid; grid-template-columns: 2.4em 1fr; gap: 8px; align-items: baseline;
  padding: 7px 0; border-top: 1px solid var(--rule-2);
  font-size: .86rem; line-height: 1.5; color: var(--ink-2);
}
.qn li a .n { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); }
.qn li a:hover { color: var(--ink); }
.qn li a:hover .n { color: var(--pen-2); }
.qn li a[aria-current] { color: var(--pen-1); }
.qn li a[aria-current] .n { color: var(--pen-1); }

@media (max-width: 600px) {
  .pv-sec { margin-top: var(--u8); }
  .pg-cap .sec { display: none; }
  .qn { bottom: 64px; max-height: 66vh; }
}
