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

.shortcode__item {
    overflow: hidden;
    background: transparent;
    border: 0;
}

.shortcode__item--full {
    grid-column: 1 / -1;
}

.shortcode__item--text {
    border: 0;
}

.shortcode__content--text-wrapper {
    height: 100%;
    min-height: 100%;
    display: flex;
    align-items: center;
}

.shortcode__content--text {
    width: 100%;
    padding: 24px 40px;
    color: #1d1d1d;
    font-size: clamp(1rem, 1.15vw, 1.2rem);
    line-height: 1.72;
    background: transparent;
}

.shortcode__content--text a {
    color: var(--text);
    text-underline-offset: 0.2em;
}

.shortcode__item:not(.shortcode__item--text) {
    border: 0;
}

.shortcode__content--image {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
}

.shortcode__action {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}

.shortcode__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.shortcode__item--full .shortcode__content--image {
    padding-bottom: 0;
}

.shortcode__item--full .shortcode__action {
    position: static;
    display: block;
    height: auto;
}

.shortcode__item--full .shortcode__image {
    position: static;
    display: block;
    height: auto;
    object-fit: contain;
}

.shortcode__caption {
    padding: 12px 20px 18px;
    color: #2a2a2a;
    font-size: var(--type-sm);
    line-height: 1.5;
    background: transparent;
}

.shortcode__item--columns {
    grid-column: 1 / -1;
}

.shortcode__columns {
    --shortcode-columns: 2;
    display: grid;
    grid-template-columns: repeat(var(--shortcode-columns), minmax(0, 1fr));
    gap: 20px;
    align-items: center;
}

.shortcode__columns--align-start {
    align-items: start;
}

.shortcode__columns--align-center {
    align-items: center;
}

.shortcode__columns--align-end {
    align-items: end;
}

.shortcode__columns--align-stretch {
    align-items: stretch;
}

.shortcode__column {
    --shortcode-column-span: 1;
    grid-column: span var(--shortcode-column-span);
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-self: center;
}

.shortcode__column--align-start {
    align-self: start;
}

.shortcode__column--align-center {
    align-self: center;
}

.shortcode__column--align-end {
    align-self: end;
}

.shortcode__column--align-stretch {
    align-self: stretch;
}

.shortcode__column > .shortcode__item {
    width: 100%;
}

.shortcode__column .shortcode__content--image {
    padding-bottom: 0;
}

.shortcode__column .shortcode__action {
    position: static;
    display: block;
    height: auto;
}

.shortcode__column .shortcode__image {
    position: static;
    display: block;
    height: auto;
    object-fit: contain;
}

.shortcode__content--detail {
    padding: 0;
}

.shortcode__summary {
    width: 100%;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: var(--type-base);
}

.shortcode__summary::-webkit-details-marker,
.shortcode__summary::marker {
    display: none;
}

.shortcode__summary-arrow {
    transition: transform var(--transition);
}

details[open] .shortcode__summary-arrow {
    transform: rotate(90deg);
}

.shortcode__content--detail .shortcode__grid {
    padding: 0 20px 20px;
}

.lightbox {
    margin: 0;
    padding: 0;
    border: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    background: transparent;
    color: #f6efe4;
}

.lightbox::backdrop {
    background:
        radial-gradient(circle at center, rgba(72, 72, 72, 0.08), transparent 46%),
        linear-gradient(180deg, rgba(16, 16, 16, 0.96), rgba(6, 6, 6, 0.99));
}

.lightbox__shell {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    padding: 0;
    box-sizing: border-box;
}

.lightbox__close,
.lightbox__nav,
.lightbox__dot {
    appearance: none;
    border: 0;
}

.lightbox__close {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 2;
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 248, 239, 0.12);
    color: inherit;
    cursor: pointer;
    backdrop-filter: blur(12px);
}

.lightbox__close span {
    font-size: 2rem;
    line-height: 1;
}

.lightbox__toolbar {
    position: absolute;
    top: 18px;
    left: 20px;
    right: 92px;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
}

.lightbox__meta {
    display: grid;
    gap: 6px;
    max-width: min(720px, 100%);
}

.lightbox__counter {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: rgba(246, 239, 228, 0.72);
}

.lightbox__caption {
    font-size: clamp(0.95rem, 1vw, 1.1rem);
    line-height: 1.5;
}

.lightbox__stage {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 64px 88px 72px;
    box-sizing: border-box;
}

.lightbox__figure {
    margin: 0;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox__image {
    display: block;
    max-width: min(1680px, 100%);
    width: auto;
    height: auto;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.lightbox__nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 248, 239, 0.12);
    color: inherit;
    cursor: pointer;
    backdrop-filter: blur(12px);
    transform: translateY(-50%);
}

.lightbox__nav--prev {
    left: 18px;
}

.lightbox__nav--next {
    right: 18px;
}

.lightbox__nav span {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.6rem;
    line-height: 1;
    transform: translateY(-0.08em);
}

.lightbox__nav:disabled {
    opacity: 0.35;
    cursor: default;
}

.lightbox__dots {
    position: absolute;
    left: 50%;
    bottom: 18px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    max-width: min(calc(100vw - 120px), 560px);
    padding: 10px 14px;
    overflow-x: auto;
    transform: translateX(-50%);
    scrollbar-width: none;
}

.lightbox__dots::-webkit-scrollbar {
    display: none;
}

.lightbox__dot {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: rgba(255, 248, 239, 0.28);
    cursor: pointer;
    transition: transform 160ms ease, background-color 160ms ease;
    aspect-ratio: 1 / 1;
}

.lightbox__dot[data-active="true"] {
    transform: scale(1.35);
    background: #f6efe4;
}

body:has(dialog[open]) {
    overflow: hidden;
}

@media (max-width: 720px) {
    .shortcode__grid {
        grid-template-columns: 1fr;
    }

    .shortcode__columns {
        grid-template-columns: 1fr;
    }

    .shortcode__column {
        grid-column: auto;
    }

    .shortcode__content--text {
        padding: 18px 12px;
        font-size: 1rem;
        line-height: 1.7;
    }

    .lightbox__shell {
        padding: 0;
    }

    .lightbox__toolbar {
        top: 12px;
        left: 12px;
        right: 64px;
    }

    .lightbox__stage {
        min-height: 100vh;
        padding: 72px 14px 92px;
    }

    .lightbox__image {
        max-height: 100%;
    }

    .lightbox__nav {
        top: 50%;
        width: 46px;
        height: 46px;
        transform: translateY(-50%);
    }

    .lightbox__nav--prev {
        left: 8px;
    }

    .lightbox__nav--next {
        right: 8px;
    }

    .lightbox__close {
        top: 12px;
        right: 12px;
        width: 44px;
        height: 44px;
    }

    .lightbox__dots {
        bottom: 12px;
        max-width: calc(100vw - 24px);
        padding: 8px 12px;
    }
}
