/* 分享弹层（dialog.share-sheet）· 羊皮纸手抄本版。
   作用域 html body.ms-chrome.ms-chrome；颜色全部取自 css/manuscript.css 的 --ms-* 变量。
   弹层结构和交互仍由 js/share.js 负责，这里只换皮。图标全部是线描 svg，不用 emoji，不加装饰图。 */

/* 弹层本体：羊皮纸底 + 细金线 + 内嵌一圈亮边 + 柔和大范围暖色阴影 */
html body.ms-chrome.ms-chrome dialog.share-sheet{
  --share-ink:var(--ms-ink);--share-muted:var(--ms-ink-2);--share-line:var(--ms-rule);
  color:var(--ms-ink)!important;
  background:var(--ms-paper) url(/images/manuscript/nav-paper.webp?v=3) center/cover!important;
  border:1px solid #b07d1e!important;border-top-color:#b07d1e!important;
  border-radius:1.125rem!important;
  box-shadow:inset 0 0 0 .25rem rgba(255,251,238,.55),inset 0 0 0 .3125rem rgba(150,104,30,.22),0 2.875rem 5.625rem -2.125rem rgba(40,22,4,.7),0 .75rem 1.875rem -1.125rem rgba(40,22,4,.45)!important;
  font-family:var(--ms-serif)!important;
  -webkit-backdrop-filter:none!important;backdrop-filter:none!important;
}
html body.ms-chrome.ms-chrome dialog.share-sheet[open]{animation:ms-share-in .6s var(--ms-ease) both!important}
@keyframes ms-share-in{from{transform:translateY(1.5rem);opacity:0}to{transform:none;opacity:1}}
html body.ms-chrome.ms-chrome dialog.share-sheet::backdrop{background:rgba(43,32,20,.62)!important;-webkit-backdrop-filter:blur(.1875rem);backdrop-filter:blur(.1875rem)}

/* 标题区：居中细金字，下面一条葡萄分隔线（素材图） */
html body.ms-chrome.ms-chrome .share-sheet__head{padding:clamp(1.25rem,3vw,1.75rem) 1.5rem .875rem!important;border-bottom:0!important;text-align:center}
html body.ms-chrome.ms-chrome .share-sheet__head::before{content:none!important}
html body.ms-chrome.ms-chrome .share-sheet__head::after{content:""!important;display:block!important;width:min(22.5rem,80%)!important;height:1.875rem!important;margin:.75rem auto 0!important;background:url(/images/manuscript/divider.webp?v=3) center/contain no-repeat!important}
html body.ms-chrome.ms-chrome .share-sheet .share-sheet__head h2{margin:0 0 .4em!important;text-align:center!important;font:700 clamp(1.375rem,2.4vw,1.625rem)/1.3 var(--ms-serif)!important;letter-spacing:.14em!important;color:var(--ms-gilt)!important;text-indent:.14em}
html body.ms-chrome.ms-chrome .share-sheet__hint{margin:0 auto!important;max-width:none!important;font-size:.875rem!important;line-height:1.7!important;letter-spacing:.04em!important;color:var(--ms-ink-2)!important;text-align:center!important}

/* 预览卡：纸上小卡，细金线，图片加金边 */
html body.ms-chrome.ms-chrome .share-preview{margin:1.125rem 1.375rem .375rem!important;padding:.875rem 1rem!important;border:1px solid var(--ms-rule)!important;border-radius:.875rem!important;background:rgba(255,251,238,.55)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.7),0 1rem 1.875rem -1.5rem rgba(90,58,10,.5)!important;color:var(--ms-ink)!important}
html body.ms-chrome.ms-chrome .share-preview__image{object-fit:cover!important;object-position:center!important;border:1px solid #a9781f!important;border-radius:.625rem!important;box-shadow:0 0 0 .1875rem rgba(255,251,238,.7),0 0 0 .25rem var(--ms-rule)!important}
html body.ms-chrome.ms-chrome .share-preview h3{text-align:center!important;text-wrap:balance!important;word-break:keep-all!important;color:var(--ms-ink)!important;font-family:var(--ms-serif)!important;font-weight:700!important;letter-spacing:.04em!important}
html body.ms-chrome.ms-chrome .share-preview__brand{white-space:nowrap!important;color:var(--ms-gilt)!important;font-weight:600!important}
html body.ms-chrome.ms-chrome .share-preview__summary{color:var(--ms-ink-2)!important;font-size:.875rem!important;line-height:1.8!important}

/* 分享方式：金色描边圆形图标 + 深棕字；悬停或聚焦时转成鎏金药丸底色 */
html body.ms-chrome.ms-chrome .share-sheet__row{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;justify-items:center!important;gap:1.375rem 0!important;padding:.75rem 1rem 1.125rem!important}
html body.ms-chrome.ms-chrome .share-sheet__item{grid-column:auto!important;min-width:0!important;width:100%!important;color:var(--ms-ink-2)!important;font-family:var(--ms-serif)!important;font-size:.7812rem!important;letter-spacing:.04em!important;text-decoration:none!important}
html body.ms-chrome.ms-chrome .share-sheet__icon{width:3.375rem!important;height:3.375rem!important;border:1.5px solid var(--ms-gilt-hi)!important;border-radius:50%!important;color:var(--ms-gilt)!important;background:rgba(255,250,235,.7)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.75),0 .5rem 1rem -.625rem rgba(90,58,10,.55)!important;transition:background .6s var(--ms-ease),color .6s var(--ms-ease),box-shadow .6s var(--ms-ease),transform .6s var(--ms-ease)!important}
html body.ms-chrome.ms-chrome .share-sheet__icon svg{stroke-width:1.5!important}
html body.ms-chrome.ms-chrome .share-sheet__item:hover .share-sheet__icon{border-color:#a9781f!important;background:rgba(222,196,142,.28)!important;color:var(--ms-gilt)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.6),0 .625rem 1.125rem -.625rem rgba(90,58,10,.5)!important;transform:translateY(-1px)}
html body.ms-chrome.ms-chrome .share-sheet__item:hover{color:var(--ms-ink)!important}
html body.ms-chrome.ms-chrome .share-sheet__item:active .share-sheet__icon{transform:scale(.97)!important}
html body.ms-chrome.ms-chrome .share-sheet :focus-visible{outline:0!important}
html body.ms-chrome.ms-chrome .share-sheet__item,html body.ms-chrome.ms-chrome .share-sheet__item:focus,html body.ms-chrome.ms-chrome .share-sheet__item:focus-visible{outline:0!important;box-shadow:none!important;border:0!important}
html body.ms-chrome.ms-chrome .share-sheet__item:focus-visible .share-sheet__icon{box-shadow:0 0 0 .25rem rgba(196,156,92,.38),inset 0 1px 0 rgba(255,255,255,.5)!important}
/* 桌面：垂直水平居中的对话框，上下至少留 40px，超高时内部滚动 */
@media (min-width:821px){
  html body.ms-chrome.ms-chrome dialog.share-sheet{inset:0!important;top:0!important;bottom:0!important;left:0!important;right:0!important;margin:auto!important;width:min(47.5rem,calc(100vw - 5rem))!important;height:fit-content!important;max-height:calc(100dvh - 5rem)!important;overflow-y:auto!important;border-radius:1.125rem!important}
}
html body.ms-chrome.ms-chrome .share-sheet__item:first-child .share-sheet__icon{border-color:#a9781f!important;background:linear-gradient(180deg,#e9c66e,#c9983a)!important;color:#3a2206!important}

/* 下方面板（二维码、复制链接） */
html body.ms-chrome.ms-chrome .share-sheet__panel{padding:.375rem 1.5rem 1.125rem!important}
html body.ms-chrome.ms-chrome .share-sheet__panel p{color:var(--ms-ink)!important;font-size:.9062rem!important;line-height:1.85!important;text-indent:0!important}
html body.ms-chrome.ms-chrome .share-sheet__panel .engage-qr{padding:.625rem;border:1px solid var(--ms-rule);border-radius:.875rem;background:rgba(255,251,238,.75);box-shadow:0 1.125rem 2.125rem -1.625rem rgba(70,44,8,.6)}
html body.ms-chrome.ms-chrome .share-sheet__panel textarea{color:var(--ms-ink)!important;background:rgba(255,251,238,.66)!important;border:1px solid var(--ms-rule)!important;border-radius:.75rem!important}
html body.ms-chrome.ms-chrome .share-sheet__panel .engage-btn{min-height:2.875rem!important;padding:0 1.6em!important;border:1px solid var(--ms-rule)!important;border-radius:62.4375rem!important;color:var(--ms-ink-2)!important;background:rgba(255,250,235,.7)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.7)!important;font-family:var(--ms-serif)!important;letter-spacing:.08em!important;transition:background .5s var(--ms-ease),color .5s var(--ms-ease)!important}
html body.ms-chrome.ms-chrome .share-sheet__panel .engage-btn:hover{background:linear-gradient(180deg,#e9c66e,#c9983a)!important;border-color:#a9781f!important;color:#3a2206!important}

/* 提示语和“返回页面”：红字提示 + 金线分隔的药丸按钮 */
html body.ms-chrome.ms-chrome .share-sheet__toast{min-height:1.5rem!important;padding:0 1.5rem .625rem!important;color:var(--ms-red)!important;font-family:var(--ms-serif)!important;font-size:.875rem!important;font-weight:600!important;letter-spacing:.04em!important}
html body.ms-chrome.ms-chrome .share-sheet__cancel{display:flex!important;align-items:center!important;justify-content:center!important;width:auto!important;min-width:12em!important;min-height:3.125rem!important;margin:.25rem auto 1.375rem!important;padding:0 2.2em!important;border:1px solid #a9781f!important;border-radius:62.4375rem!important;background:linear-gradient(180deg,rgba(255,250,235,.9),rgba(239,223,184,.9))!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.8),0 .5rem 1rem -.75rem rgba(90,58,10,.6)!important;color:var(--ms-gilt)!important;font-family:var(--ms-serif)!important;font-size:.9375rem!important;font-weight:600!important;letter-spacing:.2em!important;transition:background .5s var(--ms-ease),color .5s var(--ms-ease)!important}
html body.ms-chrome.ms-chrome .share-sheet__cancel:hover{background:linear-gradient(180deg,#e9c66e,#c9983a)!important;color:#3a2206!important}
html body.ms-chrome.ms-chrome .share-sheet__cancel:active{transform:scale(.98)}

@media (prefers-reduced-motion:reduce){
  html body.ms-chrome.ms-chrome dialog.share-sheet[open]{animation:none!important}
  html body.ms-chrome.ms-chrome .share-sheet__icon,html body.ms-chrome.ms-chrome .share-sheet__cancel{transition:none!important}
}

@media (max-width:480px){
  html body.ms-chrome.ms-chrome .share-preview{margin:.875rem 1rem .25rem!important}
  html body.ms-chrome.ms-chrome .share-sheet__row{padding:.625rem .5rem .875rem!important}
  html body.ms-chrome.ms-chrome .share-sheet__icon{width:3.125rem!important;height:3.125rem!important}
}
