.entry-gated,
.entry-gated body {
  overflow: hidden;
  background: #03050c;
}

.entry-gated .container,
.entry-gate[hidden] {
  display: none;
}

.entry-gate {
  --entry-progress: 0;
  position: fixed;
  z-index: 10;
  inset: 0;
  display: grid;
  align-items: center;
  justify-items: center;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: max(24px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  background: #03050c;
  transition: opacity 280ms ease;
}

.entry-panel {
  position: relative;
  isolation: isolate;
  width: min(100%, 420px);
  padding: 29px 32px 25px;
  text-align: center;
  border: 1px solid rgb(147 178 219 / 23%);
  border-radius: 26px;
  background:
    radial-gradient(ellipse at 6% 0%, rgb(68 186 228 / 11%), transparent 47%),
    radial-gradient(ellipse at 100% 100%, rgb(127 80 238 / 13%), transparent 47%),
    #090e1a;
  box-shadow: 0 28px 100px rgb(0 0 0 / 55%), 0 0 60px rgb(59 120 196 / 7%);
  animation: entry-arrive 500ms ease-out both;
}

.entry-panel::before,
.entry-panel::after {
  position: absolute;
  z-index: -1;
  width: 64px;
  height: 64px;
  content: "";
  pointer-events: none;
  filter: drop-shadow(0 0 6px #6ae4ff) drop-shadow(0 0 18px #7160ff);
}

.entry-panel::before {
  top: -1px;
  left: -1px;
  border-top: 1px solid #c5f8ff;
  border-left: 1px solid #c5f8ff;
  border-top-left-radius: 26px;
  mask-image: linear-gradient(135deg, #000 20%, transparent 78%);
}

.entry-panel::after {
  right: -1px;
  bottom: -1px;
  border-right: 1px solid #bca8ff;
  border-bottom: 1px solid #bca8ff;
  border-bottom-right-radius: 26px;
  mask-image: linear-gradient(315deg, #000 20%, transparent 78%);
}

.entry-brand {
  margin: 0;
  color: #94a7c5;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0.3em;
}

.entry-portal {
  position: relative;
  display: grid;
  place-items: center;
  width: 136px;
  height: 136px;
  margin: 28px auto 22px;
  border: 1px solid rgb(124 197 255 / 17%);
  border-radius: 50%;
  background: radial-gradient(circle, rgb(156 116 255 / 22%), rgb(62 164 214 / 6%) 56%, transparent 72%);
  box-shadow: 0 0 48px rgb(82 137 255 / 12%);
}

.entry-portal::before,
.entry-portal::after {
  position: absolute;
  content: "";
  border-radius: 50%;
}

.entry-portal::before {
  inset: 10px;
  border: 1px solid rgb(158 175 243 / 28%);
  border-top-color: #b4efff;
  border-bottom-color: #ac8aff;
  transform: rotate(calc(-30deg - var(--entry-progress) * 160deg));
  filter: drop-shadow(0 0 5px rgb(106 228 255 / 45%));
}

.entry-portal::after {
  inset: 26px;
  border: 1px solid rgb(159 208 255 / 40%);
  box-shadow: inset 0 0 20px rgb(97 125 230 / 13%);
}

.entry-core {
  width: 38px;
  height: 38px;
  border: 1px solid #cdfaff;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #f1ffff, #8dd9ff 29%, #9173ff 67%, #342f73);
  box-shadow: 0 0 16px rgb(147 220 255 / 60%), 0 0 40px rgb(111 100 246 / 50%);
  animation: entry-pulse 3s ease-in-out infinite;
}

.entry-orbit {
  position: absolute;
  inset: 0;
  transform: rotate(calc(-25deg - var(--entry-progress) * 160deg));
}

.entry-orbit::before,
.entry-orbit::after {
  position: absolute;
  top: 50%;
  width: 5px;
  height: 5px;
  margin-top: -2px;
  content: "";
  border-radius: 50%;
  background: #d8faff;
  box-shadow: 0 0 8px #6ae4ff, 0 0 16px #9372ff;
}

.entry-orbit::before { left: -3px; }
.entry-orbit::after { right: -3px; background: #c6adff; }

.entry-title {
  margin: 0;
  color: #f0f5ff;
  font-size: clamp(32px, 7vw, 42px);
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.entry-title span {
  display: block;
  color: #bceaff;
}

.entry-instructions {
  margin: 16px 0 28px;
  color: #9babc4;
  font-size: 14px;
  line-height: 1.5;
}

.entry-track {
  position: relative;
  height: 70px;
  border: 1px solid rgb(139 175 222 / 22%);
  border-radius: 36px;
  background: #040914;
  box-shadow: inset 0 2px 8px rgb(0 0 0 / 28%);
  user-select: none;
  -webkit-user-select: none;
}

.entry-track::before {
  position: absolute;
  inset: 0;
  content: "";
  border-radius: inherit;
  background: linear-gradient(90deg, rgb(106 228 255 / 14%), rgb(147 114 255 / 7%));
  transform: scaleX(var(--entry-progress));
  transform-origin: right;
  transition: transform 220ms ease;
}

.entry-target {
  position: absolute;
  top: 6px;
  left: 6px;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  color: #7691b9;
  border: 1px dashed rgb(133 175 231 / 28%);
  border-radius: 50%;
}

.entry-target svg { width: 20px; height: 20px; }

.entry-track-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0 66px;
  color: #c1d0e6;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.15em;
  opacity: calc(0.8 - var(--entry-progress) * 1.5);
}

.entry-handle {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0;
  padding: 0;
  border: 1px solid #e0ffff;
  border-radius: 50%;
  color: #112339;
  background: linear-gradient(135deg, #edffff, #a8e8ff 58%, #bba6ff);
  box-shadow: 0 0 17px rgb(106 228 255 / 35%), 0 0 30px rgb(147 114 255 / 17%);
  appearance: none;
  cursor: grab;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  transform: translateX(var(--thumb-offset, 0px));
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.entry-handle svg { width: 24px; height: 24px; pointer-events: none; }
.entry-handle .entry-check { display: none; }

.entry-handle:focus-visible {
  outline: 2px solid #e9faff;
  outline-offset: 5px;
}

.entry-handle:hover {
  box-shadow: 0 0 24px rgb(106 228 255 / 50%), 0 0 36px rgb(147 114 255 / 30%);
}

.is-dragging .entry-handle { cursor: grabbing; }
.is-dragging .entry-handle,
.is-dragging.entry-track::before { transition: none; }

.entry-status {
  min-height: 19px;
  margin: 17px 0 0;
  color: #8093b0;
  font-size: 11px;
  line-height: 1.7;
}

.is-complete .entry-status { color: #b9f4ef; font-weight: 600; }
.is-complete .entry-handle { cursor: default; }
.is-complete .entry-handle .entry-arrow { display: none; }
.is-complete .entry-handle .entry-check { display: block; }
.is-complete .entry-portal { box-shadow: 0 0 60px rgb(106 228 255 / 26%); }
.is-leaving { opacity: 0; pointer-events: none; }
.welcome h1:focus { outline: none; }

.entry-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@keyframes entry-arrive {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes entry-pulse {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

@media (max-width: 480px) {
  .entry-panel { padding: 27px 22px 23px; }
  .entry-portal { margin-top: 26px; }
  .entry-track-label { font-size: 9px; letter-spacing: 0.1em; }
}

@media (max-height: 640px) {
  .entry-panel { padding-top: 20px; padding-bottom: 20px; }
  .entry-portal { width: 100px; height: 100px; margin-top: 17px; margin-bottom: 17px; }
  .entry-portal::after { inset: 22px; }
  .entry-core { width: 28px; height: 28px; }
  .entry-instructions { margin-top: 12px; margin-bottom: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .entry-panel,
  .entry-core { animation: none; }
  .entry-gate,
  .entry-handle,
  .entry-track::before { transition: none; }
}
