@font-face { font-family: Fredoka; src: url(fonts/Fredoka-Regular.ttf) format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: Fredoka; src: url(fonts/Fredoka-Medium.ttf) format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: Fredoka; src: url(fonts/Fredoka-SemiBold.ttf) format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: Fredoka; src: url(fonts/Fredoka-Bold.ttf) format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --ink: #1F1A3A; --paper: #FFFFFF; --ground: #FFF8EC; --coral: #FF5A5F; --sun: #FFD23F; --teal: #1FB5A6; --sky: #4CC9F0; --grape: #9B5DE5;
  --muted: #5d5670; --bad: #c9303a;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body.gate {
  font-family: Fredoka, ui-rounded, system-ui, -apple-system, sans-serif; color: var(--ink);
  background-color: var(--ground);
  background-image: linear-gradient(rgba(76, 201, 240, .16) 1px, transparent 1px), linear-gradient(90deg, rgba(76, 201, 240, .16) 1px, transparent 1px);
  background-size: 28px 28px;
  min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; overflow-x: hidden;
}
.doodles { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.doodles i { position: absolute; font-style: normal; font-size: 44px; opacity: .85; animation: bob 7s ease-in-out infinite; }
.doodles i:nth-child(1) { left: 6%; top: 10%; }
.doodles i:nth-child(2) { right: 8%; top: 12%; animation-delay: -1s; }
.doodles i:nth-child(3) { left: 14%; bottom: 14%; animation-delay: -2s; }
.doodles i:nth-child(4) { right: 12%; bottom: 10%; animation-delay: -3s; }
.doodles i:nth-child(5) { left: 44%; top: 4%; animation-delay: -4s; font-size: 34px; }
.doodles i:nth-child(6) { left: 3%; top: 50%; animation-delay: -5s; font-size: 36px; }
.doodles i:nth-child(7) { right: 3%; top: 48%; animation-delay: -6s; font-size: 38px; }
.doodles i:nth-child(8) { left: 48%; bottom: 3%; animation-delay: -2.5s; font-size: 32px; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-16px) rotate(6deg); } }

.gate-card {
  position: relative; z-index: 1; width: min(420px, 100%); background: var(--paper); border: 3px solid var(--ink);
  border-radius: 28px; box-shadow: 0 10px 0 var(--ink); padding: 30px 26px 24px; text-align: center;
  animation: pop .5s cubic-bezier(.2, 1.4, .4, 1) both;
}
@keyframes pop { from { transform: translateY(24px) scale(.94); opacity: 0; } }
.shake { animation: shake .45s ease both; }
@keyframes shake { 20%, 60% { transform: translateX(-10px); } 40%, 80% { transform: translateX(10px); } }
.gate-logo { display: flex; justify-content: center; gap: 8px; margin-bottom: 8px; }
.blk { width: 40px; height: 40px; display: grid; place-items: center; font-weight: 700; font-size: 22px; border: 3px solid var(--ink); border-radius: 10px; box-shadow: 0 4px 0 var(--ink); animation: hop 1.6s ease-in-out infinite; color: var(--ink); }
.b1 { background: var(--coral); color: #fff; } .b2 { background: var(--sun); animation-delay: .15s; } .b3 { background: var(--teal); color: #fff; animation-delay: .3s; }
@keyframes hop { 0%, 100% { transform: translateY(0) rotate(-4deg); } 40% { transform: translateY(-9px) rotate(4deg); } }
.wordmark { font-size: 46px; font-weight: 700; margin: 4px 0 2px; letter-spacing: -.5px; }
.wordmark b { color: var(--coral); }
.gate-sub { margin: 0 0 18px; color: var(--muted); font-size: 18px; }
.gate-error { background: #ffe3e6; color: #8a1026; border: 2px solid #8a1026; border-radius: 14px; padding: 10px 12px; font-weight: 500; margin: 0 0 16px; }
form { display: grid; gap: 14px; text-align: left; }
label { display: grid; gap: 6px; font-weight: 600; font-size: 15px; }
input[type=text], input[type=password] {
  font: inherit; font-size: 18px; padding: 13px 14px; border-radius: 14px; border: 3px solid var(--ink); background: var(--ground); color: var(--ink);
  outline: none; transition: box-shadow .15s;
}
input[type=text]:focus, input[type=password]:focus { box-shadow: 0 0 0 4px color-mix(in srgb, var(--sky) 55%, transparent); }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.check input { width: 22px; height: 22px; accent-color: var(--coral); }
.gate-btn {
  font: inherit; font-weight: 700; font-size: 20px; color: var(--ink); background: var(--sun); border: 3px solid var(--ink); border-radius: 16px;
  padding: 14px; cursor: pointer; box-shadow: 0 6px 0 var(--ink); transition: transform .08s, box-shadow .08s; margin-top: 4px;
}
.gate-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--ink); }
.gate-btn:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--ink); }
.gate-foot { color: var(--muted); font-size: 14px; margin: 18px 0 0; line-height: 1.4; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
