.student-lightbox:not([open]) {
    display: none !important;
}
.student-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    width: min(1100px, calc(100vw - 32px));
    max-width: calc(100vw - 32px);
    max-height: calc(100dvh - 24px);
    margin: auto;
    padding: 16px;
    box-sizing: border-box;
    border: 1px solid #d4af61;
    border-radius: 20px;
    background: linear-gradient(135deg, rgb(77 17 27 / 92%), rgb(30 14 22 / 94%));
    color: #fff5d6;
    box-shadow: 0 24px 90px rgb(0 0 0 / 45%), inset 0 1px rgb(255 237 184 / 20%);
    backdrop-filter: blur(20px);
    overflow-y: auto;
}
.student-lightbox::backdrop {
    background: rgb(24 8 14 / 72%);
    backdrop-filter: blur(8px);
}
.student-lightbox-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.student-lightbox-toolbar span {
    font-weight: 600;
}
.student-lightbox button {
    min-width: 44px;
    min-height: 44px;
    padding: 8px 16px;
    border: 1px solid #cbaa60;
    border-radius: 10px;
    background: rgb(255 238 187 / 10%);
    color: #fff1c4;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.student-lightbox button:hover {
    background: #85212b;
}
.student-lightbox button[hidden] {
    display: none;
}
.student-lightbox-stage {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    isolation: isolate;
    border: 1px solid rgb(230 196 120 / 40%);
    border-radius: 12px;
    background: #21151b;
}
.student-lightbox-stage img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.student-lightbox-stage [data-lightbox-ambient] {
    object-fit: cover;
    filter: blur(24px) brightness(.45);
    transform: scale(1.12);
    pointer-events: none;
    z-index: -1;
}
.student-lightbox-caption {
    margin: 12px 0;
    color: #fff5df;
    font-size: 14px;
    line-height: 1.6;
    text-align: center;
    overflow-wrap: anywhere;
}
.student-lightbox-navigation {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 12px;
}
.student-lightbox-thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 12px 3px 6px;
    scrollbar-width: thin;
    scrollbar-color: #cbaa60 transparent;
}
.student-lightbox-thumbnails button {
    flex: 0 0 96px;
    aspect-ratio: 16 / 9;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    border: 2px solid transparent;
    background: #392027;
    opacity: .7;
}
.student-lightbox-thumbnails button[aria-current="true"] {
    border-color: #f3ce75;
    opacity: 1;
    box-shadow: 0 0 0 1px #f3ce75;
}
.student-lightbox-thumbnails img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.student-lightbox button:focus-visible {
    outline: 3px solid #fcd879;
    outline-offset: 3px;
}
@media (max-width: 600px) {
    .student-lightbox {
        width: calc(100vw - 16px);
        max-width: calc(100vw - 16px);
        padding: 10px;
        border-radius: 14px;
    }
    .student-lightbox-thumbnails button {
        flex-basis: 80px;
    }
}
@media (min-width: 800px) and (min-height: 600px) {
    .student-lightbox {
        width: min(1100px, calc((100dvh - 260px) * 16 / 9));
    }
}

.student-lightbox-thumbnails[hidden] {
    display: none;
}
