:root {
  --cream: #fffdf5;
  --bamboo-mist: #e2f1e1;
  --ink: #2d2a32;
  --bamboo: #6b9b6a;
  --bamboo-dark: #4a7a49;
  --font-hand: "Gochi Hand", "Patrick Hand", cursive;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body.gate-page {
  margin: 0;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  font-family: var(--font-hand);
  font-size: 1.15rem;
  color: var(--ink);
  background: var(--cream);
}

.gate {
  width: min(100%, 16rem);
  text-align: center;
}

.gate-paw {
  display: block;
  width: 56px;
  height: auto;
  margin: 0 auto 1.25rem;
  opacity: 0.92;
}

.gate-paw.is-shake {
  animation: gate-paw-shake 0.4s ease;
}

@keyframes gate-paw-shake {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-12deg); }
  75% { transform: rotate(12deg); }
}

.gate-prompt {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  color: var(--ink);
}

.gate-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.gate-field {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-family: var(--font-hand);
  font-size: 1.1rem;
  color: var(--ink);
  text-align: center;
  background: #fff;
  border: 1.5px solid var(--bamboo-mist);
  border-radius: 0.5rem;
  outline: none;
}

.gate-field:focus {
  border-color: var(--bamboo);
}

.gate-field.is-error {
  border-color: #c96b82;
}

.gate-submit {
  padding: 0.6rem 1rem;
  font-family: var(--font-hand);
  font-size: 1.05rem;
  color: #fff;
  background: var(--bamboo);
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
}

.gate-submit:hover {
  background: var(--bamboo-dark);
}

.gate-submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

.gate-msg {
  min-height: 1.2rem;
  margin: 0;
  font-size: 0.9rem;
  color: #b84d68;
}

body.gate-page.is-leaving .gate {
  opacity: 0;
  transition: opacity 0.25s ease;
}

@media (prefers-reduced-motion: reduce) {
  .gate-paw.is-shake {
    animation: none;
  }
}
