html.liquid-entry-open { overflow: hidden; }

.liquid-entry[open], .liquid-entry-pending .liquid-entry {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: var(--ink);
}

.liquid-entry-pending .liquid-entry { pointer-events: none; }
.liquid-entry-pending .liquid-cue { visibility: hidden; }
.liquid-entry::backdrop { background: transparent; }

.liquid-water, .liquid-surface, .liquid-fallback, .liquid-ring-field, .liquid-shore {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.liquid-water {
  background:
    radial-gradient(ellipse at 48% 42%, #f2faff80, #deeeff35 69%, transparent),
    linear-gradient(151deg, #fbfdff42, #b4ceed68);
  -webkit-backdrop-filter: blur(18px) saturate(112%);
  backdrop-filter: blur(18px) saturate(112%);
}

.liquid-entry--draining .liquid-water {
  -webkit-clip-path: url(#liquid-water-clip);
  clip-path: url(#liquid-water-clip);
}

.liquid-shore { fill: none; }
.liquid-shore-shadow { stroke: #30598646; stroke-width: 3.6; transform: translateY(.6px); }
.liquid-shore-light { stroke: #f3fbffcd; stroke-width: 1.15; }

.liquid-fallback {
  background: linear-gradient(145deg, #ffffff4d, #b4d0ed42 52%, #f5faff60);
  overflow: hidden;
  transition: opacity 400ms ease;
}

.liquid-fallback::before, .liquid-fallback::after {
  position: absolute;
  inset: -23%;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(ellipse at 20% 34%, #e9f5ffb3, transparent 33%),
    radial-gradient(ellipse at 75% 55%, #9cc2ea51, transparent 34%),
    radial-gradient(ellipse at 64% 30%, #ffffff94, transparent 37%);
  animation: liquid-drift 10s ease-in-out infinite alternate;
}

.liquid-fallback::after {
  background: radial-gradient(ellipse at 29% 61%, #a5cce765, transparent 32%),
    radial-gradient(ellipse at 77% 36%, #ffffffb3, transparent 34%);
  animation-duration: 7s;
  animation-delay: -3s;
}

@keyframes liquid-drift {
  from { transform: translate3d(-4%, -2%, 0) rotate(-9deg) scale(1.05); }
  to { transform: translate3d(5%, 4%, 0) rotate(9deg) scale(1.11); }
}

.liquid-surface { opacity: 0; transition: opacity 360ms ease; }
.liquid-entry--gpu .liquid-surface { opacity: 1; }
.liquid-entry--gpu .liquid-fallback { opacity: 0; }
.liquid-entry--gpu .liquid-fallback::before, .liquid-entry--gpu .liquid-fallback::after { animation-play-state: paused; }
.liquid-entry--gpu .liquid-ring-field { display: none; }

.liquid-ring-field i {
  position: absolute;
  left: var(--liquid-hit-x, 50%);
  top: var(--liquid-hit-y, 50%);
  width: 96px;
  height: 96px;
  border: 1px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 2px #3156a875, inset 0 0 2px #bfdcfa;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.08);
}

.liquid-entry--leaving .liquid-ring-field i { animation: liquid-ring 1230ms cubic-bezier(.23,.63,.32,1) both; }
.liquid-entry--leaving .liquid-ring-field i:nth-child(2) { animation-delay: 95ms; }
.liquid-entry--leaving .liquid-ring-field i:nth-child(3) { animation-delay: 184ms; }
.liquid-entry--leaving .liquid-ring-field i:nth-child(4) { animation-delay: 270ms; }
.liquid-entry--leaving .liquid-ring-field i:nth-child(5) { animation-delay: 352ms; }

@keyframes liquid-ring {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.08); }
  12% { opacity: .72; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(var(--liquid-ring-scale, 18)); }
}

.liquid-cue {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 1.02rem;
  padding: 1rem;
  text-align: center;
  transition: opacity 280ms ease;
}

.liquid-entry--leaving .liquid-cue { opacity: 0; }

.liquid-wordmark {
  margin: 0;
  color: var(--blue);
  font-size: clamp(3rem, 8.2vw, 7.6rem);
  font-weight: 920;
  letter-spacing: -.09em;
  line-height: .95;
  text-shadow: 0 2px 0 #fff9, 0 10px 28px #deedffaf;
}

.liquid-entry-label {
  margin: 0;
  color: #274777;
  font: 740 .75rem/1.4 var(--mono);
  letter-spacing: .15em;
}

.liquid-enter {
  display: inline-flex;
  align-items: center;
  gap: .68rem;
  min-height: 3.25rem;
  padding: .38rem 1.15rem .38rem .45rem;
  cursor: pointer;
  border-radius: 3rem;
  color: #162743;
  font: 750 .96rem var(--font);
  background: linear-gradient(155deg, #fffffff5, #eaf4ffd4);
  transition: transform 160ms ease;
}

.liquid-enter:hover { transform: translateY(-2px); }
.liquid-enter:active { transform: translateY(1px); }

.liquid-enter-mark {
  display: grid;
  place-items: center;
  width: 2.38rem;
  height: 2.38rem;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--blue);
  box-shadow: inset 0 1px 2px #fff7, 0 2px 5px #33461726;
}

.liquid-enter-mark svg { width: 1.5rem; height: 1.5rem; }
.liquid-entry-hint { color: #375478; margin: 0; font-size: .79rem; }

@media (pointer: coarse) {
  .liquid-entry-keyboard { display: none; }
}
