/* ==========================================================================
   modal — shared lightbox / detail dialog
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 18, .65);
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal {
  background: #fff;
  max-width: 780px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  max-height: 90vh;
  overflow: auto;
}

.modal>img {
  width: 100%;
  height: 100%;
  max-height: 650px;
  object-fit: cover;
}

.modal-body {
  padding: 52px 42px;
}

.modal-body h2 {
  font-size: 34px;
  margin: 0 0 4px;
  letter-spacing: -.05em;
}

.roman {
  color: #999;
  margin: 0 0 50px;
}

.modal-close {
  position: absolute;
  right: 12px;
  top: 12px;
  background: #fff;
  border-radius: 50%;
  padding: 8px;
  z-index: 2;
}

.detail-block {
  border-top: 1px solid var(--line);
  padding: 13px 0;
  display: flex;
  justify-content: space-between;
  gap: 15px;
}

.detail-block span,
.gallery-title {
  font-size: 10px;
  color: #aaa;
  letter-spacing: .08em;
}

.detail-block b {
  font-size: 12px;
  text-align: right;
}

.detail-description {
  font-size: 11px;
  color: #888;
  line-height: 1.6;
  margin: 17px 0;
  max-height: 90px;
  overflow: auto;
}

.gallery-title {
  margin: 24px 0 10px;
}

.extra-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  max-height: 210px;
  overflow: auto;
}

.extra-gallery img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.specs {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 19px 0;
  display: flex;
  gap: 35px;
}

.specs span {
  font-size: 9px;
  color: #aaa;
  letter-spacing: .1em;
  display: block;
  margin-bottom: 7px;
}

.specs b {
  font-size: 12px;
}

.profile-link {
  display: flex;
  gap: 7px;
  align-items: center;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  margin-top: 35px;
}

/* ==========================================================================
   popup-modal — 공지 팝업 (로그인 사용자용)
   ========================================================================== */

.popup-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 18, .65);
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 20px;
}

.popup-modal {
  background: #fff;
  max-width: 520px;
  width: 100%;
  border-radius: 14px;
  position: relative;
  max-height: 85vh;
  overflow: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}

.popup-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.popup-modal-header h3 {
  margin: 0;
  font-size: 16px;
  letter-spacing: -.02em;
}

.popup-modal-close {
  border: none;
  background: transparent;
  color: #888;
  font-size: 20px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.popup-modal-close:hover {
  background: #f2f1ec;
  color: var(--ink);
}

.popup-modal-body {
  padding: 22px;
  font-size: 14px;
  line-height: 1.7;
  color: #444;
}

.popup-modal-body img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 8px 0;
}

.popup-modal-body a {
  color: var(--accent);
  text-decoration: underline;
}

.popup-modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.popup-modal-footer button {
  border: 1px solid var(--line);
  background: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
}

.popup-modal-footer button.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

