/* ============================================================================
   分享抽屉 —— **两端共用的一份样式**（网页版和手机端都加载它）
   ----------------------------------------------------------------------------
   为什么单独一个文件，而不是分别写进 app.css / m.css：
     这是全项目唯一一个「两端长得一样、行为也一样」的组件。写成两份的话，
     改一处忘一处**不会报错**，只会让两端慢慢分家；而 audit_mobile_tokens 只管
     设计令牌、管不到组件样式。所以这里一份文件、两端加载。
     ⚠️ 配套改动：scripts/audit_css.py 把本文件的类名也算进「两端各自已知的类」，
        否则模板一用就会被判成「模板在用、样式没定义」。
   只用 :root 里的**公共令牌**（那 47 个由 audit_mobile_tokens 盯着逐字相同）。
   ============================================================================ */

.sh-mask {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(26, 26, 29, .46);
  display: flex; align-items: flex-end; justify-content: center;
  animation: sh-fade .16s var(--ease-out);
}
.sh-sheet {
  width: 100%; max-width: 440px;
  background: var(--surface);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  box-shadow: var(--sh-2);
  padding: 16px 18px calc(18px + env(safe-area-inset-bottom, 0px));
  animation: sh-up .22s var(--ease-out);
}
.sh-head { display: flex; align-items: center; gap: 10px; }
.sh-title { font-family: var(--f-display); font-weight: 700; font-size: 16px; color: var(--ink); }
.sh-x {
  margin-left: auto; width: 32px; height: 32px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: var(--surface-2); color: var(--ink-2);
  border-radius: var(--r-pill); cursor: pointer;
}
.sh-x .ic { width: 16px; height: 16px; }

/* 目标平台：**文字牌子**，不是图标 —— Lucide 没有微信/微博/QQ 这些品牌图形，
   引外网图标库又是本项目明令禁止的。用各家的品牌色做底，认得出、也不撒谎。 */
.sh-grid { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.sh-item {
  display: inline-flex; align-items: center; gap: 6px;
  height: 38px; padding: 0 14px;
  border: 0; border-radius: var(--r-pill); cursor: pointer;
  font-family: var(--f-sans); font-size: 14px; font-weight: 500;
  background: var(--surface-2); color: var(--ink);
  transition: transform .12s var(--ease-out);
}
.sh-item:active { transform: scale(.96); }
.sh-item .ic { width: 15px; height: 15px; }
.sh-item.is-weibo { background: #ffe9e6; color: #d5303e; }
.sh-item.is-qq { background: #e6f1ff; color: #1c6fd6; }
.sh-item.is-qzone { background: #fff3d6; color: #b8860b; }
.sh-item.is-wx { background: #e4f7e8; color: #15803d; }
.sh-item.is-moments { background: #e9f6ec; color: #15803d; }

/* 二维码那一块：微信 / 朋友圈点开后才出现（这俩没有网页分享接口，
   唯一的通用办法就是让对方扫一下）。 */
.sh-qrbox {
  margin-top: 14px; padding: 14px;
  background: var(--surface-2); border-radius: var(--r);
  display: flex; align-items: center; gap: 14px;
}
.sh-qr {
  width: 116px; height: 116px; flex: 0 0 auto;
  background: var(--surface); border-radius: var(--r-xs); padding: 6px;
}
.sh-qrnote { font-size: 13px; line-height: 1.6; color: var(--ink-2); margin: 0; }
.sh-qrnote b { color: var(--ink); }

.sh-tip { margin: 12px 0 0; font-size: 12px; line-height: 1.6; color: var(--ink-3); }

@keyframes sh-fade { from { opacity: 0; } }
@keyframes sh-up { from { transform: translateY(28px); opacity: .6; } }

/* 宽屏（电脑）上不做「从底部升起」，居中放一张卡片更像话。 */
@media (min-width: 680px) {
  .sh-mask { align-items: center; }
  .sh-sheet {
    border-radius: var(--r-xl);
    padding: 20px 22px;
    animation: sh-pop .18s var(--ease-out);
  }
  @keyframes sh-pop { from { transform: scale(.96); opacity: .6; } }
}
