#identity-card {
  position: absolute;
  z-index: 5;
  bottom: max(18px, env(safe-area-inset-bottom));
  left: 50%;
  width: min(380px, calc(100% - 32px));
  max-height: calc(100dvh - 32px - env(safe-area-inset-bottom));
  overflow: auto;
  padding: 24px;
  border: 1px solid rgb(255 255 255 / 65%);
  border-radius: 26px;
  background: rgb(255 255 255 / 94%);
  color: #20242c;
  box-shadow: 0 18px 70px rgb(0 0 0 / 20%);
  backdrop-filter: blur(24px);
  text-align: center;
  font: 14px/1.5 "Panel Google Emoji", system-ui, -apple-system, "Segoe UI", sans-serif;
  transform: translateX(-50%);
  transform-origin: 50% 100%;
  animation: identity-enter 760ms cubic-bezier(.16,1,.3,1) both;
}
#identity-card[hidden], #identity-card [hidden] { display: none; }
#identity-avatars { display: flex; justify-content: center; padding: 0 8px; margin-bottom: 12px; }
.identity-avatar {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  margin: 0 -5px;
  overflow: hidden;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #e8edf9;
  color: #415584;
  font-size: 22px;
}
.identity-avatar img { position: absolute; width: 100%; height: 100%; object-fit: cover; }
.identity-extra { font-size: 15px; }
#identity-names { max-height: 64px; overflow: auto; overflow-wrap: anywhere; font-weight: 600; margin: 0 0 8px; }
#identity-heading { font-size: 23px; letter-spacing: -.5px; margin: 0 0 20px; }
#identity-card button {
  width: 100%; min-height: 44px; border: 0; border-radius: 14px;
  font: inherit; font-weight: 600; cursor: pointer;
}
#identity-confirm { background: #2874ed; color: white; }
#identity-card button:focus-visible { outline: 3px solid #90b8ff; outline-offset: 3px; }
#identity-prompt {
  transition: opacity 240ms ease, transform 320ms cubic-bezier(.22,1,.36,1);
}
#identity-result {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px) scale(.96);
  transition: opacity 400ms ease 160ms, transform 560ms cubic-bezier(.16,1,.3,1) 160ms;
}
#identity-success-heading { font-size: 23px; letter-spacing: -.5px; margin: 0; }
#identity-check { display: block; width: 60px; height: 60px; margin: 0 auto 14px; color: #26a775; }
#identity-check circle { fill: currentColor; opacity: .12; }
#identity-check path { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; }
#identity-card.identity-success #identity-prompt { opacity: 0; transform: translateY(-6px) scale(.98); pointer-events: none; }
#identity-card.identity-success #identity-result { opacity: 1; transform: translateY(0) scale(1); }
#identity-card.identity-success #identity-check path { animation: identity-check 420ms cubic-bezier(.4,0,.2,1) 300ms forwards; }
@keyframes identity-enter {
  from { opacity: 0; transform: translate(-50%, calc(100% + 28px)) scale(.98); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}
@keyframes identity-check { to { stroke-dashoffset: 0; } }
@media (prefers-color-scheme: dark) {
  #identity-card { background: rgb(29 32 39 / 95%); color: #f2f4f8; border-color: rgb(255 255 255 / 12%); }
  .identity-avatar { border-color: #252932; background: #36435d; color: #e6edff; }
}
@media (orientation: landscape) and (max-height: 500px) {
  #identity-card { padding: 16px 22px; bottom: max(8px, env(safe-area-inset-bottom)); }
  .identity-avatar { width: 40px; height: 40px; flex-basis: 40px; font-size: 18px; }
  #identity-avatars { margin-bottom: 4px; }
  #identity-heading { margin-bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  #identity-card, #identity-card.identity-success #identity-check path { animation: none; }
  #identity-prompt, #identity-result { transition: none; }
  #identity-check path { stroke-dashoffset: 0; }
}
