.contact-modal,
.contact-modal * { box-sizing: border-box; }

.contact-modal[hidden] { display: none !important; }

.contact-modal {
    position: fixed;
    z-index: 100000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 30px;
    color: rgba(255, 255, 255, .58);
    font-family: "Pretendard Variable", Pretendard, sans-serif;
}

.contact-modal__overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, .78); }

.contact-modal__panel {
    position: relative;
    z-index: 1;
    overflow-x: hidden;
    overflow-y: auto;
    width: min(760px, 100%);
    max-height: calc(100vh - 60px);
    padding: 64px 72px 68px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 0;
    outline: none;
    background: #18191a;
    box-shadow: 0 26px 70px rgba(0, 0, 0, .28);
}

.contact-modal__close {
    position: absolute;
    top: 27px;
    right: 28px;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, .56);
    cursor: pointer;
}

.contact-modal__close span {
    position: absolute;
    top: 13px;
    left: 3px;
    width: 22px;
    height: 1px;
    background: currentColor;
}

.contact-modal__close span:first-child { transform: rotate(45deg); }
.contact-modal__close span:last-child { transform: rotate(-45deg); }
.contact-modal__close:hover,
.contact-modal__close:focus-visible { color: rgba(255, 255, 255, .72); }
.contact-modal__close:focus-visible { outline: 1px solid rgba(255, 255, 255, .35); outline-offset: 4px; }

.contact-modal__header { margin-bottom: 32px; }
.contact-modal__label { margin: 0; color: rgba(116, 177, 230, .72); font-size: 11px; letter-spacing: .24em; }
.contact-modal__title {
    margin: 14px 0 0;
    color: rgba(255, 255, 255, .68);
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 48px;
    font-weight: 400;
    line-height: 1;
}
.contact-modal__description { margin: 20px 0 0; color: rgba(255, 255, 255, .4); font-size: 13px; line-height: 1.75; }

.contact-modal__form { display: flex; flex-direction: column; gap: 14px; }
.contact-modal__field { position: relative; }
.contact-modal__field > label {
    position: absolute;
    overflow: hidden;
    width: 1px;
    height: 1px;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.contact-modal__field input,
.contact-modal__field textarea {
    display: block;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 0;
    outline: none;
    background: rgba(0, 0, 0, .08);
    color: rgba(255, 255, 255, .66);
    font: inherit;
    font-size: 13px;
    transition: border-color .2s ease, background-color .2s ease;
}

.contact-modal__field input { height: 50px; padding: 0 18px; }
.contact-modal__field textarea { min-height: 122px; padding: 16px 18px; line-height: 1.65; resize: vertical; }
.contact-modal__field input::placeholder,
.contact-modal__field textarea::placeholder { color: rgba(255, 255, 255, .3); opacity: 1; }
.contact-modal__field input:focus,
.contact-modal__field textarea:focus { border-color: rgba(255, 255, 255, .38); background: rgba(255, 255, 255, .015); }
.contact-modal__field input[aria-invalid="true"],
.contact-modal__field textarea[aria-invalid="true"] { border-color: rgba(204, 128, 128, .58); }

.contact-modal__error {
    display: block;
    min-height: 0;
    margin-top: 5px;
    color: rgba(224, 152, 152, .72);
    font-size: 11px;
    line-height: 1.45;
}
.contact-modal__error:empty { display: none; }

.contact-modal__privacy {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px 8px;
    margin: 3px 0 5px;
    color: rgba(255, 255, 255, .38);
    font-size: 11px;
    line-height: 1.55;
}

.contact-modal__privacy input { position: absolute; opacity: 0; pointer-events: none; }
.contact-modal__privacy label { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.contact-modal__privacy label > span {
    position: relative;
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    border: 1px solid rgba(255, 255, 255, .32);
}
.contact-modal__privacy input:checked + label > span::after {
    position: absolute;
    top: 3px;
    left: 6px;
    width: 4px;
    height: 8px;
    border: solid rgba(255, 255, 255, .62);
    border-width: 0 1px 1px 0;
    content: "";
    transform: rotate(45deg);
}
.contact-modal__privacy input:focus-visible + label > span { outline: 1px solid rgba(255, 255, 255, .42); outline-offset: 3px; }
.contact-modal__privacy a { color: rgba(255, 255, 255, .42); text-underline-offset: 3px; }
.contact-modal__privacy a:hover,
.contact-modal__privacy a:focus-visible { color: rgba(116, 177, 230, .72); }
.contact-modal__privacy .contact-modal__error { flex-basis: 100%; }

.privacy-policy-modal[hidden] { display: none !important; }

.privacy-policy-modal {
    position: absolute;
    z-index: 10;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 40px;
}

.privacy-policy-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .62);
}

.privacy-policy-modal__panel {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    width: min(720px, calc(100vw - 80px));
    max-height: 78vh;
    border: 1px solid rgba(255, 255, 255, .17);
    border-radius: 0;
    outline: none;
    background: #202122;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .22);
}

.privacy-policy-modal__header {
    position: relative;
    z-index: 1;
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    min-height: 68px;
    padding: 0 72px 0 28px;
    border-bottom: 1px solid rgba(255, 255, 255, .11);
    background: #202122;
}

.privacy-policy-modal__header h2 {
    margin: 0;
    color: rgba(255, 255, 255, .72);
    font-size: 15px;
    font-weight: 400;
    letter-spacing: .04em;
}

.privacy-policy-modal__close {
    position: absolute;
    top: 20px;
    right: 25px;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, .52);
    cursor: pointer;
}

.privacy-policy-modal__close span {
    position: absolute;
    top: 13px;
    left: 3px;
    width: 22px;
    height: 1px;
    background: currentColor;
}

.privacy-policy-modal__close span:first-child { transform: rotate(45deg); }
.privacy-policy-modal__close span:last-child { transform: rotate(-45deg); }
.privacy-policy-modal__close:hover,
.privacy-policy-modal__close:focus-visible { color: rgba(255, 255, 255, .75); }
.privacy-policy-modal__close:focus-visible { outline: 1px solid rgba(255, 255, 255, .32); outline-offset: 3px; }

.privacy-policy-modal__body {
    overflow-x: hidden;
    overflow-y: auto;
    padding: 28px 32px 38px;
    color: rgba(255, 255, 255, .54);
    font-size: 14px;
    font-weight: 300;
    line-height: 1.85;
    overflow-wrap: anywhere;
    scrollbar-color: rgba(255, 255, 255, .25) rgba(255, 255, 255, .05);
}

.privacy-policy-modal__body > :first-child { margin-top: 0; }
.privacy-policy-modal__body > :last-child { margin-bottom: 0; }
.privacy-policy-modal__body h1,
.privacy-policy-modal__body h2,
.privacy-policy-modal__body h3,
.privacy-policy-modal__body h4 {
    color: rgba(255, 255, 255, .7);
    font-size: 1em;
    font-weight: 500;
    line-height: 1.6;
}
.privacy-policy-modal__body a { color: rgba(116, 177, 230, .72); }
.privacy-policy-modal__body img { max-width: 100%; height: auto; }
.privacy-policy-modal__body table { width: 100%; border-collapse: collapse; }
.privacy-policy-modal__body th,
.privacy-policy-modal__body td { padding: 8px; border: 1px solid rgba(255, 255, 255, .14); }

.contact-modal__submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 42px;
    min-height: 58px;
    margin-top: 4px;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 0;
    background: transparent;
    color: rgba(255, 255, 255, .6);
    font: inherit;
    cursor: pointer;
    transition: color .22s ease, border-color .22s ease, background-color .22s ease;
}
.contact-modal__submit span { font-size: 12px; letter-spacing: .23em; }
.contact-modal__submit i { font-size: 18px; font-style: normal; }
.contact-modal__submit:hover,
.contact-modal__submit:focus-visible { border-color: rgba(255, 255, 255, .4); background: rgba(255, 255, 255, .025); color: rgba(255, 255, 255, .72); }
.contact-modal__submit:focus-visible { outline: 1px solid rgba(255, 255, 255, .35); outline-offset: 3px; }
.contact-modal__submit:disabled { cursor: wait; opacity: .45; }

.contact-modal__message { display: none; margin: 0; font-size: 12px; line-height: 1.6; }
.contact-modal__message:not(:empty) { display: block; }
.contact-modal__message.is-success { color: rgba(142, 198, 168, .7); }
.contact-modal__message.is-error { color: rgba(224, 152, 152, .72); }

.contact-modal__honeypot {
    position: fixed !important;
    top: -10000px !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* Gnuboard CAPTCHA, kept visually quiet inside the modal. */
.contact-modal__captcha-wrap { margin-top: 1px; }
.contact-modal__captcha { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; padding: 0; border: 0; }
.contact-modal__captcha legend { position: absolute; overflow: hidden; width: 1px; height: 1px; clip: rect(0, 0, 0, 0); }
.contact-modal__captcha #captcha_img { height: 42px; opacity: .72; }
.contact-modal__captcha #captcha_key {
    width: 108px;
    height: 42px;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 0;
    outline: none;
    background: rgba(0, 0, 0, .08);
    color: rgba(255, 255, 255, .62);
    font-size: 13px;
}
.contact-modal__captcha button {
    height: 42px;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, .17);
    border-radius: 0;
    background: transparent;
    color: rgba(255, 255, 255, .4);
    font-size: 0;
    cursor: pointer;
}
.contact-modal__captcha #captcha_mp3::after { content: "음성"; font-size: 10px; }
.contact-modal__captcha #captcha_reload::after { content: "새로고침"; font-size: 10px; }
.contact-modal__captcha #captcha_info { flex-basis: 100%; color: rgba(255, 255, 255, .3); font-size: 10px; }

body.contact-modal-open { overflow: hidden; }

@media (max-width: 767px) {
    .contact-modal { align-items: start; overflow-y: auto; padding: 14px; }
    .contact-modal__panel { max-height: none; margin: 10px 0; padding: 52px 20px 30px; }
    .contact-modal__close { top: 17px; right: 17px; }
    .contact-modal__header { margin-bottom: 26px; }
    .contact-modal__title { font-size: 40px; }
    .contact-modal__description { margin-top: 16px; font-size: 12px; }
    .contact-modal__form { gap: 12px; }
    .contact-modal__field input { height: 48px; }
    .contact-modal__field textarea { min-height: 110px; }
    .contact-modal__submit { min-height: 54px; }
    .privacy-policy-modal { padding: 14px; }
    .privacy-policy-modal__panel { width: calc(100vw - 28px); max-height: 82dvh; }
    .privacy-policy-modal__header { min-height: 60px; padding: 0 60px 0 20px; }
    .privacy-policy-modal__close { top: 16px; right: 17px; }
    .privacy-policy-modal__body { padding: 22px 20px 30px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
    .contact-modal * { transition-duration: .01ms !important; }
}
