/* =========================================================
   share.css · 对外分享预览页 + 分享弹窗（站内 / 外部链接）
   ========================================================= */

/* ---------------- 分享预览页 ---------------- */
.sh-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: start;
}
.sh-main { min-width: 0; }
.sh-aside {
  min-width: 0;
  display: flex; flex-direction: column; gap: 14px;
  position: sticky; top: 84px;
}

.sh-card { padding: 18px 20px; }
.sh-card-h {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding-bottom: 12px; margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.sh-card-by {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; color: var(--t3); font-weight: 550;
}

/* 题干区：水印层的定位容器 */
.sh-qwrap { position: relative; border-radius: var(--r-l); }

/* 未登录时的平铺水印：浅色斜向重复，压在题干之上但极淡，不影响阅读与选中 */
.sh-qwrap.wm::after {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='140'%3E%3Ctext x='10' y='80' font-family='sans-serif' font-size='20' fill='%23111827' transform='rotate(-22 110 70)'%3E%E6%88%91%E7%9A%84%E6%95%B0%E5%AD%A6%E8%8A%B1%E5%9B%AD%3C/text%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 220px 140px;
  background-position: center;
  opacity: .2;
  pointer-events: none;
  border-radius: var(--r-l);
}

.sh-opts { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.sh-opt { font-size: 14.5px; color: var(--t1); line-height: 1.75; }
.sh-opt b { color: var(--blue); margin-right: 4px; }

.sh-ans {
  margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line);
  display: flex; flex-direction: column; gap: 10px;
}
.sh-ans-b { padding: 10px 12px; border-radius: var(--r-xs); background: var(--line); }
.sh-ans-b h5 { margin: 0 0 4px; font-size: 12px; font-weight: 650; color: var(--t3); }
.sh-ans-b p { margin: 0; font-size: 14px; line-height: 1.8; color: var(--t1); }

/* 未登录：答案锁定卡 */
.sh-lock {
  margin-top: 14px; padding: 20px 18px;
  border-radius: var(--r-l);
  background: linear-gradient(160deg, rgba(106, 140, 255, .07), rgba(139, 108, 255, .05));
  border: 1px dashed rgba(106, 140, 255, .35);
  text-align: center;
}
.sh-lock-i { color: var(--blue); opacity: .85; }
.sh-lock-t { margin-top: 6px; font-size: 15px; font-weight: 650; color: var(--t1); }
.sh-lock-s { margin-top: 5px; font-size: 12.5px; line-height: 1.75; color: var(--t2); }
.sh-lock-b { margin-top: 12px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

.sh-foot-tip {
  display: flex; align-items: center; gap: 6px;
  margin-top: 12px; font-size: 12px; color: var(--t3); line-height: 1.7;
}

/* 侧栏卡片 */
.sh-side { padding: 14px 16px; }
.sh-vip-list { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 12px; }
.sh-vip-row { display: flex; flex-direction: column; gap: 2px; }
.sh-vip-k {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; font-weight: 650; color: var(--t1);
}
.sh-vip-k .ico { color: var(--green, #12a150); }
.sh-vip-v { font-size: 12px; color: var(--t3); line-height: 1.6; }
.sh-side-tip {
  margin-top: 8px; font-size: 11.5px; line-height: 1.65; color: var(--t3);
}
.sh-about { font-size: 12.5px; line-height: 1.8; color: var(--t2); }
.sh-about-links { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.sh-about-links a {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--blue); text-decoration: none;
}
.sh-about-links a:hover { text-decoration: underline; }

/* ---------------- 分享弹窗 ---------------- */
.sh-tab { margin: 14px 0 12px; display: flex; }
.sh-tab button { flex: 1; justify-content: center; }
.sh-pane[hidden] { display: none; }

.sh-link-row { display: flex; gap: 8px; align-items: center; }
.sh-link-row .input { flex: 1; min-width: 0; font-size: 12.5px; }

.sh-channels {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px;
}
.sh-ch {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 6px; border-radius: var(--r-l);
  background: rgba(24, 31, 43, .03);
  border: 1px solid var(--line);
  color: var(--t2); font-size: 12.5px; font-weight: 550;
  cursor: pointer; text-decoration: none;
  transition: background .18s ease, transform .18s ease, color .18s ease;
}
.sh-ch:hover { background: rgba(24, 31, 43, .06); transform: translateY(-1px); color: var(--t1); }
.sh-ch-wechat:hover { color: #09bb07; border-color: rgba(9, 187, 7, .35); }
.sh-ch-qq:hover { color: #12a5ff; border-color: rgba(18, 165, 255, .35); }
.sh-ch-mail:hover { color: var(--blue); border-color: rgba(106, 140, 255, .35); }

.sh-perm {
  margin-top: 14px; padding: 12px 14px; border-radius: var(--r-l);
  background: rgba(106, 140, 255, .06);
  border: 1px solid rgba(106, 140, 255, .18);
}
.sh-perm-t {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 650; color: var(--t1); margin-bottom: 6px;
}
.sh-perm ul { margin: 0; padding-left: 18px; }
.sh-perm li { font-size: 12.5px; line-height: 1.85; color: var(--t2); }
.sh-perm li b { color: var(--t1); }

/* ---------------- 个人题库：发布到好题圈 ---------------- */
.ps-list {
  max-height: 190px; overflow: auto;
  display: flex; flex-direction: column; gap: 6px;
  padding: 8px; border-radius: var(--r-l); background: rgba(24, 31, 43, .03);
  border: 1px solid var(--line);
}
.ps-row { display: flex; align-items: center; gap: 8px; }
.ps-stem { font-size: 12.5px; color: var(--t2); line-height: 1.5; }

/* ---------------- 窄屏 ---------------- */
@media (max-width: 980px) {
  .sh-layout { grid-template-columns: minmax(0, 1fr); }
  .sh-aside { position: static; }
  .sh-channels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .sh-card { padding: 14px 16px; }
}
