body.gallery-page .designre-gallery-container,
body.gallery-page .designre-gallery-container *,
body.gallery-page .designre-gallery-container *::before,
body.gallery-page .designre-gallery-container *::after {
    box-sizing: border-box;
}

body.gallery-page .designre-gallery-container {
    --text-primary: #1a1a1a;
    --text-secondary: #6b6560;
    --text-muted: #9e9890;
    --line: rgba(26, 26, 26, 0.08);
    --line-strong: rgba(26, 26, 26, 0.18);
    --accent: #c4a265;
    --radius: 6px;

    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 clamp(24px, 5vw, 64px);
    color: var(--text-primary);
    font-family: "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", Arial, sans-serif;
}

body.gallery-page .designre-gallery-container a {
    color: inherit;
    text-decoration: none;
}

body.gallery-page .gallery-page-header .gallery-filters {
    display: flex;
    width: auto;
    max-width: 100%;
    padding: 0;
    justify-content: center;
    flex-wrap: wrap;
    overflow: visible;
}

body.gallery-page .gallery-page-header .gallery-grid {
    display: grid;
    align-items: stretch;
    margin: 0;
    list-style: none;
}

body.gallery-page .gallery-page-header .gallery-item {
    min-width: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

body.gallery-page .gallery-page-header .gallery-item[hidden] {
    display: none !important;
}

body.gallery-page .gallery-page-header .gallery-item.is-gallery-visible {
    animation: none;
}

body.gallery-page .gallery-page-header .gallery-card {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: auto;
}

body.gallery-page .gallery-page-header .gallery-figure {
    display: block;
    height: auto;
    margin: 0;
}

body.gallery-page .gallery-page-header .gallery-info h2 {
    display: block;
    overflow: hidden;
    color: var(--text-primary);
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.gallery-page .gallery-page-header .thumb-empty {
    display: flex;
    width: 100%;
    min-height: 260px;
    padding: 40px;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    background: #f8f7f4;
    font-size: 0.9rem;
    text-align: center;
}

body.gallery-page .gallery-page-header .gallery-scroll-sentinel {
    width: 100%;
    height: 1px;
}

body.gallery-page .gallery-page-header .gallery-noscript {
    margin: 24px 0 0;
    color: var(--text-muted);
    text-align: center;
}

body.gallery-page .header {
    border-bottom: 1px solid rgba(26, 26, 26, 0.08);
    box-shadow: none;
}

body.gallery-page .gallery-page-header {
    border: 0;
    background: #ffffff;
    background-image: none;
    box-shadow: none;
}

body.gallery-page .gallery-page-header::before,
body.gallery-page .gallery-page-header::after {
    content: none;
    display: none;
}

@media (min-width: 769px) {
    body.gallery-page .gallery-page-header {
        min-height: 0;
        padding: 120px 0 108px;
        border: 0;
        background: #ffffff;
    }

    body.gallery-page .gallery-page-header .designre-gallery-container {
        --text-primary: #1a1a1a;
        --text-secondary: #6b6560;
        --text-muted: #9e9890;
        --line: rgba(26, 26, 26, 0.08);
        --line-strong: rgba(26, 26, 26, 0.18);
        --accent: #c4a265;
        --radius: 6px;

        width: 100%;
        max-width: 1440px;
        margin: 0 auto;
        padding: 0 clamp(24px, 5vw, 64px);
        font-family: "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", Arial, sans-serif;
    }

    body.gallery-page .gallery-page-header .section-header {
        max-width: 720px;
        margin: 0 auto 34px;
        text-align: center;
    }

    body.gallery-page .gallery-page-header .section-title {
        margin: 0;
        color: var(--text-primary);
        font-family: "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", Arial, sans-serif;
        font-size: clamp(2.15rem, 3.2vw, 2.8rem);
        font-weight: 500;
        line-height: 1.25;
        letter-spacing: 0;
    }

    body.gallery-page .gallery-page-header .section-desc {
        max-width: 560px;
        margin: 20px auto 0;
        color: var(--text-secondary);
        font-size: 0.96rem;
        font-weight: 400;
        line-height: 1.8;
        word-break: keep-all;
    }

    body.gallery-page .gallery-page-header .gallery-filters {
        margin: 0 0 32px;
        gap: 8px;
    }

    body.gallery-page .gallery-page-header .filter-btn {
        min-height: 38px;
        padding: 8px 20px;
        border: 1px solid var(--line-strong);
        border-radius: var(--radius);
        color: var(--text-secondary);
        background: #ffffff;
        font-size: 0.85rem;
        font-weight: 600;
        letter-spacing: 0;
    }

    body.gallery-page .gallery-page-header .filter-btn:hover,
    body.gallery-page .gallery-page-header .filter-btn.active,
    body.gallery-page .gallery-page-header .filter-btn[aria-current="page"] {
        border-color: var(--text-primary);
        color: #ffffff;
        background: var(--text-primary);
    }

    body.gallery-page .gallery-page-header .gallery-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 22px;
        padding-top: 24px;
        border-top: 2px solid var(--text-primary);
    }

    body.gallery-page .gallery-page-header .gallery-card {
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: #ffffff;
        box-shadow: none;
        transition: border-color 180ms ease, box-shadow 180ms ease;
    }

    body.gallery-page .gallery-page-header .gallery-card:hover,
    body.gallery-page .gallery-page-header .gallery-card:focus-visible {
        border-color: rgba(26, 26, 26, 0.2);
        box-shadow: 0 12px 28px rgba(26, 26, 26, 0.08);
        transform: none;
    }

    body.gallery-page .gallery-page-header .gallery-card img {
        display: block;
        width: 100%;
        height: 100%;
        aspect-ratio: 1 / 1;
        object-fit: fill;
        transition: opacity 180ms ease;
    }

    body.gallery-page .gallery-page-header .gallery-card:hover img,
    body.gallery-page .gallery-page-header .gallery-card:focus-visible img {
        opacity: 0.94;
        transform: none;
    }

    body.gallery-page .gallery-page-header .gallery-info {
        min-height: 118px;
        padding: 18px 18px 20px;
        border-top: 1px solid var(--line);
        background: #ffffff;
    }

    body.gallery-page .gallery-page-header .gallery-info h2 {
        margin: 0 0 7px;
        color: var(--text-primary);
        font-family: "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", Arial, sans-serif;
        font-size: 1rem;
        font-weight: 600;
        line-height: 1.55;
        letter-spacing: 0;
    }

    body.gallery-page .gallery-page-header .gallery-info p {
        color: var(--text-secondary);
        font-size: 0.83rem;
        font-weight: 400;
        line-height: 1.65;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    body.gallery-page .gallery-page-header .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    body.gallery-page .gallery-page-header {
        padding-top: 104px;
        background: #ffffff;
    }

    body.gallery-page .gallery-page-header .designre-gallery-container {
        padding-inline: 16px;
    }

    body.gallery-page .gallery-page-header .section-header {
        margin-bottom: 30px;
    }

    body.gallery-page .gallery-page-header .section-title {
        font-family: "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", Arial, sans-serif;
        font-size: 2rem;
        font-weight: 600;
        line-height: 1.35;
    }

    body.gallery-page .gallery-page-header .section-desc {
        margin-top: 14px;
        font-size: 0.9rem;
        font-weight: 400;
        line-height: 1.7;
    }

    body.gallery-page .gallery-page-header .gallery-filters {
        margin-bottom: 24px;
        gap: 7px;
    }

    body.gallery-page .gallery-page-header .filter-btn {
        min-height: 36px;
        padding: 7px 14px;
        border: 1px solid rgba(26, 26, 26, 0.18);
        border-radius: 6px;
        background: #ffffff;
        font-weight: 600;
    }

    body.gallery-page .gallery-page-header .filter-btn.active,
    body.gallery-page .gallery-page-header .filter-btn[aria-current="page"] {
        border-color: #1a1a1a;
        color: #ffffff;
        background: #1a1a1a;
    }

    body.gallery-page .gallery-page-header .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 8px;
        row-gap: 18px;
        padding-top: 18px;
        border-top: 2px solid #1a1a1a;
    }

    body.gallery-page .gallery-page-header .gallery-card {
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    body.gallery-page .gallery-page-header .gallery-card img {
        display: block;
        width: 100%;
        height: 100%;
        aspect-ratio: 1 / 1;
        border-radius: 7px;
        object-fit: fill;
    }

    body.gallery-page .gallery-page-header .gallery-info {
        min-height: 0;
        padding: 8px 2px 0;
        border-top: 0;
        background: transparent;
    }

    body.gallery-page .gallery-page-header .gallery-info h2 {
        margin: 0;
        font-size: 0.82rem;
        font-weight: 600;
        line-height: 1.4;
        text-align: center;
    }

    body.gallery-page .gallery-page-header .gallery-info p {
        display: -webkit-box;
        overflow: hidden;
        margin: 4px 0 0;
        color: var(--text-secondary);
        font-size: 0.7rem;
        font-weight: 400;
        line-height: 1.45;
        word-break: keep-all;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }
}
