:root {
    --bg: #050505;
    --image-bg: #050505;
    --image-glow: rgba(255, 255, 255, 0.08);
    --panel: rgba(255, 255, 255, 0.045);
    --line: rgba(255, 255, 255, 0.18);
    --text: #f4f4f4;
    --muted: rgba(255, 255, 255, 0.62);
    --dim: rgba(255, 255, 255, 0.36);
    --page-gutter: clamp(24px, 4vw, 56px);
    --inner-offset: clamp(24px, 4vw, 70px);
    --content-gutter: calc(var(--page-gutter) + var(--inner-offset));
    --frame-padding: clamp(28px, 5vw, 72px);
}

* {
    box-sizing: border-box;
    scrollbar-color: rgba(255, 255, 255, 0.38) #000;
    scrollbar-width: thin;
}

*::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

*::-webkit-scrollbar-track {
    background: #000;
}

*::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 70% 20%, var(--image-glow), transparent 30%),
        linear-gradient(135deg, var(--image-bg), var(--bg) 54%, #000 100%);
    color: var(--text);
    font-family: Inter, "Pretendard", "Noto Sans KR", Arial, sans-serif;
    transition: background 0.45s ease;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    z-index: 18;
    width: 100%;
    height: 118px;
    pointer-events: none;
    background: linear-gradient(to bottom, var(--image-bg) 0 70%, rgba(5, 5, 5, 0) 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    width: 100%;
}

.brand {
    position: fixed;
    top: 30px;
    left: var(--page-gutter);
    z-index: 30;
    letter-spacing: 0.28em;
    text-transform: uppercase;
}

.brand span,
.brand small {
    display: block;
}

.brand span {
    font-size: 13px;
    font-weight: 700;
}

.brand small {
    margin-top: 7px;
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 0.16em;
}

.gallery-shell {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: min(100%, 1180px);
    min-height: 100vh;
    overflow: auto;
    margin: 0 auto;
    padding: var(--frame-padding);
    padding-bottom: var(--frame-padding);
}

.hero-stage {
    position: relative;
    width: 100%;
    height: auto;
    margin: 0 auto;
}

.gallery-status {
    color: var(--muted);
    font-size: 13px;
    letter-spacing: 0.14em;
    margin: clamp(18px, 3vh, 42px) 0;
}

.hero-slide {
    position: static;
    display: none;
    grid-template-columns: 1fr;
    gap: clamp(28px, 5vw, 54px);
    align-items: start;
    opacity: 1;
    pointer-events: auto;
    transform: none;
}

.hero-slide.is-active {
    display: grid;
}

.hero-copy {
    padding-left: 0;
}

.counter {
    color: var(--muted);
    font-size: 13px;
    letter-spacing: 0.14em;
    margin-top: clamp(18px, 3vh, 42px);
    margin-bottom: clamp(42px, 8vh, 96px);
}

.hero-copy h1 {
    margin: 0;
    max-width: 800px;
    font-size: clamp(40px, 5vw, 82px);
    line-height: 0.96;
    letter-spacing: -0.07em;
    overflow-wrap: break-word;
    word-break: keep-all;
}

.meta {
    display: inline-flex;
    color: var(--muted);
    font-size: 13px;
    margin: 20px 0 24px;
}

.meta-stats {
    display: inline-flex;
    gap: 12px;
    margin-left: 10px;
}

.meta-stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.meta-icon {
    display: block;
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hero-body {
    max-width: 420px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.75;
    word-break: keep-all;
}

.hero-media {
    display: grid;
    gap: 16px;
}

.hero-media .heart-button {
    justify-self: start;
    margin-top: 0;
}

.hero-image {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #111;
    box-shadow: 0 30px 120px rgba(0, 0, 0, 0.7);
}

.hero-image.is-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    width: 34px;
    height: 34px;
    margin: -17px 0 0 -17px;
    border: 2px solid rgba(255, 255, 255, 0.22);
    border-top-color: rgba(255, 255, 255, 0.86);
    border-radius: 50%;
    animation: hero-image-loading 0.8s linear infinite;
}

@keyframes hero-image-loading {
    to {
        transform: rotate(360deg);
    }
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: contrast(1.04) brightness(0.86) saturate(1.08);
}

.hero-image .image-placeholder {
    min-height: 0;
}

.image-placeholder {
    height: 100%;
    object-fit: cover;
    filter: grayscale(1) contrast(1.08) brightness(0.74);
}

.image-placeholder {
    width: 100%;
    min-height: 260px;
    background:
        linear-gradient(118deg, transparent 0 45%, rgba(255, 255, 255, 0.88) 46% 50%, transparent 51%),
        linear-gradient(90deg, #080808, #2c2c2c 45%, #050505);
}

.gallery-nav {
    position: fixed;
    top: 45%;
    z-index: 30;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 42px;
    cursor: pointer;
}

.gallery-nav--prev {
    left: var(--page-gutter);
}

.gallery-nav--next {
    right: var(--page-gutter);
}

.thumbnail-strip {
    position: static;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: clamp(14px, 1.8vw, 26px);
    margin-top: 34px;
}

.thumb-card.is-hidden {
    display: none;
}

.thumb-pager {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-top: 18px;
}

.thumb-pager button {
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.thumb-pager button:disabled {
    cursor: default;
    opacity: 0.25;
}

.gallery-footer {
    position: sticky;
    bottom: 22px;
    z-index: 24;
    margin-top: 34px;
    padding: 18px 0 0;
    color: var(--dim);
    font-size: 11px;
    letter-spacing: 0.08em;
    line-height: 1.55;
    text-align: center;
    text-transform: uppercase;
}

.gallery-footer p {
    margin: 0;
}

.gallery-footer .copyright {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--muted);
}

.copyright-mark {
    width: 1em;
    height: 1em;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.license-icons {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 12px 0 10px;
}

.license-icons span {
    display: inline-grid;
    place-items: center;
    min-width: 26px;
    height: 26px;
    border: 1px solid currentColor;
    border-radius: 999px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0;
}

.thumb-card {
    display: grid;
    gap: 8px;
    border: 0;
    border-top: 1px solid transparent;
    background: transparent;
    color: var(--text);
    text-align: left;
    cursor: pointer;
    padding: 0;
    opacity: 0.72;
}

.thumb-card.is-active {
    opacity: 1;
}

.thumb-card.is-active .thumb-image {
    border-color: var(--text);
}

.thumb-image {
    display: block;
    height: 80px;
    overflow: hidden;
    border: 1px solid transparent;
    background: #111;
}

.thumb-image img,
.thumb-image .image-placeholder {
    height: 100%;
    object-fit: cover;
    filter: grayscale(1) contrast(1.05) brightness(0.72);
}

.thumb-number,
.thumb-card small {
    color: var(--muted);
    font-size: 11px;
}

.thumb-card strong {
    font-size: 13px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.empty-gallery {
    min-height: calc(100vh - 150px);
    display: grid;
    align-content: center;
    max-width: 620px;
    margin-left: clamp(20px, 8vw, 120px);
}

.empty-gallery h1 {
    font-size: clamp(36px, 6vw, 72px);
    letter-spacing: -0.06em;
}

.detail-shell {
    display: grid;
    align-items: center;
    min-height: 100vh;
    padding: 130px clamp(24px, 6vw, 86px) 70px;
}

.detail-article {
    display: grid;
    grid-template-columns: minmax(240px, 360px) 1fr;
    gap: clamp(32px, 6vw, 90px);
    align-items: center;
    width: min(100%, 1280px);
    margin: 0 auto;
}

.detail-meta {
    position: sticky;
    top: 120px;
}

.back-link {
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.18em;
}

.detail-meta h1 {
    font-size: clamp(40px, 5vw, 76px);
    line-height: 0.96;
    letter-spacing: -0.07em;
    margin: 24px 0;
}

.detail-meta p,
.body-copy {
    color: var(--muted);
    line-height: 1.75;
}

.heart-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 30px;
    border: 1px solid var(--line);
    border-width: medium;
    border-radius: 999px;
    background: var(--panel);
    color: var(--text);
    width: 46px;
    height: 46px;
    padding: 0;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.heart-button.is-hearted {
    border-color: rgba(255, 82, 82, 0.72);
    color: #ff5252;
}

.detail-images {
    display: grid;
    gap: 22px;
}

.detail-images figure {
    margin: 0;
    background: #111;
}

.detail-images img {
    max-height: 78vh;
    object-fit: cover;
    filter: contrast(1.04) brightness(0.9) saturate(1.06);
}

@media (max-width: 1200px) {
    .gallery-shell {
        justify-content: center;
        overflow: auto;
        padding-bottom: var(--frame-padding);
    }

    .hero-stage {
        height: auto;
    }

    .hero-slide {
        position: static;
        display: none;
        opacity: 1;
        pointer-events: auto;
        transform: none;
    }

    .hero-slide.is-active {
        display: grid;
    }

    .thumbnail-strip {
        position: static;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        margin-top: 34px;
        padding-left: 0;
    }

    .gallery-footer {
        position: sticky;
        bottom: 22px;
        margin-top: 34px;
        padding: 18px 0 0;
    }
}

@media (max-width: 900px) {
    .gallery-shell {
        overflow: auto;
    }

    .hero-slide {
        grid-template-columns: 1fr;
    }

    .hero-copy {
        padding-left: 0;
        padding-top: 70px;
    }

    .counter {
        margin-bottom: 40px;
    }

    .thumbnail-strip {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-top: 34px;
        padding-left: 0;
    }

    .gallery-nav {
        display: none;
    }

    .detail-article {
        grid-template-columns: 1fr;
    }

    .detail-meta {
        position: static;
    }
}

@media (max-width: 560px) {
    :root {
        --page-gutter: 18px;
        --frame-padding: var(--page-gutter);
    }

    .hero-copy h1 {
        font-size: 38px;
    }

    .heart-button {
        width: 41.4px;
        height: 41.4px;
        font-size: 16.2px;
    }

    .thumbnail-strip {
        grid-template-columns: 1fr;
    }

    .thumb-pager {
        margin-top: 14px;
    }
}
