:root {
  --access-black: #000000;
  --access-cream: #F4EBD9;
  --access-amber: #f7ce46;
  --access-orange: #f09235;
  --access-red: #eb5528;
  --access-crimson: #D22D52;
  --access-violet: #8b27c9;
}

.deck-experience {
  position: fixed;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

html.access-revealing .deck-experience,
html.access-granted .deck-experience {
  visibility: visible;
  opacity: 1;
}

html.access-granted .deck-experience {
  pointer-events: auto;
}

.access-gate {
  --u: 1.25px;
  --cream: #F4EBD9;
  --dot: calc(var(--u) * 8 + 3px);
  --ease: cubic-bezier(.22, 1.08, .32, 1);
  position: fixed;
  z-index: 300;
  inset: 0;
  width: 100%;
  height: 100%;
  height: var(--app-height, 100dvh);
  overflow: hidden;
  isolation: isolate;
  color: var(--access-cream);
  background: var(--access-black);
  outline: none;
  overscroll-behavior: none;
  touch-action: manipulation;
  opacity: 1;
  transition: opacity 620ms ease;
}

.access-gate[hidden] {
  display: none;
}

.access-keyway,
.access-aperture,
.access-stack {
  position: absolute;
  inset: 0;
}

.access-keyway {
  z-index: 1;
  overflow: hidden;
}

.access-aperture {
  z-index: 2;
}

.access-stack {
  z-index: 3;
  opacity: 0;
  transform: scale(.84);
  transform-origin: 50% 50%;
  will-change: opacity, transform;
}

.access-gate.phase-closed .access-stack {
  animation: access-stack-arrive 690ms 120ms cubic-bezier(.16, 1, .3, 1) both;
}

.access-gate.phase-opening .access-stack,
.access-gate.phase-ready .access-stack,
.access-gate.is-closing .access-stack,
.access-gate.is-restored .access-stack {
  opacity: 1;
  transform: scale(1);
}

.access-layer,
.access-shell,
.access-mandala-intact {
  position: absolute;
  left: 50%;
  top: 50%;
  display: block;
  backface-visibility: hidden;
}

.access-layer {
  z-index: 2;
  width: var(--closed-width);
  height: var(--layer-height);
  border-radius: var(--layer-radius);
  background-color: var(--layer-color);
  transform: translate3d(-50%, -50%, 0);
  transform-origin: center;
  will-change: width, transform, background-color;
}

.access-layer--amber {
  --closed-width: 268px;
  --layer-height: 228px;
  --layer-radius: 67.7px;
  --layer-color: var(--access-amber);
  --open-width: min(888px, 92vw);
  --reverse-delay: 0ms;
  --close-delay: 350ms;
  z-index: 1;
}

.access-layer--orange {
  --closed-width: 226px;
  --layer-height: 192px;
  --layer-radius: 56.3px;
  --layer-color: var(--access-orange);
  --open-width: min(846px, calc(92vw - 42px));
  --reverse-delay: 70ms;
  --close-delay: 280ms;
  z-index: 2;
}

.access-layer--red {
  --closed-width: 184px;
  --layer-height: 156px;
  --layer-radius: 45.6px;
  --layer-color: var(--access-red);
  --open-width: min(804px, calc(92vw - 84px));
  --reverse-delay: 140ms;
  --close-delay: 210ms;
  z-index: 3;
}

.access-layer--magenta {
  --closed-width: 144px;
  --layer-height: 122px;
  --layer-radius: 38px;
  --layer-color: var(--access-crimson);
  --open-width: min(764px, calc(92vw - 124px));
  --reverse-delay: 210ms;
  --close-delay: 140ms;
  z-index: 4;
}

.access-layer--violet {
  --closed-width: 102px;
  --layer-height: 86px;
  --layer-radius: 27.5px;
  --layer-color: var(--access-violet);
  --open-width: min(722px, calc(92vw - 166px));
  --reverse-delay: 280ms;
  --close-delay: 70ms;
  z-index: 5;
}

.access-shell {
  --closed-width: 60px;
  --open-width: min(680px, calc(92vw - 208px));
  z-index: 7;
  width: var(--closed-width);
  height: 50px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 14.3px;
  background: var(--access-black);
  opacity: 1;
  transform: translate3d(-50%, -50%, 0);
  transform-origin: center;
  will-change: width, transform;
}

.access-mandala-intact {
  z-index: 12;
  width: 268px;
  height: 228px;
  opacity: 1;
  transform: translate3d(-50%, -50%, 0);
  pointer-events: none;
  user-select: none;
}

.access-gate.phase-opening .access-layer {
  animation: access-reverse-open 570ms var(--reverse-delay) cubic-bezier(.62, 0, .23, 1) both;
}

.access-gate.phase-opening .access-shell {
  animation: access-reverse-core-open 560ms 350ms cubic-bezier(.62, 0, .23, 1) both;
}

.access-gate.phase-opening .access-mandala-intact {
  animation: access-exact-yield 90ms linear both;
}

.access-gate.phase-ready .access-layer,
.access-gate.phase-ready .access-shell {
  width: var(--open-width);
}

.access-gate.phase-ready .access-mandala-intact {
  opacity: 0;
}

.access-input {
  position: absolute;
  z-index: 4;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0 28px;
  border: 0;
  border-radius: inherit;
  outline: 0;
  background: transparent;
  color: transparent;
  -webkit-text-fill-color: transparent;
  caret-color: transparent;
  font-size: 16px;
  letter-spacing: 0;
  text-align: center;
  -webkit-appearance: none;
  appearance: none;
}

.access-entry {
  position: absolute;
  z-index: 5;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9.25px;
  gap: calc(var(--u) * 5 + 3px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.access-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9.25px;
  gap: calc(var(--u) * 5 + 3px);
  pointer-events: none;
}

.access-dots:empty {
  display: none;
}

.access-dot {
  display: block;
  flex: 0 0 auto;
  width: 13px;
  width: var(--dot);
  height: 13px;
  height: var(--dot);
  border-radius: 50%;
  background: var(--cream);
  transform: scale(1);
  transition: transform 300ms var(--ease);
}

.access-dot.pop {
  animation: access-dot-pop 220ms var(--ease);
}

.access-caret {
  display: block;
  flex: 0 0 2px;
  width: 2px;
  height: 28px;
  height: calc(var(--u) * 16 + 8px);
  border-radius: 1px;
  background: var(--cream);
  opacity: 0;
}

.access-gate.phase-ready .access-entry {
  opacity: 1;
  visibility: visible;
}

.access-gate.phase-ready.has-focus .access-caret {
  animation: access-caret-blink 1.1s infinite;
}

.access-gate.is-winning .access-dot {
  transform: scale(0);
}

.access-gate.is-winning .access-caret {
  display: none;
}

.access-key-label {
  position: absolute;
  z-index: 6;
  left: clamp(15px, 2vw, 22px);
  bottom: 7px;
  overflow: hidden;
  color: rgba(244, 235, 217, .45);
  font: 800 7px/1 -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  letter-spacing: .2em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  transform: translate3d(0, 5px, 0);
  pointer-events: none;
  transition: opacity 220ms ease, transform 240ms cubic-bezier(.16, 1, .3, 1), color 120ms linear;
}

.access-gate.phase-ready .access-key-label {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.access-gate.phase-ready .access-shell,
.access-gate.phase-ready .access-input {
  pointer-events: auto;
}

.access-status {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.access-gate.is-invalid .access-stack {
  animation: access-stack-reject 520ms cubic-bezier(.36, .07, .19, .97) both;
}

.access-gate.is-invalid .access-layer {
  width: var(--open-width);
  animation: access-all-rings-crimson 520ms linear both;
}

.access-gate.is-invalid .access-shell {
  width: var(--open-width);
  animation: none;
}

.access-gate.is-invalid .access-key-label {
  color: var(--access-crimson);
}

.access-gate.is-unlocking .access-key-label {
  opacity: 0;
  transform: translate3d(8px, 0, 0);
  transition-delay: 0ms;
}

.access-gate.is-closing .access-shell {
  width: var(--open-width);
  pointer-events: none;
  animation: access-wave-collapse-core 560ms 90ms cubic-bezier(.62, 0, .23, 1) both;
}

.access-gate.is-closing .access-layer {
  width: var(--open-width);
  pointer-events: none;
  animation: access-wave-collapse 570ms calc(90ms + var(--close-delay)) cubic-bezier(.62, 0, .23, 1) both;
}

.access-gate.is-closing .access-mandala-intact {
  opacity: 0;
  animation: access-exact-lock 150ms 1000ms linear both;
}

.access-gate.is-restored .access-layer,
.access-gate.is-restored .access-shell {
  opacity: 0;
  animation: none;
}

.access-gate.is-restored .access-mandala-intact {
  opacity: 1;
  animation: none;
}

.access-gate.is-mark-fading .access-mandala-intact {
  opacity: 0;
  transform: translate3d(-50%, -50%, 0) scale(.965);
  transition: opacity 420ms ease, transform 520ms cubic-bezier(.16, 1, .3, 1);
}

.access-gate.is-clearing {
  opacity: 0;
  pointer-events: none;
}

@keyframes access-stack-arrive {
  0% { opacity: 0; transform: scale(.84); }
  70% { opacity: 1; transform: scale(1.025); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes access-exact-yield {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes access-reverse-open {
  0% { width: var(--closed-width); }
  9% { width: calc(var(--closed-width) - 4px); }
  24%, 32% { width: calc(var(--closed-width) + 16px); }
  100% { width: var(--open-width); }
}

@keyframes access-reverse-core-open {
  0% { width: var(--closed-width); }
  9% { width: calc(var(--closed-width) - 4px); }
  24%, 32% { width: calc(var(--closed-width) + 18px); }
  100% { width: var(--open-width); }
}

@keyframes access-wave-collapse-core {
  0% { width: var(--open-width); }
  68%, 76% { width: calc(var(--closed-width) + 18px); }
  91% { width: calc(var(--closed-width) - 4px); }
  100% { width: var(--closed-width); }
}

@keyframes access-wave-collapse {
  0% { width: var(--open-width); }
  68%, 76% { width: calc(var(--closed-width) + 16px); }
  91% { width: calc(var(--closed-width) - 4px); }
  100% { width: var(--closed-width); }
}

@keyframes access-exact-lock {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes access-dot-pop {
  from { transform: scale(.2); }
}

@keyframes access-caret-blink {
  0%, 55% { opacity: 1; }
  56%, 100% { opacity: 0; }
}

@keyframes access-stack-reject {
  0%, 100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
  15% { transform: translate3d(-12px, 0, 0) scale(1); }
  30% { transform: translate3d(10px, 0, 0) scale(1); }
  45% { transform: translate3d(-7px, 0, 0) scale(1); }
  60% { transform: translate3d(5px, 0, 0) scale(1); }
  75% { transform: translate3d(-3px, 0, 0) scale(1); }
  90% { transform: translate3d(1px, 0, 0) scale(1); }
}

@keyframes access-all-rings-crimson {
  0%, 100% { background-color: var(--layer-color); filter: brightness(1) saturate(1); }
  12%, 72% { background-color: var(--access-crimson); filter: brightness(1) saturate(1); }
}

@media (max-width: 620px) {
  .access-gate { --u: .5625px; }
  .access-layer--amber { --open-width: min(94vw, 640px); }
  .access-layer--orange { --open-width: min(calc(94vw - 18px), 622px); }
  .access-layer--red { --open-width: min(calc(94vw - 36px), 604px); }
  .access-layer--magenta { --open-width: min(calc(94vw - 54px), 586px); }
  .access-layer--violet { --open-width: min(calc(94vw - 72px), 568px); }
  .access-shell { --open-width: max(196px, min(calc(94vw - 90px), 550px)); }
  .access-entry,
  .access-dots {
    gap: 5.8125px;
    gap: calc(var(--u) * 5 + 3px);
  }
  .access-dot {
    width: 7.5px;
    width: var(--dot);
    height: 7.5px;
    height: var(--dot);
  }
  .access-caret {
    height: 17px;
    height: calc(var(--u) * 16 + 8px);
  }
}

@media (orientation: landscape) and (max-height: 590px) {
  .access-layer,
  .access-shell,
  .access-mandala-intact {
    zoom: .78;
  }
}

@media (prefers-reduced-motion: reduce) {
  .access-gate.phase-closed .access-stack {
    animation: access-reduced-arrive 200ms both !important;
  }

  .access-gate.phase-opening .access-layer,
  .access-gate.phase-opening .access-shell {
    animation: access-reduced-open 200ms ease both !important;
  }

  .access-gate.phase-opening .access-mandala-intact {
    animation: access-exact-yield 120ms linear both !important;
  }

  .access-gate.is-closing .access-layer,
  .access-gate.is-closing .access-shell {
    animation: access-reduced-close 200ms 90ms ease both !important;
  }

  .access-gate.is-closing .access-mandala-intact {
    animation: access-exact-lock 120ms 250ms linear both !important;
  }

  .access-gate.is-invalid .access-stack {
    animation: access-reduced-reject 200ms ease both !important;
  }

  .access-gate.is-invalid .access-layer {
    animation: access-reduced-crimson 200ms linear both !important;
  }

  .access-dot,
  .access-dot.pop {
    transition: none;
    animation: none;
  }

  .access-gate.phase-ready.has-focus .access-caret {
    animation: none;
    opacity: 1;
  }

  .access-gate.is-mark-fading .access-mandala-intact {
    transition-duration: 200ms;
  }
}

@keyframes access-reduced-arrive {
  from { opacity: 0; transform: scale(.98); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes access-reduced-open {
  from { width: var(--closed-width); }
  to { width: var(--open-width); }
}

@keyframes access-reduced-close {
  from { width: var(--open-width); }
  to { width: var(--closed-width); }
}

@keyframes access-reduced-reject {
  from, to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes access-reduced-crimson {
  0%, 100% { background-color: var(--layer-color); }
  50% { background-color: var(--access-crimson); }
}

@supports not (height: 100dvh) {
  .access-gate { height: 100vh; }
}
