.launch-page {
  filter: blur(8px);
  transform: scale(1.025);
  transition: filter 1500ms ease, transform 1500ms ease;
}

body.secret-open {
  overflow: auto;
}

body.secret-open .launch-page,
.launch-page.is-readable {
  filter: blur(0);
  transform: scale(1);
}

body:not(.secret-open) {
  overflow: hidden;
}

.secret-opening {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: rgba(255, 248, 243, 0.28);
  padding: 22px;
  transition: opacity 450ms ease, visibility 450ms ease;
}

.secret-opening::before {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.26), transparent 26%),
    rgba(36, 19, 17, 0.18);
  content: "";
}

.secret-opening.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.secret-opening.is-unlocking {
  pointer-events: none;
}

.secret-opening.is-unlocking::before {
  animation: secret-overlay-clear 1500ms ease forwards;
}

.secret-gate-card {
  position: relative;
  z-index: 2;
  width: min(88vw, 560px);
  border: 1px solid rgba(255, 253, 251, 0.32);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(255, 253, 251, 0.97), rgba(255, 241, 242, 0.92)),
    rgba(255, 253, 251, 0.94);
  box-shadow:
    0 0 44px rgba(255, 255, 255, 0.5),
    0 28px 70px rgba(36, 19, 17, 0.26);
  padding: clamp(16px, 3.2vw, 22px);
  animation: secret-gate-arrive 800ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.secret-code-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(132px, auto);
  gap: 10px;
}

.secret-code-form input {
  width: 100%;
  min-width: 0;
  min-height: 58px;
  border: 1px solid rgba(107, 64, 56, 0.16);
  border-radius: 18px;
  background: rgba(255, 253, 251, 0.92);
  box-shadow:
    inset 0 1px 3px rgba(91, 56, 48, 0.06),
    0 10px 24px rgba(91, 56, 48, 0.08);
  color: var(--brown);
  font: inherit;
  font-size: clamp(0.78rem, 2.2vw, 1rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  outline: none;
  padding: 0 18px;
  text-align: center;
}

.secret-code-form input::placeholder {
  color: rgba(107, 64, 56, 0.5);
}

.secret-code-form input.is-invalid {
  border-color: rgba(185, 79, 114, 0.62);
  box-shadow:
    inset 0 1px 3px rgba(91, 56, 48, 0.06),
    0 0 0 3px rgba(214, 110, 140, 0.14);
}

.secret-enter-button {
  min-height: 58px;
  border: 0;
  border-radius: 18px;
  background: var(--rose);
  box-shadow: 0 12px 30px rgba(214, 110, 140, 0.34);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  padding: 0 28px;
  transition: background 180ms ease, transform 180ms ease;
}

.secret-enter-button:hover,
.secret-enter-button:focus-visible {
  background: #c9577a;
  transform: translateY(-1px);
}

.secret-enter-button:active {
  transform: translateY(0);
}

.secret-opening.is-unlocking .secret-gate-card {
  animation: secret-gate-exit-down 1100ms 180ms cubic-bezier(0.2, 0.78, 0.18, 1) forwards;
}

@keyframes secret-gate-arrive {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes secret-gate-exit-down {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  100% {
    opacity: 0;
    transform: translateY(80px) scale(0.96);
  }
}

@keyframes secret-overlay-clear {
  to {
    background:
      radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0), transparent 26%),
      rgba(36, 19, 17, 0);
  }
}

@media (max-width: 720px) {
  .secret-gate-card {
    width: min(90vw, 390px);
    border-radius: 24px;
    padding: 12px;
  }

  .secret-code-form {
    grid-template-columns: 1fr;
  }

  .secret-code-form input,
  .secret-enter-button {
    min-height: 54px;
  }
}
