.tacLegend { display: none; }
#mapBox { display: block; width: 100%; box-sizing: border-box; }
#tacCv { display: block; width: 100%; touch-action: manipulation; }
@media (min-width: 900px) {
  #mapBox { padding: 8px 10px 0; }
  .tacLegend { display: block; padding: 4px 4px 8px; font-size: 12px; line-height: 1.5; color: #8fb09b; }
}
@media (max-width: 899px) {
  /* 모바일: 지도는 [지도] 탭을 눌렀을 때만 보인다 (장면 탭에서는 확실히 숨김) */
  #mapBox { display: none; }
  body.connected.topMap #mapBox { display: block; padding: 0; overflow: hidden; }
}
@media (max-width: 480px) {
  /* 좁은 폰: 🌐 전체 지도 칩이 맵 오른쪽 위 방과 겹치지 않게 지도를 칩 아래에서 시작 */
  body.connected.topMap #mapBox { padding-top: 32px; }
  #gmapBtn { top: 4px; }
}

/* 전체 지도(글로벌 맵) */
#mapBox { position: relative; }
#gmapBtn { position: absolute; right: 8px; top: 6px; z-index: 3; font-size: 12px; padding: 3px 9px; border-radius: 999px; background: rgba(8,20,13,.85); border: 1px solid #3f7a4a; color: #C6F24E; cursor: pointer; }
#gmapBtn:hover { background: #1d4528; border-color: #6df29a; }
#gmapWrap { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.72); display: flex; align-items: center; justify-content: center; padding: 12px; }
#gmapWrap[hidden] { display: none; }
.gmBox { width: min(980px, 100%); max-height: 100%; display: flex; flex-direction: column; background: #07110b; border: 1px solid #356343; border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,.6); overflow: hidden; }
.gmHead { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid #2c4a34; color: #9cf7ba; font-size: 13px; }
.gmHead button { min-width: 36px; min-height: 30px; font-size: 14px; }
.gmStage { padding: 6px; overflow: hidden; }
.gmStage canvas { display: block; margin: 0 auto; touch-action: none; cursor: grab; border-radius: 8px; background: #050c08; }
.gmStage canvas:active { cursor: grabbing; }
.gmTools { display: inline-flex; gap: 4px; align-items: center; }
.gmChips { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 10px 0; }
.gmChip { min-height: 26px; padding: 0 9px; font-size: 12px; border-radius: 999px; background: transparent; color: var(--c, #9cf7ba); border: 1px solid var(--c, #3f7a4a); }
.gmChip:hover { background: rgba(255,255,255,.08); }
.gmCap { padding: 6px 12px; min-height: 18px; color: #e8fff0; font-size: 12px; border-top: 1px solid #2c4a34; }
.gmLegend { padding: 0 12px 8px; color: #8fb09b; font-size: 12px; }
.gmRoute { margin-left: 6px; padding: 3px 10px; border: 1px solid #39ff14; border-radius: 6px; background: #12301a; color: #e8fff0; font-size: 12px; cursor: pointer; }
.gmRoute:hover { background: #1c4a28; }
