/* ─── Paper detail modal ─── */
#modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2200;
  background: rgba(0, 0, 0, .7);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
}

#modal-backdrop.open {
  display: flex;
}

#modal {
  background: rgba(19, 41, 75, 0.6);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(44, 78, 138, 0.4);
  border-radius: 16px;
  width: 640px;
  max-width: 92vw;
  max-height: 85vh;
  overflow-y: auto;
  padding: 28px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
  animation: modalIn .3s ease;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

#modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all .2s;
}

#modal-close:hover {
  background: var(--border);
  color: var(--text);
}

#modal h3 {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
  padding-right: 40px;
}

#modal .detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

#modal .detail-tag {
  font-size: .65rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}

#modal .detail-tag.time {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-dim);
}

#modal .detail-tag.domain {
  background: rgba(255, 95, 5, .15);
  color: var(--accent-2);
}

#modal .detail-tag.room {
  background: rgba(252, 179, 22, .15);
  color: var(--gold);
}

#modal .detail-authors {
  font-size: .8rem;
  color: var(--text-dim);
  margin-bottom: 16px;
  line-height: 1.5;
}

#modal .detail-abstract {
  font-size: .82rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 18px;
}

#modal .detail-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-2);
  font-size: .8rem;
  text-decoration: none;
  font-weight: 600;
  transition: color .2s;
}

#modal .detail-link:hover {
  color: var(--teal);
}
