.image-lightbox {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    cursor: zoom-out;
    padding: 2rem;
}

.image-lightbox.is-open {
    display: flex;
}

.image-lightbox img {
    max-width: min(96vw, 1800px);
    max-height: 92vh;
    width: auto;
    height: auto;
    object-fit: contain;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.45);
    border-radius: 8px;
}

article img,
.prose img {
    cursor: zoom-in;
}

.code-lightbox {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.92);
    z-index: 10000;
    padding: 1rem;
}

.code-lightbox.is-open {
    display: flex;
}

.code-lightbox__panel {
    width: min(96vw, 1900px);
    max-height: 94vh;
    display: flex;
    flex-direction: column;
    --code-lightbox-font-scale: 1;
}

.code-lightbox__toolbar {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.code-lightbox__button {
    background: rgba(16, 24, 40, 0.92);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 0.35rem 0.75rem;
    font-weight: 600;
    cursor: pointer;
}

.code-lightbox__content {
    overflow: auto;
    border-radius: 10px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.45);
}

.code-lightbox__content pre {
    margin: 0;
    padding: 1.25rem;
    max-height: 86vh;
    overflow: auto;
    font-size: calc(clamp(15px, 1.35vw, 24px) * var(--code-lightbox-font-scale));
    line-height: 1.45;
}

article pre,
.prose pre {
    cursor: zoom-in;
}
