.wiki-footnote-popup {
  position: absolute;
  z-index: 99999;
  width: min(340px, calc(100vw - 32px));
  padding: 12px 38px 12px 14px;
  border: 1px solid var(--lightgray);
  border-radius: 4px;
  background: var(--light);
  color: var(--dark);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
  font-size: 0.9rem;
  line-height: 1.55;
}

.wiki-footnote-content p,
.wiki-footnote-content li {
  margin: 0;
}

.wiki-footnote-content a[data-footnote-backref] {
  display: none;
}

.wiki-footnote-close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: none;
  background: transparent;
  color: var(--gray);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

/* Quartz 기본 큰 미리보기만 숨김 */
.popover {
  display: none !important;
}

@media (max-width: 700px) {
  .wiki-footnote-popup {
    position: fixed;
    left: 20px !important;
    right: 20px;
    top: 35% !important;
    bottom: auto !important;
    transform: translateY(-50%);
    width: auto;
    max-height: 38vh;
    overflow-y: auto;
  }
}