
/* ================= v7 笔记/图文笔记详情页 =================
   版式：左右两栏卡片 —— 左图集（Swiper 轮播，宽度随首图比例）、右笔记（局部滚动）。
   电脑端整体不超出屏幕（shell 高度锁定视口）；iframe 嵌入（列表页弹窗）时隐藏框架元素。
   配色与组件对齐 v7 设计体系（--brand / --purple / Space Grotesk）。 */

:root{--nav-h:64px}

/* ---- 页面舞台：整体不超屏 ---- */
.ntd-page{padding:calc(var(--nav-h) + 26px) var(--gutter) 44px}
.ntd-shell{position:relative;z-index:1;max-width:1280px;margin:0 auto;
  display:flex;align-items:stretch;
  height:calc(100vh - var(--nav-h) - 70px);min-height:520px;max-height:880px;
  background:#fff;border:1px solid var(--line);border-radius:24px;overflow:hidden;
  box-shadow:0 1px 3px rgba(80,60,140,.05),0 24px 60px -30px rgba(60,44,110,.18)}

/* iframe 嵌入（列表页弹窗）：占满弹窗，撤掉圆角描边 */
body.in-iframe .ntd-page{padding:0}
body.in-iframe .ntd-shell{height:100vh;min-height:0;max-height:none;border-radius:0;border:0;box-shadow:none}

/* ---- 左：图集 ---- */
.ngal{position:relative;flex:none;height:100%;margin:0;background:#1A1820;overflow:hidden;
  width:52%} /* 兜底宽度，JS 按首图比例精调 */
.ngal .swiper,.ngal .swiper-wrapper{height:100%}
.ngal .swiper-slide{height:100%;display:flex;align-items:center;justify-content:center}
.ngal img{display:block;width:100%;height:100%;object-fit:cover;user-select:none}
/* 未启用 Swiper（单图）时 swiper 容器退化为普通块 */
.ngal:not(.has-swiper) .swiper{display:contents}
/* 单图浅底 */
.ngal.is-solo{background:var(--bg-2)}

/* 计数胶囊 */
.ngal-count{position:absolute;top:14px;right:14px;z-index:3;
  font-family:var(--font-display);font-size:12.5px;font-weight:600;
  color:#fff;background:rgba(19,21,25,.5);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);
  border-radius:999px;padding:4px 11px;letter-spacing:.04em;
  font-variant-numeric:tabular-nums;pointer-events:none}
/* 切换箭头：桌面 hover 出现 */
.ngv-nav{position:absolute;top:50%;transform:translateY(-50%);z-index:3;
  width:38px;height:38px;border-radius:50%;border:0;padding:0;
  display:flex;align-items:center;justify-content:center;color:#fff;cursor:pointer;
  background:rgba(19,21,25,.42);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);
  opacity:0;transition:opacity .3s var(--ease),background .2s}
.ngal:hover .ngv-nav,.ngal:focus-within .ngv-nav{opacity:1}
.ngv-nav:hover{background:rgba(19,21,25,.62)}
.ngv-nav svg{width:17px;height:17px}
.ngv-prev{left:14px}
.ngv-next{right:14px}
/* 圆点指示器 */
.ngal-dots{position:absolute;left:0;right:0;bottom:14px;z-index:3;
  display:flex;justify-content:center;gap:8px;pointer-events:none}
.ngal-dots .swiper-pagination-bullet{width:7px;height:7px;margin:0!important;
  border-radius:99px;cursor:pointer;pointer-events:auto;
  background:rgba(255,255,255,.44);opacity:1;
  transition:width .3s var(--ease),background .3s var(--ease)}
.ngal-dots .swiper-pagination-bullet.on,
.ngal-dots .swiper-pagination-bullet-active{width:20px;background:#fff}
.ngv-nav:focus-visible,.ngal-dots button:focus-visible{outline:2px solid #fff;outline-offset:2px}
/* 单图：轮播 UI 全部隐藏 */
.ngal:not(.has-swiper) .ngv-nav,
.ngal:not(.has-swiper) .ngal-dots,
.ngal:not(.has-swiper) .ngal-count{display:none}

/* ---- 右：笔记（局部滚动） ---- */
.npane{flex:1;min-width:0;height:100%;overflow-y:auto;overscroll-behavior:contain;
  scrollbar-width:thin;scrollbar-color:#D9D4E6 transparent}
.npane::-webkit-scrollbar{width:6px}
.npane::-webkit-scrollbar-thumb{background:#D9D4E6;border-radius:99px}
.npane::-webkit-scrollbar-track{background:transparent}
.npane-in{padding:clamp(24px,2.6vw,36px) clamp(24px,3vw,42px) clamp(30px,3vw,44px)}

/* ---- 位置导航 ---- */
.crumb{display:flex;align-items:center;flex-wrap:wrap;gap:8px;font-size:14px;color:var(--ink-4)}
.crumb a{color:var(--ink-4);transition:color .22s var(--ease)}
.crumb a:hover{color:var(--brand-h)}
.crumb i{font-style:normal;color:#DAD7E4}

/* 分类胶囊 */
.ntopic{display:inline-flex;align-items:center;gap:7px;margin-top:16px;
  font-size:14px;font-weight:600;letter-spacing:.02em;
  color:var(--brand-h);background:#FFF3E0;
  border:1px solid rgba(255,153,0,.28);border-radius:999px;padding:5px 14px}
.ntopic::before{content:"";width:6px;height:6px;border-radius:50%;background:var(--brand)}

/* ---- 标题 / 导语 / 作者日期 ---- */
.nhead{margin-top:clamp(16px,2vw,22px)}
.nhead h1{margin:0;font-size:clamp(22px,2.2vw,28px);line-height:1.36;
  letter-spacing:-.01em;font-weight:700;color:var(--ink);
  font-family:var(--font-display)}
.nlede{margin:13px 0 0;font-size:15.5px;line-height:1.84;color:var(--ink-3)}
.nmeta{display:flex;align-items:center;flex-wrap:wrap;gap:10px 12px;margin-top:16px;
  font-size:14px;color:var(--ink-4);font-variant-numeric:tabular-nums}
.nmeta .who{color:var(--ink-2);font-weight:600}
.nmeta .dot{width:3px;height:3px;border-radius:50%;background:#DAD7E4;flex:none}

/* 正文排版：与文章详情同一套 prose（含优化过的列表样式） */
.prose{margin-top:clamp(18px,2.2vw,24px);font-size:15.5px;line-height:1.9;color:var(--ink-2);overflow-wrap:break-word}
.prose>p{margin:0 0 22px}
.prose h2{position:relative;margin:clamp(30px,3.2vw,40px) 0 16px;padding-left:18px;
  font-size:21px;line-height:1.44;letter-spacing:-.01em;font-weight:700;color:var(--ink);
  font-family:var(--font-display)}
.prose h2::before{content:"";position:absolute;left:0;top:.32em;width:4px;height:1.04em;border-radius:2px;
  background:linear-gradient(180deg,var(--brand),var(--brand-h))}
.prose h2:first-child{margin-top:0}
.prose h3{margin:26px 0 13px;font-size:17px;line-height:1.52;font-weight:700;color:var(--ink);
  font-family:var(--font-display)}
.prose strong{font-weight:700;color:var(--ink)}
.prose em{font-style:normal;color:var(--ink);font-weight:600}
.prose a{color:var(--brand-h);text-decoration:underline;text-underline-offset:3px}
.prose a:hover{color:var(--brand)}
.prose ul,.prose ol{list-style:none;margin:0 0 22px;display:flex;flex-direction:column;gap:11px}
.prose ul>li{position:relative;padding-left:24px;line-height:1.86}
.prose ul>li::before{content:"";position:absolute;left:2px;top:.52em;width:8px;height:8px;border-radius:50%;
  background:linear-gradient(150deg,#FFA41C,var(--brand-h));
  box-shadow:0 0 0 4px rgba(255,153,0,.10)}
.prose ol{counter-reset:pn}
.prose ol>li{position:relative;padding-left:36px;min-height:24px;line-height:1.86}
.prose ol>li::before{counter-increment:pn;content:counter(pn);position:absolute;left:0;top:.16em;
  width:24px;height:24px;border-radius:8px;display:flex;align-items:center;justify-content:center;
  font-family:var(--font-display);font-size:12.5px;font-weight:700;color:#fff;
  background:linear-gradient(150deg,#FFA41C,var(--brand-h));
  box-shadow:0 3px 9px -3px rgba(255,140,0,.5)}
.prose li>ul,.prose li>ol{margin:12px 0 0}
.prose li>ul{gap:10px}
.prose li>ul>li{padding-left:20px}
.prose li>ul>li::before{width:6px;height:6px;top:.6em;border-radius:50%;
  background:var(--purple);box-shadow:none;opacity:.72}
.prose li>ol{gap:10px}
.prose li>ol>li{padding-left:32px}
.prose li>ol>li::before{width:20px;height:20px;border-radius:6px;font-size:11.5px;
  background:#FFF3E0;color:var(--brand-h);box-shadow:none;top:.14em}
.prose img{max-width:100%;width:100%;height:auto;margin:24px 0;border-radius:14px;
  box-shadow:0 1px 3px rgba(80,60,140,.05),0 10px 28px -18px rgba(80,60,140,.14)}
.prose video{width:100%;height:auto;display:block;margin:24px 0;border-radius:14px}
.prose iframe{width:100%;aspect-ratio:16/9;height:auto;border:0;margin:24px 0;border-radius:14px}
.prose .hly-map{max-width:100%;margin:24px 0}
.prose blockquote{margin:24px 0;padding:2px 0 2px 20px;border-left:3px solid var(--brand);color:var(--ink-3)}
.prose hr{margin:30px 0;border:0;border-top:1px solid var(--line)}
.prose>*:last-child{margin-bottom:0}

/* ---- 右栏底部：标签 + 复制链接 / 返回列表 ---- */
.nend{margin-top:clamp(26px,2.8vw,34px);padding-top:clamp(22px,2.4vw,28px);
  border-top:1px solid var(--line);
  display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:14px 18px}
.tagline{display:flex;flex-wrap:wrap;gap:8px}
.tagc{display:inline-flex;align-items:center;gap:7px;font-size:14px;color:var(--ink-3);
  background:#fff;border:1px solid var(--line);border-radius:999px;padding:6px 14px;
  transition:background .24s var(--ease),border-color .24s var(--ease),color .24s var(--ease)}
.tagc::before{content:"";width:6px;height:6px;border-radius:50%;background:var(--purple);flex:none}
.tagc:hover{border-color:rgba(102,0,255,.35);color:var(--ink)}
.nacts{display:flex;flex-wrap:wrap;gap:10px}
.sbtn{display:inline-flex;align-items:center;gap:7px;flex:none;
  font-size:14px;font-weight:500;color:var(--ink-3);
  background:#fff;border:1px solid var(--line);border-radius:999px;padding:7px 16px;cursor:pointer;
  text-decoration:none;
  transition:background .24s var(--ease),border-color .24s var(--ease),color .24s var(--ease)}
.sbtn svg{width:16px;height:16px}
.sbtn:hover{border-color:var(--brand);color:var(--brand-h)}
.sbtn.ok{border-color:var(--brand);color:var(--brand-h);background:#FFF3E0}

/* ---- 全页氛围光斑（独立访问时） ---- */
body{position:relative}
.ntd-glow{position:absolute;inset:0;overflow:clip;pointer-events:none;z-index:0}
.ntd-glow i{position:absolute;border-radius:50%;filter:blur(90px);will-change:transform}
.ng-1{width:440px;height:440px;left:-150px;top:14%;
  background:radial-gradient(closest-side,rgba(102,0,255,.13),transparent);
  animation:ngFloat 26s ease-in-out infinite}
.ng-2{width:380px;height:380px;right:-130px;top:36%;
  background:radial-gradient(closest-side,rgba(255,153,0,.16),transparent);
  animation:ngFloat 22s ease-in-out -6s infinite reverse}
.ng-3{width:320px;height:320px;left:-90px;top:60%;
  background:radial-gradient(closest-side,rgba(255,61,144,.11),transparent);
  animation:ngFloat 30s ease-in-out -12s infinite}
.ng-4{width:360px;height:360px;right:4%;top:84%;
  background:radial-gradient(closest-side,rgba(102,0,255,.10),transparent);
  animation:ngFloat 24s ease-in-out -18s infinite reverse}
@keyframes ngFloat{0%,100%{transform:translate(0,0)}50%{transform:translate(26px,-20px)}}
@media (prefers-reduced-motion:reduce){.ntd-glow i{animation:none}}

/* iframe 嵌入：隐藏框架元素与光斑层 */
body.in-iframe .nav,
body.in-iframe .foot,
body.in-iframe .sprog,
body.in-iframe .ntd-glow,
body.in-iframe .mnav{display:none!important}
body.in-iframe{background:#fff}

@media (max-width:860px){
  /* 移动端：上下堆叠，右栏回归文档流（弹窗内靠 iframe 滚动） */
  .ntd-page{padding:calc(var(--nav-h) + 18px) var(--gutter) 36px}
  .ntd-shell{flex-direction:column;height:auto;min-height:0;max-height:none;border-radius:18px}
  body.in-iframe .ntd-page{padding:0}
  body.in-iframe .ntd-shell{height:auto;min-height:100vh}
  .ngal{width:100%!important;height:auto;min-height:0}
  .ngal.has-swiper,.ngal.is-solo{height:auto}
  .ngal .swiper,.ngal .swiper-wrapper{height:auto}
  .ngal .swiper-slide{height:auto}
  .ngal img{height:auto;aspect-ratio:var(--ngal-ratio,3/4);object-fit:cover}
  .ngv-nav{display:none}
  .npane{height:auto;overflow:visible}
  .prose h2{font-size:19px;margin-top:28px}
  .nend{align-items:flex-start;flex-direction:column}
}
