.speakers-search {
  display: block;
  width: 100%;
  max-width: 420px;
  margin: 0.5rem auto 1.75rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  font-size: 0.95rem;
  box-sizing: border-box;
}

.speakers-search:focus {
  outline: 2px solid #004f9f;
  outline-offset: 1px;
}

.speakers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.1rem;
  margin-bottom: 1rem;
}

.speaker-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: #f7f9fc;
  border: 1px solid #e0e6ef;
  border-radius: 10px;
  padding: 1.25rem 1rem;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.speaker-card:hover,
.speaker-card:focus-visible {
  box-shadow: 0 6px 16px rgba(0, 79, 159, 0.15);
  border-color: #004f9f;
  transform: translateY(-2px);
}

.speaker-card-photo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.6rem;
  font-weight: 700;
}

.speaker-card-name {
  font-weight: 700;
  color: #004f9f;
  font-size: 1.02rem;
  margin-bottom: 0.2rem;
}

.speaker-card-affiliation {
  font-size: 0.82rem;
  color: #555555;
  margin-bottom: 0.2rem;
}

.speakers-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: #5f6f82;
  padding: 1.5rem 0;
}

.speakers-more-note {
  text-align: center;
}

/* Modal */

.speakers-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.speakers-modal:not([hidden]) {
  display: flex;
}

.speakers-modal[hidden] {
  display: none;
}

.speakers-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 30, 45, 0.55);
}

.speakers-modal-card {
  position: relative;
  background: #ffffff;
  border-radius: 12px;
  max-width: 600px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 2rem 1.75rem 1.75rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  text-align: center;
}

.speakers-modal-close {
  position: absolute;
  top: 0.6rem;
  right: 0.8rem;
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  color: #5f6f82;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
}

.speakers-modal-close:hover {
  color: #1f2f40;
}

#speakers-modal-body .speaker-card-photo {
  width: 130px;
  height: 130px;
  margin: 0 auto 1rem;
  font-size: 2rem;
}

#speakers-modal-body h3 {
  font-size: 1.4rem;
  margin-bottom: 0.2rem;
  color: #004f9f;
}

#speakers-modal-body h4 {
  font-size: 0.95rem;
  margin: 0 0 1rem;
  color: #6b7684;
  font-weight: 500;
}

.speakers-modal-session {
  text-align: left;
  background: #f2f5fa;
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  margin: 0 0 1.25rem;
}

.speakers-modal-session-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8a97a8;
  margin-bottom: 0.25rem;
}

.speakers-modal-session-title {
  font-size: 0.98rem;
  font-weight: 600;
  color: #1ca64d;
}

.speakers-modal-session-when {
  font-size: 0.82rem;
  color: #6b7684;
  margin-top: 0.4rem;
}

.speakers-modal-session-when + .speakers-modal-session-when {
  margin-top: 0.2rem;
}

.speakers-modal-abstract {
  text-align: left;
  line-height: 1.6;
}

.speakers-modal-abstract p {
  margin-bottom: 0.8rem;
}

@media (max-width: 500px) {
  .speakers-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.8rem;
  }

  .speaker-card-photo {
    width: 76px;
    height: 76px;
  }
}
