



@import url("https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;1,400&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;700&display=swap");

@font-face {
    font-family: "Pyeonsan";
    src: url("../../fonts/pyeonsan.woff2") format("woff2");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

html,
body {
    font-family: "EB Garamond", Garamond, "Pyeonsan", serif;
    line-height: 1.3;
}


html {
    background: #e9e9e9;
}
html:not(.pyeonsan-loaded) body {
    visibility: hidden;
}
html.pyeonsan-loaded body {
    visibility: visible;
}


button,
.btn-submit,
input[type="submit"],
input[type="button"],
[class*="-trigger"],
[class*="-btn"],
.exhibition-modal-write-close {
    font-family: var(--font-ui);
    font-size: var(--font-ui-size);
    font-weight: 500;
    border-radius: var(--btn-radius);
    border: var(--border-width) solid var(--border-color);
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

:root {
    
    font-size: clamp(16px, 1.1vw, 22px);

    --font-ui: "Noto Sans KR", -apple-system, BlinkMacSystemFont, sans-serif;
    --font-ui-size: 0.75rem;

    --touch-target: 44px;

    
    --max-container: 1920px;
    --max-content: 1200px;
    --max-modal-w: 640px;
    --max-modal-h: 90vh;
    --max-footer-legal: 36em;

    --nav-height: 3.5rem;
    
    --border-width: 1px;
    --border-color: #000;
    --border: var(--border-width) solid var(--border-color);

    
    --close-btn-size: 1.5rem;

    
    --space-1: 0.1rem;
    --space-2h: 0.2rem;
    --space-2: 0.25rem;
    --space-4h: 0.4rem;
    --space-3: 0.5rem;
    --space-4: 0.75rem;
    --space-5: 1rem;
    --space-6: 1.25rem;
    --space-7: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-page: 5rem;
    --pad-bottom-pct: 5%;
    --gap-inline: 0.15em;
    
    --pad: var(--space-3);
    --pad-block: var(--space-4);
    
    --btn-radius: 0.375rem;
    --btn-padding-y: var(--space-3);
    --btn-padding-x: var(--space-4);

    --bg-write: #fff;
    --color-muted: #666;
    --color-muted-secondary: #555;
    --color-text: #333;
}


button:focus,
button:focus-visible,
input:focus,
input:focus-visible,
textarea:focus,
textarea:focus-visible,
select:focus,
select:focus-visible,
[class*="-trigger"]:focus,
[class*="-trigger"]:focus-visible,
.modal-close:focus,
.modal-close:focus-visible,
a:focus,
a:focus-visible {
    outline-color: black;
    box-shadow: none;
}

button,
input,
textarea,
select,
a,
[role="button"] {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.15);
}


html,
body {
    scrollbar-width: none;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

body {
    letter-spacing: -0.01rem;
    background: #e9e9e9;
    padding-top: calc(var(--nav-height) + env(safe-area-inset-top, 0));
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    overflow-x: hidden;
}


::selection {
    background: #d0d0d0;
    color: black;
}

::-moz-selection {
    background: #d0d0d0;
    color: black;
}


.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding-top: env(safe-area-inset-top, 0);
    padding-left: env(safe-area-inset-left, 0);
    padding-right: env(safe-area-inset-right, 0);
    z-index: 2147483647;
}

.nav__container {
    max-width: var(--max-container);
    margin: 0 auto;
    padding: 0 var(--pad-block);
    min-height: var(--nav-height);
    background: #e9e9e9;
    border-bottom: var(--border-width) solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav__logo {
    font-weight: bold;
    text-decoration: none;
    color: black;
    flex-shrink: 0;
    min-width: 0;
    padding: var(--space-3);
}

.nav__logo .nav__logo-ko,
.nav__logo .nav__logo-en {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav__logo .nav__logo-en {
    letter-spacing: 0.05em;
}

.nav__menu {
    display: flex;
    flex-shrink: 0;
    gap: var(--space-5);
}

.nav__link {
    color: black;
    text-decoration: none;
    white-space: nowrap;
}


@media (min-width: 769px) {
    .nav__menu .nav__link[href*="exhibition.php"] {
        display: none;
    }
}


.nav__toggle {
    display: none;
    padding: 0;
    margin: 0;
    border: none;
    background: none;
    border-radius: 0;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #231815;
}

.nav__toggle img {
    display: block;
    width: 24px;
    height: 24px;
}

.nav__toggle:hover img {
    opacity: 0.7;
}


.main-container {
    display: flex;
    align-items: stretch;
    justify-content: center;
    min-height: 0;
    position: fixed;
    top: 0;
    padding-top: var(--space-5);
    z-index: 0;
}

.main-container.gallery-container {
    padding: 0;
    padding-bottom: var(--pad-bottom-pct);
}


.artist-list-main {
    display: table;
    width: 100%;
    border-collapse: collapse;
}

.artist-list-main .artist-item {
    display: table-row;
    border-top: var(--border);
    cursor: pointer;
    transition: background 0.2s;
}

.artist-list-main .artist-item:hover {
    background: #f0f0f0;
}

.artist-list-main .artist-item.active {
    background: black;
}

.artist-list-main .artist-number {
    display: table-cell;
    width: 2rem;
    text-align: center;
}

.artist-list-main .artist-name {
    display: table-cell;
    font-weight: bold;
}


.modal {
    display: none;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(240, 240, 240, 0.9);
    z-index: 2147483648; 
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
    min-height: 0; 
}


.modal-content {
    background: #fff;
    aspect-ratio: 9 / 16;
    width: 95%;
    max-width: var(--max-modal-w);
    max-height: var(--max-modal-h);
    min-height: 0; 
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    margin: 0;
    padding: var(--pad-block);
    z-index: 1;
    border: var(--border-width) solid var(--border-color);
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch; 
    display: flex;
    flex-direction: column;
    scrollbar-width: none;
}
.modal-content::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}


.modal-header-row {
    display: flex;
    justify-content: space-between;
    flex-shrink: 0;
}

.modal-header-row .modal-title {
    margin: 0 0 var(--space-5) 0;
    font-weight: bold;
}

.modal-header-row .modal-header {
    margin-bottom: 0;
    padding-bottom: 0;
}


.modal-close {
    width: var(--close-btn-size);
    height: var(--close-btn-size);
    min-width: var(--close-btn-size);
    min-height: var(--close-btn-size);
}


.modal .modal-close {
    flex-shrink: 0;
    padding: 0;
    border: none;
    border-radius: var(--btn-radius);
    background: #000;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3C/svg%3E");
    background-size: 60%;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
    font-size: 0;
    text-indent: -9999px;
    overflow: hidden;
}

.modal .modal-close:hover {
    background-color: var(--color-text);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3C/svg%3E");
}

button[class*="close"]:not(.modal-close) {
    z-index: 2147483647 !important;
}


.modal-close:not(.modal .modal-close) {
    padding: 0;
    border: var(--border-width) solid #000;
    background: #000;
    cursor: pointer;
    border-radius: var(--btn-radius);
    background-image: url("../../img/icons/close.svg");
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    filter: brightness(0) invert(1);
    text-indent: -9999px;
    overflow: visible;
}

.modal-close:not(.modal .modal-close):hover {
    background: #fff;
    border-color: var(--border-color);
    filter: none;
}

.modal .modal-header,
.modal .modal-body {
    z-index: 0; 
}

.modal-header-title,
.modal-header .modal-title {
    font-weight: bold;
    margin-bottom: var(--space-5);
}

.form-group label {
    display: block;
    font-family: var(--font-ui);
    font-size: var(--font-ui-size);
    font-weight: 500;
    margin-bottom: var(--space-2);
}

.form-char-count {
    display: block;
    font-family: var(--font-ui);
    font-size: var(--font-ui-size);
    font-weight: 500;
    margin-top: var(--space-1);
    color: var(--color-muted);
}


.exhibition-add-image-label,
.exhibition-add-image-label .exhibition-add-image-text,
.gallery-add-image-label,
.gallery-add-image-label .gallery-add-image-text {
    font-family: var(--font-ui);
    font-size: var(--font-ui-size);
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group input[type="file"] {
    width: 100%;
    padding: var(--pad);
    background: #fff;
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--btn-radius);
    box-sizing: border-box;
    appearance: none;
}

.form-group input[type="file"] {
    cursor: pointer;
}

.form-group input[type="url"]::placeholder {
    font-style: italic;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--border-color);
    box-shadow: none;
}

.form-group input[type="file"]::-webkit-file-upload-button {
    padding: var(--btn-padding-y) var(--btn-padding-x);
    background: #000;
    color: #fff;
    border: var(--border-width) solid #000;
    border-radius: var(--btn-radius);
    cursor: pointer;
    font-family: var(--font-ui);
    font-size: var(--font-ui-size);
    font-weight: 500;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.form-group input[type="file"]::-webkit-file-upload-button:hover {
    background: #fff;
    color: #000;
    border-color: var(--border-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 3rem;
    display: block;
    font-family: inherit;
}

.btn-submit {
    background: #000;
    color: #fff;
    cursor: pointer;
    padding: var(--btn-padding-y) var(--btn-padding-x);
    border: var(--border-width) solid #000;
    width: 100%;
    min-height: var(--touch-target);
}

.btn-submit:hover {
    background: #fff;
    color: #000;
    border-color: var(--border-color);
}

.btn-submit:active {
    background: #000;
    color: #fff;
}


.page-container {
    max-width: var(--max-content);
    margin: 0 auto;
    padding: var(--space-page) var(--pad-block);
}

.page-content .page-title {
    font-weight: bold;
    margin-bottom: var(--space-5);
    border-bottom: 1px solid var(--border-color);
}

.page-content .content-text {
    white-space: pre-wrap;
}


.about-section {
    margin-top: var(--space-5);
    border: var(--border-width) solid var(--border-color);
    background: white;
}

.about-section .section-title {
    font-weight: bold;
    margin-bottom: var(--space-5);
    padding-bottom: var(--space-3);
    border-bottom: var(--border);
}

.about-section a {
    text-decoration: underline;
    text-decoration-thickness: 1px;
}


.site-footer {
    margin-top: auto;
    padding-bottom: env(safe-area-inset-bottom, 0);
    padding-left: env(safe-area-inset-left, 0);
    padding-right: env(safe-area-inset-right, 0);
    border-top: var(--border-width) solid var(--border-color);
    background: transparent;
    text-align: left;
    font-size: 0.75rem;
}

.site-footer__container {
    max-width: var(--max-content);
    margin: 0 auto;
    padding: var(--space-5) var(--pad-block);
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 1rem;
}

.site-footer__container > * {
    min-width: 0;
}

.site-footer-legal {
    opacity: 0.9;
    max-width: var(--max-footer-legal);
}

.site-footer-legal p {
    font-size: 0.95em;
}

.site-footer-credits {
    opacity: 0.9;
    text-align: left;
}

.site-footer-credits .site-footer-credits-line {
    margin: 0 0 var(--space-1);
}

.site-footer-credits .site-footer-credits-line:last-child {
    margin-bottom: 0;
}

.site-footer-credits a {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    color: black;
}

.site-footer-credits a:hover {
    opacity: 0.7;
}


.site-footer-copyright-mobile {
    display: none;
}

.site-footer-copy {
    opacity: 0.85;
}

.artist-list-main .artist-name-link {
    display: table-cell;
    font-weight: bold;
    text-decoration: none;
}

.artist-list-main .artist-name-link:hover {
    text-decoration: underline;
    text-decoration-thickness: 1px;
}


.loading,
.empty-state {
    text-align: center;
    font-style: italic;
}


a {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

a:hover {
    text-decoration: none;
}


@media (max-width: 1280px) {
    :root {
        --max-container: 100%;
        --max-content: min(1200px, 90%);
        --max-modal-w: min(640px, 95%);
        --max-modal-h: 90vh;
    }
}


@media (max-width: 1024px) {
    :root {
        --max-content: min(1200px, 92%);
        --max-modal-w: min(640px, 94%);
    }
}


@media (max-width: 768px) {
    :root {
        font-size: 17px;
        --nav-height: 3.75rem;
        --border-width: 1px;
        --max-content: 100%;
        --max-modal-w: min(100%, 100vw - var(--space-7));
        --max-modal-h: 90dvh;
        --max-footer-legal: none;
    }

    html,
    body {
        overflow-x: hidden;
        max-width: 100vw;
    }

    body {
        padding-top: calc(var(--nav-height) + env(safe-area-inset-top, 0));
    }

    
    .site-footer {
        display: none !important;
    }

    
    body.page-about .site-footer-copyright-desktop {
        display: none !important;
    }
    body.page-about .site-footer-copyright-mobile {
        display: block;
        font-size: 0.7rem;
        opacity: 0.65;
        color: var(--color-muted-secondary);
    }
    body.page-about .site-footer-copyright-mobile .site-footer-legal p,
    body.page-about .site-footer-copyright-mobile .site-footer-credits-line {
        margin-bottom: var(--space-1);
    }
    body.page-about .site-footer-copyright-mobile .site-footer-credits a {
        color: var(--color-muted-secondary);
    }

    
    .nav {
        padding-top: env(safe-area-inset-top, 0);
    }

    .nav__container {
        flex-wrap: wrap;
    }

    .nav__toggle {
        display: flex;
    }

    .nav__menu {
        display: none;
    }
    
    .main-container {
        align-items: center;
        padding: 0;
    }
    
    .modal-content {
        aspect-ratio: 9 / 16;
        width: 94%;
        border: var(--border-width) solid var(--border-color);
    }
    
    .btn-submit {
        min-height: var(--touch-target, 44px);
        border: var(--border-width) solid var(--border-color);
    }
    
    .page-container {
        box-sizing: border-box;
    }

    .nav__overlay-link {
        font-size: 1.25rem;
        min-height: var(--touch-target, 44px);
        display: inline-flex;
        align-items: center;
    }
}


html:has(.modal.active),
html.modal-open,
body:has(.modal.active),
body.modal-open {
    overflow: hidden;
    height: 100%;
}

body:has(.modal.active),
body.modal-open {
    position: fixed;
    width: 100%;
    left: 0;
    right: 0;
    
    height: auto;
    min-height: 100%;
}

body:has(.modal.active) .nav,
body.modal-open .nav {
    visibility: hidden;
    pointer-events: none;
    z-index: -1;
}


.nav__overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: #e9e9e9;
    z-index: 10001;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.nav__overlay.active {
    display: flex;
}

.nav__overlay-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.nav__overlay-link {
    text-decoration: none;
    color: black;
}

img.progressive-folder-image {
    filter: blur(12px);
    transform: scale(1.02);
    transition: filter 0.35s ease, transform 0.35s ease;
}

img.progressive-folder-image.is-loaded {
    filter: blur(0);
    transform: scale(1);
}
