/* 공통 모달 (/Scripts/modal.js). 공개 사이트/관리자 공용 */
.g-modal { width: min(420px, calc(100% - 32px)); max-width: none; max-height: calc(100% - 32px); margin: auto; padding: 0; border: 0; border-radius: 16px; background: #fff; color: #102033; box-shadow: 0 24px 60px rgba(6, 24, 43, .28); font-family: 'Pretendard', 'Malgun Gothic', sans-serif; }
.g-modal::backdrop { background: rgba(6, 24, 43, .55); backdrop-filter: blur(2px); }
.g-modal[open] { animation: g-modal-in .18s ease-out; }
@keyframes g-modal-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }

.g-modal__box { position: relative; padding: 36px 28px 24px; text-align: center; }
.g-modal__x { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: none; color: #627182; font-size: 16px; cursor: pointer; }
.g-modal__x:hover { background: #F2F5F7; color: #102033; }

.g-modal__icon { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 50%; background: #e6f6fc; color: #1a8fb5; font-size: 28px; }
.g-modal[data-type=warn] .g-modal__icon { background: #fff3e6; color: #d97706; }
.g-modal__title { margin: 0 0 8px; font-size: 19px; font-weight: 700; line-height: 1.4; }
.g-modal__msg { margin: 0; color: #33475B; font-size: 15px; line-height: 1.6; white-space: pre-line; word-break: keep-all; }

.g-modal__btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 24px; }
.g-modal__btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 120px; height: 44px; padding: 0 20px; border: 1px solid #06182B; border-radius: 8px; background: #06182B; color: #fff; font: inherit; font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer; }
.g-modal__btn:hover { background: #1b3350; }
.g-modal__btn:focus-visible, .g-modal__x:focus-visible { outline: 2px solid #34C3E8; outline-offset: 2px; }
.g-modal__btn--sub { border-color: #DBE2E8; background: #fff; color: #102033; }
.g-modal__btn--sub:hover { background: #F2F5F7; }
.g-modal [hidden] { display: none; }

/* 이미지 보기 (명함 미리보기) */
.g-modal--image { width: min(920px, calc(100% - 32px)); }
.g-modal--image .g-modal__box { padding: 52px 20px 20px; }
.g-modal__img { display: block; max-width: 100%; max-height: calc(100vh - 220px); margin: 0 auto; border-radius: 8px; box-shadow: 0 2px 12px rgba(6, 24, 43, .12); }
.g-modal--image .g-modal__title { position: absolute; top: 16px; left: 22px; margin: 0; font-size: 16px; }
.g-modal--image .g-modal__btns { margin-top: 16px; }
