/* share.css — 分享功能 Phase 1（2026-09-24 · docs/分享功能-Phase1-验收标准.md）
 * 三块 UI：正文末尾分享条 .share-bar（build 静态产）· 手机右下悬浮钮 .share-fab · 弹层 .share-mask/.share-panel。
 * 2026-11-06 按全站规范改样式：分享条不再是米色圆角框，改成细线 + 一行（跟版尾同一种收尾方式）；
 * 按钮 6px 圆角白底细边；颜色只用墨 / 灰 / 普鲁士蓝，去掉金色；▣ ❋ ⧉ ◎ 这类符号不代表平台，不再显示。
 * 不依赖 shared.css / annotate.css，取值写字面量。 */

/* ── 微信兜底缩略图：占位不占版面（绝不能 display:none，微信取不到） ── */
.wx-share-thumb-wrap { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: hidden; pointer-events: none; }
.wx-share-thumb { display: block; width: 300px; height: 300px; }

/* ── 分享条 ── */
.share-bar, .share-mask, .share-toast { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; } /* iOS 不许自动放大 */
.share-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  margin: 40px 0 8px; padding: 16px 0 0;
  border-top: 1px solid #e3e5e8;
  font-family: "Noto Sans SC", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}
.share-bar .share-lab { font-size: 15px; font-weight: 700; color: #14171b; }
.share-bar .share-lab small { font-size: 13px; font-weight: 400; color: #6b717b; margin-left: 10px; }
.share-bar .share-btns { margin-left: auto; }
@media (max-width: 600px) { .share-bar .share-btns { margin-left: 0; } }
.share-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.share-btn {
  appearance: none; display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: 6px; border: 1px solid #d4d6da;
  background: #fff; color: #14171b;
  /* 不用 font 简写：family 分量写 inherit 整条作废，<a> 与 <button> 就各回各的默认字号（站长 09-24 手机截图两行字号不一） */
  font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1;
  text-decoration: none; cursor: pointer; white-space: nowrap; transition: border-color .15s, background .15s;
}
.share-btn:hover { border-color: #14171b; }
.share-btn.primary { background: #14171b; color: #fff; border-color: #14171b; }
.share-btn.primary:hover { background: #2b2f35; }
.share-btn[hidden] { display: none; }
/* 符号图标不显示（share.js 动态建的按钮、手搭页里的静态副本都还带着 .ic，统一在这里藏） */
.share-btn .ic { display: none; }

/* ── 手机悬浮钮：≤760px 显示；避开划线工具条（那条是 absolute 跟随选区，不在右下） ── */
.share-fab {
  position: fixed; right: 16px; bottom: 22px; z-index: 900; display: none;
  align-items: center; gap: 6px; padding: 10px 14px; border-radius: 8px; border: 0;
  background: #14171b; color: #fff; font: 600 14px/1 "Noto Sans SC", -apple-system, "PingFang SC", sans-serif;
  box-shadow: 0 2px 12px rgba(20, 23, 27, .22); cursor: pointer;
}
@media (max-width: 760px) {
  .share-fab { display: inline-flex; }
  body.has-share-fab .anno-fav { display: none; } /* 收藏并入分享弹层，避免右下角两钮重叠 */
}
.share-btn.on { color: #1d4ed8; border-color: #1d4ed8; }
.share-fab.hide { display: none; }

/* ── 弹层 ── */
.share-mask {
  position: fixed; inset: 0; z-index: 9990; background: rgba(20, 23, 27, .5);
  display: flex; align-items: flex-end; justify-content: center;
  font-family: "Noto Sans SC", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}
@media (min-width: 761px) { .share-mask { align-items: center; } }
.share-panel {
  width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; -webkit-overflow-scrolling: touch;
  background: #fff; color: #14171b;
  border-radius: 12px 12px 0 0; padding: 18px 18px 22px; box-shadow: 0 -8px 40px rgba(20, 23, 27, .25);
}
@media (min-width: 761px) { .share-panel { border-radius: 10px; padding: 22px 24px; } }
.share-panel h3 { margin: 0 0 4px; font-size: 18px; font-weight: 800; }
.share-panel .sub { font-size: 13px; color: #6b717b; margin: 0 0 14px; line-height: 1.6; }
.share-panel .row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.share-panel .close {
  position: sticky; float: right; top: 0; appearance: none; border: 0; background: transparent;
  font-size: 22px; line-height: 1; color: #6b717b; cursor: pointer; padding: 0 2px;
}
.share-panel .tabs { display: inline-flex; border: 1px solid #d4d6da; border-radius: 6px; overflow: hidden; margin: 2px 0 12px; }
.share-panel .tabs button {
  appearance: none; border: 0; background: transparent; padding: 7px 14px;
  font-family: inherit; font-size: 13px; font-weight: 600; line-height: 1; color: #555b65; cursor: pointer;
}
.share-panel .tabs button.on { background: #14171b; color: #fff; }
.share-card-img { display: block; width: 100%; height: auto; border-radius: 6px; border: 1px solid #e3e5e8; background: #fff; }
.share-card-img.v { max-width: 340px; margin: 0 auto; }
.share-panel .hint { font-size: 13px; color: #6b717b; margin: 10px 0 0; line-height: 1.6; }
.share-panel .warn { font-size: 13px; color: #c8341f; margin: 8px 0 0; line-height: 1.6; }
.share-panel .qr { display: block; width: 200px; height: 200px; margin: 6px auto 4px; }
.share-panel .wx-guide { display: flex; gap: 14px; align-items: center; margin: 8px 0 4px; }
.share-panel .wx-guide .step { flex: 1; padding: 12px 14px; border: 1px solid #e3e5e8; border-radius: 6px; background: #fff; font-size: 14px; line-height: 1.6; color: #14171b; }
.share-panel .wx-guide .step b { display: block; color: #14171b; font-size: 13px; margin-bottom: 2px; }
.share-panel .url {
  display: block; width: 100%; box-sizing: border-box; padding: 10px 12px; margin-top: 10px;
  border: 1px solid #d4d6da; border-radius: 6px; background: #fff; font: 13px/1.5 ui-monospace, Menlo, monospace;
  color: #14171b; word-break: break-all; -webkit-user-select: all; user-select: all;
}
.share-panel textarea.copy {
  display: block; width: 100%; box-sizing: border-box; min-height: 120px; margin-top: 10px; padding: 10px 12px;
  border: 1px solid #d4d6da; border-radius: 6px; background: #fff; color: #14171b;
  font-family: inherit; font-size: 13px; font-weight: 400; line-height: 1.6;
}
.share-toast {
  position: fixed; left: 50%; bottom: 80px; transform: translate(-50%, 12px); z-index: 9999;
  background: #14171b; color: #fff; font: 14px/1.4 "Noto Sans SC", -apple-system, "PingFang SC", sans-serif;
  padding: 10px 16px; border-radius: 8px; box-shadow: 0 6px 22px rgba(20, 23, 27, .28);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: 86vw;
}
.share-toast.show { opacity: 1; transform: translate(-50%, 0); }
.share-toast a { color: #9db7ff; font-weight: 600; margin-left: 4px; }

/* 赠阅横幅（worker 注入，内联样式已齐；这里只补链接 hover） */
.gift-banner a:hover { color: #fff; }
