/* Note page - PDF 뷰어 중심 반응형 */

.page-container--note {
    max-width: min(var(--max-content), 96%);
}

/* 제목 영역: 책 제목 + 저자 */
.note-book-title {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: var(--space-2);
}

.note-book-author {
    font-size: 0.95rem;
    margin-bottom: var(--space-5);
}

.page-container--note .note-page-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 0;
}

/* 글 소개 + 다운로드 링크 */
.note-intro {
    flex-shrink: 0;
    text-align: center;
    width: 100%;
}

.note-intro-text {
    margin: 0;
}

.note-intro-download {
    margin: 0;
}

.note-pdf-download {
    display: inline-block;
    padding: var(--pad-block);
    min-height: var(--touch-target, 44px);
    font-size: 0.9rem;
    text-decoration: none;
    color: var(--color-text, #111);
    border: var(--border);
    border-radius: var(--btn-radius, 4px);
    background: #fff;
    transition: background-color 0.15s ease, color 0.15s ease;
    box-sizing: border-box;
}

.note-pdf-download:hover {
    background: var(--color-text, #111);
    color: #fff;
}

/* PDF 뷰어: 한 페이지씩 세로로 쌓기, 드래그·선택 비활성화 */
.note-pdf-wrap {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1 1 auto;
    min-height: 0;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    user-drag: none;
}

.note-pdf-loading {
    color: var(--color-text, #111);
}

/* 페이지 하나: 한 줄 블록, 텍스트 레이어 위치 기준 */
.note-pdf-page {
    width: 100%;
    display: block;
    position: relative;
}

.note-pdf-canvas {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    vertical-align: top;
}

/* 텍스트 레이어: 캔버스와 동일 배치, 선택·드래그 비활성화 */
.note-pdf-text-layer {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    font-family: var(--font-ui);
}

.note-pdf-text-layer span {
    position: absolute;
    white-space: pre;
    color: transparent;
    transform-origin: 0 0;
    display: block;
    overflow: hidden;
    font-family: var(--font-ui);
}

.note-content strong {
    font-weight: bold;
}

.note-content em {
    font-style: italic;
}

/* 태블릿 */
@media (max-width: 1024px) {
    .page-container--note {
        max-width: 98%;
    }
}

/* 모바일: PDF 90vw, PDF가 화면 대부분 차지 */
@media (max-width: 768px) {
    .page-container--note {
        max-width: 100%;
        padding-bottom: env(safe-area-inset-bottom, 0);
    }

    .page-container--note .note-page-content {
        /* padding: 0; */
    }

    .note-pdf-download {
        width: 100%;
        text-align: center;
    }

    .note-pdf-wrap {
        width: 100%;
        max-width: 100%;
    }
}

