/* verse — 실지도 프레즌스 화면 (루프9: 지도-우선 하이브리드)
   /styles.css 의 :root 변수·.btn 계열을 그대로 계승한다. 이 파일은
   지도 전용 레이아웃(풀블리드)·HUD·바텀시트·마커 연출만 추가한다.
*/

html, body {
  height: 100%;
  overflow: hidden; /* 지도만 스크롤/팬, 페이지 스크롤 없음 */
}

body {
  background: var(--bg);
}

#map {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
}

/* Leaflet 기본 attribution/컨트롤을 야간톤에 맞춰 톤다운 */
.leaflet-control-attribution {
  background: rgba(16, 11, 6, 0.72) !important;
  color: var(--text-faint) !important;
  font-size: 10px !important;
}
.leaflet-control-attribution a { color: var(--text-dim) !important; }
.leaflet-control-zoom a {
  background: rgba(16, 11, 6, 0.82) !important;
  color: var(--amber-light) !important;
  border-color: var(--line) !important;
}
.leaflet-control-zoom a:hover { background: rgba(36, 23, 8, 0.9) !important; }

/* ---------- HUD ---------- */

.map-hud {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 500;
  display: flex;
  gap: 10px;
  padding: 0 16px;
  pointer-events: none;
}

.map-hud-top {
  top: max(14px, env(safe-area-inset-top));
  flex-direction: column;
  align-items: flex-start;
}

.map-hud-bottom {
  bottom: max(16px, env(safe-area-inset-bottom));
  flex-direction: column;
  align-items: stretch;
}

.map-hud > * { pointer-events: auto; }

.loc-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  color: var(--amber-light);
  background: rgba(16, 11, 6, 0.82);
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: 999px;
  box-shadow: var(--shadow-amber);
  backdrop-filter: blur(6px);
}

.demo-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  background: rgba(16, 11, 6, 0.72);
  border: 1px solid var(--line-soft);
  padding: 5px 10px;
  border-radius: 999px;
  margin-top: 8px;
}

.map-hud-bottom .btn {
  width: 100%;
  min-height: 44px;
}
.map-hud-bottom .btn-primary { margin-bottom: 8px; }
.map-hud-bottom .btn-secondary {
  background: rgba(16, 11, 6, 0.72);
  backdrop-filter: blur(6px);
}

/* ---------- 바텀시트 (호스트 카드 / 잠긴 동네) ---------- */

.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 700;
  max-width: 480px;
  margin: 0 auto;
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--line);
  border-bottom: none;
  border-radius: 20px 20px 0 0;
  padding: 22px 20px max(22px, env(safe-area-inset-bottom));
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5);
  animation: sheetFade 0.22s ease-out;
}
.sheet[hidden] { display: none; }

@keyframes sheetFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.sheet-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 32px;
  height: 32px;
  min-width: 44px;
  min-height: 44px;
  margin: -6px -6px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 16px;
}

.sheet-kicker {
  font-size: 12px;
  font-weight: 700;
  color: var(--amber);
  margin: 0 0 6px;
}
.sheet-title {
  font-size: 19px;
  font-weight: 800;
  margin: 0 0 6px;
  color: var(--text);
}
.sheet-sub {
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.5;
  margin: 0 0 18px;
}

/* ---------- 호스트 마커 (앰버 펄스) ---------- */

.host-icon {
  position: relative;
  width: 36px;
  height: 36px;
}
.host-pulse {
  position: absolute;
  left: 3px;
  top: 3px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 183, 87, 0.38);
  animation: hostPulse 2.4s ease-out infinite;
}
.host-dot {
  position: absolute;
  left: 11px;
  top: 11px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--amber-light), var(--amber));
  box-shadow: 0 0 0 3px rgba(16, 11, 6, 0.92), 0 0 14px rgba(255, 183, 87, 0.85);
}
.host-label {
  position: absolute;
  left: 42px;
  top: 8px;
  white-space: nowrap;
  background: rgba(16, 11, 6, 0.85);
  color: var(--amber-light);
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  pointer-events: none;
}
@keyframes hostPulse {
  0% { transform: scale(0.4); opacity: 0.85; }
  100% { transform: scale(2); opacity: 0; }
}

/* ---------- 행인 점 (은은한 배회) ---------- */

.ped-icon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(243, 229, 208, 0.5);
  box-shadow: 0 0 5px rgba(243, 229, 208, 0.3);
}
.leaflet-marker-icon.ped-icon-wrap {
  transition: transform 3.6s linear;
}

@media (min-width: 640px) {
  .map-hud-bottom { align-items: center; }
  .map-hud-bottom .btn { max-width: 320px; }
  .sheet { border-radius: 20px; bottom: 20px; left: 50%; right: auto; transform: translateX(-50%); margin: 0; }
  .sheet[hidden] { display: none; }
}
