/* 四元學院 – PDF 閱讀器 */
.sya-pdf { --pdf-bg: #e9ebef; border: 1px solid #dfe2e8; border-radius: 12px; overflow: hidden; background: var(--pdf-bg); display: flex; flex-direction: column; height: min(82vh, 980px); position: relative; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.sya-pdf:fullscreen { height: 100vh; border-radius: 0; }
.sya-pdf__bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #fff; border-bottom: 1px solid #dfe2e8; font: 13px/1.4 -apple-system, "PingFang TC", "Noto Sans TC", sans-serif; color: #3d4350; flex: none; }
.sya-pdf__title { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #14171f; }
.sya-pdf__pages { font-variant-numeric: tabular-nums; margin-right: 6px; }
.sya-pdf__bar button { width: 30px; height: 30px; border: 1px solid #dfe2e8; background: #fff; border-radius: 8px; cursor: pointer; font-size: 14px; color: #14171f; line-height: 1; }
.sya-pdf__bar button:hover { background: #f2f3f6; }
.sya-pdf__bar [data-zoomtext] { min-width: 42px; text-align: center; font-variant-numeric: tabular-nums; }
.sya-pdf__scroll { flex: 1; overflow: auto; padding: 16px 12px; -webkit-overflow-scrolling: touch; }
.sya-pdf__pagesbox { display: flex; flex-direction: column; align-items: center; gap: 14px; min-height: 100%; }
.sya-pdf__page { position: relative; background: #fff; box-shadow: 0 2px 10px rgba(16, 24, 40, .12); max-width: none; overflow: hidden; }
.sya-pdf__page canvas { display: block; pointer-events: none; }
.sya-pdf__loading, .sya-pdf__error { margin: auto; color: #6b7280; font: 14px -apple-system, "PingFang TC", sans-serif; display: flex; gap: 10px; align-items: center; padding: 40px; }
.sya-pdf__loading span { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #d1d5db; border-top-color: #4f46e5; animation: syaspin .7s linear infinite; }
.sya-pdf__error { color: #b91c1c; }
.sya-pdf__note { flex: none; text-align: center; font: 12px -apple-system, "PingFang TC", sans-serif; color: #8a90a0; padding: 6px; background: #fff; border-top: 1px solid #dfe2e8; }
@keyframes syaspin { to { transform: rotate(360deg); } }
@media print {
	.sya-pdf { display: none !important; }
	body::after { content: "此內容不提供列印"; display: block; padding: 40px; text-align: center; }
}
@media (max-width: 640px) { .sya-pdf { height: 78vh; border-radius: 8px; } .sya-pdf__title { display: none; } }
