/* Digital cards.
   ------------------------------------------------------------------
   The editor shows the card the way the person receiving it will see
   it: in a phone-shaped frame, rendered by the same code that serves
   the real thing. A mockup drawn separately is a mockup that will one
   day be wrong. */

.cardtop {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 22px;
  align-items: start;
  margin: 14px 0 8px;
}
@media (max-width: 820px) {
  .cardtop { grid-template-columns: 1fr; }
}

.cardphone {
  border: 1px solid var(--line, #e4e4de);
  border-radius: 20px;
  overflow: hidden;
  background: var(--card, #fff);
  box-shadow: 0 4px 20px rgba(10, 30, 25, .08);
  height: 540px;
}
.cardphone iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
@media (max-width: 820px) {
  .cardphone { height: 460px; max-width: 340px; }
}

.cardside {
  display: grid;
  gap: 12px;
  align-content: start;
}
.cardqr {
  background: var(--card, #fff);
  border: 1px solid var(--line, #e4e4de);
  border-radius: 14px;
  padding: 14px;
  width: max-content;
  line-height: 0;
}
.cardqr svg { display: block; }

/* ------------------------------------------------------------------
   The list. People, not records, so the face comes first and the
   short address does not appear at all. */

.cardgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin: 6px 0 8px;
}

.cardtile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px;
  border: 1px solid var(--line, #e4e4de);
  border-radius: 14px;
  background: var(--card, #fff);
  color: inherit;
  text-decoration: none;
  transition: border-color .12s ease, transform .12s ease;
}
.cardtile:hover {
  border-color: var(--accent, #125a50);
  transform: translateY(-1px);
  text-decoration: none;
}
.cardtile:focus-visible { outline: 2px solid var(--accent, #125a50); outline-offset: 2px; }

.cardface {
  flex: 0 0 auto;
  width: 54px; height: 54px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--accenttint, #eef4f2);
  display: grid;
  place-items: center;
}
.cardface img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cardinit {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: .02em;
  color: var(--accent, #125a50);
}

.cardwho { display: block; min-width: 0; flex: 1 1 auto; }
.cardwho b { display: block; font-size: 15.5px; line-height: 1.3; }
.cardwho .det {
  display: block;
  font-size: 13px;
  color: var(--muted, #6b6b64);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cardwho .qrfoot { display: block; margin-top: 7px; }

/* ------------------------------------------------------------------
   Uploaded pictures, shown as the circles they will become rather
   than as rectangles that look nothing like the result. */

.picstrip {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0 0 16px;
}
.picstrip figure { margin: 0; width: 82px; text-align: center; }
.picstrip img {
  width: 68px; height: 68px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto 5px;
  border: 1px solid var(--line, #e4e4de);
  background: var(--bg, #f5f5f2);
}
.picstrip figcaption {
  font-size: 11.5px;
  color: var(--muted, #6b6b64);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
