/* 帖子海报 — 按钮与预览弹层（不依赖 jQuery / Bootstrap） */

.kehua-poster-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--color-bg, #f5f6f8);
  color: var(--color-text-light, #666);
  font-size: 14px;
  line-height: 1.6;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.kehua-poster-btn:hover { background: var(--color-primary-soft, #e8f5ec); color: var(--color-primary, #5b8c5a); }
.kehua-poster-btn.is-loading { opacity: .6; pointer-events: none; }

.kehua-poster-mask {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, .6);
}
.kehua-poster-mask.is-open { display: flex; }

.kehua-poster-box {
  display: flex;
  flex-direction: column;
  width: min(400px, 100%);
  max-height: 88vh;
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .3);
  animation: kehua-poster-in .18s ease-out;
}
@keyframes kehua-poster-in {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: none; }
}

.kehua-poster-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, .06);
  color: #333;
  font-size: 15px;
  font-weight: 600;
}
.kehua-poster-head-sub { margin-left: 8px; color: #999; font-size: 12px; font-weight: 400; }

.kehua-poster-close {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: #999;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.kehua-poster-close:hover { background: rgba(0, 0, 0, .06); color: #333; }

.kehua-poster-body {
  overflow: auto;
  background: #f3f4f6;
  text-align: center;
  -webkit-overflow-scrolling: touch;
}
.kehua-poster-img {
  display: block;
  width: 100%;
  height: auto;
  -webkit-touch-callout: default;
  touch-action: auto;
}
.kehua-poster-tip {
  padding: 54px 16px;
  color: #999;
  font-size: 14px;
  line-height: 1.7;
}
.kehua-poster-tip.is-error { color: #ef4444; }

@media (max-width: 640px) {
  .kehua-poster-box { max-height: 82vh; }
}
