/* ▼ 1. 주석(Footnote) 기본 스타일 */
.cheese-footnote-ref {
  font-size: 0.9em; vertical-align: super; cursor: pointer;
  color: inherit; scroll-margin-top: 100px; text-decoration: none;
}
.cheese-footnotes {
  margin-top: 2rem; font-size: 1.0em; line-height: 1.6;
  list-style: none; padding-left: 0; border-top: 1px solid #eee; padding-top: 20px;
}
.cheese-footnotes li { margin: 6px 0; }
.cheese-footnotes li::before { content: ""; display: none; }

/* 기존 ol 스타일 초기화 */
.post-body ol.cheese-footnotes { list-style: none !important; padding-left: 0 !important; margin-left: 0 !important; }
.post-body ol.cheese-footnotes > li::before { content: '' !important; display: none !important; }

/* ▼ 2. 나무위키 스타일 링크 (외부/내부) */

/* [외부 링크] 초록색 + 아이콘 */
a.namu-external {
  color: #00a495 !important; /* 나무위키 초록색 */
  text-decoration: none;
  word-break: break-all;
}
a.namu-external::after {
  content: "";
  display: inline-block;
  width: 12px; height: 12px; margin-left: 2px;
  /* 외부 링크 아이콘 (SVG) */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300a495' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'%3E%3C/path%3E%3Cpolyline points='15 3 21 3 21 9'%3E%3C/polyline%3E%3Cline x1='10' y1='14' x2='21' y2='3'%3E%3C/line%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  vertical-align: middle;
}
a.namu-external:hover { text-decoration: underline; }

/* [내부 링크] 파란색 + 툴팁 대상 */
a.namu-internal {
  color: #0275d8 !important; /* 나무위키 파란색 */
  text-decoration: none;
}
a.namu-internal:hover {
  text-decoration: underline;
}

/* ▼ 3. 툴팁 박스 (PC용) */
.cheese-footnote-tooltip {
  position: absolute; max-width: 340px; /* 너비도 살짝 키움 */
  
  /* [수정] 글자 크기 확대 (13px -> 15px) */
  font-size: 15px; 
  line-height: 1.6; /* 줄 간격도 여유 있게 */
  
  background: #fff; color: #333;
  border: 1px solid #ccc; border-radius: 6px; /* 둥글기 조정 */
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  padding: 12px 14px; /* 여백도 살짝 키움 */
  z-index: 10000;
  opacity: 0; visibility: hidden;
  transform: translateY(5px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}
.cheese-footnote-tooltip.is-open {
  opacity: 1; visibility: visible; transform: translateY(0);
  pointer-events: auto; /* 툴팁 위 링크 클릭 가능 */
}
.cheese-tooltip-title {
    font-weight: bold; margin-bottom: 6px; display: block; color: #0275d8; font-size: 1.05em;
}

/* ▼ 4. 모바일 모달 */
.cheese-footnote-modal {
  position: fixed; inset: 0; z-index: 99999; background: rgba(0,0,0,0.5);
  display: flex; justify-content: center; align-items: center;
  padding: 20px; opacity: 0; visibility: hidden; pointer-events: none; transition: 0.2s;
}
.cheese-footnote-modal.is-open { opacity: 1; visibility: visible; pointer-events: auto; }

.cheese-footnote-modal-inner {
  background: #fff; width: 100%; max-width: 400px; max-height: 80vh;
  border-radius: 12px; padding: 24px; /* 패딩 키움 */
  display: flex; flex-direction: column; 
  
  /* [수정] 글자 크기 확대 (기본 -> 16px) */
  font-size: 16px; 
  line-height: 1.65;
}

.cheese-footnote-modal-body { flex: 1; overflow-y: auto; margin-bottom: 15px; }
.cheese-footnote-modal-close {
  width: 100%; padding: 12px; /* 버튼 높이 키움 */
  border: none; background: #f1f5f9; border-radius: 8px; cursor: pointer;
  font-size: 15px; font-weight: 600; /* 버튼 글씨도 키움 */
}
