.social-share-wrap {
  padding-top: 1rem;
  border-top: 1px dashed var(--home-border);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  position: relative;
}
.share-label {
  color: #555;
  font-size: 0.95rem;
}
.social-share-buttons {
  display: flex;
  gap: 8px;
}
.share-btn {
  border: 1px solid #d8d2c5;
  background: transparent;
  color: #555;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.22s ease;
  outline: none;
}
.share-btn:hover {
  background: #f1ece2;
  border-color: #b8b0a0;
  color: #222;
}
.share-btn:active {
  transform: scale(0.95);
}
/* 2 倍透明 PNG 精灵图：五个按钮共享同一个懒加载资源 */
.share-icon {
  display: block;
  width: 20px;
  height: 20px;
  overflow: hidden;
  flex: 0 0 20px;
  pointer-events: none;
}
.share-icon img {
  display: block;
  width: 100px;
  height: 20px;
  max-width: none;
}
.share-icon-wechat-moments img {
  transform: translateX(-20px);
}
.share-icon-weibo img {
  transform: translateX(-40px);
}
.share-icon-email img {
  transform: translateX(-60px);
}
.share-icon-copy img {
  transform: translateX(-80px);
}
[data-theme="dark"] .share-icon img {
  filter: brightness(0) invert(1);
  opacity: 0.78;
}
/* 弹窗遮罩 */
.share-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.share-modal.show {
  display: flex;
}
.modal-inner {
  background: #fff;
  
  text-align: center;
}
.qrcode-box {
  width: 180px;
  height: 180px;
  margin: 0 auto 12px;
}
.modal-tip {
  color: var(--home-text);
  font-size: 0.9rem;
  margin-bottom: 16px;
}
.modal-close {
  padding: 6px 16px;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
}
.share-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10000;
  max-width: min(80vw, 520px);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 14px 22px;
  border-radius: 10px;
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: center;
  word-break: break-all;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.share-toast-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #8fe0b0;
  font-weight: 600;
}
.share-toast-status svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}
.share-toast-text {
  color: #e9efec;
  font-size: 0.88rem;
  font-weight: 400;
}
.share-toast.show {
  opacity: 1;
}
/* 海报按钮（内联 SVG 图标，不占精灵图） */
.share-icon-poster svg {
  display: block;
  width: 20px;
  height: 20px;
  color: #555;
}
[data-theme="dark"] .share-icon-poster svg {
  filter: brightness(0) invert(1);
  opacity: 0.78;
}

/* 海报预览弹窗 */
.poster-modal-inner {
  border: none;
  max-width: 360px;
  width: 90vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background-color: var(--home-bg);
  padding-bottom: 1em;
}
.poster-preview {
  position: relative;
  flex: 1 1 auto;
  min-height: 220px;
  overflow: auto;
  margin-bottom: 12px;
  background: #f5f5f5;
  border: none;
}
/* 海报生成/加载中的占位动画，避免出现空白区 */
.poster-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #f5f5f5;
  color: #888;
  font-size: 13px;
  z-index: 1;
  transition: opacity 0.2s;
}
.poster-loading.is-hidden {
  opacity: 0;
  visibility: hidden;
}
.poster-loading.is-error {
  color: #b45309;
}
.poster-loading.is-error .poster-spinner {
  display: none;
}
.poster-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(63, 98, 82, 0.18);
  border-top-color: var(--home-primary, #3f6252);
  border-radius: 50%;
  animation: poster-spin 0.8s linear infinite;
}
@keyframes poster-spin {
  to { transform: rotate(360deg); }
}
.poster-preview img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 70vh;
  margin: 0 auto;
  border: none;
  opacity: 0;
  transition: opacity 0.25s;
}
.poster-preview img.is-loaded {
  opacity: 1;
}
.poster-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}
.poster-download-btn {
  display: inline-block;
  padding: 6px 16px;
  background: #3F6252;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.9rem;
  cursor: pointer;
  transition: opacity 0.2s;
}
.poster-download-btn:hover {
  /*opacity: 0.9;*/
  color: #e0e0e0;
}

@media (max-width: 640px) {
  .social-share-wrap {
    justify-content: flex-start;
  }
}

.wechat{
  padding: 2em 1em;
  border-radius: var(--home-radius-md);
}