/* 云丹漫剧 · 使用引导（配合 zm-guide.js）
   遮罩用「四块挡板」的思路做不出圆角挖洞，这里用一个巨大的 box-shadow 把洞外面全糊黑，
   洞本身就是那个 div —— 一层元素搞定，缩放/滚动时只改它的位置和尺寸，不会有缝。 */

.zmg-root { position: fixed; inset: 0; z-index: 2147483200; pointer-events: none; opacity: 0; transition: opacity .18s ease; }
.zmg-root.zmg-on { opacity: 1; pointer-events: auto; }
html.zmg-lock { overflow: hidden; }

.zmg-mask { position: absolute; inset: 0; }
.zmg-hole {
  position: absolute; left: 50%; top: 50%; width: 0; height: 0; border-radius: 14px;
  /* 洞外面全部糊黑：一个够大的扩散阴影 */
  box-shadow: 0 0 0 9999px rgba(6, 8, 12, .72);
  border: 1.5px solid rgba(255,255,255, .85);
  transition: left .28s cubic-bezier(.4, 0, .2, 1), top .28s cubic-bezier(.4, 0, .2, 1),
              width .28s cubic-bezier(.4, 0, .2, 1), height .28s cubic-bezier(.4, 0, .2, 1);
}
/* 高亮框外圈再来一层柔光，让"这里"更明确 */
.zmg-hole::after {
  content: ""; position: absolute; inset: -5px; border-radius: inherit;
  box-shadow: 0 0 0 3px rgba(0,0,0, .18), 0 0 26px rgba(0,0,0, .45);
  pointer-events: none;
}
/* 没有具体目标的那几步（比如「欢迎」），洞收到看不见，气泡居中 */
.zmg-root.zmg-center .zmg-hole { width: 0; height: 0; left: 50%; top: 50%; border-color: transparent; }
.zmg-root.zmg-center .zmg-hole::after { display: none; }
.zmg-root.zmg-center .zmg-tip { left: 50% !important; top: 50% !important; transform: translate(-50%, -50%); }
/* 2026-11-05 [Claude] 刚开一条引导、第一步还没画出来：别露上一条引导的残影（标题 / 圆点 / 旧高亮框）。
   start() 清掉高亮框的内联位置并挂 zmg-wait → 洞收在中心（整屏均匀压暗）、气泡先藏；paint() 第一笔摘掉，洞从中心展开到目标。 */
.zmg-root.zmg-wait .zmg-tip { visibility: hidden; }
.zmg-root.zmg-wait .zmg-hole { border-color: transparent; transition: none; }
.zmg-root.zmg-wait .zmg-hole::after { display: none; }

.zmg-tip {
  position: absolute; width: min(23rem, calc(100vw - 24px));
  padding: 1rem 1.1rem 1rem; border-radius: 16px;
  background: linear-gradient(180deg, #1b1f27, #14171d);
  border: 1px solid rgba(255, 255, 255, .13);
  box-shadow: 0 26px 60px -22px rgba(0, 0, 0, .9);
  color: #eef1f6; font-size: .9rem; line-height: 1.6;
  transition: left .28s cubic-bezier(.4, 0, .2, 1), top .28s cubic-bezier(.4, 0, .2, 1);
}
.zmg-tip-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.zmg-tip-step { font-size: .72rem; letter-spacing: .06em; color: #f4f4f5; font-weight: 600; }
.zmg-x {
  border: 0; background: none; cursor: pointer; font-family: inherit; font-size: .95rem;
  color: rgba(255,255,255,.55); padding: .1rem .2rem; line-height: 1;
}
.zmg-x:hover { color: #fff; }
/* 步骤上方的小分段标签（长引导里用来标「第几阶段」） */
.zmg-tip-tag {
  margin-top: .5rem; display: inline-block; font-size: .67rem; font-weight: 700; letter-spacing: .04em;
  padding: .12rem .45rem; border-radius: 6px; color: #ffd0a1;
  background: rgba(255,255,255, .14); border: 1px solid rgba(255,255,255, .28);
}
.zmg-tip-title { margin-top: .45rem; font-size: 1.02rem; font-weight: 700; color: #fff; }
/* 正文可能很长（详细引导），给它自己的滚动条，别把气泡撑出屏幕 */
.zmg-tip-body { margin-top: .4rem; color: rgba(255, 255, 255, .74); font-size: .845rem; max-height: 44vh; overflow: auto; }
.zmg-tip-body .zmg-p { display: block; }
.zmg-tip-body .zmg-p:empty { height: .42rem; }
.zmg-tip-body b { color: #fff; font-weight: 700; }
.zmg-tip-body .zmg-li {
  display: block; position: relative; padding-left: .85rem; margin-top: .12rem;
}
.zmg-tip-body .zmg-li::before {
  content: ""; position: absolute; left: .18rem; top: .62em;
  width: 4px; height: 4px; border-radius: 50%; background: #f2a35a;
}
.zmg-tip-body .zmg-note {
  display: block; margin-top: .45rem; padding: .35rem .5rem; border-radius: 8px;
  font-size: .78rem; color: rgba(255, 255, 255, .66);
  background: rgba(255, 255, 255, .05); border-left: 2px solid rgba(255,255,255, .55);
}
.zmg-tip-foot { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-top: 1rem; }
.zmg-dots { display: flex; flex-wrap: wrap; gap: .3rem; max-width: 46%; }
.zmg-dot {
  width: 5px; height: 5px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, .22); transition: width .2s, background .2s;
}
.zmg-dot:hover { background: rgba(255, 255, 255, .5); }
.zmg-dot.zmg-on { width: 16px; border-radius: 3px; background: linear-gradient(90deg, #f4f4f5, #d4d4d8); }
/* 最后一步的「接着看下一条」 */
.zmg-more {
  display: block; width: 100%; margin-top: .65rem; padding: .4rem .6rem; border-radius: 9px;
  cursor: pointer; font-family: inherit; font-size: .78rem; font-weight: 600; text-align: center;
  color: #f4f4f5; background: rgba(255,255,255, .1); border: 1px dashed rgba(255,255,255, .35);
}
.zmg-more:hover { background: rgba(255,255,255, .18); color: #ffd0a1; }
/* ⚠️ 这两个是靠 hidden 属性收起来的，而 display:block/inline-block 会盖掉浏览器自带的
   [hidden]{display:none} —— 不补这条，没有下一条引导时底下会多出一条空的虚线横杠。 */
.zmg-more[hidden], .zmg-tip-tag[hidden] { display: none !important; }
.zmg-btns { display: flex; gap: .45rem; }
.zmg-btn {
  cursor: pointer; font-family: inherit; font-size: .82rem; font-weight: 600;
  padding: .4rem .85rem; border-radius: 9px;
  color: rgba(255, 255, 255, .72); background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .11);
  transition: color .15s, background .15s, filter .15s;
}
.zmg-btn:hover { color: #fff; background: rgba(255, 255, 255, .12); }
.zmg-primary {
  color: #2b1406; border-color: transparent;
  background: linear-gradient(135deg, #f4f4f5, #d4d4d8);
  box-shadow: 0 8px 20px -10px rgba(0,0,0, .9);
}
.zmg-primary:hover { filter: brightness(1.06); color: #2b1406; }

/* 浅色主题 */
html[data-theme="light"] .zmg-hole { box-shadow: 0 0 0 9999px rgba(28, 26, 22, .5); }
html[data-theme="light"] .zmg-tip {
  background: linear-gradient(180deg, #fffdf9, #f6f3ed);
  border-color: rgba(0, 0, 0, .12); color: #26292f;
  box-shadow: 0 26px 60px -24px rgba(60, 40, 20, .35);
}
html[data-theme="light"] .zmg-tip-title { color: #26292f; }
html[data-theme="light"] .zmg-tip-body { color: #5b6270; }
html[data-theme="light"] .zmg-tip-step { color: #18181b; }
html[data-theme="light"] .zmg-x { color: #5d626a; }
html[data-theme="light"] .zmg-x:hover { color: #26292f; }
html[data-theme="light"] .zmg-btn { color: #5b6270; background: rgba(0, 0, 0, .045); border-color: rgba(0, 0, 0, .1); }
html[data-theme="light"] .zmg-btn:hover { color: #26292f; background: rgba(0, 0, 0, .08); }
html[data-theme="light"] .zmg-primary { color:#fff; background: linear-gradient(135deg,#18181b,#3f3f46); border-color: transparent; }
html[data-theme="light"] .zmg-dot { background: rgba(0, 0, 0, .18); }
html[data-theme="light"] .zmg-tip-tag { color: #18181b; background: rgba(24,24,27, .12); border-color: rgba(24,24,27, .28); }
html[data-theme="light"] .zmg-tip-body b { color: #26292f; }
html[data-theme="light"] .zmg-tip-body .zmg-note { color: #5b6270; background: rgba(0, 0, 0, .04); border-left-color: rgba(24,24,27, .5); }
html[data-theme="light"] .zmg-more { color: #18181b; background: rgba(24,24,27, .08); border-color: rgba(24,24,27, .35); }
html[data-theme="light"] .zmg-more:hover { background: rgba(24,24,27, .16); color: #18181b; }

/* 引导中心（从顶栏问号打开，随时重看任意一条） */
.zmg-hub-mask {
  position: fixed; inset: 0; z-index: 2147483100; display: grid; place-items: center; padding: 24px;
  background: rgba(6, 8, 12, .62); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.zmg-hub {
  width: min(46rem, 100%); max-height: 82vh; overflow: auto; padding: 1.5rem 1.6rem 1.7rem;
  border-radius: 20px; background: linear-gradient(180deg, #1b1f27, #14171d);
  border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 30px 70px -26px rgba(0, 0, 0, .9);
  color: #eef1f6;
}
.zmg-hub-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.zmg-hub-title { font-size: 1.2rem; font-weight: 800; }
.zmg-hub-title span { display: block; margin-top: .3rem; font-size: .82rem; font-weight: 400; color: rgba(255,255,255,.55); }
.zmg-hub-sec {
  margin-top: 1.25rem; font-size: .74rem; font-weight: 700; letter-spacing: .08em;
  color: rgba(255, 190, 116, .9);
}
.zmg-hub-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; margin-top: .55rem; }
.zmg-hub-item {
  display: flex; align-items: center; gap: .8rem; text-align: left; cursor: pointer; font-family: inherit;
  padding: .9rem 1rem; border-radius: 14px; color: inherit;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .11);
  transition: transform .15s, border-color .15s, background .15s;
}
.zmg-hub-item:hover { transform: translateY(-2px); border-color: rgba(255,255,255, .45); background: rgba(255,255,255, .09); }
.zmg-hub-ic {
  flex: none; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 11px;
  color: #f4f4f5; background: linear-gradient(150deg, rgba(255,255,255, .26), rgba(255,255,255, .1));
  border: 1px solid rgba(255,255,255, .32);
}
.zmg-hub-ic svg { width: 1.2rem; height: 1.2rem; }
.zmg-hub-tx { min-width: 0; flex: 1; }
.zmg-hub-tx b { display: block; font-size: .92rem; font-weight: 700; }
.zmg-hub-tx span { display: block; margin-top: .15rem; font-size: .74rem; color: rgba(255,255,255,.55); }
.zmg-hub-badge {
  flex: none; font-size: .68rem; padding: .16rem .48rem; border-radius: 999px;
  color: rgba(255, 255, 255, .55); background: rgba(255, 255, 255, .08);
}
.zmg-hub-badge.zmg-new { color: #2b1406; background: linear-gradient(135deg, #f4f4f5, #d4d4d8); font-weight: 700; }
@media (max-width: 720px) { .zmg-hub-list { grid-template-columns: 1fr; } }

html[data-theme="light"] .zmg-hub { background: linear-gradient(180deg, #fffdf9, #f6f3ed); border-color: rgba(0, 0, 0, .12); color: #26292f; }
html[data-theme="light"] .zmg-hub-title span, html[data-theme="light"] .zmg-hub-tx span { color: #5d626e; }
html[data-theme="light"] .zmg-hub-sec { color: #18181b; }
html[data-theme="light"] .zmg-hub-item { background: rgba(0, 0, 0, .035); border-color: rgba(0, 0, 0, .1); }
html[data-theme="light"] .zmg-hub-item:hover { background: rgba(24,24,27, .14); border-color: rgba(24,24,27, .4); }
html[data-theme="light"] .zmg-hub-ic { color: #18181b; }

/* 浅色模式可读性补丁（2026-08-17）：角标文字在浅底上只有 2.9:1 */
html[data-theme="light"] .zmg-hub-badge { color: #535a68; background: rgba(0, 0, 0, .075); }
html[data-theme="light"] .zmg-hub-badge.zmg-new { color:#fff; background: linear-gradient(135deg,#18181b,#3f3f46); }
