html, body { margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; }
#viewDiv, #googleMapDiv { position: absolute; inset: 0; }
#viewDiv { z-index: 1; }
#googleMapDiv {
  z-index: 0;
  display: none;
  pointer-events: none;
  transform-origin: center center;
  will-change: transform;
}
#toolbar { position: absolute; top: 10px; left: 10px; z-index: 99; background: white; padding: 10px; border-radius: 8px; box-shadow: 0 2px 6px rgba(0,0,0,.2); font-family: Arial,sans-serif; min-width: 260px; width: 260px; max-height: calc(100dvh - 20px); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; box-sizing: border-box; }
.mode-btn, .action-btn { display: block; width: 100%; margin-bottom: 6px; padding: 8px 12px; border: 1px solid #999; background: #f5f5f5; cursor: pointer; border-radius: 4px; text-align: left; }
.mode-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; margin-bottom: 6px; }
.mode-row .mode-btn, .action-row .action-btn { width: 100%; text-align: center; }
.action-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 6px; }
.quick-nav-row { display: grid; grid-template-columns: 1fr; margin-bottom: 8px; }
#locateBtn { text-align: center; font-weight: 600; }
.coord-row { display: grid; grid-template-columns: 1fr 1fr 60px; gap: 6px; margin-bottom: 8px; align-items: center; }
.coord-nav-row { display: grid; grid-template-columns: 96px 96px auto; gap: 6px; margin-bottom: 8px; align-items: center; }
.icon-btn { width: 38px; height: 36px; padding: 0; text-align: center; margin-bottom: 0; }
#panCoordBtn { width: 60px; margin-bottom: 0; text-align: center; font-weight: 600; padding: 8px; }
.coord-input { width: 100%; padding: 8px; border: 1px solid #999; border-radius: 4px; box-sizing: border-box; font-size: 13px; }
.toolbar-section-title { margin: 10px 0 6px; font-size: 13px; font-weight: 700; }
.basemap-option { display: block; margin-bottom: 4px; font-size: 13px; cursor: pointer; user-select: none; }
.toolbar-separator { border: 0; border-top: 1px solid #d8d8d8; margin: 10px 0 8px; }
.mode-btn.active { color: white; border-color: transparent; }
#addModeBtn.active { background: #1565c0; } #deleteModeBtn.active { background: #c62828; } #editModeBtn.active { background: #2e7d32; }
#modeText { margin-top: 2px; margin-bottom: 8px; font-size: 14px; }
#editText, #fileText { margin-top: 8px; font-size: 14px; }
.usage-ref { margin-top: 10px; font-size: 12px; line-height: 1.4; color: #333; }
.usage-ref a { color: #0b57d0; text-decoration: none; }.usage-ref a:hover { text-decoration: underline; }
.usage-link { text-decoration: underline; background: #fff59d; padding: 3px 8px; border-radius: 3px; font-weight: 700; font-size: 16px; }
#loadFileInput { display: none; }
@media (max-width:600px) { #toolbar { top:6px; left:6px; padding:6px; width:190px; min-width:190px; max-height:calc(100dvh - 12px); font-size:12px; } .mode-btn,.action-btn,.coord-input { padding:5px 6px; font-size:12px; } .coord-row { grid-template-columns:1fr 1fr; } #panCoordBtn { width:100%; grid-column:1/3; } .toolbar-section-title { margin:6px 0 3px; font-size:12px; } .usage-link { font-size:13px; padding:2px 5px; } #modeText,#editText,#fileText { font-size:11px; } }
