.fg-project-media {
                margin-top: 2rem;
                --fg-media-modal-backdrop: rgba(0, 0, 0, .58);
                --fg-media-modal-surface: var(--theme-section-background-color, var(--theme-card-background-color, #ffffff));
                --fg-media-modal-text: var(--theme-body-text-color, #202124);
                --fg-media-modal-heading: var(--theme-heading-color, #111827);
                --fg-media-modal-accent: var(--theme-accent-color, currentColor);
                --fg-media-modal-border: rgba(0, 0, 0, .12);
                --fg-media-modal-muted-bg: rgba(0, 0, 0, .06);
                --fg-media-modal-shadow: 0 24px 70px rgba(0, 0, 0, .28);
                --fg-media-modal-radius: 12px;
                --fg-media-modal-button-radius: 999px;
                --fg-media-modal-header-bg: transparent;
                --fg-media-modal-title-transform: none;
                --fg-media-modal-title-letter-spacing: 0;
                --fg-media-modal-close-hover-text: #ffffff;
            }
            .fg-project-media {
    --fg-media-modal-backdrop: rgba(2, 8, 15, .72);
    --fg-media-modal-surface: linear-gradient(165deg, var(--py-panel, rgba(6, 12, 20, .98)) 0%, rgba(4, 10, 18, .98) 100%);
    --fg-media-modal-text: var(--py-text, #e8f4ff);
    --fg-media-modal-heading: var(--py-text, #e8f4ff);
    --fg-media-modal-accent: #7dd3fc;
    --fg-media-modal-border: rgba(125, 211, 252, .22);
    --fg-media-modal-muted-bg: var(--py-panel-2, rgba(10, 22, 36, .55));
    --fg-media-modal-shadow: 0 28px 90px rgba(0, 190, 255, .14), 0 22px 70px rgba(0, 0, 0, .55);
}

            .fg-project-media-title {
                margin: 0 0 1rem;
                font-size: 1.25rem;
                font-weight: 700;
            }
            .fg-project-media-grid {
                display: grid;
                gap: 1rem;
            }
            .fg-project-media-card {
                border: 1px solid rgba(127, 127, 127, .18);
                border-radius: 10px;
                padding: 1rem;
                background: rgba(255, 255, 255, .04);
            }
            .fg-project-media-name {
                margin: 0 0 .75rem;
                font-size: 1rem;
                font-weight: 600;
            }
            .fg-project-media-player,
            .fg-project-media-audio,
            .fg-project-media-image,
            .fg-project-media-frame {
                width: 100%;
                display: block;
                border-radius: 8px;
            }
            .fg-project-media-image {
                max-height: 720px;
                object-fit: contain;
                background: rgba(0, 0, 0, .08);
            }
            .fg-project-media-frame-wrap {
                position: relative;
                width: 100%;
                aspect-ratio: 16 / 9;
                overflow: hidden;
                border-radius: 8px;
            }
            .fg-project-media-frame-wrap iframe {
                position: absolute;
                inset: 0;
                width: 100%;
                height: 100%;
                border: 0;
            }
            .fg-project-media-pdf-wrap {
                aspect-ratio: 4 / 3;
                background: rgba(0, 0, 0, .08);
            }
            .fg-project-media-pdf-action {
                display: inline-flex;
                align-items: center;
                justify-content: center;
                min-height: 40px;
                padding: 0 1rem;
                border: 1px solid var(--fg-media-modal-border);
                border-radius: var(--fg-media-modal-button-radius);
                background: var(--fg-media-modal-muted-bg);
                color: inherit;
                font: inherit;
                font-weight: 600;
                text-decoration: none;
                cursor: pointer;
            }
            .fg-project-media-pdf-action:hover {
                border-color: var(--fg-media-modal-accent);
                color: var(--fg-media-modal-accent);
            }
            .fg-project-media-info-btn {
                display: inline-flex;
                align-items: center;
                justify-content: center;
                gap: .45rem;
                margin-top: .85rem;
                min-height: 40px;
                padding: 0 1rem;
                border: 1px solid var(--fg-media-modal-border);
                border-radius: var(--fg-media-modal-button-radius);
                background: var(--fg-media-modal-muted-bg);
                color: inherit;
                font: inherit;
                font-weight: 600;
                cursor: pointer;
            }
            .fg-project-media-info-btn:hover {
                border-color: var(--fg-media-modal-accent);
                color: var(--fg-media-modal-accent);
            }
            .fg-project-media-modal {
                position: fixed;
                inset: 0;
                z-index: 9999;
                display: none;
                align-items: center;
                justify-content: center;
                padding: 1.25rem;
                background: var(--fg-media-modal-backdrop);
            }
            .fg-project-media-modal.is-open {
                display: flex;
            }
            .fg-project-media-modal-panel {
                width: min(100%, 640px);
                max-height: min(82vh, 720px);
                overflow: auto;
                border: 1px solid var(--fg-media-modal-border);
                border-radius: var(--fg-media-modal-radius);
                background: var(--fg-media-modal-surface);
                color: var(--fg-media-modal-text);
                box-shadow: var(--fg-media-modal-shadow);
            }
            .fg-project-media-modal-panel.is-pdf {
                width: min(100%, 1120px);
            }
            .fg-project-media-modal-header {
                display: flex;
                align-items: center;
                justify-content: space-between;
                gap: 1rem;
                padding: 1rem 1.15rem;
                background: var(--fg-media-modal-header-bg);
                border-bottom: 1px solid var(--fg-media-modal-border);
            }
            .fg-project-media-modal-title {
                margin: 0;
                color: var(--fg-media-modal-heading);
                font-size: 1rem;
                font-weight: 700;
                letter-spacing: var(--fg-media-modal-title-letter-spacing);
                text-transform: var(--fg-media-modal-title-transform);
            }
            .fg-project-media-modal-close {
                width: 34px;
                height: 34px;
                min-width: 34px;
                max-width: 34px;
                flex: 0 0 34px;
                display: inline-flex;
                align-items: center;
                justify-content: center;
                padding: 0;
                border: 0;
                border-radius: var(--fg-media-modal-button-radius);
                background: var(--fg-media-modal-muted-bg);
                color: var(--fg-media-modal-heading);
                cursor: pointer;
                font-size: 1.25rem;
                line-height: 1;
                box-shadow: none;
                text-decoration: none;
                text-transform: none;
                letter-spacing: 0;
                appearance: none;
            }
            .fg-project-media-modal-close:hover {
                background: var(--fg-media-modal-accent);
                color: var(--fg-media-modal-close-hover-text);
            }
            .fg-project-media-modal-body {
                padding: 1.15rem;
                line-height: 1.7;
                white-space: pre-line;
            }
            .fg-project-media-modal-body.is-pdf {
                padding: .75rem;
                white-space: normal;
            }

.fg-project-media .fg-project-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    align-items: start;
    justify-content: start;
    gap: 1rem;
}

.fg-project-media .fg-project-media-card {
    box-sizing: border-box;
    min-width: 0;
    width: 100%;
    max-width: 360px;
    display: flex;
    flex-direction: column;
    gap: .75rem;
    overflow: hidden;
}

.fg-project-media .fg-project-media-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: .4rem .75rem;
    min-width: 0;
}

.fg-project-media .fg-project-media-name {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
}

.fg-project-media .fg-project-media-kind {
    flex: 0 0 auto;
    border: 1px solid currentColor;
    border-radius: 999px;
    padding: .15rem .55rem;
    color: var(--fg-media-modal-text, inherit);
    font-size: .72rem;
    font-weight: 600;
    line-height: 1.35;
    opacity: .75;
}

.fg-project-media .fg-project-media-player,
.fg-project-media .fg-project-media-image,
.fg-project-media .fg-project-media-frame-wrap {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 210px;
    margin: 0;
}

.fg-project-media .fg-project-media-player,
.fg-project-media .fg-project-media-image {
    height: auto;
    object-fit: contain;
    background: rgba(0, 0, 0, .35);
}

.fg-project-media .fg-project-media-audio {
    box-sizing: border-box;
    display: block;
    width: 100%;
    max-width: 100%;
    height: 48px;
    margin: 0;
}

.fg-project-media .fg-project-media-frame-wrap iframe {
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
}

.fg-project-media .fg-project-media-card--audio {
    gap: .6rem;
}

.fg-project-media .fg-project-media-description {
    margin: 0;
    overflow-wrap: anywhere;
    font-size: .9rem;
    line-height: 1.5;
    white-space: pre-line;
}

.fg-project-media .fg-project-media-info-btn,
.fg-project-media .fg-project-media-pdf-action {
    align-self: flex-start;
    margin-top: 0;
}

.fg-project-media .fg-project-media-pdf-wrap {
    max-height: none;
    aspect-ratio: 4 / 3;
}

@media (max-width: 480px) {
    .fg-project-media .fg-project-media-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}
