/* 근쌤 연수랩 — 그린 정원 지도 게임 화면 (화면 위 안내는 map-hud.css) */
.m-stage {
  position: fixed; inset: 0; z-index: 1; overflow: hidden; background: #2E4A2A;
  opacity: 0; transition: opacity .8s ease; touch-action: none; cursor: pointer;
}
.m-stage.on { opacity: 1; }
/* 지도 양옆 남는 곳: 같은 정원을 흐리게 깔아 빈 곳 없이 */
.m-stage::before {
  content: ""; position: absolute; inset: -40px; z-index: 0;
  background: url(/images/lab/garden-map-1600.jpg) center / cover no-repeat;
  filter: blur(18px) brightness(.62) saturate(.9);
}
.m-world { z-index: 1; box-shadow: 0 0 60px rgba(0, 0, 0, .45); }
.m-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.m-map { position: absolute; inset: 0; width: 100%; height: 100%; display: block; user-select: none; -webkit-user-drag: none; pointer-events: none; }

/* 정자 이름표: 그림 속 빈 현판 자리에 얹는 나무 판 */
.m-plate {
  position: absolute; transform: translate(-50%, -50%);
  max-width: 220px; padding: 5px 12px 6px; text-align: center; white-space: normal; text-wrap: balance;
  font: 900 15px/1.3 var(--f-display); color: #FFF1D6;
  background: #7A4B2A; border: 3px solid #5A3519; border-radius: 10px;
  box-shadow: 0 8px 16px -8px rgba(0, 0, 0, .6); text-shadow: 0 -1px 0 rgba(0, 0, 0, .4);
  pointer-events: none; transition: transform .3s cubic-bezier(.3, 1.5, .5, 1), background-color .2s ease;
}
.m-plate.on { transform: translate(-50%, -50%) scale(1.12); background: #8C5631; }

/* 정자 위 떠 있는 보석: 들어갈 수 있는 곳 표시 */
.m-gem {
  position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px;
  background: #FFD36B; border: 2px solid #D9921C; border-radius: 4px;
  transform: rotate(45deg); box-shadow: 0 0 0 4px rgba(255, 211, 107, .25);
  animation: m-gem 2.2s ease-in-out infinite; pointer-events: none;
}
@keyframes m-gem { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }

/* 근쌤 */
.m-hero { position: absolute; left: 0; top: 0; pointer-events: none; transition: opacity .2s ease; }
.m-hero img { position: relative; z-index: 1; display: block; width: 100%; height: 100%; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .3)); transform-origin: 50% 100%; }
.m-shadow { position: absolute; left: 30%; right: 30%; bottom: 0; height: 9%; border-radius: 50%; background: rgba(0, 0, 0, .28); filter: blur(2px); }

@media (prefers-reduced-motion: reduce) {
  .m-gem { animation: none; }
  .m-stage { transition: none; }
}

/* 현판: 첫 줄 날짜·대상, 둘째 줄 주제 (같은 크기, 굵기만 다르게) */
.m-plate { display: grid; gap: 1px; max-width: 240px; }
.m-plate-when { font-weight: 700; color: #F6DDB4; white-space: nowrap; }
.m-plate-title { font-weight: 900; }

/* 미니맵: 늘 보임 — 컴퓨터는 오른쪽 아래, 휴대폰은 오른쪽 위 */
.m-mini {
  display: block; position: absolute; right: 16px; bottom: max(16px, env(safe-area-inset-bottom));
  width: 210px; aspect-ratio: 3 / 2; padding: 0; overflow: hidden; cursor: pointer;
  border: 3px solid #7A4B2A; border-radius: 12px; background: #2E4A2A;
  box-shadow: 0 10px 20px -10px rgba(0, 0, 0, .6);
}
@media (max-width: 760px) { .m-mini { width: 140px; bottom: auto; top: calc(max(12px, env(safe-area-inset-top)) + 52px); right: 12px; } }
.m-mini img { width: 100%; height: 100%; display: block; object-fit: cover; }
.m-mini-spot, .m-mini-me { position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; pointer-events: none; }
.m-mini-spot { background: rgba(255, 255, 255, .7); border: 1.5px solid #5A3519; }
.m-mini-spot.on { background: #FFD36B; }
.m-mini-me { width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; background: #E2261C; border: 2px solid #fff; }
.m-mini-view { position: absolute; border: 2px solid rgba(255, 255, 255, .9); border-radius: 3px; pointer-events: none; }
