/* 智卜卜官网公共样式：从 zhibbu.cn 首页原样提取（2026-11-12）。
 * 范围：设计变量、基础排版、按钮、页头、页脚、文末下载区、弹窗、微信引导、手机悬浮条。
 * 维护：首页这几部分的样式改动时，要同步改本文件。
 * 与首页的差异只有两处，都已标注：--serif 换成按篇截取的字体；页头图片路径改为 /assets/。 */

:root {
  --bg: #09070D;
  --bg-2: #100C17;
  --line: rgba(237, 230, 247, 0.10);
  --line-2: rgba(237, 230, 247, 0.20);
  --text: #EDE6F7;
  --text-2: rgba(237, 230, 247, 0.66);
  --text-3: rgba(237, 230, 247, 0.56);
  --gold: #FF8E43;
  --gold-2: rgba(255, 142, 67, 0.5);
  --lav: #BF94FF;
  --purple: #793ED0;
  --purple-2: #9956FF;
  --grad: linear-gradient(100deg, #BF94FF 0%, #9956FF 45%, #FF8E43 100%);
  /* 差异：首页的 "ZBB Serif" 只含首页用字；文章页用按篇截取的思源宋体 "ZBB Page Serif"（在页面里声明） */
  --serif: "ZBB Page Serif", "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", serif;
  --latin: "Didot", "Bodoni 72", "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --sans: -apple-system, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-padding-top: 64px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.75 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }

/* ---------- 背景竖线 ---------- */
.gridlines { position: fixed; inset: 0; z-index: 0; pointer-events: none; display: grid; grid-template-columns: repeat(6, 1fr); padding: 0 var(--gutter); }
.gridlines span { border-left: 1px solid rgba(191,148,255,.06); }
.gridlines span:last-child { border-right: 1px solid rgba(191,148,255,.06); }
main, header, footer { position: relative; z-index: 2; }
.wrap { padding: 0 var(--gutter); max-width: 1440px; margin: 0 auto; }

/* ---------- 按钮 ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 26px; border-radius: 999px; cursor: pointer; font-size: 14px; letter-spacing: .08em; border: 1px solid var(--line-2); background: transparent; color: var(--text); white-space: nowrap; transition: background .3s, color .3s, border-color .3s; position: relative; }
.btn:hover { background: rgba(153,86,255,.18); border-color: var(--purple-2); }
.btn-solid { background: linear-gradient(180deg, var(--purple-2), var(--purple)); color: #fff; border: 0; box-shadow: 0 10px 30px rgba(121,62,208,.45); }
.btn-solid:hover { background: linear-gradient(180deg, #FFA466, var(--gold)); color: #fff; border: 0; box-shadow: 0 10px 30px rgba(255,142,67,.4); }
.btn-solid::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; background: linear-gradient(180deg, rgba(255,255,255,.6) 0%, rgba(255,255,255,.12) 45%, rgba(255,255,255,.04) 70%, rgba(214,180,255,.5) 100%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.btn-solid:hover::before { background: linear-gradient(180deg, rgba(255,255,255,.7) 0%, rgba(255,255,255,.15) 45%, rgba(255,255,255,.05) 70%, rgba(255,214,180,.55) 100%); }
.btn .arrow { transition: transform .3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- 顶栏 ---------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; transition: background .4s, border-color .4s; border-bottom: 1px solid transparent; }
.nav.solid { background: rgba(9,7,13,.7); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-color: var(--line); }
.nav .wrap { height: 64px; display: flex; align-items: center; }
.brand { display: flex; align-items: center; gap: 10px; font: 500 17px var(--serif); letter-spacing: .12em; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.nav nav { margin: 0 auto; }
.nav ul { display: flex; gap: 36px; font-size: 13px; letter-spacing: .18em; color: var(--text-2); }
.nav ul a { position: relative; }
.nav ul a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: var(--grad); transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease); }
.nav ul a:hover::after, .nav ul a.on::after { transform: scaleX(1); transform-origin: left; }
.nav ul a.on { color: var(--text); }
.nav .btn { height: 38px; padding: 0 20px; font-size: 13px; }

/* ---------- 标签与渐变字 ---------- */
.label { display: flex; align-items: center; gap: 14px; font-size: 12px; letter-spacing: .32em; color: var(--text-3); text-transform: uppercase; }
.label b { font: 400 13px var(--latin); color: var(--gold); letter-spacing: .1em; }
.display { font: 400 clamp(40px, 6.4vw, 104px)/1.08 var(--serif); letter-spacing: .01em; }
.display em, .em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- 结尾下载区 ---------- */
.sec-pad { padding: clamp(96px, 14vw, 200px) 0; }
.finale { position: relative; text-align: center; overflow: hidden; border-top: 1px solid var(--line); }
.finale::before { content: ""; position: absolute; pointer-events: none; z-index: -1; border-radius: 50%; filter: blur(20px); width: 90vw; height: 50vw; left: 5vw; top: 5%; background: radial-gradient(closest-side, rgba(153,86,255,.22), rgba(255,142,67,.06) 60%, transparent); }
.finale .display { position: relative; font-size: clamp(36px, 4.6vw, 72px); line-height: 1.3; letter-spacing: .14em; padding-left: .14em; }
.finale .display span { display: block; }
.finale-dl { display: flex; justify-content: center; align-items: stretch; gap: 0; margin-top: 64px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.finale-dl > div { padding: 36px clamp(24px, 4vw, 64px); display: flex; gap: 24px; align-items: center; text-align: left; }
.finale-dl > div + div { border-left: 1px solid var(--line); }
.finale-dl b { display: block; font: 400 20px var(--serif); letter-spacing: .1em; margin-bottom: 6px; }
.finale-dl span { font-size: 13px; color: var(--text-2); line-height: 1.9; }
.qr { width: 132px; height: 132px; padding: 8px; background: #fff; border-radius: 10px; cursor: zoom-in; transition: transform .3s var(--ease), box-shadow .3s; }
.qr:hover { transform: scale(1.04); box-shadow: 0 12px 40px rgba(153,86,255,.35); }
.platforms { margin-top: 28px; font-size: 12px; letter-spacing: .3em; color: var(--text-3); }
.finale-mobile { display: none; }

/* ---------- 页脚 ---------- */
footer { border-top: 1px solid var(--line); padding: 40px 0 48px; font-size: 12px; color: var(--text-3); letter-spacing: .06em; }
footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
footer nav { display: flex; gap: 28px; flex-wrap: wrap; }
footer a:hover { color: var(--text); }
footer .beian-ga { white-space: nowrap; }
footer .beian-ga img { display: inline-block; width: 14px; height: 15px; margin-right: 4px; vertical-align: -2px; }

/* ---------- 弹层 ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; background: radial-gradient(60% 50% at 50% 45%, rgba(121,62,208,.25), transparent 70%), rgba(5,3,10,.78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.modal.show { display: flex; animation: mFade .3s ease both; }
.modal.show .modal-card { animation: mPop .5s var(--ease) both; }
.modal-card { width: 340px; max-width: 100%; margin: auto; padding: 36px 32px 28px; text-align: center; position: relative; overflow: hidden; border-radius: 28px; background: radial-gradient(120% 60% at 50% 0%, rgba(153,86,255,.28), transparent 60%), linear-gradient(180deg, #1B1426, #100C17); box-shadow: 0 40px 100px rgba(0,0,0,.6), 0 0 0 1px rgba(191,148,255,.12) inset; }
.modal-card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; background: linear-gradient(160deg, rgba(191,148,255,.7), rgba(153,86,255,.15) 40%, rgba(255,142,67,.55)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.modal-eyebrow { font: italic 12px var(--latin); letter-spacing: .4em; color: var(--gold); }
.modal-card h3 { font: 400 24px var(--serif); letter-spacing: .14em; margin-top: 10px; }
.qr-frame { position: relative; width: 212px; height: 212px; margin: 26px auto 22px; padding: 12px; background: #fff; border-radius: 18px; box-shadow: 0 16px 40px rgba(121,62,208,.35); }
.qr-frame img { width: 100%; height: 100%; display: block; }
.qr-frame i { position: absolute; width: 22px; height: 22px; border: 2px solid var(--gold); }
.qr-frame i:nth-child(2) { left: -10px; top: -10px; border-right: 0; border-bottom: 0; border-top-left-radius: 10px; }
.qr-frame i:nth-child(3) { right: -10px; top: -10px; border-left: 0; border-bottom: 0; border-top-right-radius: 10px; }
.qr-frame i:nth-child(4) { left: -10px; bottom: -10px; border-right: 0; border-top: 0; border-bottom-left-radius: 10px; }
.qr-frame i:nth-child(5) { right: -10px; bottom: -10px; border-left: 0; border-top: 0; border-bottom-right-radius: 10px; }
.modal-card p { color: var(--text-2); font-size: 13px; line-height: 1.9; }
.modal-contact { display: grid; gap: 8px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); text-align: left; }
.modal-contact a { display: block; font-size: 13px; color: var(--text); letter-spacing: .04em; padding: 6px 12px; border-radius: 10px; background: rgba(255,255,255,.04); }
.modal-contact a:hover { background: rgba(153,86,255,.16); }
.modal-tags:empty { display: none; }
.modal-tags { display: flex; justify-content: center; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.modal-tags span { font-size: 11px; letter-spacing: .1em; color: var(--lav); padding: 3px 10px; border-radius: 999px; background: rgba(153,86,255,.14); border: 1px solid rgba(191,148,255,.2); }
.modal-close { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(255,255,255,.04); color: var(--text-2); font-size: 18px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .2s, transform .3s var(--ease); }
.modal-close:hover { background: rgba(255,255,255,.1); transform: rotate(90deg); }
@keyframes mFade { from { opacity: 0; } }
@keyframes mPop { from { opacity: 0; transform: translateY(16px) scale(.96); } }
.wx-guide { position: fixed; inset: 0; z-index: 120; display: none; background: rgba(0,0,0,.85); color: #fff; }
.wx-guide.show { display: block; }
.wx-guide img.arrow { position: absolute; top: 10px; right: 22px; width: 64px; }
.wx-guide .tip { position: absolute; top: 86px; right: 24px; left: 24px; text-align: right; font-size: 17px; line-height: 1.8; }
.wx-guide .tip img { display: inline-block; width: 18px; vertical-align: -3px; margin: 0 4px; }
.mbar { display: none; }

@media (max-width: 1024px) {
  .nav ul { display: none; }
  .nav .btn { margin-left: auto; }
}
@media (max-width: 640px) {
  body { font-size: 14px; }
  .gridlines { grid-template-columns: repeat(4, 1fr); }
  .gridlines span:nth-child(n+5) { display: none; }
  .nav .wrap { height: 56px; }
  .finale-dl { display: none; }
  .finale-mobile { display: flex; flex-direction: column; gap: 10px; margin-top: 48px; }
  .finale-mobile .btn { justify-content: center; height: 52px; }
  .finale-mobile .btn:not(.btn-solid) { border-color: transparent; color: var(--text-2); }
  footer { padding-bottom: 110px; }
  .mbar { display: flex; position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 60; align-items: center; gap: 12px; padding: 10px 10px 10px 14px; border-radius: 999px; background: rgba(16,12,23,.88); border: 1px solid var(--line-2); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transform: translateY(160%); transition: transform .5s var(--ease); }
  .mbar.show { transform: none; }
  .mbar img { width: 34px; height: 34px; border-radius: 9px; }
  .mbar div { flex: 1; line-height: 1.3; }
  .mbar b { display: block; font: 400 15px var(--serif); letter-spacing: .1em; }
  .mbar span { font-size: 11px; color: var(--text-3); }
  .mbar .btn { height: 40px; padding: 0 18px; }
}
@media (max-height: 540px) {
  .modal-card { padding: 28px 28px 22px; }
  .qr-frame { width: 168px; height: 168px; margin: 18px auto 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@supports not ((mask-composite: exclude) or (-webkit-mask-composite: xor)) {
  .btn-solid::before, .modal-card::before { display: none; }
}
@supports not (inset: 0) {
  .gridlines, .btn-solid::before, .modal, .modal-card::before, .wx-guide { top: 0; right: 0; bottom: 0; left: 0; }
}

/* flex 布局的 gap（iOS 14.5 以下），脚本检测后加 no-flexgap，用外边距补间距 */
.no-flexgap .label b { margin-right: 12px; }
.no-flexgap .brand img { margin-right: 10px; }
.no-flexgap .btn .arrow { margin-left: 10px; }
.no-flexgap .nav ul li + li { margin-left: 36px; }
.no-flexgap .finale-dl p { margin-left: 24px; }
.no-flexgap footer nav a + a { margin-left: 28px; }
.no-flexgap .modal-tags span { margin: 0 4px 6px; }
.no-flexgap .finale-mobile > * + * { margin-top: 10px; }
.no-flexgap .mbar > * + * { margin-left: 12px; }
