html, body {
	margin: 0;
	padding: 0;
	height: 100%;
	font-family: Arial, Helvetica, sans-serif;
}

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


/* ========================================
   LEAFLET CSS PROTECTION
======================================== */

.leaflet-container {
	overflow: hidden !important;
}

.leaflet-container .leaflet-pane,
.leaflet-container .leaflet-map-pane,
.leaflet-container .leaflet-tile-pane,
.leaflet-container .leaflet-layer {
	position: absolute !important;
	left: 0;
	top: 0;
}

.leaflet-container img {
	max-width: none !important;
	max-height: none !important;
}

.leaflet-container .leaflet-tile {
	position: absolute !important;
	width: 256px !important;
	height: 256px !important;
	max-width: none !important;
	max-height: none !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
}


/* ========================================
   TRAIL NUMBER LABELS
======================================== */

.trail-label {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #c00000;
	color: white;
	border: 2px solid white;
	font-size: 13px;
	font-weight: bold;
	text-align: center;
	line-height: 24px;
	box-shadow: 0 1px 4px rgba(0,0,0,.4);
	cursor: pointer;
}


/* ========================================
   TOP MAP BUTTONS
======================================== */

#topButtons {
	position: fixed;
	z-index: 1200;
	top: 12px;
	right: 12px;
	display: flex;
	gap: 8px;
}

#trailKeyButton,
#locationButton {
	padding: 9px 12px;
	border: 0;
	border-radius: 8px;
	background: white;
	font-size: 14px;
	font-weight: bold;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0,0,0,.30);
}


/* ========================================
   TRAIL KEY PANEL
======================================== */

#trailKey {
	display: none;
	position: fixed;
	z-index: 1199;
	top: 60px;
	right: 12px;
	width: 310px;
	max-height: calc(100vh - 130px);
	overflow-y: auto;
	background: rgba(255,255,255,.97);
	border-radius: 10px;
	padding: 14px;
	box-shadow: 0 3px 14px rgba(0,0,0,.35);
}

#trailKey h2 {
	margin: 0 0 12px 0;
	font-size: 20px;
	text-align: center;
}

.trail-key-row {
	display: flex;
	align-items: flex-start;
	padding: 6px 2px;
	border-bottom: 1px solid #ddd;
	font-size: 14px;
	line-height: 18px;
}

.trail-number {
	display: inline-block;
	min-width: 24px;
	height: 24px;
	margin-right: 8px;
	border-radius: 50%;
	background: #c00000;
	color: white;
	font-size: 13px;
	font-weight: bold;
	text-align: center;
	line-height: 24px;
}

.trail-info {
	flex: 1;
}

.trail-name {
	font-weight: bold;
}

.trail-distance {
	color: #666;
	font-size: 12px;
}

.trail-active {
	cursor: pointer;
}

.trail-active:hover {
	background: #f2f2f2;
}


/* ========================================
   GPS STATUS
   Hidden during normal use. Available for
   future troubleshooting if needed.
======================================== */

#status {
	display: none;
}


/* ========================================
   PHONE
======================================== */

@media (max-width: 600px) {

	#trailKey {
		left: 10px;
		right: 10px;
		width: auto;
		top: 58px;
		max-height: 65vh;
	}

	#topButtons {
		top: 8px;
		right: 8px;
		gap: 6px;
	}

	#trailKeyButton,
	#locationButton {
		padding: 8px 10px;
		font-size: 13px;
	}

}