body.share-modal-open {
  overflow: hidden;
}

.share-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
}

.share-modal[hidden] {
  display: none;
}

.share-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 28, 24, 0.45);
  backdrop-filter: blur(4px);
}

.share-modal-panel {
  position: relative;
  width: min(440px, 100%);
  background: var(--soft-white);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 28px 24px 24px;
  animation: fadeIn 0.28s ease;
}

.share-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: var(--light-jade);
  color: var(--primary-jade);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.share-modal-close:focus-visible,
.share-action:focus-visible,
.share-url-row .action-btn:focus-visible {
  outline: none;
  box-shadow: var(--focus, 0 0 0 3px rgba(184, 134, 11, 0.35));
}

.share-modal-title {
  margin: 0 0 8px;
  font-family: "Noto Serif TC", serif;
  font-size: 1.25rem;
  color: var(--primary-jade);
}

.share-modal-desc {
  margin: 0 0 18px;
  font-size: 14px;
  color: var(--ink-65);
}

.share-url-label {
  display: block;
  font-size: 12px;
  color: var(--ink-50);
  margin-bottom: 6px;
}

.share-url-row {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}

.share-url-input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: #fff;
  color: var(--ink-80);
}

.share-copy-status {
  min-height: 1.2em;
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--primary-jade);
}

.share-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.share-action {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}

.share-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
  filter: brightness(1.05);
}

.share-action--facebook { background: #1877f2; }
.share-action--line { background: #06c755; }
.share-action--threads {
  background: #101010;
  color: #fff;
  letter-spacing: 0.02em;
}
.share-action--native { background: var(--primary-jade); }

.share-action--native[hidden] {
  display: none;
}

.wisdom-share-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(28, 74, 60, 0.28);
  background: rgba(255, 255, 255, 0.66);
  color: var(--primary-jade);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.wisdom-share-trigger:hover {
  transform: translateY(-1px);
  background: var(--primary-jade);
  border-color: var(--primary-jade);
  color: #fff;
}

.wisdom-share-trigger:focus-visible {
  outline: 2px solid var(--primary-jade);
  outline-offset: 2px;
}

.share-btn.wisdom-share-trigger {
  width: auto;
  height: auto;
  border-radius: 999px;
  padding: 10px 16px;
}

.series-prev.is-disabled,
.series-next.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}

.video-sidebar[hidden],
.series-nav[hidden],
#ap-episodes-wrap[hidden],
#wv-related[hidden],
#ed-related-wrap[hidden] {
  display: none !important;
}
