.personalitetet-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin: 0 0 2rem;
}

.personalitet-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-align: left;
  width: 100%;
  padding: 0.85rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  color: inherit;
  box-shadow: none;
}

.personalitet-card:hover,
.personalitet-card:focus-visible {
  background: rgba(255, 255, 255, 0.85);
  color: inherit;
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
}

.personalitet-avatar {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #f0e4d8;
}

.personalitet-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.personalitet-avatar-fallback {
  font-weight: 700;
  font-size: 1.1rem;
  color: #8a4a2a;
}

.personalitet-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.personalitet-info strong {
  font-size: 1rem;
}

.personalitet-meta {
  font-size: 0.8rem;
  color: rgba(0, 0, 0, 0.6);
}

.personalitet-excerpt {
  font-size: 0.82rem;
  color: rgba(0, 0, 0, 0.65);
  line-height: 1.35;
}

.personalitet-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 12, 6, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 2000;
}

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

.personalitet-modal {
  position: relative;
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px;
  padding: 2.2rem 2rem 2rem;
  text-align: center;
}

.personalitet-modal-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: #fff;
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  line-height: 1;
  color: rgba(0, 0, 0, 0.6);
  box-shadow: none;
  cursor: pointer;
}

.personalitet-modal-close:hover,
.personalitet-modal-close:focus-visible {
  background: #f3f3f3;
  color: rgba(0, 0, 0, 0.8);
  transform: none;
}

.personalitet-modal-photo {
  width: 160px;
  height: 160px;
  margin: 0 auto 1.1rem;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #f0e4d8;
}

.personalitet-modal-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.personalitet-modal-photo .personalitet-avatar-fallback {
  font-size: 2rem;
}

.personalitet-modal-name {
  margin: 0 0 0.3rem;
  font-size: 1.5rem;
}

.personalitet-modal-meta {
  margin: 0 0 1.1rem;
  font-size: 0.92rem;
  color: rgba(0, 0, 0, 0.6);
}

.personalitet-modal-biography {
  margin: 0 0 1rem;
  text-align: left;
  line-height: 1.55;
  font-size: 0.98rem;
  color: rgba(0, 0, 0, 0.82);
}

.personalitet-modal-biography:empty {
  display: none;
}

.personalitet-modal-description {
  margin: 0;
  text-align: left;
  white-space: pre-line;
  line-height: 1.6;
  font-size: 1.02rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.personalitet-modal-description:empty {
  display: none;
  border-top: none;
  padding-top: 0;
}
