.course-share-dialog {
    margin: auto;
    box-sizing: border-box;
    width: min(440px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
    overflow: auto;
    padding: 24px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 16px;
    background: #171724;
    color: #f5f5f7;
}
.course-share-dialog::backdrop { background: rgba(0,0,0,.72); }
.course-share-dialog h2 { font-size: 18px; margin: 0 0 16px; }
.course-share-dialog p { line-height: 1.5; overflow-wrap: anywhere; }
.course-share-dialog input {
    box-sizing: border-box; width: 100%; min-height: 44px; font-size: 16px;
    background: #222231; color: #f5f5f7; border: 1px solid rgba(255,255,255,.14); border-radius: 8px;
}
.course-share-dialog img { display: block; margin: 16px auto; background: white; max-width: 100%; }
.course-share-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.course-share-actions button {
    min-height: 44px; padding: 8px 16px; border-radius: 8px;
    background: #222231; border: 1px solid rgba(255,255,255,.14); color: #f5f5f7;
    font: inherit; cursor: pointer; overflow-wrap: anywhere;
}
.course-share-actions button:focus-visible { outline: 2px solid #e94560; outline-offset: 2px; }
.course-share-actions button:disabled { cursor: wait; opacity: .6; }
.course-share-actions button.primary { background: #e94560; border-color: #e94560; color: #fff; font-weight: 600; }
.course-share-desktop-dialog { width: min(420px, calc(100vw - 32px)); }
.course-share-qr { display: grid; justify-items: center; gap: 8px; margin: 16px 0 20px; color: #aeaeb2; font-size: 13px; text-align: center; }
.course-share-qr img { width: 196px; height: 196px; box-sizing: border-box; padding: 10px; margin: 0; border-radius: 10px; }
.course-share-desktop-dialog .course-share-actions { justify-content: center; }
.course-share-ready-dialog input { padding: 10px 12px; }
.course-share-ready-dialog .course-share-actions button { flex: 1 1 0; min-width: 0; }
.course-share-ready-dialog .course-share-actions button.primary { flex-basis: 100%; }
.course-share-ready-dialog p:empty { display: none; }
.course-share-ready-dialog .course-share-actions { margin-top: 20px; }

.m-btn-share { right: 12px; width: 44px; height: 44px; }
#mBtnShare[hidden] { display: none !important; }
.my-courses-header { position: relative; z-index: 300; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 8px; }
.my-courses-header .study-header-title { min-width: 0; text-align: center; overflow-wrap: anywhere; }
.my-courses-header-actions { display: flex; align-items: center; gap: 2px; }
.my-courses-header-icon-button,
.my-courses-header-action {
    box-sizing: border-box; display: grid; place-items: center; width: 44px; height: 44px;
    padding: 0; border: 0; border-radius: 8px; background: transparent; color: #f5f5f7; cursor: pointer;
}
.my-courses-header-icon-button[hidden],
.my-courses-header-action[hidden] { display: none; }
.my-courses-header-icon-button:hover:not(:disabled),
.my-courses-header-icon-button:focus-visible,
.my-courses-header-action:hover:not(:disabled), .my-courses-header-action:focus-visible { background: rgba(255,255,255,.07); }
.my-courses-header-icon-button:focus-visible,
.my-courses-header-action:focus-visible { outline: 2px solid #e94560; outline-offset: 2px; }
.my-courses-header-icon-button svg,
.my-courses-header-action svg { width: 22px; height: 22px; }
.course-library-search-button.is-open,
.course-library-search-button.has-query { color: #e94560; }
.my-courses-manage-icon-done { display: none; }
.my-courses-manage-button.is-done .my-courses-manage-icon-transfer { display: none; }
.my-courses-manage-button.is-done .my-courses-manage-icon-done { display: block; }
.my-courses-refresh-button { display: inline-flex; width: auto; gap: 7px; padding: 0 11px; font: inherit; font-size: 13px; white-space: nowrap; }
.my-courses-refresh-button svg { width: 18px; height: 18px; flex: none; }
.my-courses-refresh-button[aria-busy="true"] svg { animation: my-courses-refresh-spin 1s linear infinite; }
.my-courses-refresh-button:disabled { cursor: wait; opacity: .65; }
@keyframes my-courses-refresh-spin { to { transform: rotate(360deg); } }
@media (max-width: 700px) { .my-courses-refresh-button { display: none; } }
.my-courses-batch-bar {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 320; box-sizing: border-box;
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px;
    padding: 10px max(14px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
    background: rgba(23,23,36,.96); border-top: 1px solid rgba(255,255,255,.12);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.my-courses-batch-bar[hidden] { display: none; }
.my-courses-batch-bar span { min-width: 0; color: #aeaeb2; font-size: 13px; text-align: center; overflow-wrap: anywhere; }
.my-courses-batch-bar button { min-height: 44px; border-radius: 10px; padding: 8px 12px; font: inherit; font-size: 14px; font-weight: 600; }
.my-courses-batch-secondary { border: 1px solid rgba(255,255,255,.14); background: #222231; color: #f5f5f7; }
.my-courses-batch-primary { border: 0; background: #e94560; color: #fff; }
.my-courses-batch-primary:disabled { opacity: .45; }
.my-courses-page.manage-mode .my-courses-main { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
.course-library-filter-button {
    position: relative;
}
.course-library-filter-button.is-filtered { color: #e94560; }
.course-library-filter-badge {
    position: absolute; top: 3px; right: 2px; display: grid; place-items: center; min-width: 17px; height: 17px;
    padding: 0 4px; border: 2px solid #0d0d1a; border-radius: 999px; background: #e94560; color: #fff;
    font-size: 9px; line-height: 1; font-weight: 800;
}
.course-library-filter-badge[hidden] { display: none; }
.my-courses-tools { display: grid; gap: 10px; margin-bottom: 14px; }
.my-courses-tools[hidden], .my-courses-search[hidden] { display: none; }
.my-courses-search {
    position: relative; display: flex; align-items: center; min-height: 46px; padding: 0 42px 0 14px;
    border: 1px solid rgba(255,255,255,.10); border-radius: 12px; background: #171724; color: #86868b;
}
.my-courses-search:focus-within { border-color: rgba(100,167,255,.68); box-shadow: var(--rs-focus-ring,0 0 0 2px #64a7ff); }
.my-courses-search > svg { flex: 0 0 auto; width: 19px; height: 19px; margin-right: 9px; }
.my-courses-search input {
    min-width: 0; width: 100%; height: 44px; padding: 0; border: 0; outline: 0; background: transparent;
    color: #f5f5f7; font: inherit; font-size: 16px;
}
.my-courses-search input::placeholder { color: #73737d; }
.my-courses-search input::-webkit-search-cancel-button { display: none; }
.my-courses-search-clear {
    position: absolute; right: 1px; top: 0; width: 44px; height: 44px; padding: 0; border: 0;
    border-radius: 9px; background: transparent; color: #aeaeb2; font-size: 22px; cursor: pointer;
}
.my-courses-search-clear[hidden] { display: none; }
.my-courses-search-clear:focus-visible { outline: 2px solid #e94560; outline-offset: -3px; }
.course-library-active-filters { display: flex; align-items: center; gap: 7px; overflow-x: auto; padding: 1px; scrollbar-width: none; }
.course-library-active-filters::-webkit-scrollbar { display: none; }
.course-library-active-filters[hidden] { display: none; }
.course-library-filter-chip {
    flex: 0 0 auto; min-height: 44px; padding: 0 11px; border: 1px solid rgba(233,69,96,.28);
    border-radius: 999px; background: rgba(233,69,96,.12); color: #f5f5f7; font: inherit; font-size: 13px; cursor: pointer;
}
.course-library-filter-chip::after { content: " ×"; color: #aeaeb2; }
.course-library-filter-clear-all {
    flex: 0 0 auto; min-height: 44px; padding: 0 8px; border: 0; background: transparent;
    color: #aeaeb2; font: inherit; font-size: 13px; cursor: pointer;
}
.course-library-filter-chip:focus-visible, .course-library-filter-clear-all:focus-visible { outline: 2px solid #e94560; outline-offset: 2px; }
.my-courses-resume-card {
    box-sizing: border-box; display: grid; grid-template-columns: 36px minmax(0,1fr) auto; align-items: center; gap: 10px;
    width: 100%; min-height: 66px; margin: 0 0 12px; padding: 10px 12px; border: 1px solid rgba(90,200,250,.24);
    border-radius: 12px; background: rgba(90,200,250,.08); color: #f5f5f7; text-align: left; cursor: pointer;
}
.my-courses-resume-card[hidden] { display: none; }
.my-courses-resume-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: rgba(90,200,250,.13); color: #5ac8fa; }
.my-courses-resume-copy { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.my-courses-resume-copy strong { font-size: 14px; line-height: 1.35; }
.my-courses-resume-copy span { color: #aeaeb2; font-size: 12px; line-height: 1.4; }
.my-courses-resume-arrow { color: #86868b; font-size: 22px; }
.my-courses-resume-card:focus-visible { outline: 2px solid #5ac8fa; outline-offset: 2px; }
.course-library-filter-modal {
    position: fixed; inset: 0; z-index: 1800; display: flex; align-items: flex-end; justify-content: center;
    padding: 0; background: rgba(0,0,0,.68);
}
.course-library-filter-modal[hidden] { display: none; }
.course-library-filter-sheet {
    box-sizing: border-box; display: flex; width: min(100%,560px); max-height: min(88vh,760px); max-height: min(88dvh,760px);
    flex-direction: column; padding: 8px 18px max(16px,env(safe-area-inset-bottom)); border: 1px solid rgba(255,255,255,.12);
    border-bottom: 0; border-radius: 22px 22px 0 0; outline: 0; background: #171724; color: #f5f5f7;
    box-shadow: 0 -18px 60px rgba(0,0,0,.48);
}
.course-library-filter-handle { width: 38px; height: 4px; margin: 0 auto 8px; border-radius: 999px; background: rgba(255,255,255,.24); }
.course-library-filter-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 50px; }
.course-library-filter-head h2 { margin: 0; font-size: 19px; letter-spacing: -.01em; }
.course-library-filter-head button { min-width: 44px; min-height: 44px; padding: 0 4px; border: 0; background: transparent; color: #e94560; font: inherit; font-weight: 650; }
.course-library-filter-head-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 4px; }
.course-library-filter-head .course-library-filter-close { width: 44px; flex: 0 0 44px; padding: 0; color: #aeaeb2; font-size: 25px; font-weight: 400; }
.course-library-filter-options { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 0 14px; }
.course-library-filter-group { margin: 0; padding: 14px 0 16px; border: 0; border-top: 1px solid rgba(255,255,255,.08); }
.course-library-filter-group:first-child { border-top: 0; }
.course-library-filter-group legend { width: 100%; margin-bottom: 10px; color: #aeaeb2; font-size: 13px; font-weight: 700; }
.course-library-filter-choices { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.course-library-filter-choice {
    min-width: 0; min-height: 44px; padding: 8px 10px; border: 1px solid rgba(255,255,255,.10); border-radius: 10px;
    background: #222231; color: #f5f5f7; font: inherit; font-size: 14px; line-height: 1.3; text-align: center; cursor: pointer;
}
.course-library-filter-choice[aria-pressed="true"] { border-color: rgba(233,69,96,.62); background: rgba(233,69,96,.16); color: #fff; }
.course-library-filter-choice small { margin-left: 4px; color: #86868b; font-size: 11px; }
.course-library-filter-choice[aria-pressed="true"] small { color: #d8a3ad; }
.course-library-filter-choice:focus-visible, .course-library-filter-head button:focus-visible { outline: 2px solid #e94560; outline-offset: -2px; }
.course-library-filter-apply {
    flex: 0 0 auto; width: 100%; min-height: 48px; border: 0; border-radius: 12px;
    background: #e94560; color: #fff; font: inherit; font-weight: 750; cursor: pointer;
}
.course-library-filter-apply:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
.my-courses-page.manage-mode .my-courses-tools,
.my-courses-page.manage-mode .my-courses-resume-card,
.my-courses-page.collection-detail-active .my-courses-tools,
.my-courses-page.collection-detail-active .my-courses-resume-card { display: none; }
.my-courses-management-choice[hidden] { display: none; }
.my-courses-empty.filtered-empty .my-courses-empty-actions { display: none; }
@media (min-width: 720px) {
    .course-library-filter-modal { align-items: flex-start; justify-content: flex-end; padding: 76px 24px 24px; }
    .course-library-filter-sheet { width: 380px; max-height: calc(100vh - 100px); border-bottom: 1px solid rgba(255,255,255,.12); border-radius: 18px; padding-bottom: 18px; box-shadow: 0 20px 70px rgba(0,0,0,.52); }
    .course-library-filter-handle { display: none; }
}
.course-share-transition {
    position: fixed; z-index: 10050; left: 50%; top: 50%; transform: translate(-50%, -50%);
    box-sizing: border-box; max-width: calc(100vw - 32px); min-width: 180px; padding: 16px 20px; border-radius: 12px;
    background: rgba(23,23,36,.96); color: #f5f5f7; border: 1px solid rgba(255,255,255,.14);
    display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: nowrap; box-shadow: 0 12px 32px rgba(0,0,0,.35);
}
.course-share-spinner { width: 18px; height: 18px; flex: 0 0 auto; border: 2px solid rgba(255,255,255,.22); border-top-color: #f5f5f7; border-radius: 50%; animation: courseShareSpin .8s linear infinite; }
@keyframes courseShareSpin { to { transform: rotate(360deg); } }
.shared-learning-cta {
    flex: 0 0 auto; position: relative; display: block; padding: 10px 16px; background: #171724; z-index: 100;
}
.shared-learning-cta-pending { display: none; }
.shared-learning-cta > a, .shared-learning-cta > button {
    min-height: 44px; display: flex; align-items: center; justify-content: center; text-align: center;
    box-sizing: border-box; padding: 8px; border-radius: 8px; color: #aeaeb2; text-decoration: none;
    font-size: 14px; line-height: 20px; overflow-wrap: anywhere;
}
.shared-learning-cta > button { width: 100%; border: 0; background: transparent; cursor: pointer; font-family: inherit; }
.shared-learning-cta > button:focus-visible { outline: 2px solid #e94560; outline-offset: 2px; }
.shared-learning-cta > a.primary { background: #e94560; color: #f5f5f7; font-weight: 600; }
.shared-lesson-more { grid-column: 2; grid-row: 1 / 3; align-self: start; }
.shared-lesson-more > summary {
    list-style: none; box-sizing: border-box; display: grid; place-items: center; min-width: 44px; min-height: 44px;
    border-radius: 8px; background: #222231; color: #f5f5f7; font-size: 24px; cursor: pointer;
}
.shared-lesson-more > summary::-webkit-details-marker { display: none; }
.shared-lesson-more[open] { position: absolute; right: 16px; bottom: 8px; padding: 8px; width: min(260px, calc(100vw - 32px)); background: #222231; border-radius: 12px; box-sizing: border-box; }
.shared-lesson-more[open] > button { width: 100%; margin-top: 8px; }
.shared-learning-cta a:focus-visible, .shared-lesson-more summary:focus-visible { outline: 2px solid #e94560; outline-offset: 2px; }

.shared-clipboard-overlay { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(0,0,0,.72); }
.shared-clipboard-card { width: min(100%, 360px); padding: 20px; border: 1px solid rgba(255,255,255,.14); border-radius: 16px; background: #171724; color: #f5f5f7; text-align: center; box-sizing: border-box; }
.shared-clipboard-card strong { display: block; font-size: 18px; line-height: 24px; }
.shared-clipboard-card p { margin: 10px 0 16px; color: #aeaeb2; font-size: 14px; line-height: 20px; }
.shared-clipboard-card button { width: 100%; min-height: 44px; border: 0; border-radius: 8px; background: #e94560; color: #f5f5f7; font: inherit; font-weight: 600; }
.shared-clipboard-card button + button { margin-top: 8px; }
.shared-clipboard-card button.secondary { background: #222231; border: 1px solid rgba(255,255,255,.14); color: #aeaeb2; }

.my-courses-header .study-back-button { position: static; background: transparent; }

/* Share Handoff v1: only handoff UI, no player layout changes. */
.shared-handoff-copy-buffer { position: fixed; left: -9999px; top: 0; }
/* Keep the existing auth modal usable above the mobile CSS-fullscreen player. */
body.auth-modal-open .phase-play.css-fullscreen { z-index: 100; }
.shared-clipboard-card button:focus-visible { outline: 2px solid #e94560; outline-offset: 2px; }
