.overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(31, 41, 55, 0.45);
  display: grid;
  place-items: center;
  padding: 18px;
  overflow-y: auto;
}

.overlay[hidden] {
  display: none;
}

.modal {
  width: min(760px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  position: relative;
  box-shadow: 0 25px 80px rgba(31, 41, 55, 0.20);
  max-height: calc(100vh - 36px);
  overflow-y: auto;
}

.close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 22px;
  cursor: pointer;
}

.close:hover {
  color: var(--text);
}

.modal-title {
  margin: 0 0 10px;
  color: var(--accent);
}

.modal-description {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.5;
}

.modal-meta {
  display: grid;
  gap: 6px;
  margin: 12px 0 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fffaf2;
}

.modal-subtitle {
  margin: 16px 0 10px;
}

.modal-image-placeholder {
  height: 180px;
  border: 2px dashed rgba(153, 54, 51, 0.25);
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: rgba(153, 54, 51, 0.03);
  margin-bottom: 12px;
}

body.modal-open {
  overflow: hidden;
}

.modal-image-frame {
  width: 100%;
  max-width: 520px;
  margin: 0 auto 1rem;
  border-radius: 14px;
  background: #f3f4f6;
  padding: 12px;
}

.modal-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}