:root {
	--header-h: 56px;
	--panel-min: 64px;
	--panel-max: 58vh;
	--safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
	margin: 0;
	font-family: system-ui,-apple-system,"Segoe UI",Roboto,"Noto Sans JP",sans-serif;
	color: #111;
	font-size: 15px;
	-webkit-text-size-adjust: 100%;
}

/* ヘッダー */
header {
	position: sticky;
	top: 0;
	z-index: 10;
	height: var(--header-h);
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 14px;
	border-bottom: 1px solid #eee;
	background: #fff;
}
h1 {
	margin: 0;
	font-size: 18px;
	font-weight: 800;
}
#status {
	margin-left: auto;
	font-size: 13px;
	color: #374151;
}

#map {
	height: calc(100vh - var(--header-h));
	width: 100%;
}

/* 地図種別切替 */
.maptype {
	position: fixed;
	left: 10px;
	top: 66px;
	z-index: 9000;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	box-shadow: 0 2px 10px rgba(0,0,0,.08);
	padding: 6px;
	display: flex;
	gap: 6px;
	align-items: center;
	font-size: 13px;
}
.maptype button {
	border: 1px solid #e5e7eb;
	background: #fff;
	border-radius: 10px;
	padding: 8px 10px;
	cursor: pointer;
}
.maptype button.active {
	border-color: #2563eb;
	color: #2563eb;
	box-shadow: 0 0 0 2px rgba(37,99,235,.12) inset;
}

/* 一覧パネル */
.panel {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1000;
	height: var(--panel-min);
	max-height: var(--panel-max);
	background: #fff;
	border-top: 1px solid #eee;
	border-radius: 18px 18px 0 0;
	box-shadow: 0 -8px 20px rgba(0,0,0,.12);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transition: height .25s;
}
.panel.open {
	height: var(--panel-max);
}
.panel-header {
	padding: 8px 12px;
	min-height: 48px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	position: sticky;
	top: 0;
	background: #fff;
	border-bottom: 1px solid #f1f5f9;
	z-index: 1;
}
.panel-title {
	font-weight: 800;
	font-size: 15px;
}
.panel-toggle {
	border: 1px solid #e5e7eb;
	background: #fff;
	border-radius: 10px;
	padding: 6px 10px;
	cursor: pointer;
	white-space: nowrap;
}
#list {
	overflow: auto;
	padding: 12px 12px calc(12px + var(--safe-bottom));
}

/* 一覧アイテム */
.item {
	padding: 14px 12px;
	border: 1px solid #eee;
	border-radius: 14px;
	margin-bottom: 12px;
	cursor: pointer;
	background: #fff;
	transition: background .15s, border-color .15s, box-shadow .15s;
	outline: none;
}
.item:hover {
	background: #fafafa;
}
.item:focus {
	box-shadow: 0 0 0 3px rgba(37,99,235,.2);
}
.title {
	font-weight: 800;
	font-size: 16px;
}
.addr {
	margin-top: 4px;
	font-size: 13px;
	color: #6b7280;
}
.desc {
	color: #374151;
	font-size: 14px;
	margin-top: 6px;
	white-space: pre-wrap;
	line-height: 1.6;
}
.empty {
	color: #6b7280;
	text-align: center;
	margin-top: 24px;
	font-size: 14px;
}

/* 凡例 */
.legend {
	position: fixed;
	right: 10px;
	top: 66px;
	z-index: 9999;
	margin: 0;
	background: #fff;
	border: 1px solid #eee;
	border-radius: 12px;
	padding: 10px 12px;
	box-shadow: 0 2px 6px rgba(0,0,0,.06);
	font-size: 13px;
	color: #374151;
}
.legend h4 {
	margin: 0 0 6px;
	font-size: 13px;
	color: #111;
	font-weight: 800;
}
.legend .row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 8px 0;
}
.legend img {
	width: 24px;
	height: 24px;
	display: block;
}

/* マーカー / ポップアップ（InfoWindow 内の中身用） */
.ml-marker {
	width: 36px;
	height: 36px;
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	filter: drop-shadow(0 1px 2px rgba(0,0,0,.25));
	cursor: pointer;
}
.popup {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 10px 12px;
	max-width: 260px;
	box-shadow: 0 10px 20px rgba(0,0,0,.12);
	font-size: 14px;
	line-height: 1.5;
}
.popup .tt {
	font-weight: 800;
}

/* 著作権表示 */
.attribution {
	position: fixed;
	right: 8px;
	bottom: 8px;
	z-index: 500;
	font-size: 12px;
	color: #555;
	background: #fff;
	border: 1px solid #eee;
	border-radius: 10px;
	padding: 4px 8px;
}
