/* A / L · editorial annotation and single-column reading · HTML/CSS */
:root {
  --fm-share-paper: #f8f3e7;
  --fm-share-forest: #1e3526;
  --fm-share-ink: #17291d;
  --fm-share-muted: #52624a;
  --fm-share-rule: #b6bda9;
  --fm-share-sans: system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
  --fm-share-serif: "Songti SC", "Noto Serif CJK SC", serif;
}

.card .meta:has(.fm-share-trigger) { align-items: center; gap: 8px; }
.card .meta:has(.fm-share-trigger) time { margin-inline-start: auto; white-space: nowrap; }
.fm-share-trigger {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--fm-share-muted);
}
.fm-share-trigger::before {
  content: '';
  display: block;
  width: 16px;
  height: 16px;
  background-color: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round'%3E%3Cpath d='m8.4 10.6 7.2-4.2M8.4 13.4l7.2 4.2'/%3E%3Ccircle cx='6' cy='12' r='2.75'/%3E%3Ccircle cx='18' cy='5' r='2.75'/%3E%3Ccircle cx='18' cy='19' r='2.75'/%3E%3C/svg%3E") center / contain no-repeat;
}
.fm-share-trigger:hover,
.fm-share-trigger:focus-visible { color: var(--fm-share-forest); }
.fm-share-trigger:active::before { opacity: .7; }

.fm-share-dialog {
  box-sizing: border-box;
  width: min(472px, calc(100% - 24px));
  max-width: none;
  max-height: min(760px, calc(100dvh - 24px));
  padding: 0;
  border: 1px solid var(--fm-share-forest);
  background: var(--fm-share-paper);
  color: var(--fm-share-ink);
  font: 15px/1.5 var(--fm-share-sans);
  overscroll-behavior: contain;
}
.fm-share-dialog::backdrop { background: rgb(17 29 20 / .64); }
.fm-share-panel { padding: 16px 20px; }
.fm-share-panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.fm-share-panel-head h2 { margin: 0; font: 800 26px/1.2 var(--fm-share-serif); }
.fm-share-close {
  width: 44px;
  height: 44px;
  border: 1px solid var(--fm-share-rule);
  background: transparent;
  color: inherit;
  font: 24px/1 var(--fm-share-sans);
  cursor: pointer;
}
.fm-share-item { margin: 4px 0 12px; font-weight: 650; overflow-wrap: anywhere; }
.fm-share-preview {
  display: block;
  width: min(100%, 312px);
  height: auto;
  max-height: 43dvh;
  margin: 0 auto 16px;
  object-fit: contain;
  background: #eee9db;
}
.fm-share-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.fm-share-actions :is(button, a) {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--fm-share-muted);
  border-radius: 2px;
  background: var(--fm-share-paper);
  color: var(--fm-share-forest);
  font: 650 14px/1.3 var(--fm-share-sans);
  text-decoration: none;
  cursor: pointer;
}
.fm-share-actions [hidden], .fm-share-links [hidden] { display: none; }
.fm-share-actions .fm-share-primary { background: var(--fm-share-forest); color: var(--fm-share-paper); }
.fm-share-actions :is(button, a):hover, .fm-share-close:hover { box-shadow: inset 0 0 0 1px currentColor; }
.fm-share-actions :is(button, a):active { transform: translateY(1px); }
.fm-share-links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.fm-share-links a { display: inline-flex; min-height: 44px; align-items: center; color: var(--fm-share-forest); text-decoration: underline; text-underline-offset: 3px; }
.fm-share-panel [data-share-wechat], .fm-share-feedback { margin: 0; color: var(--fm-share-muted); font-size: 13px; }
.fm-share-feedback:not(:empty) { margin-top: 8px; }
.fm-share-panel input { box-sizing: border-box; width: 100%; margin-top: 8px; padding: 8px; font-size: 16px; }
:is(.fm-share-dialog, .fm-story) :is(a, button, summary, input):focus-visible,
.fm-share-trigger:focus-visible { outline: 2px solid #527740; outline-offset: 2px; }

.fm-story { margin: 0; background: var(--fm-share-paper); color: var(--fm-share-ink); font: 16px/1.75 var(--fm-share-sans); }
.fm-story-main { width: min(730px, calc(100% - 40px)); margin: auto; }
.fm-story nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--fm-share-rule); }
.fm-story nav a, .fm-story footer a, .fm-story-traces a { color: var(--fm-share-forest); text-underline-offset: 4px; }
.fm-story a.fm-story-brand { font: 900 28px/1.2 var(--fm-share-serif); text-decoration: none; }
.fm-story-brand i { margin-left: 4px; font: italic 700 .8em Georgia, serif; }
.fm-story article header { padding: 32px 0 16px; }
.fm-story-kicker, .fm-story-label { color: var(--fm-share-muted); font: 650 13px/1.5 var(--fm-share-sans); }
.fm-story-kicker { margin: 0 0 8px; }
.fm-story h1 { margin: 0; color: var(--fm-share-forest); font: 900 clamp(34px, 6vw, 66px)/1.16 var(--fm-share-serif); text-wrap: balance; overflow-wrap: anywhere; }
.fm-story-label { margin: 0 0 4px; }
.fm-story-summary { margin: 0 0 24px; font-size: clamp(17px, 2.5vw, 20px); overflow-wrap: anywhere; }
.fm-story-use { padding: 12px 16px; background: #e9eddb; border-inline-start: 3px solid var(--fm-share-muted); }
.fm-story-use p { margin: 4px 0 0; }
.fm-story-source { margin: 16px 0; border-block-end: 1px solid var(--fm-share-rule); padding: 4px 0 12px; }
.fm-story-source summary { min-height: 40px; cursor: pointer; font-weight: 650; }
.fm-story-source p { margin: 0 0 4px; }
.fm-story-traces { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.fm-story footer { padding: 20px 0 32px; font-size: 14px; }

@media (max-width: 400px) {
  .fm-share-panel { padding: 12px; }
  .fm-share-actions :is(button, a) { padding-inline: 8px; }
}
