/* =========================================
   Compact Modern Listing UI
   (courses, notices, blog, quizzes, mock tests, files)
   ========================================= */
.lp-wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.lp-wrap-narrow { max-width: 820px; }
.lp-page-body { background: #F8FAFC; padding: 36px 0 56px; min-height: 60vh; }

/* Banner */
.lp-page-banner { background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%); border-bottom: 1px solid #BFDBFE; padding: 32px 0; }
.lp-page-banner h1 { margin: 0 0 6px; font-size: 2rem; font-weight: 800; color: #1E3A8A; line-height: 1.2; }
.lp-crumbs { margin: 0; font-size: .95rem; color: #3B82F6; }
.lp-crumbs a { color: #60A5FA; text-decoration: none; }
.lp-dot { color: #93C5FD; margin: 0 6px; }

.lp-section-head { text-align: center; margin-bottom: 28px; }
.lp-section-head h1 { margin: 0 0 8px; font-size: 2rem; font-weight: 800; color: #0F172A; line-height: 1.25; }
.lp-section-head p { margin: 0 auto; max-width: 560px; color: #64748B; font-size: 1rem; }

/* Course cards */
.lp-course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.lp-course-card { display: flex; flex-direction: column; background: #fff; border: 1px solid #E2E8F0; border-radius: 14px; overflow: hidden; text-decoration: none; color: inherit; transition: transform .2s, box-shadow .2s; }
.lp-course-card:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(15,23,42,.08); }
.lp-course-thumb { position: relative; aspect-ratio: 16/9; background: #F1F5F9; overflow: hidden; }
.lp-course-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lp-badge-featured { position: absolute; top: 8px; left: 8px; background: #2563EB; color: #fff; padding: 3px 8px; border-radius: 6px; font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; line-height: 1.3; }
.lp-course-info { padding: 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; }
.lp-course-info h3 { margin: 0; font-size: 1rem; font-weight: 700; color: #0F172A; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lp-course-rating { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; font-size: .8rem; }
.lp-course-rating b { color: #334155; }
.lp-stars { display: inline-flex; gap: 1px; color: #F59E0B; font-size: .85rem; }
.lp-stars .empty { color: #D1D5DB; }
.lp-muted { color: #94A3B8; }
.lp-duration { display: inline-flex; align-items: center; gap: 3px; }
.lp-course-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lp-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; min-width: 0; }
.lp-price-old { font-size: .8rem; color: #94A3B8; text-decoration: line-through; }
.lp-price-now { font-size: 1.1rem; font-weight: 800; color: #0F172A; }
.lp-price-now.lp-free { color: #10B981; }
.lp-btn-sm { background: #2563EB; color: #fff; font-weight: 700; font-size: .85rem; padding: 8px 14px; border-radius: 8px; white-space: nowrap; }

/* Notice cards */
.lp-notice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.lp-notice-card { display: block; background: #fff; border: 1px solid #E2E8F0; border-radius: 14px; padding: 18px; text-decoration: none; transition: transform .2s, box-shadow .2s; }
.lp-notice-card:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(15,23,42,.08); }
.lp-notice-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.lp-tag { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; white-space: nowrap; background: #DBEAFE; color: #3B82F6; }
.lp-tag.lp-type-exam { background: #EDE9FE; color: #8B5CF6; }
.lp-tag.lp-type-result { background: #D1FAE5; color: #10B981; }
.lp-tag.lp-type-important { background: #FEE2E2; color: #EF4444; }
.lp-date { display: inline-flex; align-items: center; gap: 4px; color: #94A3B8; font-size: .78rem; white-space: nowrap; }
.lp-notice-card h3 { margin: 0 0 6px; font-size: 1.05rem; font-weight: 700; color: #0F172A; line-height: 1.35; }
.lp-notice-card p { margin: 0 0 10px; color: #64748B; font-size: .88rem; line-height: 1.5; }
.lp-more { display: inline-flex; align-items: center; gap: 4px; color: #2563EB; font-weight: 600; font-size: .85rem; }

/* Notice single */
.lp-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; color: #2563EB; text-decoration: none; font-size: .9rem; font-weight: 600; }
.lp-article { background: #fff; border: 1px solid #E2E8F0; border-radius: 16px; overflow: hidden; }
.lp-article-head { padding: 22px 24px; background: #F8FAFC; border-bottom: 1px solid #F1F5F9; }
.lp-article-head h1 { margin: 0; font-size: 1.8rem; font-weight: 800; color: #0F172A; line-height: 1.3; word-wrap: break-word; }
.lp-article-body { padding: 24px; color: #334155; font-size: 1rem; line-height: 1.75; word-wrap: break-word; }
.notice-content-body h1, .notice-content-body h2, .notice-content-body h3 { color: #0F172A; font-weight: 700; margin: 1.2em 0 .5em; }
.notice-content-body h2 { font-size: 1.4rem; }
.notice-content-body h3 { font-size: 1.2rem; }
.notice-content-body p { margin: 0 0 1.1em; }
.notice-content-body ul, .notice-content-body ol { margin: 0 0 1.1em; padding-left: 20px; list-style: revert; }
.notice-content-body li { margin-bottom: .4em; }
.notice-content-body img { max-width: 100%; height: auto; border-radius: 8px; margin: .8em 0; }
.notice-content-body a { color: #2563EB; text-decoration: underline; }

/* Blog listing */
.lp-blog-hero { background: linear-gradient(135deg, #1E3A8A 0%, #3B82F6 100%); padding: 44px 0 36px; text-align: center; color: #fff; }
.lp-blog-hero h1 { margin: 0; font-size: 2.2rem; font-weight: 800; color: #fff; line-height: 1.2; }
.lp-blog-hero p { margin: 10px auto 0; max-width: 560px; color: rgba(255,255,255,.9); font-size: 1rem; }
.lp-blog-page { background: #F8FAFC; }
.lp-chips-bar { background: #fff; border-bottom: 1px solid #E2E8F0; position: sticky; top: 0; z-index: 50; }
.lp-chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.lp-chips::-webkit-scrollbar { display: none; }
.lp-chip { white-space: nowrap; padding: 6px 14px; border-radius: 20px; font-weight: 600; font-size: .85rem; text-decoration: none; border: 1px solid #CBD5E1; background: #fff; color: #475569; }
.lp-chip.active { background: #1E3A8A; border-color: #1E3A8A; color: #fff; }
.lp-blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.lp-blog-card { display: flex; flex-direction: column; background: #fff; border: 1px solid #E2E8F0; border-radius: 14px; overflow: hidden; text-decoration: none; transition: transform .2s, box-shadow .2s; }
.lp-blog-card:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(15,23,42,.08); }
.lp-blog-thumb { position: relative; aspect-ratio: 16/9; background: #E2E8F0; overflow: hidden; }
.lp-blog-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lp-blog-noimg { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; color: #94A3B8; }
.lp-badge-cat { background: #3B82F6; border-radius: 20px; padding: 3px 10px; }
.lp-blog-info { padding: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.lp-blog-info h2 { margin: 0; font-size: 1.05rem; font-weight: 700; color: #0F172A; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lp-blog-info p { margin: 0; color: #64748B; font-size: .88rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Shared */
.lp-pagination { margin-top: 28px; display: flex; justify-content: center; }
.lp-pagination ul.page-numbers { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; list-style: none; padding: 0; margin: 0; }
.lp-pagination .page-numbers li { display: block; margin: 0; }
.lp-pagination ul.page-numbers a, .lp-pagination ul.page-numbers span { display: flex; align-items: center; justify-content: center; min-width: 36px; padding: 8px 12px; background: #fff; border: 1px solid #CBD5E1; border-radius: 8px; color: #334155; font-weight: 600; font-size: .88rem; text-decoration: none; }
.lp-pagination ul.page-numbers span.current { background: #2563EB; border-color: #2563EB; color: #fff; }
.lp-empty { grid-column: 1 / -1; text-align: center; padding: 36px 20px; background: #fff; border: 1px dashed #CBD5E1; border-radius: 14px; }
.lp-empty-icon { width: 52px; height: 52px; margin: 0 auto 12px; background: #F1F5F9; color: #94A3B8; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; }
.lp-empty h3 { margin: 0 0 6px; font-size: 1.1rem; color: #0F172A; }
.lp-empty p { margin: 0; color: #64748B; font-size: .9rem; }

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
    .lp-wrap { padding: 0 14px; }
    .lp-page-body { padding: 16px 0 32px; min-height: 0; }
    .lp-page-banner { padding: 16px 0; }
    .lp-page-banner h1 { font-size: 1.4rem; margin-bottom: 2px; }
    .lp-crumbs { font-size: .82rem; }
    .lp-section-head { margin-bottom: 14px; text-align: left; }
    .lp-section-head h1 { font-size: 1.4rem; margin-bottom: 4px; }
    .lp-section-head p { font-size: .85rem; margin: 0; }

    /* Courses: horizontal compact cards */
    .lp-course-grid { grid-template-columns: 1fr; gap: 10px; }
    .lp-course-card { flex-direction: row; border-radius: 12px; }
    .lp-course-card:hover, .lp-notice-card:hover, .lp-blog-card:hover, .quiz-card:hover { transform: none; box-shadow: none; }
    .lp-course-thumb { width: 38%; max-width: 150px; flex-shrink: 0; aspect-ratio: auto; min-height: 100px; }
    .lp-course-thumb img { position: absolute; inset: 0; }
    .lp-badge-featured { top: 6px; left: 6px; font-size: .55rem; padding: 2px 6px; }
    .lp-course-info { padding: 10px 12px; gap: 5px; }
    .lp-course-info h3 { font-size: .92rem; }
    .lp-course-rating { font-size: .72rem; }
    .lp-stars { font-size: .75rem; }
    .lp-price-now { font-size: 1rem; }
    .lp-price-old { font-size: .72rem; }
    .lp-btn-sm { font-size: .75rem; padding: 6px 10px; }

    /* Notices: compact list */
    .lp-notice-grid { grid-template-columns: 1fr; gap: 10px; }
    .lp-notice-card { padding: 12px 14px; border-radius: 12px; }
    .lp-notice-top { margin-bottom: 6px; }
    .lp-notice-card h3 { font-size: .95rem; margin-bottom: 3px; }
    .lp-notice-card p { font-size: .8rem; margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .lp-more { font-size: .78rem; }
    .lp-back { margin-bottom: 10px; font-size: .82rem; }
    .lp-article { border-radius: 12px; }
    .lp-article-head { padding: 14px; }
    .lp-article-head h1 { font-size: 1.25rem; }
    .lp-article-body { padding: 14px; font-size: .95rem; line-height: 1.65; }
    .notice-content-body h2 { font-size: 1.15rem; }
    .notice-content-body h3 { font-size: 1.05rem; }

    /* Blog list: horizontal cards */
    .lp-blog-hero { padding: 20px 0 16px; text-align: left; }
    .lp-blog-hero h1 { font-size: 1.4rem; }
    .lp-blog-hero p { font-size: .85rem; margin: 4px 0 0; }
    .lp-blog-grid { grid-template-columns: 1fr; gap: 10px; }
    .lp-blog-card { flex-direction: row; border-radius: 12px; }
    .lp-blog-thumb { width: 36%; max-width: 140px; flex-shrink: 0; aspect-ratio: auto; min-height: 96px; }
    .lp-blog-thumb img, .lp-blog-noimg { position: absolute; inset: 0; }
    .lp-blog-thumb .lp-badge-cat { display: none; }
    .lp-blog-info { padding: 10px 12px; gap: 3px; }
    .lp-blog-info h2 { font-size: .92rem; }
    .lp-blog-info p { font-size: .78rem; -webkit-line-clamp: 1; }
    .lp-pagination { margin-top: 18px; }

    /* Single blog: tighter */
    .blog-hero { padding-top: 18px !important; padding-bottom: 14px !important; }
    .blog-title { font-size: 1.6rem !important; letter-spacing: -.3px !important; margin-bottom: 10px !important; }
    .blog-category-badge { margin-bottom: 8px !important; }
    .blog-meta { gap: 12px !important; font-size: .8rem !important; }
    .blog-image-container { margin: 14px auto 18px !important; padding: 0 14px !important; }
    .blog-featured-image { max-height: 220px !important; border-radius: 12px !important; box-shadow: 0 6px 14px rgba(15,23,42,.12) !important; }
    .blog-content-container { padding: 0 14px 28px !important; }
    .blog-content { font-size: 1rem !important; line-height: 1.7 !important; }
    .blog-content p { margin-bottom: 16px !important; }
    .blog-content h2 { font-size: 1.3rem !important; margin: 22px 0 10px !important; }
    .blog-content h3 { font-size: 1.1rem !important; margin: 16px 0 8px !important; }
    .blog-content img { margin: 14px 0 !important; }
    .blog-content-container hr { margin: 28px 0 !important; }

    /* Quizzes / mock tests / files: compact */
    .site-main > .container { padding-top: 14px !important; padding-bottom: 28px !important; }
    .site-main > .container > div:first-child { margin-bottom: 14px !important; gap: 10px !important; }
    .site-main > .container h1 { font-size: 1.3rem !important; }
    .site-main > .container h1 + p { font-size: .82rem !important; margin-top: 2px !important; }
    .quiz-filter-bar { gap: 8px; width: 100%; flex-wrap: nowrap; }
    .filter-group, .filter-search { min-width: 0; flex: 1; max-width: none; }
    .filter-group select.form-control, .search-input-wrapper input.form-control { height: 40px; padding: 8px 14px; font-size: .85rem; }
    .filter-group select.form-control { padding-right: 32px; background-position: right 10px center; }
    .search-input-wrapper input.form-control { padding-left: 34px; }
    .search-input-wrapper i { left: 12px; font-size: 1rem; }
    .all-quizzes-grid, .all-mock-tests-grid { grid-template-columns: 1fr !important; gap: 10px !important; }
    .quiz-card { border-radius: 12px !important; }
    .quiz-card .quiz-card-header { padding: 12px 14px 0 !important; }
    .quiz-card .quiz-card-body { padding: 8px 14px !important; }
    .quiz-card .quiz-card-body h3 { font-size: .98rem !important; margin: 0 0 8px !important; }
    .quiz-card .quiz-meta { font-size: .78rem !important; gap: 12px !important; }
    .quiz-card .quiz-card-footer { padding: 4px 14px 14px !important; border-top: none !important; }
    .quiz-card .quiz-card-footer .btn-primary { padding: 9px !important; font-size: .88rem !important; border-radius: 10px; box-shadow: none; }
    .quiz-category-badge { padding: 3px 10px !important; font-size: .68rem !important; }
    .file-item-row { padding: 12px 14px !important; gap: 8px !important; }
    .file-col-title { font-size: .92rem !important; }
}

/* Skeleton loader is absolutely positioned and was stretching the page height,
   leaving a big blank area below short pages. Collapse it unless animating. */
.swup-skeleton { height: 0; max-height: 0; overflow: hidden; visibility: hidden; }
html.is-animating .swup-skeleton { height: auto; max-height: 100vh; visibility: visible; }

@media (max-width: 768px) {
    /* nav is ~60px; keep just enough room so content isn't hidden behind it */
    body { padding-bottom: 64px; }
    .site-main[style*="min-height"], main[style*="min-height"] { min-height: 0 !important; }
}

.lp-notice-filter { margin: 0 0 14px; padding: 2px 0 6px; }
@media (min-width: 769px) { .lp-notice-filter { justify-content: center; flex-wrap: wrap; margin-bottom: 22px; } }

/* Notice source (PDF / URL) */
.lp-source-box { display: flex; flex-wrap: wrap; gap: 10px; padding: 0 24px 24px; }
.lp-source { flex: 1 1 220px; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid #E2E8F0; border-radius: 12px; background: #F8FAFC; text-decoration: none; color: #0F172A; transition: border-color .2s, background .2s; }
.lp-source:hover { background: #fff; border-color: #2563EB; }
.lp-source-ico { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; }
.lp-source-pdf .lp-source-ico { background: #FEE2E2; color: #EF4444; }
.lp-source-url .lp-source-ico { background: #DBEAFE; color: #2563EB; }
.lp-source-txt { display: flex; flex-direction: column; line-height: 1.25; flex: 1; min-width: 0; }
.lp-source-txt small { color: #94A3B8; font-size: .72rem; text-transform: uppercase; letter-spacing: .5px; }
.lp-source-txt b { font-size: 1rem; }
.lp-source-go { color: #94A3B8; font-size: 1.1rem; }
.lp-src-chip { display: inline-flex; align-items: center; gap: 3px; margin-right: 8px; padding: 2px 8px; border-radius: 6px; background: #F1F5F9; color: #475569; font-size: .7rem; font-weight: 600; }
@media (max-width: 768px) {
    .lp-source-box { padding: 0 14px 14px; gap: 8px; }
    .lp-source { flex-basis: 100%; padding: 10px 12px; }
    .lp-source-ico { width: 34px; height: 34px; font-size: 1.2rem; }
    .lp-src-chip { font-size: .65rem; }
}

/* ---------- In-site PDF viewer ---------- */
.lpv { background: #1E293B; border-radius: 14px; overflow: hidden; border: 1px solid #334155; display: flex; flex-direction: column; }
.lpv:fullscreen { border-radius: 0; height: 100vh; }
.lpv-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; background: #0F172A; border-bottom: 1px solid #334155; color: #E2E8F0; }
.lpv-pageinfo { display: flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.lpv-pageinfo i { color: #60A5FA; font-size: 1.1rem; }
.lpv-tools { display: flex; align-items: center; gap: 4px; }
.lpv-zoom { min-width: 44px; text-align: center; font-size: .78rem; font-weight: 700; color: #CBD5E1; font-variant-numeric: tabular-nums; }
.lpv-btn { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 8px; background: #1E293B; color: #CBD5E1; font-size: 1.05rem; cursor: pointer; text-decoration: none; transition: background .15s; }
.lpv-btn:hover { background: #2563EB; color: #fff; }
.lpv-scroll { position: relative; height: 80vh; overflow: auto; background: #525659; padding: 12px; -webkit-overflow-scrolling: touch; }
.lpv:fullscreen .lpv-scroll { height: calc(100vh - 51px); }
.lpv-iframe-mode .lpv-scroll { padding: 0; }
.lpv-frame { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.lpv-pagesbox { display: flex; flex-direction: column; align-items: center; gap: 10px; width: max-content; min-width: 100%; }
.lpv-page-wrap { background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.35); flex-shrink: 0; }
.lpv-page-wrap canvas { display: block; }
.lpv-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px; color: #CBD5E1; font-size: .9rem; }
.lpv-empty { text-align: center; padding: 40px 20px; color: #94A3B8; background: #fff; border-radius: 14px; }
.lpv-empty i { font-size: 2.4rem; display: block; margin-bottom: 8px; }
.lpv-nodl .lpv-page-wrap { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
@media print { .lpv-nodl { display: none !important; } }
@media (max-width: 768px) {
    .lpv { border-radius: 10px; }
    .lpv-scroll { height: 72vh; padding: 6px; }
    .lpv-hide-sm { display: none; }
    .lpv-btn { width: 32px; height: 32px; }
}

@media (max-width: 768px) {
    /* file-content single: tighter top bar + container */
    .lpv-page-wrap-outer { padding-left: 8px !important; padding-right: 8px !important; padding-top: 10px !important; padding-bottom: 20px !important; }
}
.lp-source-pdfwrap { flex: 1 1 100%; }
.lp-source-label { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.lp-source-label small { display: block; color: #94A3B8; font-size: .72rem; text-transform: uppercase; letter-spacing: .5px; }
.lp-source-label b { font-size: 1rem; color: #0F172A; }
.lp-source-label .lp-source-ico { background: #FEE2E2; color: #EF4444; }

/* ---------- PDF viewer: annotations ---------- */
.lpv { position: relative; }
.lpv-page-wrap { position: relative; }
.lpv-ov { position: absolute; left: 0; top: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.lpv-annbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 12px; background: #111C33; border-bottom: 1px solid #334155; }
.lpv-anntools { display: flex; align-items: center; gap: 5px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.lpv-anntools::-webkit-scrollbar { display: none; }
.lpv-sep { width: 1px; height: 22px; background: #334155; margin: 0 4px; flex-shrink: 0; }
.lpv-tool.active { background: #2563EB; color: #fff; }
.lpv-color { width: 22px; height: 22px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; flex-shrink: 0; padding: 0; }
.lpv-color.active { border-color: #fff; box-shadow: 0 0 0 2px #2563EB; }
.lpv-savebtn { display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; height: 34px; border: 0; border-radius: 8px; background: #334155; color: #E2E8F0; font-weight: 700; font-size: .82rem; cursor: pointer; white-space: nowrap; flex-shrink: 0; }
.lpv-savebtn:hover { background: #2563EB; color: #fff; }
.lpv-savebtn.dirty { background: #16A34A; color: #fff; }
.lpv-savebtn:disabled { opacity: .6; cursor: default; }
.lpv-drawing { cursor: crosshair; }
.lpv-toast { position: absolute; left: 50%; bottom: 18px; transform: translate(-50%, 20px); background: #0F172A; color: #fff; padding: 9px 16px; border-radius: 10px; font-size: .85rem; opacity: 0; pointer-events: none; transition: all .25s; z-index: 5; border: 1px solid #334155; max-width: 90%; text-align: center; }
.lpv-toast.show { opacity: 1; transform: translate(-50%, 0); }
.lpv-toast.bad { background: #7F1D1D; border-color: #B91C1C; }
@media print { .lpv-ov { display: none; } }
@media (max-width: 768px) {
    .lpv-annbar { padding: 5px 8px; gap: 6px; }
    .lpv-savebtn { padding: 0 10px; height: 32px; font-size: .75rem; }
    .lpv-color { width: 20px; height: 20px; }
}

/* ---------- Sticky notes ---------- */
.lpv-notes { position: absolute; inset: 0; pointer-events: none; }
.lpv-note { position: absolute; display: flex; flex-direction: column; background: var(--note-bg, #FEF08A); border: 1px solid rgba(0,0,0,.18); border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,.25); pointer-events: auto; font-size: var(--lpv-fs, 12px); min-width: 0; overflow: hidden; }
.lpv-note-head { display: flex; align-items: center; justify-content: space-between; height: 1.6em; min-height: 14px; padding: 0 .3em; background: rgba(0,0,0,.1); color: rgba(0,0,0,.5); cursor: grab; touch-action: none; user-select: none; flex-shrink: 0; }
.lpv-note-head:active { cursor: grabbing; }
.lpv-note-del { border: 0; background: transparent; color: rgba(0,0,0,.55); cursor: pointer; font-size: 1em; padding: 0 .2em; line-height: 1; display: inline-flex; align-items: center; }
.lpv-note-del:hover { color: #B91C1C; }
.lpv-note-text { overflow: hidden; flex: 1; width: 100%; min-height: 0; border: 0; outline: 0; resize: none; background: transparent; padding: .35em .5em; font: inherit; line-height: 1.35; color: #1E293B; -webkit-user-select: text; user-select: text; }
.lpv-note-grip { position: absolute; right: 0; bottom: 0; width: 1.3em; height: 1.3em; cursor: nwse-resize; touch-action: none; background: linear-gradient(135deg, transparent 50%, rgba(0,0,0,.35) 50%); }
@media print { .lpv-notes { display: none; } }

/* ---------- PDF viewer: mobile containment + compact toolbars ---------- */
.lpv, .lpv-scroll, .lp-source-pdfwrap, .lp-source-box, .lp-article, .lpv-page-wrap-outer { min-width: 0; max-width: 100%; }
.lpv { width: 100%; box-sizing: border-box; }
.lpv-scroll { box-sizing: border-box; overscroll-behavior: contain; }
.lp-source-pdfwrap { overflow: hidden; }
@media (max-width: 768px) {
    .lpv-bar { padding: 6px 8px; gap: 6px; }
    .lpv-pageinfo { font-size: .8rem; gap: 4px; flex-shrink: 0; }
    .lpv-pageinfo i { display: none; }
    .lpv-tools { gap: 2px; min-width: 0; }
    .lpv-tools .lpv-btn { width: 30px; height: 30px; font-size: .95rem; }
    .lpv-zoom { min-width: 36px; font-size: .72rem; }
    .lpv-annbar { padding: 5px 6px; }
    .lpv-anntools { gap: 3px; flex: 1; }
    .lpv-anntools .lpv-btn { width: 30px; height: 30px; font-size: .95rem; flex-shrink: 0; }
    .lpv-sep { margin: 0 2px; }
    .lpv-savebtn { padding: 0 10px; height: 30px; font-size: .74rem; }
    .lpv-scroll { height: 70vh; }
    .lp-source-box { padding: 0 10px 12px; }
    .lp-source-label { margin-bottom: 8px; }
}
@media (max-width: 400px) {
    .lpv-tools .lpv-btn[data-act="print"] { display: none; }
    .lpv-color { width: 18px; height: 18px; }
}
