html:has(.history-gate) {
  overflow-y: auto;
  scrollbar-gutter: stable;
}

body:has(.history-gate) {
  height: var(--history-preview-height, auto);
  overflow: clip;
}

.history-gate {
  position: relative;
  isolation: isolate;
  z-index: 2;
  display: grid;
  place-items: end center;
  min-height: 23rem;
  padding: 2rem 1rem 5rem;
}

.history-gate::before {
  content: "";
  position: absolute;
  inset: -4rem -100vw auto;
  height: calc(100% + 4rem);
  z-index: -1;
  pointer-events: none;
  backdrop-filter: blur(5px);
  background: rgb(248 250 252 / 60%);
  mask-image: linear-gradient(to bottom, transparent, black 7rem);
}

.history-gate-preview {
  position: absolute;
  inset: .5rem 0 0;
  display: grid;
  align-content: start;
  gap: .85rem;
  pointer-events: none;
  filter: blur(5px);
  mask-image: linear-gradient(transparent, black 16%, transparent 86%);
}

.history-gate-preview > div {
  height: 1.55rem;
  border-radius: .375rem;
  background: linear-gradient(to right, #cbd5e1 17%, #f8fafc 17% 26%, #dbeafe 26% 48%, #f8fafc 48% 57%, #e2e8f0 57%);
}

.history-gate-card {
  position: relative;
  width: min(100%, 32rem);
  translate: var(--history-card-offset, 0px) 0;
}

.history-gate-card > div {
  box-shadow: 0 16px 42px #0f172a26;
}
