/* 转发页 share.css（share-page-v1，2026-10-21）
 * 暖纸 / 炭黑 / 陶土 / 橄榄，无渐变、无蓝色、无衬线字体、无外链素材。
 * 卡片、二维码、分享卡预览和分享状态沿用站内细线与陶土点缀。 */
.share-page {
  --share-clay: #a65336;
  --share-olive: #17613b;
  --share-soft: #f7f4f2;
}
.share-page .shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
}
.share-page h1,
.share-page h2,
.share-page h3 { letter-spacing: -.02em; }
.share-version { font-size: 11px; color: var(--ink-dim); white-space: nowrap; }

/* ---------- 首屏 ---------- */
/* 注意：页头/小节与 .shell 同元素时，`.share-page .shell` 的 0 纵向内边距会压过单类选择器；
   因此这里统一用 `.share-page .share-*` 提高一级特异性，恢复纵向留白。 */
.share-page .share-hero {
  padding: 48px 32px 32px;
  border-bottom: 2px solid var(--ink);
}
.share-hero .eyebrow {
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--share-clay);
  font-weight: 800;
}
.share-page .share-hero h1 {
  margin: 10px 0 14px;
  font-size: clamp(32px, 4.6vw, 52px);
  line-height: 1.18;
  letter-spacing: -.03em;
}
.share-lead {
  max-width: 660px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--ink-dim);
}
.share-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 4px;
}
.share-hero__actions .sp-btn { min-width: 132px; }
.share-privacy {
  max-width: 680px;
  margin-top: 16px;
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--ink-dim);
  border-left: 3px solid var(--yellow);
  padding-left: 12px;
}

/* ---------- 按钮：全部 ≥44px 触控高 ---------- */
.sp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--ink);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  text-align: center;
}
.sp-btn:hover { background: var(--panel-2); }
.sp-btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.sp-btn--primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.sp-btn--primary:hover { background: var(--share-olive); border-color: var(--share-olive); color: #fff; }
.sp-status {
  min-height: 24px;
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--share-olive);
}

/* ---------- 小节 ---------- */
.share-page .share-section {
  padding: 42px 0;
  border-bottom: 1px solid var(--line);
}
.share-heading { margin-bottom: 22px; }
.share-heading .eyebrow {
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--share-clay);
  font-weight: 800;
  margin-bottom: 6px;
}
.share-page .share-heading h2 { font-size: clamp(23px, 3vw, 31px); line-height: 1.35; letter-spacing: -.02em; }
.share-heading p:last-child {
  margin-top: 8px;
  max-width: 680px;
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--ink-dim);
}

/* ---------- 素材卡 ---------- */
.share-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.share-page .share-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 22px 20px;
  border: 1px solid var(--ink);
  border-top: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  background: var(--panel);
}
.share-card__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}
.share-card__kicker {
  font-size: 11px;
  letter-spacing: .14em;
  font-weight: 800;
  color: var(--share-clay);
}
.share-card__meta {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 1px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  color: var(--ink-dim);
}
.share-page .share-card h3 { font-size: 23px; line-height: 1.35; }
.share-card__hook { font-size: 14px; line-height: 1.85; color: var(--ink-dim); }
.share-card ul { list-style: none; display: grid; gap: 5px; margin: 2px 0 4px; }
.share-card li {
  position: relative;
  padding-left: 14px;
  font-size: 13px;
  line-height: 1.8;
}
.share-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .72em;
  width: 5px;
  height: 5px;
  background: var(--share-clay);
}
.share-card__meta { font-size: 12px; line-height: 1.7; color: var(--ink-dim); }
/* 五个操作统一为两列按钮组：打开 / 分享 / 复制链接 / 复制转发文案 / 二维码，高度一致 */
.share-card__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
}
.share-card__actions .sp-mini { width: 100%; }
.share-card__actions .sp-mini:last-child { grid-column: 1 / -1; }
.sp-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
  cursor: pointer;
  text-align: center;
}
.sp-mini:hover { border-color: var(--ink); background: var(--panel-2); }
.sp-mini:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.sp-mini--link { background: var(--ink); border-color: var(--ink); color: var(--bg); font-weight: 650; }
.sp-mini--link:hover { background: var(--share-olive); border-color: var(--share-olive); color: #fff; text-decoration: none; }

.share-page .share-card__qr {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  border-top: 1px dashed var(--line);
  padding-top: 12px;
}
.share-card__qr::before {
  content: "扫码打开公开页面";
  flex: 0 0 100%;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--share-clay);
}
.share-card__qr[hidden] { display: none !important; }
.share-qr-box {
  flex: none;
  width: 128px;
  height: 128px;
  padding: 6px;
  display: grid;
  place-items: center;
  background: var(--bg);
  border: 1px solid var(--ink);
}
.share-qr-box canvas,
.share-qr-box img { width: 100% !important; height: auto !important; display: block; }
.share-qr-note { flex: 1 1 180px; max-width: 260px; font-size: 12px; line-height: 1.75; color: var(--ink-dim); }

.share-noscript { padding: 0 32px; }
.share-noscript li { margin: 6px 0; }

/* ---------- 分享卡 ---------- */
.poster-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 28px;
  align-items: start;
  padding: 22px;
  border: 1px solid var(--ink);
  border-radius: var(--radius-lg);
  background: var(--bg);
}
.poster-controls { display: grid; gap: 14px; align-content: start; }
.poster-label { font-size: 13px; font-weight: 800; color: var(--ink); letter-spacing: .02em; }
.poster-targets { display: flex; flex-wrap: wrap; gap: 8px; }
.poster-chip {
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
  color: var(--ink);
  font-size: 13px;
  cursor: pointer;
}
.poster-chip:hover { border-color: var(--ink); }
.poster-chip:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.poster-chip[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--yellow);
  color: var(--ink);
  font-weight: 800;
}
.poster-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.poster-preview {
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--share-soft);
}
/* 未生成时收起空白画布，只留一句说明，避免看起来像坏掉的图 */
.poster-preview:has(.poster-empty:not([hidden])) { min-height: 260px; align-content: center; }
.poster-preview:has(.poster-empty:not([hidden])) .poster-canvas { display: none; }
.poster-canvas {
  width: 100%;
  max-width: 360px;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #f7f3e8;
}
.poster-empty {
  max-width: 320px;
  padding: 12px 0;
  font-size: 13px;
  line-height: 1.8;
  text-align: center;
  color: var(--ink-dim);
}
.small { font-size: 12px; line-height: 1.75; color: var(--ink-dim); }

/* ---------- 建议 ---------- */
.share-tips {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  counter-reset: tip;
}
.share-tips li { border-top: 2px solid var(--ink); padding-top: 14px; counter-increment: tip; }
.share-tips b { display: block; margin-bottom: 6px; font-size: 16px; }
.share-tips b::before { content: counter(tip, decimal-leading-zero) " / "; color: var(--share-clay); font-size: 12px; }
.share-tips span { font-size: 13px; line-height: 1.85; color: var(--ink-dim); }

/* ---------- 边界与页脚 ---------- */
.share-page .share-boundary {
  border-bottom: 0;
  padding-top: 34px;
}
.share-boundary h2 { font-size: 22px; margin-bottom: 10px; }
.share-boundary p {
  max-width: 860px;
  margin-bottom: 10px;
  font-size: 13.5px;
  line-height: 1.9;
  color: var(--ink-dim);
}
.share-footer {
  padding-top: 30px;
  padding-bottom: 48px;
  font-size: 12px;
  line-height: 1.8;
  color: var(--ink-dim);
  text-align: center;
}
.share-footer p + p { margin-top: 4px; }
.share-footer a { text-decoration: underline; text-underline-offset: 4px; }
.share-footer a:hover { color: var(--ink); }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .share-grid { grid-template-columns: 1fr; }
  .poster-panel { grid-template-columns: 1fr; gap: 20px; }
  .share-tips { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 700px) {
  .share-page .shell,
  .share-page .share-hero { padding-left: 20px; padding-right: 20px; }
  .share-page .share-hero { padding-top: 32px; padding-bottom: 24px; }
  .share-page .share-section { padding: 30px 0; }
  .poster-panel { padding: 16px; }
  .poster-canvas { max-width: 300px; }
}
@media (max-width: 400px) {
  .share-page .share-hero h1 { font-size: 30px; }
  .sp-mini { padding: 8px 10px; }
  .share-qr-box { width: 112px; height: 112px; }
  .share-card__actions { grid-template-columns: minmax(0, 1fr); }
  .share-card__actions .sp-mini:last-child { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .share-page *,
  .share-page *::before,
  .share-page *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (prefers-contrast: more) {
  .share-card,
  .poster-preview,
  .share-qr-box { border-width: 2px; }
}
