/* Both cards share one paper size and one baseline for the controls. */
.owned-card-dialog {
  --folio-footer: 58px;
  --folio-width: min(430px, calc(100vw - 40px), calc((100dvh - var(--folio-footer) - 28px) * .666667));
  --folio-shadow: 0 1px 2px rgb(32 32 24 / 5%), 0 18px 44px rgb(32 32 24 / 11%);
  box-sizing: border-box;
  inset: 0;
  width: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: auto;
  background: transparent;
}
.owned-card-dialog[open] { display: block; }
.owned-card-dialog::backdrop { background: rgb(247 247 245 / 94%); }
.owned-card-dialog.has-naming { --folio-footer: 138px; }
.owned-card-dialog .collection-focus,
.owned-card-dialog.has-naming .collection-focus {
  box-sizing: border-box;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 12px 0 calc(12px + var(--folio-footer));
}
.owned-card-stack {
  position: relative;
  width: var(--folio-width);
  aspect-ratio: 2 / 3;
  perspective: 1600px;
}
.owned-card-stack .collection-flight,
.owned-card-dialog.has-naming .collection-flight,
.owned-card-stack .ownership-card {
  width: 100%;
  height: 100%;
}
.owned-card-stack .ownership-card,
.owned-card-stack .collection-face { box-shadow: var(--folio-shadow); }
.owned-card-stack .ownership-card:focus { outline: none; }
.receipt-wait { bottom: 24.5%; background: #f5f5f3; z-index: 1; }
.owned-card-stack .collection-controls,
.owned-card-stack .ownership-footer {
  position: absolute;
  z-index: 2;
  inset: calc(100% + 5px) auto auto 50%;
  width: max-content;
  max-width: calc(100vw - 16px);
  transform: translateX(-50%);
}
.owned-card-stack .collection-controls,
.owned-card-stack .ownership-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0 clamp(2px, 1.4vw, 14px);
  padding: 0;
  margin: 0;
}
.owned-card-stack .ownership-actions { flex-wrap: nowrap; }
.owned-card-stack .collection-controls button:not(.collection-name-action),
.owned-card-stack .ownership-actions button,
.owned-card-stack .ownership-serial-option {
  box-sizing: border-box;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
  min-height: 36px;
  padding: 4px clamp(3px, 1.1vw, 8px);
  margin: 0;
  gap: 4px;
  white-space: nowrap;
  font-family: inherit;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -.025em;
  color: #696960;
}
.owned-card-stack [hidden] { display: none !important; }
.owned-card-stack .ownership-actions button:disabled { color: #9a9a94; }
.owned-card-stack .collection-naming { margin-top: 2px; }
.owned-card-stack .ownership-note { max-width: min(90vw, 350px); margin-inline: auto; }
.collection-export-controls .ownership-actions button {
  appearance: none;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
}
.collection-export-controls .ownership-actions button:disabled { cursor: default; }
.collection-dialog.is-exporting:not(.export-serial-visible) .collection-serial-block { display: none; }
.collection-dialog.export-serial-visible .collection-foot::after {
  content: attr(data-export-serial);
  display: block;
  color: #777771;
  font-size: 10px;
}
.inspection-provenance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
  grid-column: 1 / -1;
}
.inspection-provenance .inspection-spin { position: static; flex: none; }
