#card-dialog {
  width: min(420px, calc(100% - 32px));
  max-width: 100%;
  max-height: 88dvh;
  border: 1px solid var(--line, #d5dfe4);
  border-radius: 20px;
  margin: auto;
  padding: 0;
  color: var(--ink, #172c36);
  background: #fff;
  box-shadow: 0 16px 75px #1028343b;
}
#card-dialog::backdrop { background: #0a172bb0; }
.card-inner { position: relative; padding: 27px; }
#card-dialog [hidden] { display: none !important; }
#card-dialog button { cursor: pointer; font-family: inherit; }
#card-dialog button:disabled { opacity: .65; cursor: progress; }
.card-close {
  position: absolute; top: 14px; right: 14px; width: 44px; height: 44px;
  border: 0; border-radius: 50%; background: #edf2f5; color: #25384a; font-size: 26px; line-height: 1;
}
#card-title { margin: 0 42px 10px 0; font-size: 1.55rem; letter-spacing: -.03em; line-height: 1.15; }
.card-intro { color: #4a5e6a; font-size: 1rem; line-height: 1.45; margin: 0 0 18px; }
.card-primary,.card-secondary { width: 100%; min-height: 44px; border-radius: 10px; padding: 9px 16px; font-weight: 650; font-size: 1rem; }
.card-primary { border: 1px solid #183849; background: #163444; color: white; }
.card-secondary { background: #f4f7f8; color: #193846; border: 1px solid #c4d0d6; }
.card-status { color: #285449; line-height: 1.45; font-size: .95rem; margin: 12px 0; }
.card-status.card-error { color: #943929; }
#card-camera-video { display: block; width: 100%; max-height: 250px; object-fit: contain; background: #102431; border-radius: 10px; }
#card-dialog :focus-visible { outline: 3px solid #2584a2; outline-offset: 2px; }
@media (max-width: 550px) {
  #card-dialog { width: 100%; max-height: 90dvh; margin: auto 0 0; border-radius: 20px 20px 0 0; }
  .card-inner { padding: 24px 20px max(24px, env(safe-area-inset-bottom)); }
}
