body {
	margin: 0;
	padding: 0;
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	height: 100vh;
	overflow: hidden;
}

.container {
	width: 100%;
	height: 100vh;
	position: relative;
}

.map-container {
	width: 100%;
	height: 100vh;
	position: relative;
}

#map {
	width: 100%;
	height: 100vh;
}

#controls {
	position: absolute;
	top: 20px;
	left: 20px;
	background: rgba(255, 255, 255, 0.95);
	padding: 20px;
	border-radius: 8px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
	min-width: 140px;
	max-width: 200px;
	max-height: 80vh;
	overflow-y: auto;
	backdrop-filter: blur(10px);
}

#controls h2 {
	margin: 0 0 5px 0;
	color: #333;
	font-size: 18px;
	border-bottom: 2px solid #4caf50;
	padding-bottom: 5px;
}

.description {
	margin: 0 0 15px 0;
	font-size: 12px;
	color: #666;
	font-style: italic;
	line-height: 1.3;
}

#controls h3 {
	margin: 15px 0 10px 0;
	color: #555;
	font-size: 14px;
}

.control-group {
	margin-bottom: 15px;
	padding-bottom: 10px;
	border-bottom: 1px solid #eee;
}

.control-group:last-child {
	border-bottom: none;
}

label {
	display: block;
	margin-bottom: 8px;
	font-size: 14px;
	color: #666;
	cursor: pointer;
}

input[type='checkbox'] {
	margin-right: 8px;
}

input[type='text'] {
	width: 100%;
	padding: 8px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	box-sizing: border-box;
}

button {
	width: 100%;
	padding: 8px;
	margin-top: 5px;
	background: #4caf50;
	color: white;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	transition: background 0.3s;
}

button:hover {
	background: #45a049;
}

#stats p {
	margin: 5px 0;
	font-size: 13px;
	color: #666;
}

#point-details {
	background: #f9f9f9;
	padding: 10px;
	border-radius: 4px;
	margin-top: 10px;
}

#point-info {
	font-size: 12px;
	line-height: 1.4;
}

#point-info p {
	margin: 3px 0;
}

#point-info strong {
	color: #333;
}

/* MapLibre attribution control positioning */
.maplibre-ctrl-attrib {
	right: 25px !important;
}

#data-attribution {
	margin-top: 15px;
	padding: 10px;
	background: #e7f3ff;
	border-radius: 4px;
	border: 1px solid #b3d9ff;
	font-size: 0.85em;
}

#data-attribution p {
	margin: 0;
	color: #2c5aa0;
}

#data-attribution small {
	color: #666;
	font-style: italic;
}

#disclaimer {
	margin-top: 15px;
	padding: 10px;
	background: #fff3cd;
	border-radius: 4px;
	border: 1px solid #ffeaa7;
	font-size: 0.8em;
}

#disclaimer h4 {
	margin: 0 0 8px 0;
	color: #856404;
	font-size: 0.9em;
	font-weight: bold;
}

#disclaimer p {
	margin: 3px 0;
	color: #856404;
	line-height: 1.3;
}

#creation-notice {
	margin-top: 15px;
	padding: 10px;
	background: #e7f3ff;
	border-radius: 4px;
	border: 1px solid #b3d9ff;
	font-size: 0.8em;
}

#creation-notice h4 {
	margin: 0 0 8px 0;
	color: #2c5aa0;
	font-size: 0.9em;
	font-weight: bold;
}

#creation-notice p {
	margin: 3px 0;
	color: #2c5aa0;
	line-height: 1.3;
}

#loading {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: rgba(255, 255, 255, 0.95);
	padding: 30px;
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
	text-align: center;
	z-index: 1000;
}

.spinner {
	border: 4px solid #f3f3f3;
	border-top: 4px solid #4caf50;
	border-radius: 50%;
	width: 40px;
	height: 40px;
	animation: spin 1s linear infinite;
	margin: 0 auto 15px;
}

@keyframes spin {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

/* MapLibre popup styling */
.maplibregl-popup-content {
	padding: 15px;
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.maplibregl-popup-content h4 {
	margin: 0 0 10px 0;
	color: #333;
}

.maplibregl-popup-content p {
	margin: 3px 0;
	font-size: 13px;
}

/* Responsive design */
@media (max-width: 768px) {
	#controls {
		position: fixed;
		bottom: 20px;
		left: 50%;
		transform: translateX(-50%);
		top: auto;
		max-height: 40vh;
		min-width: auto;
		max-width: calc(100vw - 40px);
		width: auto;
	}

	#controls h2 {
		font-size: 16px;
	}
}

/* Hide controls when map is small */
@media (max-width: 480px) {
	#controls {
		transform: translateX(-50%) translateY(calc(100% - 50px));
		transition: transform 0.3s ease;
	}

	#controls:hover {
		transform: translateX(-50%) translateY(0);
	}

	#controls::before {
		content: '▲ 設定パネル';
		position: absolute;
		top: -30px;
		left: 0;
		right: 0;
		background: rgba(255, 255, 255, 0.9);
		text-align: center;
		padding: 5px;
		border-radius: 8px 8px 0 0;
		font-size: 12px;
		color: #666;
	}
}
