.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;
}

/* Teilen, Pëlqej, Vorschlag (17.11.2026) */
.personalitet-likes { display: inline-block; margin-top: .35rem; font-size: .8rem; color: #8b2f5c; }
.personalitet-modal-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.personalitet-modal-actions .button { margin: 0; }
.personalitet-modal-note { margin: .6rem 0 0; font-size: .9rem; color: #6b4520; }
@media (max-width: 600px) { .personalitet-modal-actions .button { flex: 1 1 100%; text-align: center; } }

/* Popup: kleinere Icon-Buttons, Familie, Verknüpfung (17.11.2026) */
.personalitet-foot { display: flex; align-items: center; gap: .6rem; margin-top: .35rem; flex-wrap: wrap; }
.personalitet-linked, .personalitet-unlinked { font-size: .72rem; letter-spacing: .02em; padding: .05rem .45rem; border-radius: 999px; }
.personalitet-linked { background: rgba(47, 125, 50, .12); color: #2f5d1f; }
.personalitet-unlinked { background: rgba(201, 162, 39, .18); color: #6b5300; }
.personalitet-card.is-unlinked { opacity: .92; }
.pm-toolbar { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; margin: .6rem 0 .4rem; }
.pm-icon {
  display: inline-flex; align-items: center; gap: .35rem;
  height: 34px; padding: 0 .75rem; border-radius: 999px;
  border: 1px solid rgba(127, 63, 31, .3); background: #fffaf0 !important; color: #7f3f1f !important;
  font: 600 .78rem/1 Georgia, serif; text-decoration: none; cursor: pointer; box-shadow: none !important;
  text-transform: none; letter-spacing: 0;
}
.pm-icon:hover, .pm-icon:focus-visible { background: #f6ead0 !important; }
.pm-icon[hidden] { display: none; }
.pm-like { color: #8b2f5c !important; border-color: rgba(139, 47, 92, .35); }
.pm-like b { font-weight: 700; }
.pm-family { margin-top: .8rem; text-align: left; }
.pm-family h4 { margin: 0 0 .35rem; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: #7f3f1f; }
.pm-family dl { display: grid; grid-template-columns: auto 1fr; gap: .25rem .75rem; margin: 0; font-size: .92rem; }
.pm-family dt { font-weight: 700; color: #4f2d10; }
.pm-family dd { margin: 0; }
.pm-family a { color: #7f3f1f; }
.pm-family a.pm-female { color: #8b2f5c; }
.pm-linkform { display: grid; gap: .5rem; margin-top: .8rem; text-align: left; font-size: .9rem; }
.pm-linkform label { display: grid; gap: .2rem; font-weight: 600; color: #4f2d10; }
.pm-linkform input { font: inherit; padding: .45rem .6rem; border: 1px solid rgba(127, 63, 31, .3); border-radius: 6px; }
.pm-linkform-hint { margin: 0; font-size: .85rem; color: #6b4520; }
.pm-send { justify-self: start; height: 36px; padding: 0 1rem; border-radius: 999px; font-size: .8rem; }
.pm-hp { position: absolute !important; left: -9999px !important; }
.pm-source { margin: .8rem 0 0; font-size: .75rem; color: rgba(79, 45, 16, .6); }
@media (max-width: 600px) { .pm-icon span { display: none; } .pm-icon { padding: 0 .65rem; } .pm-linkbtn span, .pm-tree span { display: inline; } }
.pm-linkform[hidden], .pm-family:empty, .pm-source:empty { display: none !important; }

/* ===== Karten neu (18.11.2026): Bild oben links, Name + Beruf daneben, Text darunter ===== */
.personalitetet-gallery { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.1rem; align-items: stretch; }
.personalitet-card {
  display: flex; flex-direction: column; align-items: stretch; gap: .65rem;
  height: 100%; padding: 1rem 1.05rem; white-space: normal; line-height: 1.4;
  border-radius: 14px; border: 1px solid rgba(127, 79, 31, .16);
  background: linear-gradient(180deg, rgba(255, 252, 244, .96), rgba(250, 242, 222, .92));
  box-shadow: 0 1px 2px rgba(60, 35, 10, .06), 0 8px 22px rgba(60, 35, 10, .07);
}
.personalitet-card:hover, .personalitet-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 2px 4px rgba(60, 35, 10, .08), 0 16px 34px rgba(60, 35, 10, .13);
}
.pc-head { display: flex; align-items: center; gap: .8rem; min-width: 0; }
.pc-head .personalitet-avatar { width: 54px; height: 54px; box-shadow: 0 0 0 2px #fffaf0, 0 0 0 3px rgba(127, 63, 31, .25); }
.pc-title { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.pc-title strong { font: 700 1.02rem/1.25 'Cinzel', Georgia, serif; color: #3a2414; letter-spacing: .01em; }
.pc-title .personalitet-meta { font-size: .8rem; line-height: 1.35; color: rgba(58, 36, 20, .66); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.personalitet-card .personalitet-excerpt { font-size: .86rem; line-height: 1.5; color: rgba(58, 36, 20, .78); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.personalitet-card .personalitet-foot { margin-top: auto; padding-top: .45rem; border-top: 1px dashed rgba(127, 79, 31, .18); justify-content: space-between; }

/* Liste: Zähler links, Suche oben rechts, "Shfaq më shumë" unten */
.pm-listbar { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; margin: 0 0 1rem; }
.pm-count { font-size: .85rem; color: rgba(58, 36, 20, .66); }
.pm-search { position: relative; display: flex; align-items: center; flex: 0 1 300px; }
.pm-search svg { position: absolute; left: .75rem; color: rgba(127, 63, 31, .7); pointer-events: none; }
.pm-search input { width: 100%; height: 40px; padding: 0 .9rem 0 2.2rem !important; border-radius: 999px !important; border: 1px solid rgba(127, 79, 31, .25) !important; background: #fffaf0 !important; font-size: .9rem; }
.pm-more {
  display: block; margin: .2rem auto 2.2rem; height: 42px; padding: 0 1.4rem;
  border-radius: 999px; border: 1px solid rgba(127, 63, 31, .35) !important;
  background: #fffaf0 !important; color: #7f3f1f !important; box-shadow: none !important;
  font: 600 .8rem 'Cinzel', Georgia, serif; letter-spacing: .08em; cursor: pointer;
}
.pm-more:hover { background: #f6ead0 !important; }
.pm-more[hidden] { display: none; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 600px) {
  .pm-search { flex: 1 1 100%; order: -1; }
  .personalitetet-gallery { grid-template-columns: 1fr; }
}
