/* ─────────────────────────────────────────────
   로그인 — 책상 한가운데 놓인 종이 한 장
   ───────────────────────────────────────────── */
body.login { height: 100%; overflow: hidden; position: fixed; inset: 0; }

/* 흩어진 장식: 천천히 떠다니고, 마우스를 따라 아주 조금 움직인다 */
.scatter { position: fixed; inset: 0; pointer-events: none; z-index: 1; }
.sc {
  position: absolute; left: var(--x); top: var(--y); rotate: var(--r, 0deg);
  translate: calc(var(--mx, 0) * var(--k, 1) * 1px) calc(var(--my, 0) * var(--k, 1) * 1px);
  transition: translate .6s cubic-bezier(.2, .8, .2, 1);
  animation: bob 9s ease-in-out infinite; animation-delay: var(--d, 0s);
  opacity: .92;
}
@keyframes bob { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-9px) } }
.sc.sticky { position: absolute; }
.sc.polaroid { position: absolute; }
.sc.label, .sc.doodle { position: absolute; }
.sc.book {
  width: 150px; aspect-ratio: 3 / 4; border-radius: 5px 12px 12px 5px; overflow: hidden;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .5), 0 2px 6px rgba(0, 0, 0, .35);
}
.sc.book img { width: 100%; height: 100%; object-fit: cover; }
.sc.book .spine {
  position: absolute; left: 0; top: 0; bottom: 0; width: 15px;
  background: linear-gradient(90deg, rgba(0, 0, 0, .34), rgba(0, 0, 0, .08) 70%, rgba(255, 255, 255, .12));
}

.stage {
  position: fixed; inset: 0; z-index: 5; display: grid; place-items: center;
  padding: 24px 18px; overflow-y: auto;
}
.door-wrap {
  position: relative; width: min(100%, 440px); rotate: -1deg;
  animation: door-in .7s var(--ease-pop) both;
}
@keyframes door-in { from { opacity: 0; transform: translateY(30px) scale(.94) rotate(-4deg) } to { opacity: 1; transform: none } }
.door-wrap .sheet {                    /* 아래에 겹쳐 놓인 다른 종이 한 장 */
  position: absolute; inset: 8px -7px -9px 9px; border-radius: 6px;
  background: #e2dccb; rotate: 2.4deg; box-shadow: 0 18px 40px rgba(0, 0, 0, .4);
}
.door { padding: 44px 38px 30px; }
.door .owl {
  position: absolute; right: -46px; top: -92px; width: 168px; height: 168px;
  rotate: 8deg; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .35));
  animation: owl-in .9s .25s var(--ease-pop) both, owl-wave 5s 1.4s ease-in-out infinite;
  transform-origin: 50% 90%;
}
@keyframes owl-in { from { opacity: 0; translate: 0 50px; rotate: 22deg } to { opacity: 1; translate: 0 0; rotate: 8deg } }
@keyframes owl-wave { 0%, 84%, 100% { rotate: 8deg } 88% { rotate: 3deg } 92% { rotate: 11deg } 96% { rotate: 5deg } }

.door .brand { font-size: 10.5px; letter-spacing: .34em; color: var(--paper-ink-3); }
.door h1 { margin-top: 6px; font-size: 46px; line-height: 1.1; letter-spacing: -.01em; }
.door h1 .spark {
  display: inline-block; margin-left: 8px; font-style: normal; font-size: 30px; color: #f2b632;
  vertical-align: 10px; animation: twinkle 2.6s ease-in-out infinite;
}
@keyframes twinkle { 0%, 100% { scale: 1; opacity: 1 } 50% { scale: .7; opacity: .55; rotate: 20deg } }
.door .sub { margin-top: 4px; font-size: 25px; line-height: 1.25; color: #c9553e; }

.door form { margin-top: 24px; display: grid; gap: 14px; }
.door .msg { min-height: 22px; font-size: 14.5px; font-weight: 700; color: #c4402b; line-height: 1.5; }
.door .msg:empty { min-height: 4px; }
.door .btn b { font-size: 20px; transition: translate .25s var(--ease-pop); }
.door .btn:hover b { translate: 5px 0; }
.door .fine { margin-top: 14px; font-size: 13px; color: var(--paper-ink-3); text-align: center; }
.door-wrap.shake { animation: shake .45s ease both; }
@keyframes shake {
  0%, 100% { translate: 0 0 } 20% { translate: -9px 0 } 40% { translate: 8px 0 } 60% { translate: -5px 0 } 80% { translate: 4px 0 }
}
.door-wrap.leave { animation: door-out .5s ease both; }
@keyframes door-out { to { opacity: 0; transform: translateY(-26px) scale(1.04) rotate(2deg) } }

.teacher-link {
  position: fixed; z-index: 6; right: 18px; bottom: 16px; padding: 8px 12px; border-radius: 99px;
  font-size: 10.5px; letter-spacing: .16em; color: rgba(232, 232, 236, .42); text-decoration: none;
  transition: color .2s, background .2s;
}
.teacher-link:hover { color: var(--ink); background: rgba(255, 255, 255, .08); }

@media (max-width: 1080px) {
  .sc.label, .sc.doodle { display: none; }
  .sc { opacity: .5; }
}
@media (max-width: 720px) {
  .sc.sticky, .sc.polaroid { display: none; }
  .sc.book { width: 104px; opacity: .38; }
  .door { padding: 40px 24px 26px; }
  .door h1 { font-size: 38px; }
  .door .sub { font-size: 22px; }
  .door .owl { width: 128px; height: 128px; right: -14px; top: -78px; }
}
@media (max-height: 640px) {
  .stage { place-items: start center; padding-top: 96px; }
}
