/* 分享連結打開時的邀請卡片（src/share.js）；地圖上用粉紅虛線框出對方綁的格子 */
.sh-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px 12px calc(12px + var(--safe-b));
  background: rgba(15, 39, 71, 0.45);
}
.sh-card {
  width: min(400px, 100%);
  max-height: 80vh;
  overflow: auto;
  padding: 18px 18px 16px;
  border: 3px solid var(--btn-line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 8px 0 var(--btn-line), 0 20px 50px rgba(0, 0, 0, 0.3);
  animation: sh-in 0.35s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
.sh-kicker { margin: 0; font-size: 13px; font-weight: 800; color: #1f6aa8; letter-spacing: 0.06em; }
.sh-title { margin: 4px 0 10px; font-family: var(--font-display); font-size: 26px; font-weight: 400; line-height: 1.25; color: var(--sea); }
.sh-message {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #eef5fb;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.5;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.sh-message::before { content: "「"; }
.sh-message::after { content: "」"; }
.sh-list { list-style: none; margin: 0; padding: 0; }
/* 名單列是文字列，不套按鈕的厚底樣式 */
.sh-cell {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: none;
  border-bottom: 1px solid #cbd5e1;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-shadow: none;
  text-align: left;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
}
button.sh-cell:active:not(:disabled) { transform: none; box-shadow: none; }
.sh-cell-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-cell-votes { flex: none; font-weight: 800; color: var(--ribbon-ink); font-variant-numeric: tabular-nums; }
.sh-more { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.sh-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
button.sh-join { height: 52px; font-size: 18px; }
.sh-look { height: 46px; font-size: 17px; }
@keyframes sh-in { from { transform: translateY(40px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sh-card { animation: none; } }
@media (min-width: 720px) { .sh-overlay { align-items: center; } }

/* 手機：底部 sheet。把手在頂端，內容區捲動，按鈕固定在底部；遮罩點一下關閉 */
.sh-body { min-width: 0; }
@media (max-width: 719px) {
  .sh-overlay { align-items: flex-end; padding: 0; }
  .sh-card {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    padding: 22px max(16px, env(safe-area-inset-right, 0px)) calc(16px + var(--safe-b)) max(16px, env(safe-area-inset-left, 0px));
    border-bottom: none;
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -4px 0 var(--btn-line), 0 -8px 30px rgba(16, 42, 67, 0.2);
    animation: sh-in 0.35s cubic-bezier(0.2, 1.2, 0.4, 1) backwards;
  }
  .sh-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
  .sh-actions { flex: none; margin-top: 12px; }
}
