html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

#sidebar {
  width: 320px;
  padding: 10px;
  box-sizing: border-box;
  border-right: 1px solid #ccc;
  background: #f7f7f7;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;

  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #bbb #eee;
}

/* WebKit 스크롤바 */
#sidebar::-webkit-scrollbar {
  width: 6px;
}
#sidebar::-webkit-scrollbar-track {
  background: #eee;
}
#sidebar::-webkit-scrollbar-thumb {
  background: #bbb;
  border-radius: 3px;
}

/* 로그 영역 스크롤바 */
#log {
  scrollbar-width: thin;
  scrollbar-color: #bbb #222;
}
#log::-webkit-scrollbar {
  width: 6px;
}
#log::-webkit-scrollbar-track {
  background: #333;
}
#log::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 3px;
}

/* 고정 경로 목록 스크롤바 */
#fixedRouteList {
  scrollbar-width: thin;
  scrollbar-color: #999 #f0f0f0;
}
#fixedRouteList::-webkit-scrollbar {
  width: 8px;
}
#fixedRouteList::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 4px;
}
#fixedRouteList::-webkit-scrollbar-thumb {
  background: #999;
  border-radius: 4px;
}
#fixedRouteList::-webkit-scrollbar-thumb:hover {
  background: #777;
}

/* 오른쪽 패널: 지도 + 고도 그래프 */
#mapPanel {
  flex: 1;
  display: flex;
  flex-direction: column;
}

#map {
  flex: 3;
}

#elevationChart {
  flex: 1;
  min-height: 120px;
  max-height: 220px;
  border-top: 1px solid #ccc;
  background: #fafafa;
}

h1 {
  font-size: 18px;
  margin: 0 0 8px 0;
}

h2 {
  font-size: 14px;
  margin: 10px 0 4px 0;
}

.section {
  border: 1px solid #ddd;
  padding: 6px;
  border-radius: 4px;
  background: #fff;
}

.section label {
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

button {
  margin: 2px 0;
  padding: 4px 8px;
  font-size: 13px;
  cursor: pointer;
  box-sizing: border-box;
  min-height: 26px;
  border: 1px solid #ccc;
  border-radius: 3px;
  background: #fff;
}

button:hover:not(:disabled) {
  background: #f0f0f0;
}

button:disabled {
  opacity: 0.5;
  cursor: default;
}

/* 고정 경로 목록 아이콘 버튼 */
.route-item-btn {
  padding: 2px 6px;
  min-height: 22px;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

select, input[type="file"], input[type="number"] {
  box-sizing: border-box;
  font-size: 13px;
  padding: 4px 8px;
  min-height: 26px;
  border: 1px solid #ccc;
  border-radius: 3px;
  margin: 2px 0;
  width: 100%;
}

input[type="file"] {
  cursor: pointer;
}

input[type="file"]:hover {
  background: #f0f0f0;
}

#log {
  flex: 1;
  font-size: 12px;
  background: #222;
  color: #eee;
  padding: 4px;
  overflow-y: auto;
  white-space: pre-wrap;
  border-radius: 4px;
}

/* 고정 경로 그리기용 연필 커서 */
.drawing-cursor {
  cursor: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAQCAYAAADJViUEAAABM0lEQVQ4EWNgGAWjYBSMglEwCjAyMDDw7+//B8J8YGBg+A8SNjAwMEjAwPjP8P4nBgYGJgZiAROtJkA0QD9hwP///3+EAWQyMjL8D4r9//+fC4wMjAwMDP+//+fGBgYGBiYCTZg0HQHQPwHwPxP+P3///4vx/+/f3//O4bAwMDLwPbv379G1gYGP4Pxv9//8/EzYbGxsYTv379y9gYGBgYnjx4kVwAhiDbQZgBkuDh4UgwyMgJkUxmBgYGf4/8f4n9n8GBiY+P///4fBgYGhin379m3wPxj+798/GRgYGBh4+vQp7gCjgZsBNGRkZEQyMjBw/v//f4aBgYGJgSKPnz59BuIGRkYGZiYmfg/G/2/9+zMDAwMh8+/YtnAFGg24CUNyMjITCwsLDPy///H4l9kYGJiYqEbAwPD/48eP4AWJAMQAAAYnm5vtPxGkAAAAASUVORK5CYII='), auto;
}

/* 거리/반경 측정용 커서 */
.measure-cursor {
  cursor: crosshair;
}

/* 지도 우측 상단 커스텀 측정 버튼 스타일 */
.leaflet-control-measure-btn a {
  text-align: center;
  width: 30px;
  height: 30px;
  line-height: 30px;
  font-size: 16px;
  text-decoration: none;
}

.measure-btn-active {
  background: #4caf50 !important;
  color: #fff !important;
}

/* 지도 위 측정 라벨 스타일 */
.measure-tooltip {
  background: #ffffff;
  border: 1px solid #333;
  color: #000;
  padding: 2px 4px;
  border-radius: 3px;
  font-size: 11px;
  white-space: nowrap;
}
