/* 哲心内容站 · 计费/会员前端样式 */
.zx-tools {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 18px 0 8px; padding: 13px 16px;
  background: var(--card2, #faf6ec); border: 1px solid var(--line, #e5decf);
  border-radius: 14px;
}
.zx-tools .zx-tools-label {
  font-size: 11.5px; color: var(--muted, #656d65); letter-spacing: .06em;
  margin-right: auto; white-space: nowrap;
}
.zx-tool {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  font: inherit; font-size: 12.5px; font-weight: 600;
  color: var(--ink2, #3c4741); background: var(--card, #fffdf8);
  border: 1px solid var(--line, #e5decf); border-radius: 999px; padding: 8px 14px;
  transition: .16s; white-space: nowrap;
}
.zx-tool svg { width: 15px; height: 15px; flex: none; }
.zx-tool .zx-price { color: var(--gold, #8a6128); font-size: 11.5px; }
.zx-tool:hover { border-color: var(--accent, #1b5c4c); color: var(--accent, #1b5c4c); }
.zx-tool.is-off { opacity: .45; cursor: not-allowed; }
.zx-tool.is-free .zx-price { color: var(--accent, #1b5c4c); }

/* 免费时间胶囊 */
.zx-badge {
  position: fixed; left: 22px; bottom: 22px; z-index: 900;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 15px; border-radius: 999px; cursor: pointer;
  background: var(--card, #fffdf8); color: var(--ink2, #3c4741);
  border: 1px solid var(--line, #e5decf);
  box-shadow: 0 14px 34px -18px rgba(20, 30, 24, .45);
  font-size: 12px; letter-spacing: .02em; transition: .18s;
  -webkit-user-select: none; user-select: none;
}
.zx-badge:hover { border-color: var(--accent, #1b5c4c); transform: translateY(-1px); }
.zx-badge .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--gold, #8a6128); flex: none;
}
.zx-badge b { font-weight: 700; color: var(--accent-d, #12453a); font-variant-numeric: tabular-nums; }
.zx-badge.is-zero { border-color: #dcc9a8; background: #fbf3e3; color: #7a5420; }
.zx-badge.is-zero .dot { background: #b0503a; }
[data-theme="dark"] .zx-badge { background: var(--card, #17201c); border-color: var(--line, #29332d); }
[data-theme="dark"] .zx-badge.is-zero { background: #2a2114; border-color: #4a3a1f; color: #e3c68c; }

.zx-lock { overflow: hidden !important; }

/* 弹层 */
.zx-overlay {
  position: fixed; inset: 0; z-index: 9998; padding: 20px;
  background: rgba(10, 22, 18, .58);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  display: flex; align-items: center; justify-content: center;
  animation: zx-fade .18s ease-out;
}
@keyframes zx-fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes zx-up { from { opacity: 0; transform: translateY(14px) } to { opacity: 1; transform: none } }
.zx-modal {
  position: relative; width: min(440px, 96vw); max-height: 92vh; overflow: auto;
  background: var(--card, #fffdf8); color: var(--ink, #1a241f);
  border: 1px solid var(--line, #e5decf); border-radius: 22px;
  padding: 28px 28px 22px; box-shadow: 0 40px 100px -40px rgba(0, 0, 0, .55);
  animation: zx-up .22s ease-out;
}
.zx-modal .zx-close {
  position: absolute; right: 14px; top: 12px; width: 32px; height: 32px;
  border: 0; border-radius: 50%; background: transparent; cursor: pointer;
  color: var(--muted, #656d65); font-size: 22px; line-height: 1;
}
.zx-modal .zx-close:hover { background: var(--accent-soft, #e8f0ea); color: var(--accent-d, #12453a); }
.zx-tabs button:focus-visible, .zx-claim:focus-visible, .zx-close:focus-visible,
.zx-paywall .zx-btn:focus-visible { outline: 2px solid var(--gold, #8a6128); outline-offset: 2px; }
.zx-modal .zx-eyebrow {
  font-size: 9.5px; font-weight: 700; letter-spacing: .2em; color: var(--gold, #8a6128);
  text-transform: uppercase; margin-bottom: 8px;
}
.zx-modal h3 {
  font-family: var(--serif, "Songti SC", serif); font-size: 25px; line-height: 1.35;
  margin: 0 0 8px; font-weight: 700; letter-spacing: .01em;
}
.zx-modal .zx-desc { margin: 0 0 14px; color: var(--muted, #656d65); font-size: 13px; line-height: 1.8; }
.zx-modal .zx-price {
  font-family: var(--serif, "Songti SC", serif); font-size: 34px; font-weight: 700;
  color: var(--accent-d, #12453a); line-height: 1.1; margin: 2px 0 4px;
}
.zx-modal .zx-price span { font-family: var(--font, sans-serif); font-size: 12px; font-weight: 500; color: var(--muted, #656d65); }
.zx-modal .zx-notice {
  background: var(--gold-soft, #f6ecd8); border: 1px solid rgba(138, 97, 40, .18);
  border-radius: 10px; padding: 9px 12px; font-size: 11.5px; color: #7a5420;
  line-height: 1.7; margin: 12px 0;
}
.zx-modal .zx-notice:empty { display: none; }
.zx-tabs { display: flex; gap: 8px; margin: 14px 0 12px; }
.zx-tabs button {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 10px; border-radius: 10px; border: 1px solid var(--line, #e5decf);
  background: var(--card2, #faf6ec); color: var(--ink2, #3c4741); font: inherit;
  font-size: 12.5px; font-weight: 600; cursor: pointer; transition: .15s;
}
.zx-tabs button:hover { border-color: var(--accent, #1b5c4c); }
.zx-tabs button.on { border-color: var(--accent, #1b5c4c); background: var(--accent-soft, #e8f0ea); color: var(--accent-d, #12453a); }
.zx-tabs button:disabled { opacity: .45; cursor: not-allowed; }
.zx-tabs i {
  width: 7px; height: 7px; border-radius: 50%; background: #2f7d63; display: inline-block;
}
.zx-tabs button[data-method="wechat"] i { background: #2a9d5c; }
.zx-panel { min-height: 214px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.zx-panel .zx-qr {
  width: 178px; height: 178px; object-fit: contain; background: #fff;
  border: 1px solid var(--line, #e5decf); border-radius: 12px; padding: 8px;
}
.zx-panel .zx-qr-empty {
  width: 178px; min-height: 120px; border: 1px dashed var(--line, #e5decf);
  border-radius: 12px; display: grid; place-items: center; text-align: center;
  color: var(--muted, #656d65); font-size: 12px; padding: 16px; background: var(--card2, #faf6ec);
  line-height: 1.7;
}
.zx-panel .zx-paylink {
  display: inline-flex; margin-top: 4px; padding: 10px 18px; border-radius: 10px;
  background: var(--accent, #1b5c4c); color: #fff; font-size: 13px; font-weight: 600;
}
.zx-panel .zx-paylink:hover { text-decoration: none; background: var(--accent-d, #12453a); }
.zx-panel .zx-qr-note {
  margin: 10px 0 0; font-size: 11.5px; color: var(--muted, #656d65); text-align: center; line-height: 1.7;
}
.zx-form { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.zx-form > label { font-size: 11.5px; font-weight: 600; color: var(--ink2, #3c4741); margin-top: 6px; }
.zx-form input[type="tel"], .zx-form input[type="text"], .zx-form input[type="password"] {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line, #e5decf);
  border-radius: 10px; background: var(--card2, #faf6ec); color: var(--ink, #1a241f);
  font: inherit; font-size: 14px; outline: none; transition: .16s;
}
.zx-form input:focus { border-color: var(--accent, #1b5c4c); box-shadow: 0 0 0 3px var(--accent-soft, #e8f0ea); background: var(--card, #fffdf8); }
.zx-code-row { display: flex; gap: 8px; align-items: stretch; }
.zx-code-row input { flex: 1 1 auto; min-width: 0; letter-spacing: .12em; }
.zx-send {
  flex: none; padding: 0 13px; border: 1px solid var(--accent, #1b5c4c);
  background: transparent; color: var(--accent, #1b5c4c); border-radius: 10px;
  font: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.zx-send:hover { background: var(--accent-soft, #e8f0ea); }
.zx-send:disabled { opacity: .55; cursor: wait; }
.zx-consent { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 2px; font-size: 11px; color: var(--muted, #656d65); line-height: 1.65; font-weight: 400 !important; }
.zx-consent input { margin-top: 3px; flex: none; }
.zx-consent a { color: var(--accent, #1b5c4c); text-decoration: underline; }
.zx-form .zx-claim { margin-top: 6px; }

.zx-orderline {
  display: flex; justify-content: space-between; gap: 10px; width: 100%;
  font-size: 11px; color: var(--muted, #656d65); margin-top: 10px;
  border-top: 1px dashed var(--line, #e5decf); padding-top: 9px;
}
.zx-orderline b { color: var(--ink2, #3c4741); font-weight: 600; letter-spacing: .06em; }
.zx-status {
  min-height: 20px; font-size: 12px; color: var(--muted, #656d65); text-align: center;
  line-height: 1.7; margin: 8px 0 0;
}
.zx-status.err { color: #a34734; }
.zx-status.ok { color: var(--accent, #1b5c4c); font-weight: 600; }
.zx-claim {
  width: 100%; margin-top: 10px; padding: 11px; border: 1px solid var(--accent, #1b5c4c);
  background: var(--accent, #1b5c4c); color: #fff; border-radius: 10px;
  font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.zx-claim:hover { background: var(--accent-d, #12453a); }
.zx-claim:disabled { opacity: .6; cursor: wait; }
.zx-hint { margin: 10px 0 0; font-size: 10.5px; color: var(--muted, #656d65); text-align: center; line-height: 1.7; }
.zx-hint a { color: var(--accent, #1b5c4c); text-decoration: underline; }
.zx-loading { font-size: 12px; color: var(--muted, #656d65); }
.zx-spinner {
  width: 22px; height: 22px; border: 2px solid var(--line, #e5decf);
  border-top-color: var(--accent, #1b5c4c); border-radius: 50%;
  animation: zx-spin .8s linear infinite; margin-bottom: 10px;
}
@keyframes zx-spin { to { transform: rotate(360deg) } }

/* 付费墙整页 */
.zx-paywall-body { margin: 0; background: var(--bg, #f7f4ec); min-height: 100vh; }
.zx-paywall {
  max-width: 720px; margin: 0 auto; padding: 70px 24px 80px;
}
.zx-paywall-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 42px; }
.zx-paywall-brand .zx-seal {
  width: 38px; height: 38px; border-radius: 11px; background: var(--accent, #1b5c4c);
  color: #fff; display: grid; place-items: center;
  font-family: var(--serif, "Songti SC", serif); font-size: 19px; font-weight: 700;
}
.zx-paywall-brand b { font-family: var(--serif, "Songti SC", serif); font-size: 17px; letter-spacing: .03em; }
.zx-paywall .zx-eyebrow {
  font-size: 10px; font-weight: 700; letter-spacing: .22em; color: var(--gold, #8a6128);
  margin: 0 0 10px;
}
.zx-paywall h1 {
  font-family: var(--serif, "Songti SC", serif); font-size: clamp(30px, 5vw, 44px);
  line-height: 1.32; margin: 0 0 16px; font-weight: 700; letter-spacing: .01em;
}
.zx-paywall-lead { color: var(--ink2, #3c4741); font-size: 15px; line-height: 1.95; max-width: 560px; margin: 0 0 26px; }
.zx-paywall .zx-btn {
  display: inline-flex; align-items: center; gap: 9px; border: 1px solid transparent;
  border-radius: 999px; padding: 13px 26px; font: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer;
}
.zx-paywall .zx-btn-primary { background: var(--accent, #1b5c4c); color: #fff; }
.zx-paywall .zx-btn-primary:hover { background: var(--accent-d, #12453a); }
.zx-paywall-note { margin: 18px 0 0; font-size: 12.5px; color: var(--muted, #656d65); }
.zx-paywall-fine { margin: 46px 0 0; padding-top: 18px; border-top: 1px solid var(--line, #e5decf); font-size: 11.5px; color: var(--muted, #656d65); line-height: 1.8; }

/* 全站免费：浏览器直接打印也放行，只隐藏工具栏/浮层 */
@media print {
  .zx-badge, .zx-overlay, .zx-tools, .zx-timer { display: none !important; }
  header.top, footer.foot, .zx-tools, .zx-badge { display: none !important; }
  main.detail.zx-article { display: block !important; }
}

@media (max-width: 640px) {
  .zx-tools { padding: 12px 13px; }
  .zx-tools .zx-tools-label { width: 100%; margin: 0 0 2px; }
  .zx-tool { flex: 1; justify-content: center; }
  .zx-badge { left: 14px; bottom: 14px; font-size: 11.5px; padding: 8px 13px; }
  .zx-modal { padding: 24px 20px 18px; border-radius: 18px; }
  .zx-modal h3 { font-size: 22px; }
  .zx-paywall { padding: 42px 20px 60px; }
}

/* 内容防复制（仅公开内容页；后台/输入框/付费打印版不受影响） */
main, header.top, footer.foot {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
main input, main textarea, main select,
header.top input, header.top textarea, header.top select,
footer.foot input, footer.foot textarea,
[contenteditable="true"], .zx-copyable, .zx-copyable * {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}
main img, header.top img, footer.foot img { -webkit-user-drag: none; }
