/**
 * 영어 맵 스타일
 * 배경: images/main/bg-eng.webp
 * 캐릭터: images/main/eng1.webp ~ eng9.webp
 * 표지판: 왼쪽 sign-kor-left, 오른쪽 sign-math-right
 */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Jua", sans-serif;
  overflow: hidden;
}

.eng-map {
  width: 100vw;
  height: 100vh;
  background-image: url("../../images/main/bg-eng.webp");
  background-size: cover;
  background-position: center;
  position: relative;
}

.eng-map .signpost,
.eng-map .eng-spot {
  position: absolute;
  z-index: 20;
  transition: transform 0.2s ease-out;
  display: block;
  text-decoration: none;
}

.eng-map .signpost.is-guest-locked {
  cursor: not-allowed;
  filter: grayscale(0.55) brightness(0.92);
  opacity: 0.72;
}

.eng-map .signpost.is-guest-locked:hover {
  transform: none;
}

.eng-map .signpost.is-guest-locked::after {
  content: "로그인";
  position: absolute;
  left: 50%;
  bottom: 6%;
  transform: translateX(-50%);
  z-index: 3;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  font-size: clamp(9px, 1.1vw, 12px);
  font-weight: 700;
  pointer-events: none;
  white-space: nowrap;
}

.eng-map .eng-spot--link {
  cursor: pointer;
  z-index: 22;
}

.eng-map .eng-spot--link.is-guest-locked {
  cursor: not-allowed;
  filter: grayscale(0.45) brightness(0.94);
  opacity: 0.78;
}

.eng-map .eng-spot--link.is-guest-locked:hover {
  transform: none;
}

.eng-map .eng-spot-label {
  position: absolute;
  left: 50%;
  top: -0.35em;
  transform: translate(-50%, -100%);
  z-index: 3;
  padding: 0.28em 0.7em;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: rgba(55, 65, 81, 0.78);
  font-size: clamp(10px, 1.15vw, 14px);
  font-weight: 500;
  letter-spacing: -0.02em;
  white-space: nowrap;
  pointer-events: none;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(2px);
}

.eng-map .eng-spot-label::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(255, 255, 255, 0.42);
}

.eng-map .signpost:hover,
.eng-map .eng-spot--link:hover {
  transform: scale(1.1);
}

.eng-map .sign-img,
.eng-map .eng-spot-img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 5px 5px rgba(0, 0, 0, 0.2));
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* 국어 학습방 · 수학학습방 */
#sign-kor {
  top: 53%;
  left: 1%;
  width: 9%;
}
#sign-math {
  top: 53%;
  right: 1%;
  width: 9%;
}

/* 영어 학습지 — 강변 */
#worksheet-eng {
  bottom: 50%;
  left: 87%;
  width: 6%;
  z-index: 22;
}

/* eng1 거북 · eng2 여우 · eng3 토끼 · eng4 다람쥐 / 물고기·물속은 장식 */
#eng-1 { bottom: 45%; left: 20%; width: 8%; } /*거북 → 1.알파벳*/
#eng-2 { top: 38%; left: 64%; width: 5.5%; } /*여우 → 2.소리*/
#eng-3 { top: 24%; left: 70%; width: 6%; } /*토끼 → 3.단어*/
#eng-4 { top: 20%; left: 50%; width: 5.5%; } /*다람쥐 → 4.문장*/
#eng-fish-a { bottom: 10%; left: 38%; width: 6%; } /*주황물고기*/
#eng-fish-b { bottom: 12%; left: 55%; width: 4.2%; } /*주황물고기(복제)*/
#eng-fish-c { bottom: 15%; left: 22%; width: 4.5%; } /*파란물고기*/
#eng-goose,
#eng-5 { bottom: 8%; left: 68%; width: 7%; } /*거위 → 5.대화*/
#eng-5a { bottom: 40%; left: 43%; width: 4%; } /*오리*/
#eng-5b { bottom: 42%; left: 46%; width: 2.6%; } /*오리*/
#eng-5c { bottom: 44%; left: 48%; width: 2.8%; } /*오리*/
#eng-5d { bottom: 43%; left: 50.5%; width: 2.4%; } /*오리*/
#eng-5e { bottom: 46%; left: 52.5%; width: 2.5%; } /*오리*/
#eng-6 { bottom: 15%; left: 50%; width: 4%; } /*개구리*/
#eng-goose.eng-spot--float-a .eng-spot-img,
#eng-5.eng-spot--float-a .eng-spot-img { animation-delay: -0.7s; }
#eng-6.eng-spot--float-c .eng-spot-img { animation-delay: -1.6s; }
#eng-fish-a.eng-spot--float-a .eng-spot-img { animation-delay: 0s; }
#eng-fish-b.eng-spot--float-c .eng-spot-img { animation-delay: -1.1s; }
#eng-fish-c.eng-spot--float-b .eng-spot-img { animation-delay: -0.4s; }

/* 물속 캐릭터: 그 자리에서 둥둥 (이미지에 적용해 위치 박스와 분리) */
.eng-map .eng-spot--float {
  transition: none;
}
.eng-map .eng-spot--float .eng-spot-img {
  display: block;
  width: 100%;
  height: auto;
  will-change: transform;
  transform-origin: 50% 80%;
  backface-visibility: hidden;
}
.eng-map .eng-spot--float-a .eng-spot-img {
  animation: eng-float-a 9s ease-in-out infinite;
}
.eng-map .eng-spot--float-b .eng-spot-img {
  animation: eng-float-b 11s ease-in-out infinite;
}
.eng-map .eng-spot--float-c .eng-spot-img {
  animation: eng-float-c 10s ease-in-out infinite;
}

@keyframes eng-float-a {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-1deg); }
  50% { transform: translate3d(3px, -10px, 0) rotate(1deg); }
}
@keyframes eng-float-b {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0.8deg); }
  50% { transform: translate3d(-3px, -8px, 0) rotate(-0.8deg); }
}
@keyframes eng-float-c {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  35% { transform: translate3d(2px, -9px, 0) rotate(0.7deg); }
  70% { transform: translate3d(-2px, -5px, 0) rotate(-0.5deg); }
}

@media (prefers-reduced-motion: reduce) {
  .eng-map .eng-spot--float-a .eng-spot-img,
  .eng-map .eng-spot--float-b .eng-spot-img,
  .eng-map .eng-spot--float-c .eng-spot-img {
    animation: none;
  }
}

