/* ========================================
   グローバルスタイル
======================================== */
:root {
	/* お知らせ用：モダンアンバーパレット */
	--news-accent: #ffd43b;       /* 少し明るく、かつ高級感のあるアンバー */
	--news-accent-hover: #f59e0b; /* ホバー時は少し濃く */
	--news-on-accent: #451a03;    /* アクセント色上の文字色（白） */
	--news-bg-light: #fffbeb;     /* 非常に薄い背景（アコーディオン背景等） */
	--news-text-dark: #451a03;    /* より深い茶色（コントラスト確保用） */
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
    font-family: 'Noto Sans JP', sans-serif;
}

body {
	overflow: hidden;
	height: 100dvh;
	width: 100dvw;
	position: relative;
}

/* ========================================
   地図コンテナ
======================================== */
#map-container {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 1;
}

/* MapLibre ズーム（+ / -）: 既定より大きくタップしやすく・アイコン中央揃え */
/* 注: 出典(Attribution)も .maplibregl-ctrl-bottom-right に入るため、モバイルで角コンテナを動かすと出典までずれる。ズームは JS で top-right に分離する */
#map-container .maplibregl-ctrl-bottom-right {
	right: 12px;
}
#map-container .maplibregl-ctrl-group {
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}
#map-container .maplibregl-ctrl-group > button {
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}
#map-container .maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon,
#map-container .maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon {
	width: 26px !important;
	height: 26px !important;
	margin: 0 !important;
	background-position: center center;
	background-repeat: no-repeat;
	flex-shrink: 0;
	position: static;
	inset: auto;
}
@media (max-width: 767px) {
	/* ズームのみ top-right（お知らせの下）。出典は bottom-right のまま */
	#map-container .maplibregl-ctrl-top-right {
		top: calc(60px + 36px + 10px);
		right: 10px;
	}
}
@media (min-width: 768px) {
	#map-container .maplibregl-ctrl-bottom-right {
		bottom: 14px;
	}
}

#headerPanel {
	position: relative;
	width: 100%;
	height: 50px;
	background: #fff;
	z-index: 10;
	display: flex;
	align-items: center;
	padding: 0 12px;
}
/* 案A: ロゴ＋テキスト横並び（モバイル・PC共通） */
.header-inner {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	min-width: 0;
}
.header-logo {
	height: 36px;
	width: auto;
	flex-shrink: 0;
}
.header-title {
	font-size: 0.875rem;
	font-weight: 600;
	color: #333;
	margin: 0;
	line-height: 1.3;
	word-break: break-word;
	overflow-wrap: break-word;
}
@media  (max-width: 767px) {
	/*
	 * 一覧バー(50px)の上に出典帯、その上に凡例・外部リンク等（縦方向でかぶらないよう積む）
	 */
	:root {
		--m-map-canvas-h: 50px;
		--m-map-attrib-estimate: 30px;
		--m-map-ui-gap: 10px;
		--m-map-float-bottom: calc(var(--m-map-canvas-h) + var(--m-map-attrib-estimate) + var(--m-map-ui-gap));
	}
	.maplibregl-ctrl-attrib {
		bottom: var(--m-map-canvas-h);
		left: 12px;
		right: 12px;
		width: auto;
		max-width: calc(100vw - 24px);
		margin: 0 auto;
		text-align: center;
		box-sizing: border-box;
		padding: 3px 6px 2px;
		font-size: 10px;
		line-height: 1.25;
		background: rgba(255, 255, 255, 0.9);
		border-radius: 4px 4px 0 0;
		z-index: 3;
	}
	.header-logo {
		height: 28px;
	}
	.header-title {
		font-size: 0.7rem;
	}
}


/* ========================================
   お知らせ/リンク/規制情報ボタン
======================================== */
/*ボタン位置*/
.map-controls {
	position: absolute;
	top: 60px;
	right: 10px;
	z-index: 10;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 0;
}

.canvas-btn {
	position: absolute;
	bottom: 0;
	right:0;
	left:0;
	z-index: 10;
	height: 50px;
	display: flex;
	justify-content: space-between;
	font-size: 0.875rem;
	font-weight: 600;
	color: #808080;
	
}
/*影*/
.add-shadow {
	-webkit-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.3);
	box-shadow: 0 3px 5px rgba(0, 0, 0, 0.3);
}
.add-shadow-bottom {
	box-shadow: 0px -3px 5px rgba(0, 0, 0, 0.3);
}

/*丸ボタン*/
.circle-btn {
	width: 75px;
	height: 50px;
	border-radius: 15%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	line-height: 1;
	box-sizing: border-box;
	background-color: #fffafa;
	transition: all 0.2s ease;
}

.news-btn {
	color: var(--news-accent);
	border: 2px solid var(--news-accent);
}
.news-btn:hover {
	background-color: var(--news-accent);
	color: var(--news-on-accent);
}
.news-btn-text {
	font-size: 0.8rem;
	color: #333;
	font-weight: 600;
}
.news-btn:hover .news-btn-text {
	color: var(--news-on-accent);
}
.link-btn {
	color: #368dff;
	border: 2px solid #368dff;
}
.link-btn:hover {
	background-color: #368dff;
	color: #fffafa;
}
.link-btn-text {
	font-size: 0.8rem;
	color: #333;
	font-weight: 600;
}
.link-btn-text:hover {
	color: #fffafa;
}
/* 免責ボタン（モバイルのみ表示。PCではフッターのため非表示） */
.disclaimer-btn {
	color: #6b7280;
	border: 2px solid #6b7280;
}
.disclaimer-btn:hover {
	background-color: #6b7280;
	color: #fffafa;
}
.disclaimer-btn-text {
	font-size: 0.8rem;
	color: #333;
	font-weight: 600;
}
.disclaimer-btn-text:hover {
	color: #fffafa;
}
/* ========================================
   凡例パネル（左下）
======================================== */
/* 読み込み完了まで非表示（レイアウトシフト防止） */
.legend-panel-loading {
	visibility: hidden;
}
.legend-panel {
	position: absolute;
	left: 20px;
	bottom: 60px;
	background: rgba(255, 255, 255, 0.95);
	padding: 10px 12px;
	border-radius: 8px;
	font-size: 0.6rem;
	z-index: 10;
	max-width: 250px;
/*	transition: bottom 0.1s ease;*/
}
.legend-icon-toggle {
	font-size: 0.875rem;
}
.legend-panel-title {
	font-weight: 600;
	margin-bottom: 8px;
	padding-bottom: 4px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
.legend-item {
	display: flex;
	align-items: center;
	margin-bottom: 5px;
	gap: 6px;
}
.legend-item:last-child {
	margin-bottom: 0;
}
/* 凡例スウォッチの線寸法（単色・エンドポイント付きの色帯で共通） */
.legend-panel-body,
.pc-legend-panel-body {
	--legend-swatch-width: 32px;
	--legend-swatch-height: 4px;
	--legend-endpoint-icon-size: 16px;
}
.legend-color {
	width: var(--legend-swatch-width, 32px);
	height: var(--legend-swatch-height, 4px);
	flex-shrink: 0;
	border-radius: 2px;
}
/* 線端アイコン付き凡例: 色帯幅は上記と同一、アイコンは線の右横 */
.legend-color.legend-color--endpoints {
	display: inline-flex;
	flex-direction: row;
	align-items: center;
	gap: 6px;
	width: auto;
	height: auto;
	min-height: calc(var(--legend-endpoint-icon-size, 16px) + 2px);
	background: transparent;
	border-radius: 0;
	flex-shrink: 0;
}
.legend-color--endpoints .legend-color-bar {
	width: var(--legend-swatch-width, 32px);
	height: var(--legend-swatch-height, 4px);
	flex-shrink: 0;
	border-radius: 2px;
}
.legend-color--endpoints .legend-endpoint-img {
	width: var(--legend-endpoint-icon-size, 16px);
	height: var(--legend-endpoint-icon-size, 16px);
	flex-shrink: 0;
	object-fit: contain;
	pointer-events: none;
}
.legend-item-toggle {
	cursor: pointer;
	user-select: none;
	border-radius: 4px;
	padding: 2px 4px;
	margin: 0 -4px 2px;
	position: relative;
}
.legend-item-toggle:hover {
	background: rgba(0, 0, 0, 0.06);
}
.legend-checkbox {
	width: 14px;
	height: 14px;
	border: 1px solid #999;
	border-radius: 3px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	flex-shrink: 0;
	color: #333;
	font-size: 10px;
}
.legend-item-inactive {
	opacity: 0.45;
}

/* 凡例パネルヘッダー（スマホで折りたたみ用） */
.legend-panel-header {
	display: none; /* PCでは非表示 */
}

/* 種別リスト（凡例パネル内） */
.type-item {
	display: flex;
	align-items: center;
	margin-bottom: 5px;
	gap: 6px;
}
.type-item:last-child {
	margin-bottom: 0;
}
.type-item-icon {
	flex-shrink: 0;
	object-fit: contain;
}
.type-item-name {
	font-size: 0.875rem;
}
.type-item-toggle {
	cursor: pointer;
	user-select: none;
	border-radius: 4px;
	padding: 2px 4px;
	margin: 0 -4px 2px;
	position: relative;
}
.type-item-toggle:hover {
	background: rgba(0, 0, 0, 0.06);
}
.type-item-inactive {
	opacity: 0.45;
}
.type-item-inactive .legend-checkbox {
	/* チェックが外れた状態はJSで制御（中身を空にする） */
}

@media (max-width: 767px) {
	.legend-panel {
		bottom: var(--m-map-float-bottom, 90px);
		left: 12px;
		max-width: min(13rem, 46vw);
		padding: 6px 10px;
	}
	.legend-panel-header {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 6px;
		cursor: pointer;
		user-select: none;
		font-size: 11px;
		font-weight: 600;
		padding: 2px 0;
	}
	.legend-panel-header:hover {
		opacity: 0.9;
	}
	.legend-panel-chevron {
		font-size: 10px;
		transition: transform 0.2s ease;
	}
	.legend-panel.collapsed .legend-panel-chevron {
		transform: rotate(-90deg);
	}
	.legend-panel-body {
		max-height: 180px;
		overflow-y: auto;
		overflow-x: hidden;
		scrollbar-gutter: stable;
		transition: max-height 0.36s cubic-bezier(0.22, 1, 0.36, 1);
	}
	.legend-panel.collapsed .legend-panel-body {
		max-height: 0;
		padding-top: 0;
		padding-bottom: 0;
		margin: 0;
		overflow: hidden;
	}
	.legend-panel-title {
		font-size: 11px;
		margin-bottom: 6px;
		padding-bottom: 3px;
	}
	.legend-item {
		margin-bottom: 4px;
		gap: 6px;
	}
	.legend-panel-body,
	.pc-legend-panel-body {
		--legend-swatch-width: 26px;
		--legend-swatch-height: 3px;
		--legend-endpoint-icon-size: 20px;
	}
	.legend-color.legend-color--endpoints {
		gap: 5px;
	}
	.type-item {
		margin-bottom: 4px;
		gap: 5px;
	}
	.type-item-icon {
		width: 12px;
		height: 12px;
	}
	/* 凡例パネル内の種別アイコンのみ大きく（一覧カード等は上記のまま） */
	.legend-panel-body .type-item-icon,
	#legendPanelBody .type-item-icon {
		width: 20px;
		height: 20px;
	}
	.type-item-name {
		font-size: 11px;
	}
	.legend-icon-toggle {
		font-size: 11px;
		margin-bottom: 0;
	}
	/* 一覧カード・詳細ヘッダーの種別アイコン（スマホでやや小さく） */
	.regu-card-type-icon,
	.regu-card-type-icon--placeholder {
		width: 18px;
		height: 18px;
	}
	/* お知らせのみ右上（コンパクト） */
	.map-controls-stack {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		width: max-content;
		max-width: calc(100vw - 24px);
		box-sizing: border-box;
	}
	.map-controls-stack .news-btn.circle-btn {
		min-width: 7.25rem;
		height: 36px;
		border-width: 1px;
		border-radius: 8px;
		padding: 0 10px;
		box-sizing: border-box;
	}
	.map-controls-stack .news-btn-text {
		font-size: 0.75rem;
	}
	/* 外部リンク・免責: 出典帯より上（凡例行と揃える） */
	.map-controls-bottom {
		position: absolute;
		bottom: var(--m-map-float-bottom, 90px);
		right: 10px;
		z-index: 10;
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: flex-end;
		gap: 6px;
		max-width: calc(100vw - 24px);
		flex-wrap: wrap;
	}
	.map-controls-bottom .map-corner-btn.circle-btn {
		width: auto;
		min-width: 0;
		height: auto;
		min-height: 28px;
		padding: 4px 9px;
		border-width: 1px;
		border-radius: 999px;
		opacity: 0.94;
		box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
	}
	.map-controls-bottom .link-btn {
		color: #5a9de8;
		border-color: rgba(54, 141, 255, 0.45);
		background-color: rgba(255, 255, 255, 0.94);
	}
	.map-controls-bottom .disclaimer-btn {
		color: #777;
		border-color: rgba(107, 114, 128, 0.35);
		background-color: rgba(255, 255, 255, 0.94);
	}
	.map-controls-bottom .link-btn-text,
	.map-controls-bottom .disclaimer-btn-text {
		font-size: 0.68rem;
		font-weight: 500;
		color: #555;
		line-height: 1.25;
		line-break: strict;
		overflow-wrap: break-word;
		white-space: nowrap;
	}
	.map-controls-bottom .link-btn:hover .link-btn-text {
		color: #fffafa;
	}
	.map-controls-bottom .disclaimer-btn:hover .disclaimer-btn-text {
		color: #fffafa;
	}
}

/* PC：規制一覧オフキャンバス表示時は凡例を開いた分だけ上にずらす */
@media (min-width: 768px) {
	#reguCanvas.show ~ .legend-panel {
		bottom: calc(30dvh + 1rem);
	}
}

/* ========================================
   お知らせ/リンク/規制情報パネル
======================================== */
/*モバイル版*/
@media  (max-width: 767px) {
	/*お知らせパネル(PC版のみ表示)*/
	.news-panel {
		display: none;
	}
	/*modalサイズ*/
	.modal-size {
		width: 80vw;
		height: 80%;
		margin-left: auto;
		margin-right: auto;
	}
}

.offcanvas-bottom {
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
	height: 50dvh !important;

	.offcanvas-header{
		height: 50px;

		.offcanvas-title{
			font-size: 0.875rem;
			font-weight: 600;
			color: #808080;
		}
	}
}
@media  (min-width: 768px) {
	/* PCでもオフキャンバスで規制一覧を表示（スマホ・タブレットと同じUI） */
	.offcanvas-bottom {
		height: 30dvh !important;
	}
}


/*PC版*/
@media  (min-width: 768px) {
	/* PC: ボタンは非表示（上部パネル表示のため）。JS読み込み前の一瞬表示を防ぐ */
	#newsBtn, #linkBtn, #disclaimerBtn {
		display: none !important;
	}
	.map-controls-bottom {
		display: none !important;
	}
	/* お知らせ帯が無いときはヘッダー直下に合わせる（実高に応じて微調整可） */
	body.news-band-empty .map-controls {
		top: 58px;
	}
	#newsPanel.news-panel--empty {
		display: none !important;
	}
	/*ボタン位置(お知らせパネル分下げる)*/
	.map-controls {
		top: 120px;
	}

	/* #pcPanelRegu の縦は下の .pc-panel-accordion 周りの flex で確保（max-height 50vh は廃止） */

	#newsPanel {
		position: relative;
		background-color: white;
		width: 100%;
		max-width: 100%;
		box-sizing: border-box;
		z-index: 10;
		overflow: hidden;
		font-size: 0.875rem;
		font-weight: 500;
		padding: 0;
		margin: 0;
	}
	#newsPanel #news-wrapper {
		width: 100%;
		max-width: 100%;
		box-sizing: border-box;
	}
	#newsPanel .news-accordion {
		width: 100%;
		max-width: 100%;
	}
	#newsPanel .accordion-button {
		width: 100%;
		text-align: left;
	}

	/* お知らせティッカー（右から左へ流れる） */
	.news-panel-summary-btn .news-ticker-wrap {
		flex: 1;
		min-width: 0;
		overflow: hidden;
	}
	.news-ticker-wrap {
		display: block;
		overflow: hidden;
	}
	.news-ticker-marquee {
		display: inline-flex;
		white-space: nowrap;
		animation: news-ticker-scroll 40s linear infinite;
	}
	.news-ticker-text {
		white-space: nowrap;
		padding-right: 3em;
	}
	@keyframes news-ticker-scroll {
		0% { transform: translateX(0); }
		100% { transform: translateX(-50%); }
	}

	/*modalサイズ*/
	.modal-size {
		width: auto;
		height: auto;
		margin-left: auto;
		margin-right: auto;
	}
}

/*お知らせ*/
#newsModal {
	.modal-header {
		background: var(--news-accent);
		color: var(--news-on-accent);
		padding: 0.75rem 1rem;
		border-bottom: none;
	}
	.btn-close {
		filter: brightness(0) invert(1); /* ヘッダーが濃い色になるため×ボタンを白に */
	}
}
/* お知らせアコーディオン */
.news-accordion .accordion-item {
	border-radius: 8px;
	margin-bottom: 8px;
	overflow: hidden;
}
.news-accordion .accordion-button {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--news-text-dark);
	background-color: var(--news-bg-light);
	padding: 0.75rem 1rem;
}
.news-accordion .accordion-button:not(.collapsed) {
	/* 展開時は背景だけアクセント。文字色は閉じた時と同じ（白にしない） */
	background-color: var(--news-accent);
	color: var(--news-text-dark);
}
.news-accordion .accordion-body {
	padding: 0.75rem 1rem;
	background-color: #fff;
	font-size: 0.875rem;
}
/* PCお知らせパネル：「お知らせはN件あります」をタップで開く */
.news-panel-summary {
	font-size: 0.875rem;
	font-weight: 600;
	padding: 0 0.25rem;
}
.news-panel-summary-btn {
	font-size: 0.875rem;
	font-weight: 600;
	cursor: pointer;
	/* 視認性向上のため、帯の文字は「濃い茶色」にする */
	background-color: var(--news-accent) !important;
	color: var(--news-text-dark) !important;
	border-bottom: 2px solid rgba(0,0,0,0.05);
	box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* パネルに立体感を出す */
}
.news-panel-summary-btn::after {
	/* 文字色に合わせ、矢印も濃い茶色に（filter解除） */
	filter: none;
	flex-shrink: 0;
	opacity: 0.92;
}
.news-panel-summary-btn:not(.collapsed) {
	/* 開いている時も視認性を維持 */
	background-color: var(--news-accent) !important;
	color: var(--news-text-dark) !important;
	box-shadow: none;
}
.news-accordion-inner .accordion-item {
	margin-bottom: 6px;
}

/* PC #newsPanel: マーキー文字と Bootstrap シェブロン（::after）の距離（data-bs-* は変更しない） */
@media (min-width: 768px) {
	#newsPanel .news-panel-summary-btn.accordion-button {
		padding-right: 2.85rem;
		gap: 0.65rem;
	}
	#newsPanel .news-panel-summary-btn.accordion-button::after {
		/* 右端との隙間を確保（マーキーと重なりにくくする） */
		margin-inline-end: 0.2rem;
	}
	#newsPanel .news-accordion-inner .accordion-button {
		padding-right: 2.75rem;
	}
}

/* 外部リンクモーダル(共通) */
#linkModal {
	.card-header {
		background: #fff;
		border-bottom: 1px solid #eee;
		border-radius: 12px 12px 0 0;
		padding: 0.5rem 0.75rem;
	}
	.modal-header {
		background: #4481eb; /* 青単色 */
		color: #fff;
		padding: 0.75rem 1rem;
	}
	.modal-description {
		background: #f8f9fa;
		font-size: 0.8rem;
		padding: 8px 12px;
		border-bottom: 1px solid #e5e5e5;
		color: #555;
	}
}

@media (max-width: 767px) {
	#linkModal .link-list .card {
		border-radius: 12px;
		border: 1px solid #e2e8f0;
		box-shadow: 0 4px 14px rgba(15, 23, 42, 0.07);
		overflow: hidden;
		min-height: 4.5rem;
	}
	/* タイトル行: 左ボーダー廃止 → 上端グラデ＋下線で区切るフラット寄りのカード */
	#linkModal .link-list .card-header.link-title {
		position: relative;
		padding: 0.85rem 1rem 0.75rem;
		border-left: none;
		border-bottom: 1px solid #eef2f6;
		background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
	}
	#linkModal .link-list .card-header.link-title::before {
		content: '';
		position: absolute;
		left: 0;
		right: 0;
		top: 0;
		height: 3px;
		background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 50%, #93c5fd 100%);
		border-radius: 12px 12px 0 0;
	}
	#linkModal .link-list .card-header.link-title a {
		font-size: 0.95rem;
		line-height: 1.4;
		font-weight: 600;
		color: #1e40af;
		letter-spacing: 0.01em;
		text-decoration: none;
	}
	#linkModal .link-list .card-header.link-title a:hover {
		color: #1d4ed8;
	}
	#linkModal .link-list .card-body {
		padding: 0.6rem 0.85rem 0.75rem;
		background: #fff;
	}
	#linkModal .link-list .card-text {
		font-size: 0.82rem;
		line-height: 1.55;
		color: #64748b;
	}
	#linkModal .modal-description {
		font-size: 0.78rem;
		line-height: 1.5;
		color: #64748b;
	}
}

/* ========================================
   規制情報リスト（admin と同じクラス名）
======================================== */
/* アコーディオン（department ごと） */
.regu-accordion .accordion-item {
	border-radius: 8px;
	margin-bottom: 8px;
	overflow: hidden;
}
.regu-accordion .accordion-button {
	font-size: 0.875rem;
	font-weight: 600;
	color: #333;
	background-color: #f0f4f8;
	padding: 0.75rem 1rem;
}
.regu-accordion .accordion-button:not(.collapsed) {
	background-color: #e0e8f0;
	color: #1a365d;
}
.regu-accordion .accordion-body {
	padding: 0.5rem 0.75rem 0.75rem;
	background-color: #fff;
}
.regu-card-summary {
	font-size: 0.875rem;
	color: #555;
	line-height: 1.4;
}
/* 規制詳細の座標: カンマ前後で改行されないよう1行にまとめる */
.regu-detail-coords-line {
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}
.regu-detail-coords-value {
	white-space: nowrap;
}

/* 規制詳細パネル: グループ見出し・ラベル/値の整列 */
.regu-detail-group {
	margin-top: 14px;
}
.regu-detail-group:first-child {
	margin-top: 10px;
}
.regu-detail-group-title {
	font-size: 0.8rem;
	font-weight: 700;
	color: #4169e1;
	margin-bottom: 4px;
}
.regu-detail-row {
	display: flex;
	align-items: baseline;
	gap: 8px;
	padding: 6px 0;
	border-bottom: 1px solid #eef0f4;
	font-size: 0.875rem;
}
.regu-detail-row:last-child {
	border-bottom: none;
}
.regu-detail-label {
	flex: 0 0 100px;
	color: #777;
}
.regu-detail-value {
	flex: 1 1 auto;
	font-weight: 600;
	color: #333;
	word-break: break-word;
}
.regu-detail-coords-toggle {
	margin-top: 6px;
	font-size: 0.8rem;
}
.regu-detail-coords-toggle summary {
	cursor: pointer;
	color: #4169e1;
}
.regu-detail-coords-toggle summary::-webkit-details-marker {
	color: #4169e1;
}
.regu-detail-coords-toggle .regu-detail-coords-line {
	margin-top: 6px;
}
.regu-card-header[role="button"] {
	cursor: pointer;
}
/* 一覧カード全体クリック（モバイル等）: シェルに role="button" */
.regu-card[role="button"] {
	cursor: pointer;
}
.regu-card[role="button"]:focus-visible {
	outline: 2px solid #368dff;
	outline-offset: 2px;
}

/*カード*/
.regu-card {
	background: #f8f8ff;
	border-radius: 12px;
	padding: 12px 14px;
	margin-bottom: 12px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
	transition: .2s;
}
.regu-card .card-header,
.regu-card .regu-card-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 8px;
	gap: 8px;
}
.regu-card .card-header .status-badge,
.regu-card .regu-card-header .status-badge {
	max-width: 100%;
	min-width: 0;
	overflow-wrap: break-word;
	word-break: break-word;
	text-align: center;
}
.regu-card .card-header-text {
	font-size: 0.875rem;
	font-weight: 600;
	color: #808080;
}
.regu-card-type-icon {
	width: 24px;
	height: 24px;
	object-fit: contain;
	flex-shrink: 0;
}
.regu-card-type-icon--placeholder {
	display: inline-block;
	width: 24px;
	height: 24px;
	border-radius: 4px;
	background: #e0e4ea;
}

.regu-card:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 10px rgba(0,0,0,.12);
}
.regu-card-highlight {
	box-shadow: 0 0 0 2px #368dff;
	background-color: #e8f4ff !important;
}

/* PC: 規制一覧テーブル（縦スペース節約） */
.regu-table {
	font-size: 13px;
}
.regu-table th {
	white-space: nowrap;
	font-weight: 600;
	color: #555;
}
.regu-table td {
	vertical-align: middle;
}
.regu-table-row-clickable {
	cursor: pointer;
}
.regu-table-row-clickable:hover {
	background-color: #e8f0f8;
}
.regu-table-row-highlight,
.regu-table-row-highlight td {
	background-color: #cce5ff !important;
}

/* PC左：規制一覧テーブル（モダン寄せ・横スクロール・規制単位でグループ化） */
.regu-table-pc-wrap {
	border-radius: 10px;
	overflow-x: auto;
	overflow-y: visible;
	padding: 6px 4px 10px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
	background: #f1f4f9;
}
.regu-table-pc {
	font-size: 0.8125rem;
	--regu-table-header-bg: #2e5ba1;
	--regu-table-header-fg: #fff;
	--regu-entry-border: #b9c8dc;
	--regu-entry-accent: #2e5ba1;
	border-collapse: separate;
	border-spacing: 0;
	width: 100%;
}
.regu-table-pc thead th {
	background: var(--regu-table-header-bg);
	color: var(--regu-table-header-fg);
	font-weight: 600;
	border: none;
	padding: 0.5rem 0.4rem;
	vertical-align: middle;
	white-space: nowrap;
}
/* 規制1件分＝tbody。枠・左アクセントで境界を明確に */
.regu-table-pc tbody.regu-table-entry tr.regu-table-row-pc td {
	vertical-align: middle;
	padding: 0.5rem 0.45rem;
	background: #fff;
	border-color: var(--regu-entry-border);
	border-style: solid;
	border-width: 1px 1px 0 0;
}
/* 左アクセントは種別アイコン列のみ（サブ行の td は :first-child になるため first-child セレクタは使わない） */
.regu-table-pc tbody.regu-table-entry tr.regu-table-row-pc td.regu-table-icon-cell {
	border-left-width: 4px;
	border-left-color: var(--regu-entry-accent);
}
.regu-table-pc tbody.regu-table-entry tr.regu-table-row-pc td:last-child {
	border-right-width: 1px;
}
.regu-table-pc tbody.regu-table-entry tr.regu-table-subrow-pc td {
	background: #f4f7fb;
	border: 1px solid var(--regu-entry-border);
	border-top: 1px dashed #c5d3e3;
	border-left: 1px solid var(--regu-entry-border);
	padding: 0.45rem 0.5rem 0.55rem;
	font-size: 0.75rem;
	line-height: 1.45;
	color: #3d4f63;
}
/* サブ行なし：メイン行の下辺を閉じる */
.regu-table-pc tbody.regu-table-entry tr.regu-table-row-pc:only-child td {
	border-bottom-width: 1px;
	border-bottom-style: solid;
	border-bottom-color: var(--regu-entry-border);
}
/* エントリ間の余白（別tbodyの1行） */
.regu-table-pc tbody.regu-table-entry-gap .regu-table-gap-cell {
	height: 12px;
	padding: 0 !important;
	border: none !important;
	background: transparent !important;
	line-height: 0;
	font-size: 0;
}
.regu-table-pc tbody.regu-table-entry:hover tr.regu-table-row-pc td {
	background-color: #f0f6fc;
}
.regu-table-pc tbody.regu-table-entry:hover tr.regu-table-subrow-pc td {
	background-color: #e6eef8;
}
.regu-table-pc .route-name {
	font-size: inherit;
	margin-top: 0;
}
.regu-table-pc .status-badge {
	font-size: 0.65rem;
	padding: 3px 8px;
}
.regu-table-pc .regu-table-subline + .regu-table-subline {
	margin-top: 0.35rem;
}
/* 種別アイコン列（メイン行とサブ行を rowspan で縦結合） */
.regu-table-pc .regu-table-icon-cell {
	width: 44px;
	padding-left: 0.35rem;
	padding-right: 0.35rem;
}
.regu-table-pc .regu-type-icon-pc {
	display: block;
	margin: 0 auto;
	width: 28px;
	height: 28px;
	object-fit: contain;
}
.regu-table-pc .regu-type-icon-pc--placeholder {
	display: block;
	width: 28px;
	height: 28px;
	margin: 0 auto;
	border-radius: 4px;
	background: #e8ecf1;
}

/* admin と同じ .route-name, .location-name */
.route-name {
	font-size: 0.875rem;
	color: #4169e1;
	margin-top: 4px;
	font-weight: 600;
}

.location-name {
	font-size: 0.875rem;
	color: #333;
	margin-top: 4px;
}

.road-name {
	font-size: 0.875rem;
	color: #4169e1;
	margin-top: 4px;
	font-weight: 600;
}

/*規制情報バッジ*/
.status-badge {
	padding: 4px 12px;
	border-radius: 12px;
	font-size: 0.7rem;
	font-weight: 600;
	border: none;
	white-space: nowrap;
	-webkit-box-shadow: 0 3px 5px rgba(0, 0, 0, 0.3);
	box-shadow: 0 3px 5px rgba(0, 0, 0, 0.3);
}

.status-badge.closed {
	background: #dc3545;
	color: white;
}

.status-badge.alternating {
	background: #ffc107;
	color: #000;
}

/* 詳細 */
#reguPanel {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 50dvh;
	z-index: 9999;
	overflow: hidden;
	border-top-left-radius: 16px;
	border-top-right-radius: 16px;
  }
  
.detail-card {
	height: 100%;
	display: flex;
	flex-direction: column;

	.detail-header {
		height: 50px;
		display: flex;
		align-items: center;

		button {
			display: flex;
			align-items: center;
			font-size: 0.875rem;
			font-weight: 600;
			color: #808080;

		}
	}
}
  
  
/* ここだけスクロール */
.detail-scroll {
	flex: 1;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;

	.card-header {
		background-color: transparent;
	}
}

/* ========================================
   PC左パネル（768px以上）案B
======================================== */
.pc-layout-wrapper {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
}
.pc-map-area {
	position: relative;
	width: 100%;
	height: 100%;
}
.pc-map-area #map-container {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

@media (max-width: 767px) {
	.pc-left-panel-host {
		display: none !important;
	}
	.pc-layout-wrapper {
		display: flex;
		flex-direction: column;
	}
	.pc-map-area {
		flex: 1;
		min-height: 0;
	}
	.pc-legend-type-panel {
		display: none !important;
	}
}

@media (min-width: 768px) {
	/* 左パネルは地図上にオーバーレイ（地図コンテナ幅は固定のまま） */
	.pc-left-panel-host {
		position: absolute;
		left: 0;
		top: 0;
		bottom: 0;
		z-index: 4;
		display: flex;
		flex-direction: row;
		align-items: stretch;
		min-height: 0;
		pointer-events: none;
	}
	.pc-left-panel-host .pc-left-panel,
	.pc-left-panel-host .pc-left-panel-edge-btn {
		pointer-events: auto;
	}
	.pc-left-panel-edge-btn {
		flex-shrink: 0;
		width: 22px;
		padding: 0;
		border: none;
		border-left: 1px solid #e5e5e5;
		background: #fff;
		box-shadow: 2px 0 4px rgba(0, 0, 0, 0.08);
		cursor: pointer;
		display: flex;
		align-items: center;
		justify-content: center;
		color: #555;
		z-index: 4;
	}
	.pc-left-panel-edge-btn:hover {
		background: #f3f4f6;
	}
	.pc-left-panel-edge-btn i {
		transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
	}
	.pc-left-panel {
		transition:
			width 0.36s cubic-bezier(0.22, 1, 0.36, 1),
			min-width 0.36s cubic-bezier(0.22, 1, 0.36, 1),
			opacity 0.28s ease,
			box-shadow 0.28s ease;
	}
	.pc-left-panel-host.pc-left-panel-collapsed .pc-left-panel {
		width: 0 !important;
		min-width: 0 !important;
		padding: 0 !important;
		margin: 0 !important;
		overflow: hidden !important;
		border: none !important;
		box-shadow: none !important;
		opacity: 0;
		pointer-events: none;
	}
	.pc-left-panel-host.pc-left-panel-collapsed .pc-left-panel-edge-btn i {
		transform: rotate(180deg);
	}
	/* ヘッダー・お知らせ欄の下から表示（かぶり防止）。フッター分の bottom を確保 */
	.pc-layout-wrapper {
		display: flex;
		flex-direction: column;
		top: 120px;
		bottom: var(--disclaimer-footer-height);
	}
	body.news-band-empty .pc-layout-wrapper {
		top: 58px;
	}
	.pc-left-panel {
		width: clamp(340px, 50vw, 760px);
		flex-shrink: 0;
		background: #fff;
		overflow-y: auto;
		display: flex;
		flex-direction: column;
	}
	.pc-panel-content {
		flex: 1;
		min-height: 0;
		padding: 12px;
		overflow: hidden;
		display: flex;
		flex-direction: column;
	}
	.pc-panel-accordion {
		flex: 1 1 auto;
		min-height: 0;
		display: flex;
		flex-direction: column;
		overflow: hidden;
	}
	/* 規制情報：残りの縦を優先的に使用 */
	.pc-panel-accordion > .accordion-item:first-child {
		flex: 1 1 auto;
		min-height: 0;
		display: flex;
		flex-direction: column;
	}
	.pc-panel-accordion > .accordion-item:first-child .accordion-collapse.collapse.show {
		flex: 1 1 auto;
		min-height: 0;
		overflow: hidden;
		display: flex !important;
		flex-direction: column;
	}
	.pc-panel-accordion > .accordion-item:first-child .accordion-collapse.collapse.show .accordion-body {
		flex: 1 1 auto;
		min-height: 0;
		overflow-y: auto;
		display: flex;
		flex-direction: column;
	}
	.pc-panel-accordion > .accordion-item:first-child .accordion-collapse.collapse.show .accordion-body > .list-content {
		flex: 1 1 auto;
		min-height: 0;
		overflow-y: auto;
	}
	/* 外部リンク：ヘッダー＋必要最低限のリスト高（残りは規制情報へ） */
	.pc-panel-accordion > .accordion-item:last-child {
		flex: 0 0 auto;
	}
	.pc-panel-accordion .accordion-button {
		font-size: 13px;
		font-weight: 600;
		padding: 0.5rem 0.75rem;
	}
	.pc-panel-accordion .accordion-body {
		font-size: 0.875rem;
		max-height: none;
		overflow: visible;
	}
	#pc-link-list {
		text-align: left;
	}
	.pc-link-item {
		text-align: left;
	}
	/* 外部リンク本文：最低限の高さのみ確保しリンクはスクロール */
	#pcPanelLinks .accordion-body {
		max-height: min(14vh, 120px);
		overflow-y: auto;
		padding-top: 0.35rem;
		padding-bottom: 0.35rem;
	}
	.pc-map-area {
		flex: 1;
		min-width: 0;
		min-height: 0;
		width: 100%;
	}
	.pc-map-area #map-container {
		z-index: 0;
	}
	/* PC版: 凡例・種別を地図右上に配置 */
	.pc-legend-type-panel {
		position: absolute;
		top: 12px;
		right: 12px;
		background: rgba(255, 255, 255, 0.95);
		padding: 10px 12px;
		border-radius: 8px;
		font-size: 0.75rem;
		z-index: 10;
		max-width: 300px;
		overflow: visible;
	}
	.pc-legend-panel-header {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 6px;
		cursor: pointer;
		user-select: none;
		font-size: 12px;
		font-weight: 600;
		padding: 2px 0 8px;
		margin: -2px 0 0;
	}
	.pc-legend-panel-header:hover {
		opacity: 0.92;
	}
	.pc-legend-panel-body {
		max-height: 55vh;
		overflow-y: auto;
		overflow-x: hidden;
		scrollbar-gutter: stable;
		transition: max-height 0.36s cubic-bezier(0.22, 1, 0.36, 1);
	}
	.pc-legend-type-panel.collapsed .pc-legend-panel-body {
		max-height: 0;
		padding-top: 0;
		padding-bottom: 0;
		margin: 0;
		overflow: hidden;
	}
	.pc-legend-panel-chevron {
		font-size: 10px;
		transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
	}
	.pc-legend-type-panel.collapsed .pc-legend-panel-chevron {
		transform: rotate(-90deg);
	}
	.pc-legend-type-panel.collapsed .pc-legend-panel-header {
		padding-bottom: 2px;
		margin-bottom: 0;
	}
	/* PC 右上パネル: 凡例スウォッチ・線端アイコン・種別アイコンをモバイル左下より大きく */
	.pc-legend-type-panel .pc-legend-panel-body {
		--legend-swatch-width: 40px;
		--legend-swatch-height: 5px;
		--legend-endpoint-icon-size: 24px;
	}
	.pc-legend-type-panel .pc-legend-panel-body .type-item-icon {
		width: 24px;
		height: 24px;
	}
	body.pc-left-panel-active .canvas-btn,
	body.pc-left-panel-active .map-controls-bottom,
	body.pc-left-panel-active .legend-panel {
		display: none !important;
	}
}

/* ========================================
   免責・連絡先・著作権フッター（案B: 画面下部固定）
======================================== */
:root {
	--disclaimer-footer-height: 28px;
}
.disclaimer-footer {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	height: var(--disclaimer-footer-height);
	background: #f5f5f5;
	border-top: 1px solid #e0e0e0;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}
.disclaimer-footer-inner {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px;
	padding: 4px 12px;
	font-size: 11px;
	color: #555;
	text-align: center;
	max-width: 100%;
	white-space: nowrap;
}
.disclaimer-footer-contact a {
	color: #368dff;
	text-decoration: none;
}
.disclaimer-footer-contact a:hover {
	text-decoration: underline;
}
.disclaimer-footer-copyright {
	color: #666;
	font-size: 10px;
}
.disclaimer-footer-sep {
	display: none;
}
.disclaimer-footer-link {
	padding: 0 0.25rem;
	font-size: 11px;
	color: #368dff;
	text-decoration: none;
}
.disclaimer-footer-link:hover {
	color: #2563eb;
	text-decoration: underline;
}
/* 免責モーダル */
#disclaimerModal .modal-header {
	background: #6b7280; /* グレー単色 */
	color: #fff;
	padding: 0.75rem 1rem;
	border-bottom: none;
}
#disclaimerModal .modal-body {
	padding: 1.5rem;
}
#disclaimerModal .modal-body p {
	margin-bottom: 1rem;
	font-size: 0.8125rem;
	line-height: 1.65;
	color: #444;
	line-break: strict;
	overflow-wrap: break-word;
}
#disclaimerModal .modal-body p:last-child {
	margin-bottom: 0;
}
#disclaimerModal .modal-body a {
	color: #368dff;
	text-decoration: none;
}
#disclaimerModal .modal-body a:hover {
	text-decoration: underline;
}
#disclaimerModal h2 {
	font-size: 14px;
	font-weight: 700;
	color: #333;
	margin-top: 1.5rem;
	margin-bottom: 0.75rem;
	padding-bottom: 0.25rem;
	border-bottom: 2px solid #eee;
}
@media (max-width: 767px) {
	/* 案A: モバイルではフッター非表示。免責は map-controls のボタンからモーダル表示 */
	.disclaimer-footer {
		display: none !important;
	}
}
@media (min-width: 768px) {
	.disclaimer-footer-inner {
		font-size: 0.875rem;
	}
	.disclaimer-footer-copyright {
		font-size: 11px;
	}
}
