/* ============================================================
   笔迹 — 公开分享页
   ============================================================ */

.share-body {
  min-height: 100vh;
  background:
    radial-gradient(900px 480px at 50% -8%, var(--accent-softer), transparent 70%),
    var(--bg);
}

/* 顶部墨迹进度条样式在 base.css，全站共用 */

/* 顶部统一导航栏样式在 base.css；这里只放正文内的复制链接按钮 */
.share-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.share-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.share-card-btn {
  border-color: color-mix(in srgb, var(--accent) 26%, var(--line));
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.share-copy:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  background: var(--accent-soft);
  color: var(--accent-strong);
  transform: translateY(-1px);
}

.share-copy .icon {
  width: 14px;
  height: 14px;
}

.share-copy[disabled] {
  opacity: 0.55;
  pointer-events: none;
}

/* ---------- 主体 ---------- */
.share-main {
  display: grid;
  grid-template-columns: minmax(0, 760px) 264px;
  gap: 64px;
  align-items: start;
  max-width: 1160px;
  margin: 0 auto;
  padding: 26px 28px 80px;
}

.share-article {
  min-width: 0;
  animation: fadeUp 0.6s ease both;
}

.share-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.share-label {
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: 0.2em;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  padding: 5px 10px;
  border-radius: 99px;
  font-family: var(--font-mono);
}

.share-date {
  font-size: 12.5px;
  color: var(--muted);
}

.share-title {
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -0.026em;
  color: var(--ink);
  margin-bottom: 20px;
  text-wrap: balance;
}

.share-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.share-author {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
  font-weight: 600;
}

.share-author i {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 82%, #fff 18%), var(--accent-strong));
  color: #fff;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.meta-sep {
  color: var(--faint);
}

.share-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 12%, transparent);
  white-space: nowrap;
}

.share-rule {
  position: relative;
  height: 1px;
  margin: 34px 0 38px;
  background: var(--line);
}

.share-rule span {
  position: absolute;
  left: 0;
  top: -1px;
  width: 72px;
  height: 3px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--coral));
}

.share-content {
  font-size: var(--share-font-size, 16.5px);
  line-height: 1.85;
  color: var(--ink);
}

.share-content p {
  margin-bottom: 1.05em;
}

.share-content h1 {
  font-size: 1.72em;
  margin: 1.6em 0 0.55em;
}

.share-content h2 {
  font-size: 1.36em;
  margin: 1.7em 0 0.5em;
  padding-bottom: 0.28em;
  border-bottom: 1px solid var(--line);
}

/* 章节前一枚手写的 01、02：作者自己写了「一、二、」的就不再添一遍 */
.share-content h2 .sec-no {
  display: inline-block;
  margin-right: 0.5em;
  font-family: var(--font-hand);
  font-size: 0.6em;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--faint);
  transform: translateY(-0.08em);
}

.share-content h3 {
  font-size: 1.12em;
  margin: 1.5em 0 0.4em;
}

/* 目录用的锚点要让开吸顶的导航与阅读套件 */
.share-content h1[id],
.share-content h2[id],
.share-content h3[id] {
  scroll-margin-top: calc(var(--nav-h) + 74px);
}

/* 往后翻到新的一节时，这一节的标题像纸一样落一下（只由 JS 加一次性类，不做整页动画） */
.share-content h2.is-turned {
  animation: secTurn 0.42s cubic-bezier(0.22, 0.7, 0.28, 1) backwards;
}

@keyframes secTurn {
  from {
    opacity: 0.4;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .share-content h2.is-turned {
    animation: none;
  }
}

/* ---------- 阅读套件：目录 / 字号 / 深浅色 ---------- */
.read-kit {
  position: sticky;
  top: calc(var(--nav-h) + 10px);
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 0 0 20px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: blur(7px);
  box-shadow: 0 8px 22px rgba(18, 20, 28, 0.07);
}

.rk-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  font-size: 12.5px;
  color: var(--ink-2);
  padding: 4px 9px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}

.rk-btn .icon {
  width: 14px;
  height: 14px;
}

.rk-btn:hover,
.rk-btn.is-on {
  background: var(--accent-soft);
  color: var(--accent);
}

.rk-sep {
  width: 1px;
  height: 17px;
  background: var(--line);
  flex: 0 0 auto;
}

.rk-label {
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.rk-seg {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.rk-seg-btn {
  border: 0;
  background: transparent;
  padding: 3px 9px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
}

.rk-seg-btn + .rk-seg-btn {
  border-left: 1px solid var(--line);
}

.rk-seg-btn:hover {
  color: var(--accent);
}

.rk-seg-btn.is-on {
  background: var(--accent);
  color: #fff;
}

.read-kit .theme-toggle {
  width: 30px;
  height: 27px;
  border-radius: 8px;
}

/* 目录：宽屏住进右侧栏，跟着阅读一直看得见 */
.share-toc {
  margin: 0;
  padding: 13px 12px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1px;
  max-height: calc(100vh - var(--nav-h) - 52px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.toc-title {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 2px 8px 8px;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.toc-title::before {
  content: "";
  width: 12px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--accent);
}

.toc-close {
  display: none;
  margin-left: auto;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}

.toc-close:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.share-toc a {
  font-size: 12.8px;
  color: var(--ink-2);
  line-height: 1.5;
  padding: 5px 8px;
  border-radius: 7px;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.share-toc a:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.share-toc a.is-active {
  color: var(--accent);
  font-weight: 650;
  background: var(--accent-soft);
}

.share-toc .toc-l2 {
  padding-left: 18px;
}

.share-toc .toc-l3 {
  padding-left: 30px;
  font-size: 12px;
  color: var(--muted);
}

@media (min-width: 1021px) {
  .read-kit #rk-toc,
  .read-kit #rk-toc-sep {
    display: none;
  }
}

@media (max-width: 720px) {
  .read-kit {
    gap: 6px;
    padding: 4px 6px;
  }

  .rk-label {
    display: none;
  }
}

/* ---------- 内嵌笔记卡 ---------- */
.note-embed {
  display: block;
  margin: 0.9em 0;
  padding: 14px 16px 12px;
  border: 1px solid var(--line);
  border-left: 3px solid color-mix(in srgb, var(--accent) 60%, transparent);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 2px 10px rgba(18, 20, 28, 0.05);
  text-decoration: none;
  color: inherit;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.note-embed:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(18, 20, 28, 0.1);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
}

.ne-kicker {
  display: block;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--accent);
  font-family: var(--font-mono);
  margin-bottom: 5px;
}

.ne-title {
  display: block;
  font-size: 1.02em;
  font-weight: 700;
  line-height: 1.45;
  color: var(--ink);
}

.ne-excerpt {
  display: block;
  margin-top: 4px;
  font-size: 0.9em;
  line-height: 1.6;
  color: var(--muted);
}

.ne-foot {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  font-size: 11.5px;
  color: var(--muted);
}

.ne-foot i {
  width: 19px;
  height: 19px;
  border-radius: 99px;
  display: inline-grid;
  place-items: center;
  font-size: 9.5px;
  font-style: normal;
  color: #fff;
  background: var(--accent);
}

.ne-foot em {
  font-style: normal;
  opacity: 0.85;
}

.ne-go {
  margin-left: auto;
  color: var(--accent);
  opacity: 0.7;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.note-embed:hover .ne-go {
  opacity: 1;
  transform: translateX(2px);
}

/* ---------- 页脚签名 ---------- */
.share-foot {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.share-sign {
  display: flex;
  align-items: center;
  gap: 14px;
}

.share-sign img {
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}

.share-sign p {
  font-size: 14px;
  color: var(--ink-2);
  margin-bottom: 3px;
}

.share-sign p strong {
  color: var(--ink);
}

.share-sign span {
  font-size: 12.5px;
  color: var(--muted);
}

.share-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
  background: linear-gradient(120deg, var(--accent-softer), transparent 70%), var(--surface);
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.share-cta:hover {
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
  transform: translateY(-1px);
}

.share-cta span {
  font-size: 13.5px;
  color: var(--ink-2);
}

.share-cta b {
  font-size: 13.5px;
  color: var(--accent);
  white-space: nowrap;
}

/* ---------- 侧栏 ---------- */
.share-side {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: fadeUp 0.6s 0.12s ease backwards;
}

.side-card {
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.side-card img {
  border-radius: 11px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
}

.side-card h3 {
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -0.01em;
  margin-bottom: 7px;
}

.side-card p {
  font-size: 12.8px;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 16px;
}

.side-card .btn {
  font-size: 13px;
}

/* 侧栏二维码：扫一下在手机接着读，白底纸片不受深色影响 */
.side-qr {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.side-qr canvas {
  flex: 0 0 auto;
  padding: 4px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--line-strong);
}

.side-qr p {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.side-qr b {
  font-size: 13.2px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.side-qr span {
  font-size: 12.4px;
  line-height: 1.6;
  color: var(--muted);
}

.side-login {
  display: block;
  text-align: center;
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--muted);
  transition: color 0.15s ease;
}

.side-login:hover {
  color: var(--accent);
}

.side-note {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px dashed var(--line-strong);
  color: var(--muted);
}

.side-note span {
  color: var(--coral);
  font-size: 15px;
  line-height: 1.4;
}

.side-note p {
  font-size: 12px;
  line-height: 1.65;
}

/* ---------- 底部 ---------- */
.share-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 26px 28px 40px;
  font-size: 12.5px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.share-footer .dot {
  color: var(--faint);
}

.share-footer a:hover {
  color: var(--accent);
}

/* ---------- 提示 ---------- */
.share-toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  z-index: 120;
  transform: translate(-50%, 14px);
  padding: 10px 18px;
  border-radius: 99px;
  background: var(--ink);
  color: var(--bg);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.share-toast.is-show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- 分享图预览 ---------- */
.card-layer {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: grid;
  place-items: center;
  padding: 20px;
  background: color-mix(in srgb, var(--ink) 46%, transparent);
  backdrop-filter: blur(8px);
  animation: fadeIn 0.2s ease both;
}

.card-panel {
  width: min(372px, 92vw);
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(20, 18, 40, 0.32);
  animation: cardUp 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes cardUp {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.card-head b {
  display: block;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 3px;
}

.card-head span {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.5;
}

.card-close {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 17px;
  line-height: 1;
}

.card-close:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

/* 尺寸选择：一行胶囊，选中项用主色描边 */
.card-sizes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.cs-sep {
  width: 1px;
  align-self: stretch;
  min-height: 18px;
  margin: 0 3px;
  background: var(--line);
}

.cs-btn {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.cs-btn:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

.cs-btn.is-on {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 42%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

/* 长图很高，放进可滚动容器里看，不再等比缩成一窄条 */
.card-view {
  min-height: 0;
  overflow: auto;
  border-radius: 14px;
  scrollbar-width: thin;
}

.card-preview {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100vh - 236px);
  object-fit: contain;
  border-radius: 14px;
  background: #F8F7F3;
  box-shadow: inset 0 0 0 1px rgba(20, 22, 30, 0.06);
}

.card-panel.is-long {
  width: min(430px, 94vw);
}

.card-panel.is-long .card-preview {
  max-height: none;
  box-shadow: none;
  border-radius: 12px;
}

.card-foot {
  display: flex;
  gap: 8px;
}

.card-foot .btn {
  flex: 1;
}

body.is-card-open {
  overflow: hidden;
}

/* ---------- 404 ---------- */
.share-missing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 40px 24px;
  text-align: center;
}

.share-missing img {
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  margin-bottom: 6px;
}

.share-missing h1 {
  font-size: 26px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.share-missing p {
  max-width: 420px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 10px;
}

/* ---------- 分享页互动 ---------- */
.share-snap-chip {
  font-size: 10.5px;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  color: var(--accent-strong);
  background: var(--accent-softer);
  border: 1px dashed color-mix(in srgb, var(--accent) 35%, transparent);
  padding: 4px 9px;
  border-radius: 99px;
}

a.share-author {
  text-decoration: none;
  transition: color 0.15s ease;
}

a.share-author:hover {
  color: var(--accent);
}

.share-like-mini {
  color: var(--coral);
  font-weight: 600;
}

.share-react {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-2);
}

.share-react form {
  margin: 0;
}

.react-like {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 650;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.react-like .icon {
  width: 16px;
  height: 16px;
  color: var(--coral);
  transition: fill 0.16s ease;
}

.react-like b {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 700;
}

.react-like:hover {
  border-color: color-mix(in srgb, var(--coral) 45%, transparent);
  transform: translateY(-1px);
}

.react-like.is-on {
  background: color-mix(in srgb, var(--coral) 11%, var(--surface));
  border-color: color-mix(in srgb, var(--coral) 42%, transparent);
  color: var(--ink);
}

.react-like.is-on .icon {
  fill: var(--coral);
}

.react-hint {
  font-size: 11.5px;
  color: var(--faint);
}

.react-report {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

.react-report:hover {
  color: var(--danger);
}

.share-reported {
  margin: 26px 0 -6px;
  padding: 11px 14px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--ok) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--ok) 26%, transparent);
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.6;
}

/* 举报弹层 */
.report-layer {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  padding: 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: rgba(18, 20, 26, 0.5);
  animation: reportFade 0.18s ease both;
}

.report-layer[hidden] {
  display: none;
}

body.is-report-open {
  overflow: hidden;
}

/* margin:auto 在 flex 里既能居中，又不会被视口裁掉顶部 */
.report-card {
  width: min(430px, 100%);
  margin: auto;
  padding: 20px 20px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: reportCard 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}

.report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.report-head b {
  font-size: 16px;
  letter-spacing: -0.01em;
}

.report-close {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
}

.report-close:hover {
  background: var(--surface-3);
  color: var(--ink);
}

.report-lead {
  margin: 8px 0 0;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--muted);
}

.report-options {
  display: grid;
  gap: 7px;
  margin: 16px 0 12px;
}

.report-options label {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease;
}

.report-options input {
  accent-color: var(--accent);
  margin: 0;
}

.report-options label:hover {
  border-color: var(--line-strong);
}

.report-options label:has(input:checked) {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: var(--accent-softer);
  color: var(--ink);
}

.report-card textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 13px;
  font-family: inherit;
  line-height: 1.6;
  resize: vertical;
  min-height: 74px;
}

.report-card textarea:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 9%, transparent);
}

.report-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

@keyframes reportFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes reportCard {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.side-author {
  display: block;
  margin-top: 12px;
  text-align: center;
  font-size: 11.5px;
  color: var(--accent);
  text-decoration: none;
}

.side-author:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 口令页 */
.share-gate {
  min-height: calc(100vh - 240px);
  display: grid;
  place-items: center;
  padding: 56px 24px 70px;
}

.share-gate-card {
  width: min(430px, 100%);
  padding: 38px 32px 30px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  text-align: center;
  animation: fadeUp 0.4s ease both;
}

.gate-lock {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 0 auto 16px;
  border-radius: 17px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
}

.gate-lock .icon {
  width: 25px;
  height: 25px;
}

.gate-kicker {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--faint);
}

.share-gate-card h1 {
  margin: 9px 0 8px;
  font-size: 25px;
  font-weight: 780;
  letter-spacing: -0.02em;
}

.gate-lead {
  margin: 0 auto 20px;
  max-width: 320px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

.gate-form {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.gate-form input {
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 14px;
  text-align: center;
  letter-spacing: 0.06em;
}

.gate-form input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 10%, transparent);
}

.gate-error {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--danger);
}

.gate-back {
  display: inline-block;
  margin-top: 18px;
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
}

.gate-back:hover {
  color: var(--accent);
}

/* ---------- 响应式 ---------- */
@media (max-width: 1020px) {
  .share-main {
    grid-template-columns: minmax(0, 1fr);
    gap: 44px;
    max-width: 780px;
  }

  /* 窄屏没有右栏：目录收成底部浮层，点「目录」才展开 */
  .share-toc {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    top: auto;
    z-index: 90;
    display: none;
    max-height: min(60vh, 460px);
    padding: 12px 12px 10px;
    box-shadow: var(--shadow-lg);
  }

  .share-toc.is-open {
    display: flex;
  }

  .toc-close {
    display: grid;
    place-items: center;
  }

  .share-side {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .side-card {
    flex: 1 1 300px;
  }

  .side-note {
    flex: 1 1 240px;
    align-items: center;
  }
}

@media (max-width: 720px) {
  .share-main {
    padding: 18px 20px 56px;
  }

  .share-title {
    font-size: 30px;
  }

  .share-content {
    font-size: var(--share-font-size, 15.5px);
  }

  .share-cta {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .share-footer {
    padding: 22px 20px 34px;
  }
}

@media (max-width: 460px) {
  .share-copy {
    padding: 5px 9px;
    font-size: 12px;
  }

  .share-meta {
    font-size: 12px;
  }

  .share-kicker {
    flex-wrap: wrap;
  }
}

/* ---------- 合集（小册子） ---------- */
.book-cover {
  margin-bottom: 6px;
}

.book-lead {
  font-size: 15.5px;
  line-height: 1.78;
  color: var(--ink-2);
  margin: -8px 0 18px;
}

.book-chapter {
  scroll-margin-top: calc(var(--nav-h) + 22px);
  animation: fadeUp 0.55s ease both;
}

.book-no {
  display: flex;
  align-items: baseline;
  gap: 11px;
  margin: 0 0 14px;
}

.book-no b {
  flex: none;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 16%, transparent);
  border-radius: 7px;
  padding: 3px 7px;
}

.book-no span {
  font-size: clamp(20px, 2.6vw, 25px);
  font-weight: 760;
  letter-spacing: -0.018em;
  line-height: 1.3;
  color: var(--ink);
  text-wrap: balance;
}

.book-body {
  margin-bottom: 14px;
}

.book-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
  margin: 0 0 26px;
}

.book-toc {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: 16px 10px 12px 16px;
}

.book-toc > b {
  display: block;
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: 0.16em;
  color: var(--faint);
  margin: 0 0 10px 6px;
}

.book-toc a {
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 12.8px;
  line-height: 1.55;
  color: var(--ink-2);
  transition: background 0.15s ease, color 0.15s ease;
}

.book-toc a i {
  flex: none;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--faint);
  min-width: 15px;
}

.book-toc a span {
  min-width: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.book-toc a:hover {
  background: var(--surface-3);
  color: var(--ink);
}

.book-toc a.is-now {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.book-toc a.is-now i {
  color: var(--accent);
}

.book-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 46px 20px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--surface) 55%, transparent);
}

.book-empty span {
  font-size: 26px;
  color: var(--faint);
}

.book-empty p {
  max-width: 380px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--muted);
}

@media (max-width: 1020px) {
  .book-toc {
    order: -1;
    flex: 1 1 100%;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 2px 8px;
    padding-bottom: 14px;
  }

  .book-toc > b {
    grid-column: 1 / -1;
  }
}

/* ---------------- 文末折角 ---------------- */
.share-fold {
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 26px 0 4px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  color: var(--faint);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.share-fold.is-ready {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.share-fold-flap {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 3px;
  background: linear-gradient(315deg, var(--surface) 0%, var(--surface) 48%, var(--line) 50%, var(--surface-2) 100%);
  box-shadow: -2px -2px 6px rgba(41, 35, 24, 0.08);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
}

.share-fold:hover .share-fold-flap {
  transform: translate(-2px, -2px);
}

.share-fold.is-folded .share-fold-flap {
  transform: rotate(-180deg) translate(-1px, -1px);
  border-radius: 0 0 0 3px;
}

.share-fold-text {
  font-style: normal;
  font-size: 12px;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.share-fold.is-folded .share-fold-text {
  opacity: 1;
  transform: translateX(0);
}

/* ---------------- 读到底，盖一枚「读完」 ---------------- */
.read-stamp {
  display: block;
  width: 66px;
  margin: 34px 6px 8px auto;
  padding: 11px 0;
  border: 3px solid #b3402d;
  border-radius: 5px;
  box-shadow: inset 0 0 0 1px rgba(179, 64, 45, 0.18);
  writing-mode: vertical-rl;
  font-family: var(--font-hand);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: 0.1em;
  text-align: center;
  color: #b3402d;
  opacity: 0;
  transform: rotate(-7deg) scale(1.5);
  transform-origin: 50% 50%;
}

.read-stamp.is-on {
  animation: stampDown 0.46s cubic-bezier(0.2, 0.9, 0.3, 1.15) forwards;
}

@keyframes stampDown {
  0% { opacity: 0; transform: rotate(-7deg) scale(1.5); }
  55% { opacity: 0.95; transform: rotate(-7deg) scale(0.96); }
  100% { opacity: 0.86; transform: rotate(-7deg) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .read-stamp.is-on { animation: none; opacity: 0.86; transform: rotate(-7deg); }
}

@media (max-width: 720px) {
  .read-stamp { width: 58px; font-size: 19px; margin: 28px 2px 6px auto; }
}

/* ---------------- 读完再读三篇 ---------------- */
.share-more {
  width: min(1040px, calc(100% - 40px));
  margin: 10px auto 54px;
}

.share-more-head h2 {
  margin: 0 0 6px;
  font-size: 19px;
  font-weight: 760;
  letter-spacing: -0.01em;
}

.share-more-head p {
  margin: 0 0 16px;
  font-size: 12.5px;
  color: var(--faint);
}

.share-more-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.share-more-card {
  display: grid;
  gap: 8px;
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.share-more-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.share-more-ava {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--ava, var(--accent)) 16%, transparent);
  color: var(--ava, var(--accent));
  font-size: 10.5px;
  font-weight: 700;
}

.share-more-card b {
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink);
}

.share-more-card p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.share-more-card em {
  font-style: normal;
  font-size: 11.5px;
  color: var(--faint);
}

@media (max-width: 720px) {
  .share-more-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .share-more {
    width: calc(100% - 28px);
    margin-bottom: 38px;
  }
}
