html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: sans-serif;
}

#map {
  width: 100%;
  height: 100%;
}

.control-panel {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  max-width: calc(100% - 185px);
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  padding: 8px 12px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
  transition: all 0.2s ease-in-out;
}

.control-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* 折りたたみ用共通スタイル */
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.panel-title {
  font-weight: bold;
  font-size: 14px;
  color: #333;
}

.toggle-btn {
  background: none;
  border: none;
  font-size: 12px;
  color: #666;
  cursor: pointer;
  padding: 0 4px;
}

.toggle-btn::after {
  content: "▲";
}

.collapsed .toggle-btn::after {
  content: "▼";
}

.collapsed .panel-content {
  display: none !important;
}

.panel-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* レイヤー切り替えパネルのスタイル */
.layer-toggle-panel {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  padding: 8px 12px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  max-height: 70vh;
  overflow-y: auto;
  transition: all 0.2s ease-in-out;
}

.layer-toggle-panel .panel-content {
  margin-top: 4px;
}

.toggle-subtitle {
  font-weight: bold;
  font-size: 12px;
  color: #666;
  margin-top: 4px;
}

.toggle-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.select-all-item {
  font-weight: bold;
}

.toggle-item input {
  cursor: pointer;
}

.color-indicator {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

.point-color {
  background-color: #e74c3c;
  border-radius: 50%;
}

.mode-status {
  font-size: 11px;
  color: #e67e22;
  font-style: italic;
  margin-left: auto;
}

.panel-divider {
  border: 0;
  border-top: 1px solid #ddd;
  margin: 4px 0;
}

.btn {
  display: inline-block;
  padding: 8px 14px;
  background-color: #3498db;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: bold;
  white-space: nowrap;
}

.btn:hover {
  background-color: #2980b9;
}

.btn-action {
  background-color: #2ecc71;
}

.btn-action:hover {
  background-color: #27ae60;
}

.btn:disabled, .btn-disabled {
  background-color: #bdc3c7 !important;
  color: #7f8c8d !important;
  cursor: not-allowed !important;
  opacity: 0.6;
}

.info-text {
  font-size: 12px;
  color: #555;
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ウォーターマーク設定（サイズ上限・下端揃え・透明度70%） */
#watermark {
  position: fixed;
  bottom: 0;           /* クレジット表示（Leaflet）の最下端に揃える */
  left: 10px;          /* 左端からの余白調整 */
  width: 22vw;         /* スマホ等で画面幅に応じたサイズ */
  max-width: 120px;    /* PC等で大きくなりすぎない上限サイズ */
  height: auto;
  opacity: 0.7;        /* 透明度70% */
  pointer-events: none;
  z-index: 1000;
}