.academy-share-dialog{width:min(460px,calc(100vw - 28px));max-height:90vh;padding:22px;border-radius:16px;overflow:auto;border:1px solid #d9e7f8;background:#fff;color:#19334e}.academy-share-dialog h2{font-size:20px;margin:0}.academy-share-dialog p{font-size:12px;line-height:1.6}.academy-share-dialog .share-close{float:right;border:0;background:transparent;color:#7890a6;font-size:22px}.academy-share-dialog canvas{display:block;width:100%;max-height:52vh;object-fit:contain;background:#f5f9ff;border-radius:10px}.academy-share-dialog label{font-size:12px;display:block;margin-top:14px}.academy-share-dialog input{display:block;width:100%;box-sizing:border-box;margin-top:7px;padding:10px;border:1px solid #dae7f6;border-radius:8px;color:#5d7b97}.academy-share-dialog footer{display:flex;gap:10px;margin-top:14px}.academy-share-dialog footer button{flex:1;padding:10px;border:0;border-radius:8px;background:#edf5ff;color:#2676b7}.academy-share-dialog footer button:last-child{background:#1679ed;color:#fff}.academy-share-dialog button:disabled{opacity:.4;cursor:default}
/* Reserve the preview before fetching cover/meta, so the centered dialog never jumps. */
.academy-share-dialog{max-height:calc(100dvh - 32px);animation:none!important;transition:none!important;transform:none!important}
.academy-share-dialog [data-share-status]{min-height:38px;margin:10px 0 12px;color:#6b8096}
.academy-share-dialog [data-share-preview]{height:min(48dvh,420px);display:flex;align-items:center;justify-content:center;padding:12px;background:#f5f9ff;border:1px solid #e2edf9;border-radius:12px;overflow:hidden;min-width:0}
.academy-share-dialog [data-share-preview]:empty::before{content:'正在准备分享预览';font-size:12px;color:#8196ac}
.academy-share-dialog [data-share-preview] canvas{display:block;flex:0 0 auto;width:0;height:0;max-width:none;max-height:none;object-fit:contain;border-radius:0;animation:none!important;transition:none!important;transform:none!important}
.academy-share-dialog footer{gap:12px}.academy-share-dialog footer button{min-height:44px;line-height:1.5}

/* Editorial heading, quiet search field and independent card action. */
html body main #courseGallery .gallery-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:24px 0 20px;border-bottom:1px solid #e2ebf6}
html body main #courseGallery .gallery-heading h1{font-size:28px;font-weight:680;line-height:1.35;letter-spacing:.01em;margin:0 0 9px}
html body main #courseGallery .gallery-heading p{font-size:13px;color:#7890a8;line-height:1.7;margin:0;min-height:0}
.gallery-search{position:relative;flex:0 1 290px;min-width:200px}.gallery-search>svg{position:absolute;left:12px;top:12px;pointer-events:none;color:#91a6bc}
html body #courseGallery .gallery-search #courseSearch{width:100%;height:40px;font:13px system-ui,sans-serif;padding:9px 12px 9px 36px;border:1px solid #dce7f4;border-radius:9px;background:#ffffffc9;color:#365471;outline:0 solid transparent!important;box-shadow:none;transition:border-color .15s,box-shadow .15s}
html body #courseGallery .gallery-search #courseSearch:focus,html body #courseGallery .gallery-search #courseSearch:focus-visible{outline:0 solid transparent!important;border-color:#8ab9eb;box-shadow:0 0 0 2px #86b9f01a;background:#fff}html body #courseGallery .gallery-search #courseSearch::placeholder{color:#99aabd}
#courseGallery .gallery-tools{margin:16px 0 20px;gap:12px}#courseGallery .gallery-tools nav{gap:6px}#courseGallery .gallery-tools button{font-size:12px;padding:7px 13px;border-radius:7px}
#courseGallery .course-cards{gap:22px}#courseGallery .course-preview{position:relative;border-radius:14px;min-width:0;transition:box-shadow .16s,transform .16s}#courseGallery .course-preview:hover{transform:translateY(-2px);box-shadow:0 8px 24px #215ba10c}
.course-card-open{display:block;height:100%;outline-offset:-3px!important}
#courseGallery .preview-copy{padding:16px 18px 17px}#courseGallery .preview-copy h2{font-size:16px;line-height:1.5;margin:0 0 7px;font-weight:650}
#courseGallery .preview-copy p:empty{display:none}#courseGallery .preview-copy p{font-size:12px;color:#8194a7;line-height:1.6;margin:0 0 9px;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
#courseGallery .preview-copy small{font-size:11px;color:#8a9fb4}
.course-card-share{position:absolute;right:11px;top:11px;z-index:1;display:inline-flex;align-items:center;gap:5px;height:29px;padding:5px 8px;border:1px solid #ffffffd9;border-radius:7px;color:#52759b;background:#ffffffed;box-shadow:0 2px 8px #123b6410;font:11px/1 system-ui,sans-serif;cursor:pointer}.course-card-share:hover{background:#fff;color:#2374c8;border-color:#a7cef4}.course-card-share:focus-visible{outline:1px solid #80b5ef;outline-offset:2px}
.academy-share-dialog{width:min(440px,calc(100vw - 28px));padding:20px;border-radius:18px;box-shadow:0 18px 65px #17344f20;display:flex;flex-direction:column;overflow:hidden}
.academy-share-dialog::backdrop{background:#24405a66;backdrop-filter:blur(3px)}
.academy-share-dialog h2{font-size:19px;line-height:1.4;margin:0;padding-right:32px}
.academy-share-dialog .share-close{position:absolute;right:16px;top:14px;width:28px;height:28px;padding:0;line-height:28px;font-size:21px;border-radius:7px;color:#8a9eb3}.academy-share-dialog .share-close:hover{background:#f0f5fb;color:#4f759c}
.academy-share-dialog [data-share-status]{min-height:20px;line-height:20px;font-size:11px;margin:6px 0 12px}
.academy-share-dialog [data-share-preview]{height:min(48dvh,380px);min-height:0;flex:0 1 auto;padding:10px;border-radius:12px;background:#f3f7fc;border-color:#e5edf7}.academy-share-dialog [data-share-preview] canvas{box-shadow:0 2px 10px #1c426009}
.academy-share-dialog label{margin-top:12px;font-size:11px;color:#7d92a8}.academy-share-dialog input{margin-top:5px;font-size:11px;padding:9px 10px;border-color:#e0eaf5;color:#7c92a8;outline:none}.academy-share-dialog input:focus{border-color:#94bfec;box-shadow:0 0 0 2px #86b9f012}
.academy-share-dialog footer{margin-top:12px;gap:10px}.academy-share-dialog footer button{min-height:38px;padding:8px;font-size:12px;border-radius:8px}
@media(max-width:760px){html body main #courseGallery .gallery-heading{align-items:stretch;flex-direction:column;gap:16px;padding:16px 0}html body main #courseGallery .gallery-heading h1{font-size:25px}html body main #courseGallery .gallery-heading p{font-size:12px}.gallery-search{flex:auto;min-width:0}#courseGallery .gallery-tools{margin:12px 0 16px}#courseGallery .gallery-tools nav{gap:3px}#courseGallery .gallery-tools button{padding:7px 10px;font-size:11px}.academy-share-dialog{padding:17px}.academy-share-dialog [data-share-preview]{height:min(45dvh,360px,calc(100vw - 90px))}}
@media(max-height:580px){.academy-share-dialog [data-share-preview]{height:34dvh}.academy-share-dialog{padding:14px}.academy-share-dialog [data-share-status]{margin:3px 0 7px}.academy-share-dialog label{margin-top:7px}.academy-share-dialog footer{margin-top:8px}}
