.course-detail-page {
    width: min(100%,930px);
    margin: -30px auto;
    padding: 24px 14px 42px;
    display: flex;
    flex-direction: column;
    gap: 24px
}
/* Lock background page scroll while the participants dialog is open so
   touch swipes only move the participants carousel. */
body:has(#course-participants-dialog[open]) {
    overflow: hidden;
}

.course-plus-page {
    gap: 20px;
}

.course-hero {
    text-align: center;
    padding-top: 4px
}

    .course-hero h1 {
        margin: 0;
        color: #ffffff;
        font-size: clamp(30px,4.5vw,48px);
        font-weight: 900;
        line-height: 1.35
    }

    .course-hero p {
        margin: 6px 0 0;
        color: var(--muted);
        font-size: clamp(14px,1.8vw,18px)
    }

.course-video-section, .course-info-section {
    overflow: hidden
}

.course-video-wrapper {
    position: relative;
    aspect-ratio: 2.34/1;
    overflow: hidden
}

.course-video-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(.55)
}

.course-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    width: 82px;
    height: 82px;
    border: 2px solid var(--cyan);
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--cyan);
    background: rgba(0,229,255,.14);
    box-shadow: 0 0 24px rgba(0,229,255,.6);
    cursor: pointer;
    transition: .2s
}

    .course-play-btn:hover {
        background: rgba(0,229,255,.3);
        box-shadow: 0 0 36px rgba(0,229,255,.8)
    }

    .course-play-btn svg {
        width: 40px;
        height: 40px;
        margin-right: -4px
    }

.course-video-controls {
    position: absolute;
    inset: auto 18px 11px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-size: 13px
}

    .course-video-controls i {
        height: 3px;
        flex: 1;
        border-radius: 4px;
        background: linear-gradient(90deg,var(--cyan) 66%,rgba(255,255,255,.3) 66%)
    }

.course-info-section {
    padding: 16px 38px 22px;
}

.course-outline-section {
    padding: 26px 30px 30px;
    margin-top: 0;
    background: linear-gradient(145deg, rgba(8,28,39,.88), rgba(3,13,22,.92));
}

.course-outline-header {
    text-align: center;
    margin-bottom: 22px;
}

    .course-outline-header h2 {
        margin: 0;
        color: var(--text);
        font-size: clamp(18px, 3.4vw, 32px);
        font-weight: 900;
    }

    .course-outline-header p {
        margin: 7px 0 0;
        color: var(--muted);
        font-size: 14px;
    }

.course-outline-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.course-outline-level {
    padding: 18px 18px 16px;
    border: 1px solid rgba(184,215,235,.2);
    border-radius: 14px;
    background: rgba(2,17,27,.55);
}

    .course-outline-level h3 {
        margin: 0 0 13px;
        color: var(--cyan);
        font-size: 20px;
        font-weight: 900;
        text-align: center;
    }

    .course-outline-level ol {
        margin: 0;
        padding: 0 24px 0 0;
    }

    .course-outline-level li {
        margin: 0 0 10px;
        color: var(--text);
        font-size: 14px;
        line-height: 1.75;
    }

        .course-outline-level li::marker {
            color: var(--cyan);
            font-weight: 800;
        }

        .course-outline-level li[data-type] {
            display: flex;
        }

.outline-item-link {
    flex: 1 1 auto;
    color: var(--text);
    font-size: 14px;
    line-height: 1.75;
    transition: color .2s;
}

    .outline-item-link.pdf:hover {
        color: #ff8a94;
    }

    .outline-item-link.video:hover {
        color: #7ee2b8;
    }

    /* Selected outline item: red text so the visitor knows what they
           clicked. */
    .outline-item-link.is-selected {
        color: #ff4d5e;
    }

:root.light-theme .course-outline-section {
    background: rgba(255,255,255,.88);
    border-color: rgba(38,121,160,.3);
}

:root.light-theme .course-outline-level {
    background: rgba(244,251,253,.82);
    border-color: rgba(35,125,161,.22)
}

    :root.light-theme .course-outline-level li {
        color: #183348
    }

.course-video-dialog {
    border: none;
    padding: 0;
    background: transparent;
    max-width: min(92vw, 860px);
    width: auto;
}

    .course-video-dialog::backdrop {
        background: rgba(2, 8, 16, .78);
        backdrop-filter: blur(4px);
    }

.course-video-dialog-panel {
    background: linear-gradient(145deg, rgba(8,28,39,.96), rgba(3,13,22,.98));
    border: 1px solid rgba(107,193,255,.3);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(0,0,0,.55), 0 0 30px rgba(39,231,255,.15);
}

.course-video-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 18px;
}

    .course-video-dialog-header strong {
        color: var(--text);
        font-size: 15px;
    }

.course-video-dialog-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255,71,87,.45);
    border-radius: 9px;
    background: rgba(255,71,87,.12);
    color: #ff8a94;
    cursor: pointer;
    transition: filter .2s;
}

    .course-video-dialog-close svg {
        width: 16px;
        height: 16px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
    }

    .course-video-dialog-close:hover {
        filter: brightness(1.2);
    }

.course-video-dialog video {
    display: block;
    width: 100%;
    max-height: 70vh;
    background: #000;
}

.course-info-preview {
    overflow: hidden;
    margin-bottom: 18px;
    border-radius: 8px
}

    .course-info-preview img {
        display: block;
        width: 100%;
        aspect-ratio: 16/9;
        object-fit: cover
    }

.course-info-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    margin: 18px 0
}

.course-info-item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 82px;
    padding: 12px 20px;
    border-inline-start: 1px solid rgba(184,215,235,.2)
}

    .course-info-item:nth-child(3n+1) {
        border-inline-start: 0
    }

    .course-info-item:nth-child(n+4) {
        border-top: 1px solid rgba(184,215,235,.2)
    }

.course-info-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: center
}

.course-info-label {
    color: var(--muted);
    font-size: 14px
}

.course-info-value, .course-info-sub {
    color: var(--cyan);
    font-weight: 800
}

.course-info-value {
    font-size: 18px
}

.course-info-sub {
    font-size: 14px
}

.course-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px
}

.course-action-btn {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 12px;
    color: #fff;
    font-size: 21px;
    font-weight: 900;
    font-family: inherit;
    cursor: pointer;
    transition: .2s
}

.course-buy-btn {
    background: linear-gradient(180deg,#2fc882,#17995e);
    box-shadow: 0 0 24px rgba(47,200,130,.35)
}

.course-capacity-btn {
    background: linear-gradient(180deg,#f3c94d,#d99d0b);
    box-shadow: 0 0 24px rgba(243,201,77,.3)
}

.course-action-btn:hover {
    transform: translateY(-2px);
}

.course-participants-dialog {
    width: min(100% - 24px, 560px);
    height: min(760px, calc(100dvh - 32px));
    margin: auto;
    padding: 0;
    overflow: hidden;
    color: var(--text);
    background: #06131d;
    border: 1px solid rgba(0,229,255,.55);
    border-radius: 18px;
    box-shadow: 0 0 20px rgba(0,229,255,.32), 0 24px 70px rgba(0,0,0,.72)
}

    .course-participants-dialog::backdrop {
        background: rgba(0,5,13,.78);
        backdrop-filter: blur(5px)
    }

.course-participants-panel {
    height: 100%;
    padding: 18px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: radial-gradient(circle at 100% 0, rgba(0,229,255,.11), transparent 34%), linear-gradient(145deg, rgba(8,28,39,.98), rgba(3,13,22,.98))
}

.course-participants-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: none;
    margin-bottom: 14px
}

.course-participants-pages {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: auto;
    overflow-y: hidden;
    contain: layout;
    touch-action: pan-x;
    overscroll-behavior-x: contain;
    overscroll-behavior-y: none;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-top: 2px;
}

.course-participants-carousel {
    position: relative;
    display: flex;
    align-items: stretch;
    flex: 1 1 auto;
    min-height: 0;
    gap: 2px;
}

.course-participants-pages::-webkit-scrollbar {
    display: none;
}

.course-participants-page {
    width: 100%;
    height: 100%;
    flex: 0 0 100%;
    scroll-snap-align: start;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.course-participants-page-label {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: fit-content;
    margin-right: auto;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 700;
    color: #ffaee9;
    background: rgba(3, 18, 28, .7);
    border: 1px solid rgba(255, 61, 242, .45);
    border-radius: 999px;
}

    .course-participants-page-label .dot {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: currentColor;
        box-shadow: 0 0 8px currentColor;
    }

.course-participants-page.is-current .course-participants-page-label {
    color: #8affd2;
    border-color: rgba(47, 200, 130, .55);
    box-shadow: 0 0 14px rgba(47, 200, 130, .28);
}

.course-participants-page:last-child .course-participants-page-label {
    color: #7deeff;
    border-color: rgba(0, 229, 255, .45);
    box-shadow: none;
}

.course-participants-arrows {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex: none;
    padding: 10px 0 2px;
}

.course-participants-arrow {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    color: var(--cyan);
    background: rgba(0, 229, 255, .08);
    border: 1px solid rgba(0, 229, 255, .4);
    border-radius: 50%;
    cursor: pointer;
    transition: background .2s ease, box-shadow .2s ease, opacity .2s ease;
}

    .course-participants-arrow svg {
        width: 20px;
        height: 20px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2.2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .course-participants-arrow:hover {
        background: rgba(0, 229, 255, .2);
        box-shadow: 0 0 14px rgba(0, 229, 255, .5);
    }

    .course-participants-arrow[disabled] {
        opacity: .35;
        pointer-events: none;
    }

:root.light-theme .course-participants-arrow {
    color: #34d399;
    background: rgba(22, 125, 159, .08);
    border-color: rgba(22, 125, 159, .4);
}

.course-participants-title-wrap {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: auto;
}

    .course-participants-title-wrap h2 {
        margin: 0;
        font-size: clamp(20px, 4vw, 26px);
        font-weight: 900
    }

.course-participants-title-icon {
    width: 32px;
    height: 32px;
    fill: none;
    stroke: var(--cyan);
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 6px rgba(0,229,255,.75))
}

.course-participants-close {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    flex: none;
    color: var(--text);
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(184,215,235,.25);
    border-radius: 10px
}

    .course-participants-close:hover {
        color: var(--cyan);
        border-color: rgba(0,229,255,.65)
    }

    .course-participants-close svg {
        width: 22px;
        height: 22px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round
    }

.course-participants-list {
    display: grid;
    gap: 8px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    touch-action: pan-x pan-y;
    margin: 0;
    padding: 0;
    list-style: none
}

.course-participants-list {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

    .course-participants-list::-webkit-scrollbar {
        width: 0;
        height: 0;
    }

    .course-participants-list::-webkit-scrollbar-thumb {
        background: transparent;
    }

.course-participants-meta {
    flex: none;
    position: static;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
    padding: 12px 10px;
    background: rgba(2,17,27,.55);
    background-color: #0a2231;
    border: 1px solid rgba(122,190,218,.24);
    border-radius: 12px;
    box-shadow: 0 -6px 18px rgba(0,0,0,.25);
    text-align: center;
}

    .course-participants-meta div {
        display: flex;
        flex-direction: column;
        gap: 3px;
        min-width: 0;
    }

    .course-participants-meta span {
        color: var(--muted);
        font-size: 11px;
    }

    .course-participants-meta strong {
        color: var(--cyan);
        font-size: 13px;
        line-height: 1.6;
        overflow-wrap: anywhere;
    }

:root.light-theme .course-participants-meta {
    background: rgba(247,252,254,.8);
    border-color: rgba(35,125,161,.22);
}

    :root.light-theme .course-participants-meta strong {
        color: #34d399;
    }

.course-participant {
    display: grid;
    grid-template-columns: 42px 52px minmax(0, 1fr) 118px;
    align-items: center;
    gap: 10px;
    min-height: 67px;
    padding: 7px 10px;
    background: linear-gradient(90deg, rgba(2,17,27,.88), rgba(11,31,42,.92));
    border: 1px solid rgba(122,190,218,.24);
    border-radius: 12px;
    box-shadow: inset 0 0 16px rgba(0,229,255,.025)
}

.course-participant-number {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: var(--text);
    font-size: 18px;
    font-weight: 800;
    background: linear-gradient(145deg, rgba(20,53,68,.95), rgba(7,23,34,.95));
    border: 1px solid rgba(116,194,224,.28);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,229,255,.12)
}

.course-participant-avatar {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    color: #85f7ff;
    background: radial-gradient(circle at 35% 28%, rgba(255,255,255,.25), transparent 16%), rgba(0,229,255,.12);
    border: 1px solid var(--cyan);
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(0,229,255,.65), inset 0 0 12px rgba(0,229,255,.18)
}

    .course-participant-avatar svg {
        width: 30px;
        height: 30px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.6;
        stroke-linecap: round
    }

.course-participant--female .course-participant-avatar {
    color: #ff9fe7;
    background: radial-gradient(circle at 35% 28%, rgba(255,255,255,.25), transparent 16%), rgba(255,61,242,.12);
    border-color: var(--pink);
    box-shadow: 0 0 12px rgba(255,61,242,.65), inset 0 0 12px rgba(255,61,242,.18)
}

/* Empty seat: green avatar icon, dashed placeholders for name and date. */
.course-participant--empty .course-participant-avatar {
    color: #4ade80;
    background: radial-gradient(circle at 35% 28%, rgba(255,255,255,.22), transparent 16%), rgba(74,222,128,.12);
    border-color: #4ade80;
    border-style: dashed;
    box-shadow: 0 0 12px rgba(74,222,128,.55), inset 0 0 12px rgba(74,222,128,.16)
}

.course-participant--empty strong,
.course-participant--empty time {
    color: rgba(255,255,255,.55)
}

.course-participant--empty strong {
    border-bottom: 2px dashed rgba(74,222,128,.55);
    padding-bottom: 4px;
    /* Keep the dashed name placeholder about a third shorter. */
    max-width: 66%;
}

.course-participant--empty time small {
    display: block;
    width: 55px;
    min-width: 55px;
    padding-bottom: 10px;
    border-bottom: 2px dashed rgba(74,222,128,.45);
    padding-bottom: 16px;
    transform: translateY(-6px)
}

:root.light-theme .course-participants-dialog {
    color: #102234;
    background: #f9fdff;
    border-color: rgba(25,137,178,.45);
    box-shadow: 0 0 20px rgba(20,155,200,.22), 0 24px 70px rgba(4,35,52,.28)
}

    :root.light-theme .course-participants-dialog::backdrop {
        background: rgba(22,48,64,.38)
    }

:root.light-theme .course-participants-panel {
    background: radial-gradient(circle at 100% 0, rgba(0,184,224,.12), transparent 34%), linear-gradient(145deg, #ffffff, #edf8fc)
}

:root.light-theme .course-participants-close {
    color: #214459;
    background: rgba(255,255,255,.86);
    border-color: rgba(35,105,137,.25)
}

:root.light-theme .course-participant {
    background: linear-gradient(90deg, #f7fcfe, #e9f6fa);
    border-color: rgba(35,125,161,.22);
    box-shadow: inset 0 0 16px rgba(0,166,207,.035)
}

:root.light-theme .course-participant-number {
    color: #173448;
    background: linear-gradient(145deg, #e6f5fa, #d4eaf2);
    border-color: rgba(35,125,161,.2);
    box-shadow: none
}

:root.light-theme .course-participant strong {
    color: #183348
}

:root.light-theme .course-participant time {
    color: #31556b
}

    :root.light-theme .course-participant time small {
        color: #668093
    }

.course-participant strong {
    min-width: 0;
    font-size: 16px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.course-participant time {
    color: #c9d6e2;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
    text-align: right;
    white-space: nowrap;
}

    .course-participant time small {
        display: block;
        color: var(--muted);
        font-size: 11px
    }

:root.light-theme .course-info-section {
    background: rgba(255,255,255,.88);
    border-color: rgba(38,121,160,.3)
}

:root.light-theme .course-video-section {
    background: rgba(255,255,255,.72)
}

/* Course Plus page: shared framed box that contains the title, the media
   preview and its green download button, mirroring the outline frame. */
.course-plus-frame {
    padding: 20px 22px 22px;
    background: linear-gradient(145deg, rgba(8,28,39,.88), rgba(3,13,22,.92));
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.course-plus-video-area {
    position: relative;
}

    .course-plus-video-area .course-video-wrapper {
        aspect-ratio: 16/9;
        width: 100%;
        border-radius: 14px;
        overflow: hidden;
    }

/* Inline video that replaces the preview image when an outline video item
   is clicked. */
.course-plus-inline-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    object-fit: contain;
    background: #000;
}

/* Page title sits above and outside the video frame box. */
.course-plus-heading {
    display: flex;
    justify-content: center;
    padding: 4px 0 2px;
}

.course-plus-title {
    position: static;
    margin: 0;
    padding: 0 16px;
    text-align: center;
    color: #ffffff;
    font-size: clamp(30px, 4.5vw, 48px);
    font-weight: 900;
    line-height: 1.35;
    text-shadow: 0 2px 18px rgba(0,0,0,.75);
}

/* Vertical (portrait) preview box for the PDF display. */
.course-plus-pdf-area {
    display: flex;
    justify-content: center;
}

.course-plus-pdf-preview {
    width: min(62%, 260px);
    aspect-ratio: 1/1.414;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 1px solid rgba(184,215,235,.25);
    border-radius: 14px;
    /* Yellow placeholder box with the PDF icon shown before a PDF is picked. */
    background: linear-gradient(160deg, #ffe066, #f0b429);
    color: #38bdf8;
    font-size: 15px;
    font-weight: 800;
    position: relative;
    cursor: default;
}

    /* Once a PDF is loaded inside the box, it becomes a tappable viewer. */
    .course-plus-pdf-preview.is-active {
        cursor: zoom-in;
    }

    .course-plus-pdf-preview iframe {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        border: 0;
        border-radius: 13px;
        background: #fff;
    }

/* Transparent overlay above the small PDF iframe so clicks always reach
   the parent page (iframe clicks don't bubble out). */
.course-plus-pdf-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}

/* Fullscreen PDF viewer dialog so the visitor can read the document. */
.course-pdf-viewer-dialog {
    border: 0;
    padding: 0;
    background: transparent;
    max-width: 100vw;
    width: 100vw;
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
}

    .course-pdf-viewer-dialog::backdrop {
        background: rgba(0,0,0,.75);
    }

.course-pdf-viewer-panel {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100vh;
    background: #101d26;
    border: 0;
    border-radius: 0;
    overflow: hidden;
}

.course-pdf-viewer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    color: #fff;
    font-size: 16px;
}

.course-pdf-viewer-close {
    border: 0;
    background: rgba(255,255,255,.12);
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
}

.course-pdf-viewer-panel iframe {
    width: 100%;
    flex: 1 1 auto;
    height: auto;
    border: 0;
    background: #fff;
}

.course-plus-pdf-preview svg {
    width: 54px;
    height: 54px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* The yellow placeholder keeps its icon and PDF name even when a file is
   selected; only the (unused) inline iframe stays hidden. */
.course-plus-pdf-preview iframe {
    display: none;
}

/* "Open" button shown under the PDF icon/name inside the yellow box. */
.course-plus-pdf-open {
    border: 0;
    border-radius: 24px;
    padding: 10px 28px;
    background: #2563eb;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
}

.course-plus-pdf-open:hover {
    background: #1d4ed8;
}

.course-plus-download-btn {
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    border-radius: 12px;
    color: #fff;
    font-size: 19px;
    font-weight: 900;
    background: linear-gradient(180deg,#2fc882,#17995e);
    box-shadow: 0 0 24px rgba(47,200,130,.35);
    text-decoration: none;
    transition: .2s;
}

    .course-plus-download-btn:hover {
        transform: translateY(-2px);
    }

@media(max-width:700px) {
    .course-plus-frame {
        padding: 14px 12px 16px;
        gap: 12px;
    }

    .course-plus-download-btn {
        min-height: 50px;
        font-size: 17px;
    }
}

/* The course detail pages belong to the learning section, so keep the
   centered book destination visibly lit. */
body:has(.course-detail-page) .fixed-footer .mobile-footer-nav a:nth-child(2) img,
body:has(.course-plus-page) .fixed-footer .mobile-footer-nav a:nth-child(2) img,
body:has(.course-capacity-page) .fixed-footer .mobile-footer-nav a:nth-child(2) img {
    filter: grayscale(0) drop-shadow(0 0 6px #34d399) drop-shadow(0 0 14px rgba(52, 211, 153, .8)) !important;
}

@media(max-width:700px) {
    .course-detail-page {
        padding: 0px 12px 0px;
        gap: 16px;
        margin-bottom:20px;
    }

    .course-hero h1 {
        font-size: clamp(27px,8vw,38px)
    }

    .course-hero p {
        font-size: 13px;
        line-height: 1.8
    }

    .course-video-wrapper {
        aspect-ratio: 1.45/1
    }

    .course-play-btn {
        width: 62px;
        height: 62px
    }

        .course-play-btn svg {
            width: 30px;
            height: 30px
        }

    .course-video-controls {
        inset: auto 10px 9px;
        gap: 8px;
        font-size: 10px
    }

    .course-info-section {
        padding: 12px 10px 16px
    }

    .course-outline-section {
        padding: 20px 12px 18px;
    }

    .course-outline-header {
        margin-bottom: 16px;
    }

        .course-outline-header p {
            font-size: 12px;
            line-height: 1.7;
        }

    .course-outline-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .course-outline-level {
        padding: 15px 13px 12px;
    }

        .course-outline-level h3 {
            font-size: 18px;
        }

        .course-outline-level li {
            font-size: 13px;
            margin-bottom: 8px;
        }

    .course-info-preview {
        margin-bottom: 14px
    }

    .course-info-preview img {
        aspect-ratio: 16/9
    }

    .course-info-grid {
        grid-template-columns: repeat(2,1fr);
        margin: 14px 0
    }

    .course-info-item {
        min-height: 86px;
        padding: 10px 7px
    }

        .course-info-item:nth-child(3n+1) {
            border-inline-start: 1px solid rgba(184,215,235,.2)
        }

        .course-info-item:nth-child(2n+1) {
            border-inline-start: 0
        }

        .course-info-item:nth-child(n+3) {
            border-top: 1px solid rgba(184,215,235,.2)
        }

    .course-info-label {
        font-size: 11px
    }

    .course-info-value {
        font-size: 14px
    }

    .course-info-sub {
        font-size: 12px
    }

    .course-actions {
        gap: 8px
    }

    .course-action-btn {
        min-height: 54px;
        font-size: 18px
    }

    .course-participants-panel {
        padding: 14px 10px;
    }

    .course-participants-pages::before,
    .course-participants-pages::after {
        width: 16px;
    }

    .course-participants-meta {
        grid-template-columns: 1fr;
        gap: 5px;
        padding: 9px 8px;
    }

        .course-participants-meta div {
            display: grid;
            grid-template-columns: 1fr 1fr;
            align-items: center;
            text-align: right;
        }

        .course-participants-meta strong {
            text-align: right;
            font-size: 11px;
        }

    .course-participant {
        grid-template-columns: 36px 44px minmax(0, 1fr) 94px;
        gap: 7px;
        min-height: 61px;
        padding: 6px 7px
    }

    .course-participant-number {
        width: 32px;
        height: 32px;
        font-size: 15px
    }

    .course-participant-avatar {
        width: 40px;
        height: 40px;
        font-size: 18px
    }

    .course-participant strong {
        font-size: 14px
    }

    .course-participant time {
        font-size: 11px
    }
}

@media(prefers-reduced-motion:reduce) {
    .course-play-btn, .course-action-btn {
        transition: none
    }

        .course-action-btn:hover {
            transform: none
        }
}

/* ------------------------------------------------------------------ */
/* Course capacity page: a dedicated full page listing the enrolled    */
/* participants. Each course gets its own framed box (like the outline */
/* section) with the course badge on top, the full name list inside,   */
/* and the class schedule footer at the bottom of the box.             */
/* ------------------------------------------------------------------ */
.course-capacity-page {
    width: min(100%,930px);
    margin: -30px auto;
    padding: 24px 14px 42px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 20px;
}

.course-capacity-hero {
    text-align: center;
}

.course-capacity-title-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px
}

    .course-capacity-title-wrap h1 {
        margin: 0;
        font-size: clamp(30px, 4.5vw, 48px);
        font-weight: 900
    }

.course-capacity-title-icon {
    width: 32px;
    height: 32px;
    fill: none;
    stroke: var(--cyan);
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 6px rgba(0,229,255,.75))
}

.course-capacity-hero p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: clamp(14px, 1.8vw, 18px)
}

.course-capacity-box {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 34px 38px 40px;
    background: linear-gradient(145deg, rgba(8,28,39,.88), rgba(3,13,22,.92));
    min-height: 760px
}

.course-capacity-title-green {
    color: #34d399;
    text-shadow: 0 0 12px rgba(52,211,153,.55)
}

.course-capacity-title-orange {
    color: #fb923c;
    text-shadow: 0 0 12px rgba(251,146,60,.55)
}

.course-capacity-box-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center
}

    .course-capacity-box-head h2 {
        margin: 0;
        font-size: clamp(18px, 3.4vw, 32px);
        font-weight: 900
    }

.course-capacity-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 14px;
    font-size: 14px;
    font-weight: 700;
    color: #7deeff;
    background: rgba(3, 18, 28, .7);
    border: 1px solid rgba(0, 229, 255, .45);
    border-radius: 999px
}

    .course-capacity-badge .dot {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: currentColor;
        box-shadow: 0 0 8px currentColor
    }

.course-capacity-badge--current {
    color: #8affd2;
    border-color: rgba(47, 200, 130, .55);
    box-shadow: 0 0 14px rgba(47, 200, 130, .28)
}

.course-capacity-badge--next {
    color: #7deeff;
    border-color: rgba(0, 229, 255, .45);
    box-shadow: none
}

.course-capacity-badge--orange {
    color: #fdba74;
    border-color: rgba(251, 146, 60, .55);
    box-shadow: 0 0 14px rgba(251, 146, 60, .28)
}

.course-capacity-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none
}

.course-capacity-meta {
    margin-top: 2px
}

:root.light-theme .course-capacity-box {
    background: rgba(255,255,255,.88);
    border-color: rgba(38,121,160,.3)
}

:root.light-theme .course-capacity-badge {
    background: rgba(247,252,254,.9);
    color: #34d399;
    border-color: rgba(35,125,161,.3)
}

:root.light-theme .course-capacity-badge--current {
    color: #34d399;
    border-color: rgba(23,153,94,.45)
}

:root.light-theme .course-capacity-badge--orange {
    color: #c2410c;
    border-color: rgba(234,124,58,.45)
}

:root.light-theme .course-capacity-title-orange {
    color: #ea580c;
    text-shadow: none
}

@media(max-width:700px) {
    .course-capacity-page {
        padding: 0 12px 0;
        gap: 7px
    }

    .course-capacity-hero h1 {
        color: white;
        font-size: clamp(27px, 8vw, 38px)
    }

    .course-capacity-hero p {
        font-size: 13px;
        line-height: 1.8
    }

    .course-capacity-box {
        padding: 20px 12px 18px;
        gap: 12px
    }

    .course-capacity-list {
        gap: 6px
    }
}
