.pdf-course{min-height:var(--app-h);background:linear-gradient(180deg,#e7f7ff,#f7fbff 220px,#eef6fb);padding-bottom:max(22px,var(--sab));color:#153d72}
.pdf-course-top{position:sticky;top:0;z-index:10;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:16px;min-height:88px;padding:max(10px,var(--sat)) 20px 10px;background:rgba(255,255,255,.94);border-bottom:1px solid #d7e7f3;box-shadow:0 7px 18px rgba(34,86,124,.09);backdrop-filter:blur(14px)}
.pdf-course-nav{display:flex;gap:9px}.pdf-course-nav button{width:54px;height:54px;border:0;border-radius:50%;background:#fff;box-shadow:0 4px 12px rgba(34,86,124,.16);display:grid;place-items:center}.pdf-course-nav img{width:100%;height:100%;object-fit:contain}
.pdf-course-title{min-width:0;text-align:center}.pdf-course-title small{display:block;color:#2b8ac8;font-weight:900;font-size:13px}.pdf-course-title h1{margin:3px 0 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:22px;color:#0a3d79}
.pdf-zoom{display:flex;align-items:center;gap:7px;padding:5px;border-radius:16px;background:#edf6fc}.pdf-zoom button{width:38px;height:38px;border:0;border-radius:12px;background:#fff;color:#126db2;font-size:24px;font-weight:900}.pdf-zoom span{min-width:48px;text-align:center;font-size:13px;font-weight:900;color:#526f8d}
.pdf-stage{position:relative;width:min(100%,1180px);min-height:65vh;margin:18px auto 0;padding:0 12px}.pdf-image-scroll{width:100%;overflow:auto;text-align:center;-webkit-overflow-scrolling:touch}.pdf-image-scroll img{display:block;width:100%;max-width:none;height:auto;margin:0 auto;background:#fff;border-radius:5px;box-shadow:0 12px 34px rgba(21,61,114,.18);vertical-align:top}
.pdf-loading{position:absolute;z-index:2;top:24px;left:50%;transform:translateX(-50%);padding:10px 17px;border-radius:999px;background:rgba(11,70,127,.9);color:#fff;font-weight:850;white-space:nowrap;box-shadow:0 6px 15px rgba(10,56,99,.2)}
.pdf-pager{position:sticky;bottom:0;z-index:9;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:14px;width:min(calc(100% - 24px),760px);margin:18px auto 0;padding:10px;border:1px solid #d2e4f0;border-radius:24px;background:rgba(255,255,255,.95);box-shadow:0 10px 28px rgba(34,86,124,.16);backdrop-filter:blur(14px)}
.pdf-pager button{min-height:52px;border:0;border-radius:17px;background:#e8f5ff;color:#1269a9;font-size:16px;font-weight:950;display:flex;align-items:center;justify-content:center;gap:7px}.pdf-pager button:last-child{background:linear-gradient(145deg,#3bb8ff,#0b7ee8);color:#fff}.pdf-pager button:disabled{opacity:.35}.pdf-pager img{width:25px;height:25px;object-fit:contain}.pdf-page-picker{text-align:center;color:#5f7690;font-weight:900;white-space:nowrap}.pdf-page-picker select{min-width:58px;height:40px;margin:0 3px;border:1px solid #bcd7e8;border-radius:12px;background:#fff;color:#1269a9;font:inherit;font-weight:950;text-align:center;cursor:pointer}
.pdf-course.english-pdf{background:linear-gradient(180deg,#fff4df,#fffaf0 220px,#f8f0df)}.pdf-course.english-pdf .pdf-course-title small{color:#df7d35}
@media(max-width:680px){.pdf-course-top{grid-template-columns:auto 1fr;padding-left:10px;padding-right:10px;gap:9px}.pdf-course-nav button{width:46px;height:46px}.pdf-course-title{text-align:left}.pdf-course-title h1{font-size:17px}.pdf-zoom{grid-column:1/-1;justify-self:center;margin-top:-2px}.pdf-stage{margin-top:10px;padding:0 6px}.pdf-pager{grid-template-columns:1fr 1fr;margin-top:10px}.pdf-page-picker{grid-column:1/-1;grid-row:1}.pdf-pager button{grid-row:2}}
@media(orientation:landscape) and (max-height:620px){.pdf-course-top{position:relative}.pdf-course-title h1{font-size:18px}.pdf-stage{width:min(78vw,1000px)}}

/* V5.39：阅读页取消顶部信息区，只保留左右两侧导航按钮。 */
.pdf-course-top{position:sticky;top:0;z-index:20;display:block;min-height:0;height:0;padding:0;background:transparent;border:0;box-shadow:none;backdrop-filter:none;overflow:visible}
.pdf-course-nav{position:absolute;top:max(12px,calc(var(--sat) + 8px));left:max(14px,var(--sal));right:max(14px,var(--sar));display:flex;justify-content:space-between;gap:0;pointer-events:none}
.pdf-course-nav button{width:54px;height:54px;pointer-events:auto;box-shadow:0 6px 17px rgba(34,86,124,.2)}
.pdf-stage{margin-top:0;padding:0 6px}
.pdf-image-scroll img{border-radius:0}
@media(max-width:680px){.pdf-course-top{display:block;height:0;padding:0}.pdf-course-nav{top:max(10px,calc(var(--sat) + 6px));left:max(10px,var(--sal));right:max(10px,var(--sar))}.pdf-course-nav button{width:48px;height:48px}.pdf-stage{margin-top:0;padding:0 3px}}
@media(orientation:landscape) and (max-height:620px){.pdf-course-top{position:sticky;height:0}.pdf-stage{width:min(78vw,1000px);margin-top:0}}

/* V5.42：英语、数学原页阅读背景与点击全屏查看。 */
.pdf-course.english-pdf,.pdf-course.math-pdf{width:min(100%,853px);margin:0 auto;background-repeat:no-repeat;background-position:center top;background-size:100% auto}
.pdf-course.english-pdf{max-width:820px;background-color:#f9d9d3;background-image:url('assets/reader-backgrounds/bg-english-sentence-v3.png')}
.pdf-course.math-pdf{max-width:853px;background-color:#85d7ff;background-image:url('assets/reader-backgrounds/bg-math-study-v3.png')}
.pdf-course.english-pdf .pdf-stage{width:100%;max-width:none;margin:0;padding:39.66% 2.16% 0}
.pdf-course.math-pdf .pdf-stage{width:100%;max-width:none;margin:0;padding:49.36% .94% 0}
.pdf-course.english-pdf .pdf-image-scroll,.pdf-course.math-pdf .pdf-image-scroll{overflow:hidden;background:#fff}
.pdf-course.english-pdf .pdf-image-scroll img,.pdf-course.math-pdf .pdf-image-scroll img{border-radius:0;box-shadow:none;cursor:zoom-in}
.pdf-course.math-pdf .pdf-course-nav button{background:transparent;box-shadow:none}.pdf-course.math-pdf .pdf-course-nav img{opacity:0}
.pdf-fullscreen-open{overflow:hidden}.pdf-fullscreen-view{position:fixed;inset:0;z-index:9999;background:rgba(4,13,24,.96);display:flex;align-items:center;justify-content:center;overflow:hidden}.pdf-fullscreen-scroll{width:100%;height:100%;overflow:auto;display:flex;align-items:flex-start;justify-content:center;-webkit-overflow-scrolling:touch}.pdf-fullscreen-scroll img{display:block;width:min(100%,1200px);height:auto;max-width:none;margin:auto;object-fit:contain;background:#fff}.pdf-fullscreen-close{position:fixed;z-index:2;top:max(12px,var(--sat));right:max(12px,var(--sar));width:52px;height:52px;border:0;border-radius:50%;background:rgba(255,255,255,.94);color:#173b67;font-size:36px;line-height:1;box-shadow:0 6px 18px rgba(0,0,0,.3)}.pdf-fullscreen-caption{position:fixed;z-index:2;left:50%;bottom:max(12px,var(--sab));transform:translateX(-50%);padding:8px 14px;border-radius:999px;background:rgba(0,0,0,.66);color:#fff;font-size:13px;font-weight:800;white-space:nowrap;pointer-events:none}
@media(orientation:landscape) and (max-height:620px){.pdf-course.english-pdf .pdf-stage{width:100%;padding-top:39.66%}.pdf-course.math-pdf .pdf-stage{width:100%;padding-top:49.36%}.pdf-fullscreen-scroll img{width:auto;max-width:none;height:100%;object-fit:contain}}

/* V5.43：使用用户提供的完整阅读背景，把原页/卡片放进中央画框。 */
.pdf-course.english-pdf,.pdf-course.math-card-pdf{position:relative;min-height:0;margin:0 auto;padding:0;overflow:hidden;background-repeat:no-repeat;background-position:center top;background-size:100% 100%}
#app:has(.pdf-course.math-card-pdf){background:#72ceff url('assets/reader-backgrounds/bg-math-study-v3.png') center/cover no-repeat}#app:has(.pdf-course.english-pdf){background:#f9e4b8 url('assets/reader-backgrounds/bg-english-sentence-v3.png') center/cover no-repeat}html.device-landscape #app:has(.pdf-course.math-card-pdf){background-image:url('assets/ipad-landscape/math-card-study-v5552.png')}html.device-landscape #app:has(.pdf-course.english-pdf){background-image:url('assets/ipad-landscape/english-grammar-learning.png')}
.pdf-course.english-pdf{width:min(100%,934px);max-width:934px;aspect-ratio:934/1684;background:transparent}
.pdf-course.math-card-pdf{width:min(100%,896px);max-width:896px;aspect-ratio:896/1755;background:transparent}
.pdf-course.english-pdf .pdf-stage,.pdf-course.math-card-pdf .pdf-stage{position:absolute;width:auto;max-width:none;min-height:0;margin:0;padding:0;display:grid;place-items:center;overflow:hidden}
.pdf-course.english-pdf .pdf-stage{top:28.45%;left:10.75%;right:10.75%;bottom:17.55%;border-radius:12px}
.pdf-course.math-card-pdf .pdf-stage{top:24.25%;left:6.35%;right:6.35%;bottom:20.55%;border-radius:12px}
.pdf-course.english-pdf .pdf-image-scroll,.pdf-course.math-card-pdf .pdf-image-scroll{width:100%;height:100%;display:flex;align-items:center;justify-content:center;overflow:hidden;background:transparent}
.pdf-course.english-pdf .pdf-image-scroll img,.pdf-course.math-card-pdf .pdf-image-scroll img{display:block;width:auto!important;height:100%;max-width:100%;margin:0;object-fit:contain;border-radius:8px;box-shadow:none;cursor:zoom-in}
.pdf-course.english-pdf .pdf-course-nav button,.pdf-course.math-card-pdf .pdf-course-nav button{background:transparent;box-shadow:none}
.pdf-course.english-pdf .pdf-course-nav,.pdf-course.math-card-pdf .pdf-course-nav{top:1.25%;left:3.1%;right:3.1%}
.pdf-course.english-pdf .pdf-course-nav button,.pdf-course.math-card-pdf .pdf-course-nav button{width:9.8%;height:auto;aspect-ratio:1}
.pdf-course.english-pdf .pdf-course-nav img,.pdf-course.math-card-pdf .pdf-course-nav img{opacity:0}
.pdf-course.english-pdf .pdf-pager,.pdf-course.math-card-pdf .pdf-pager{position:absolute;left:3.3%;right:3.3%;bottom:4.55%;z-index:9;width:auto;height:8.5%;margin:0;padding:0;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:3%;border:0;border-radius:0;background:transparent;box-shadow:none;backdrop-filter:none}
.pdf-course.english-pdf .pdf-pager button,.pdf-course.math-card-pdf .pdf-pager button{grid-row:auto;min-height:100%;padding:0;border:0;background:transparent!important;box-shadow:none;color:transparent;font-size:0}
.pdf-course.english-pdf .pdf-pager img,.pdf-course.math-card-pdf .pdf-pager img{display:none}
.pdf-course.english-pdf .pdf-page-picker,.pdf-course.math-card-pdf .pdf-page-picker{grid-column:2;grid-row:1;display:flex;align-items:center;justify-content:center;min-width:112px;min-height:52%;padding:6px 10px;border-radius:999px;background:rgba(255,255,255,.96);box-shadow:0 4px 12px rgba(88,55,55,.13);color:#715343;font-size:14px;font-weight:950}
.pdf-course.english-pdf .pdf-page-picker select{min-width:44px;height:34px;margin:0 3px;border-color:#f0b6b6;color:#d85c66}
.pdf-course.math-card-pdf .pdf-page-static{color:#1765b2;box-shadow:0 4px 12px rgba(25,93,150,.16)}
@media(max-width:520px){.pdf-course.english-pdf .pdf-page-picker,.pdf-course.math-card-pdf .pdf-page-picker{min-width:86px;padding:3px 6px;font-size:12px}.pdf-course.english-pdf .pdf-page-picker select{min-width:37px;height:29px;font-size:12px}}
@media(orientation:landscape) and (max-height:620px){.pdf-course.english-pdf .pdf-stage,.pdf-course.math-card-pdf .pdf-stage{width:auto;padding:0}.pdf-course.english-pdf,.pdf-course.math-card-pdf{width:min(56vw,934px)}}

/* V5.44：语文课本知识卡片学习框。 */
.pdf-course.chinese-card-pdf{position:relative;width:min(100%,941px);max-width:941px;min-height:0;aspect-ratio:941/1672;margin:0 auto;padding:0;overflow:hidden;background:transparent}
#app:has(.pdf-course.chinese-card-pdf){background:#fff0a9 url('assets/reader-backgrounds/bg-chinese-study-v3.png') center/cover no-repeat}html.device-landscape #app:has(.pdf-course.chinese-card-pdf){background-image:url('assets/ipad-landscape/chinese-card-study-v5552.png')}
.pdf-course.chinese-card-pdf .pdf-stage{position:absolute;top:29%;left:8.15%;right:8.15%;bottom:18%;width:auto;max-width:none;min-height:0;margin:0;padding:0;display:grid;place-items:center;overflow:hidden;border-radius:12px}
.pdf-course.chinese-card-pdf .pdf-image-scroll{width:100%;height:100%;display:flex;align-items:center;justify-content:center;overflow:hidden;background:transparent}.pdf-course.chinese-card-pdf .pdf-image-scroll img{display:block;width:auto!important;height:100%;max-width:100%;margin:0;object-fit:contain;border-radius:8px;box-shadow:none;cursor:zoom-in}
.pdf-course.chinese-card-pdf .pdf-course-nav{top:1.35%;left:3.4%;right:3.4%}.pdf-course.chinese-card-pdf .pdf-course-nav button{width:9.6%;height:auto;aspect-ratio:1;background:transparent;box-shadow:none}.pdf-course.chinese-card-pdf .pdf-course-nav img{opacity:0}
.pdf-course.chinese-card-pdf .pdf-pager{position:absolute;left:5.6%;right:5.6%;bottom:4.4%;z-index:9;width:auto;height:8.2%;margin:0;padding:0;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:3%;border:0;border-radius:0;background:transparent;box-shadow:none;backdrop-filter:none}.pdf-course.chinese-card-pdf .pdf-pager button{grid-row:auto;min-height:100%;padding:0;border:0;background:transparent!important;box-shadow:none;color:transparent;font-size:0}.pdf-course.chinese-card-pdf .pdf-pager img{display:none}.pdf-course.chinese-card-pdf .pdf-page-static{grid-column:2;grid-row:1;display:flex;align-items:center;justify-content:center;min-width:112px;min-height:52%;padding:6px 10px;border-radius:999px;background:rgba(255,255,255,.96);box-shadow:0 4px 12px rgba(125,80,15,.16);color:#a15c14;font-size:14px;font-weight:950}
.pdf-course.english-pdf .pdf-pager{left:5.3%;right:5.3%;bottom:2.7%;height:7.7%}
.pdf-course.english-pdf .pdf-page-static{color:#9d561e;box-shadow:0 4px 12px rgba(125,80,15,.16)}
@media(max-width:520px){.pdf-course.chinese-card-pdf .pdf-page-static{min-width:86px;padding:3px 6px;font-size:12px}}

/* V5.53：横屏阅读使用 4:3 学习背景，原始卡片始终放在中央画框内。 */
html.device-landscape .pdf-course.english-pdf,
html.device-landscape .pdf-course.math-card-pdf,
html.device-landscape .pdf-course.chinese-card-pdf{width:var(--app-w);height:var(--app-h);min-height:0;max-width:none;margin:0;background-size:cover}
html.device-landscape .pdf-course.math-card-pdf{background-image:url('assets/ipad-landscape/math-card-study-v5552.png')}
html.device-landscape .pdf-course.chinese-card-pdf{background-image:url('assets/ipad-landscape/chinese-card-study-v5552.png')}
html.device-landscape .pdf-course.english-pdf{background-image:url('assets/ipad-landscape/english-grammar-learning.png')}
html.device-landscape .pdf-course.english-pdf .pdf-stage,
html.device-landscape .pdf-course.math-card-pdf .pdf-stage,
html.device-landscape .pdf-course.chinese-card-pdf .pdf-stage{top:29.4%;left:6.8%;right:6.8%;bottom:11.8%;width:auto;padding:0;border-radius:22px;background:#fff;box-shadow:inset 0 0 0 2px rgba(80,90,90,.06)}
html.device-landscape .pdf-course.english-pdf .pdf-stage{top:29%;left:4.2%;right:4.2%;bottom:13.7%;background:#fff9e8}
html.device-landscape .pdf-course.chinese-card-pdf .pdf-stage{top:29.8%;left:7.7%;right:7.7%;bottom:12.5%}
html.device-landscape .pdf-course.math-card-pdf .pdf-stage{top:31.1%;left:4.65%;right:4.65%;bottom:14.7%}
html.device-landscape .pdf-course.english-pdf .pdf-image-scroll img,
html.device-landscape .pdf-course.math-card-pdf .pdf-image-scroll img,
html.device-landscape .pdf-course.chinese-card-pdf .pdf-image-scroll img{width:auto!important;height:100%;max-width:100%;object-fit:contain}
html.device-landscape .pdf-course.english-pdf .pdf-course-nav,
html.device-landscape .pdf-course.math-card-pdf .pdf-course-nav,
html.device-landscape .pdf-course.chinese-card-pdf .pdf-course-nav{top:1%;left:1%;right:1%}
html.device-landscape .pdf-course.english-pdf .pdf-course-nav button,
html.device-landscape .pdf-course.math-card-pdf .pdf-course-nav button,
html.device-landscape .pdf-course.chinese-card-pdf .pdf-course-nav button{width:9%;height:auto;aspect-ratio:1}
html.device-landscape .pdf-course.english-pdf .pdf-pager,
html.device-landscape .pdf-course.math-card-pdf .pdf-pager,
html.device-landscape .pdf-course.chinese-card-pdf .pdf-pager{left:13%;right:13%;bottom:1.8%;height:8.5%}
