/* 接骨院検索（店舗検索スタイル） — テーマのメインカラー #0285bb に合わせる */

.tjs-cf {
	--tjs-cf-main: #0285bb;
	--tjs-cf-main-dark: #02648c;
	--tjs-cf-accent: #d93025;
	--tjs-cf-line: #d9dee3;
	--tjs-cf-bg: #f5f7f9;
	--tjs-cf-text: #222;
	--tjs-cf-muted: #667;
	color: var(--tjs-cf-text);
	font-size: 15px;
	line-height: 1.6;
	margin: 0 0 40px;
}

.tjs-cf *,
.tjs-cf *::before,
.tjs-cf *::after {
	box-sizing: border-box;
}

.tjs-cf-page .tjs-cf-lead {
	text-align: center;
	margin: -30px 0 24px;
	color: var(--tjs-cf-muted);
}

.tjs-cf .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* ---------- ボタン ---------- */

.tjs-cf__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 44px;
	padding: 0 18px;
	border: 1px solid var(--tjs-cf-main);
	border-radius: 6px;
	background: #fff;
	color: var(--tjs-cf-main-dark);
	font: inherit;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
	white-space: nowrap;
}

.tjs-cf__btn:hover {
	background: #eaf5fa;
}

.tjs-cf__btn:focus-visible,
.tjs-cf__input:focus-visible,
.tjs-cf__area:focus-visible {
	outline: 3px solid #ffbf47;
	outline-offset: 1px;
}

.tjs-cf__btn--primary {
	background: var(--tjs-cf-main);
	color: #fff;
}

.tjs-cf__btn--primary:hover {
	background: var(--tjs-cf-main-dark);
}

.tjs-cf__btn--small {
	min-height: 36px;
	padding: 0 12px;
	font-size: 13px;
}

.tjs-cf__btn:disabled {
	opacity: .6;
	cursor: wait;
}

/* ---------- 検索パネル（地図の左上に重ねる。スマホでは地図の上） ---------- */

.tjs-cf__panel {
	position: absolute;
	z-index: 600; /* Leaflet の地図・ピン（400番台）より上 */
	top: 12px;
	left: 12px; /* 地図の左端に置く（マクドナルドの店舗検索と同じ） */
	width: 300px;
	max-height: calc(100% - 24px);
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 6px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, .25);
	overflow: hidden;
}

.tjs-cf__modes {
	display: flex;
	align-items: stretch;
	border-bottom: 1px solid var(--tjs-cf-line);
	background: var(--tjs-cf-bg);
}

.tjs-cf__mode {
	flex: 0 0 auto;
	padding: 10px 14px;
	border: 0;
	border-right: 1px solid var(--tjs-cf-line);
	background: transparent;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	color: var(--tjs-cf-muted);
	cursor: pointer;
}

.tjs-cf__mode.is-active {
	background: #fff;
	color: var(--tjs-cf-text);
	box-shadow: inset 0 3px 0 var(--tjs-cf-main);
}

.tjs-cf__reset {
	margin-left: auto;
	padding: 0 12px;
	border: 0;
	background: transparent;
	font: inherit;
	font-size: 12px;
	font-weight: 700;
	color: var(--tjs-cf-muted);
	cursor: pointer;
}

.tjs-cf__reset:hover {
	color: var(--tjs-cf-main-dark);
	text-decoration: underline;
}

.tjs-cf__form {
	display: flex;
	margin: 12px 12px 0;
}

.tjs-cf__input {
	flex: 1;
	min-width: 0;
	min-height: 40px;
	padding: 0 10px;
	border: 1px solid #b8c0c8;
	border-right: 0;
	border-radius: 4px 0 0 4px;
	font: inherit;
	font-size: 16px; /* iPhoneで入力時に拡大されないように */
	background: #fff;
}

.tjs-cf__search-btn {
	flex: 0 0 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 0 4px 4px 0;
	background: var(--tjs-cf-main);
	color: #fff;
	cursor: pointer;
}

.tjs-cf__search-btn:hover {
	background: var(--tjs-cf-main-dark);
}

.tjs-cf__options {
	display: flex;
	gap: 6px;
	margin: 8px 12px 12px;
	min-width: 0;
}

.tjs-cf__locate {
	flex: 0 0 auto;
}

.tjs-cf__area {
	flex: 1 1 0;
	min-width: 0;
	min-height: 36px;
	padding: 0 6px;
	border: 1px solid #b8c0c8;
	border-radius: 4px;
	font: inherit;
	font-size: 13px;
	background: #fff;
}

/* 絞り込み検索（外傷認定など。項目が増えたらこの中でスクロール） */
.tjs-cf__filter {
	display: flex;
	flex-direction: column;
	min-height: 0;
	border-top: 1px solid var(--tjs-cf-line);
}

.tjs-cf__filter[hidden] {
	display: none;
}

.tjs-cf__filter-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 6px 12px;
	border: 0;
	background: #d9dee3;
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	color: var(--tjs-cf-text);
	cursor: pointer;
}

.tjs-cf__filter-head::after {
	content: "▲";
	font-size: 10px;
	color: var(--tjs-cf-muted);
}

.tjs-cf__filter-head[aria-expanded="false"]::after {
	content: "▼";
}

.tjs-cf__features {
	list-style: none;
	margin: 0;
	padding: 0 12px;
	overflow-y: auto;
	min-height: 0;
}

.tjs-cf__features[hidden] {
	display: none;
}

.tjs-cf__features li {
	margin: 0;
	border-bottom: 1px solid var(--tjs-cf-line);
}

.tjs-cf__frow {
	display: grid;
	grid-template-columns: 30px 1fr auto;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 8px 0;
	border: 0;
	background: transparent;
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.tjs-cf__frow:focus-visible {
	outline: 3px solid #ffbf47;
	outline-offset: -2px;
}

.tjs-cf__ficon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 4px;
	color: #fff;
	font-size: 15px;
	font-weight: 700;
}

.tjs-cf__ficon--0 { background: #c0392b; }
.tjs-cf__ficon--1 { background: #2980b9; }
.tjs-cf__ficon--2 { background: #e67e22; }
.tjs-cf__ficon--3 { background: #8e44ad; }
.tjs-cf__ficon--4 { background: #16a085; }
.tjs-cf__ficon--5 { background: #7f8c8d; }

.tjs-cf__fname {
	font-size: 14px;
	line-height: 1.3;
}

.tjs-cf__fname small {
	display: block;
	font-size: 11px;
	color: var(--tjs-cf-muted);
}

/* OFF／ON のスイッチ */
.tjs-cf__switch {
	position: relative;
	width: 44px;
	height: 22px;
	border-radius: 11px;
	background: #c9ced3;
	transition: background .15s;
}

.tjs-cf__switch::before {
	content: "";
	position: absolute;
	top: 2px;
	left: 2px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
	transition: left .15s;
}

.tjs-cf__switch span {
	position: absolute;
	right: 5px;
	top: 0;
	line-height: 22px;
	font-size: 9px;
	font-weight: 700;
	color: #fff;
}

.tjs-cf__frow[aria-checked="true"] .tjs-cf__switch {
	background: var(--tjs-cf-main);
}

.tjs-cf__frow[aria-checked="true"] .tjs-cf__switch::before {
	left: 24px;
}

.tjs-cf__frow[aria-checked="true"] .tjs-cf__switch span {
	right: auto;
	left: 6px;
}

.tjs-cf-card__features {
	margin: 6px 0 0 36px;
}

.tjs-cf-badge {
	display: inline-block;
	margin: 0 4px 0 0;
	padding: 1px 8px;
	border-radius: 10px;
	background: #e7f3f8;
	border: 1px solid #9fd0e3;
	color: var(--tjs-cf-main-dark);
	font-size: 12px;
	font-weight: 700;
}

/* ---------- 本体（地図は横幅いっぱい、その下にリスト） ---------- */

/* 地図を画面の横幅いっぱいに広げるので、ページに横スクロールが出ないようにする */
body:has(.tjs-cf__map-wrap) {
	overflow-x: hidden;
	overflow-x: clip;
}

.tjs-cf__tabs {
	display: none;
}

.tjs-cf__body {
	margin-top: 16px;
}

.tjs-cf__map-wrap {
	position: relative;
	width: 100vw;
	margin-left: calc(50% - 50vw); /* 本文の幅（最大1200px）から左右にはみ出して画面いっぱいに */
	height: min(78vh, 760px);
	min-height: 520px;
	border-top: 1px solid var(--tjs-cf-line);
	border-bottom: 1px solid var(--tjs-cf-line);
}

.tjs-cf__map {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.tjs-cf__redo {
	position: absolute;
	top: 14px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 500;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}

.tjs-cf__redo[hidden] {
	display: none;
}

.tjs-cf__list {
	margin-top: 24px;
}

.tjs-cf__status {
	margin: 0 0 14px;
	font-size: 17px;
	font-weight: 700;
	color: var(--tjs-cf-main-dark);
}

.tjs-cf__results {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
	gap: 16px;
}

.tjs-cf__more {
	display: flex;
	min-width: 280px;
	margin: 24px auto 0;
}

.tjs-cf__more[hidden] {
	display: none;
}

/* ---------- 1件分のカード ---------- */

.tjs-cf-card {
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 16px;
	background: #fff;
	border: 1px solid var(--tjs-cf-line);
	border-radius: 10px;
	transition: box-shadow .15s, border-color .15s;
}

.tjs-cf-card:hover {
	box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
}

.tjs-cf-card.is-selected {
	background: #f3fafd;
	border-color: var(--tjs-cf-main);
	box-shadow: 0 0 0 3px rgba(2, 133, 187, .25);
}

.tjs-cf-card__head {
	display: flex;
	align-items: flex-start;
	gap: 10px;
}

.tjs-cf-card__num {
	flex: 0 0 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--tjs-cf-main);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-top: 1px;
}

.tjs-cf-card__num.is-nomap {
	background: #9aa3ab;
}

#page .tjs-cf-card__name,
.tjs-cf-card__name {
	flex: 1;
	margin: 0;
	padding: 0;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.4;
	border: 0;
	background: none;
}

#page .tjs-cf-card__name::before,
#page .tjs-cf-card__name::after {
	content: none;
}

.tjs-cf-card__dist {
	flex: 0 0 auto;
	font-size: 13px;
	font-weight: 700;
	color: var(--tjs-cf-accent);
	margin-top: 2px;
}

.tjs-cf-card__person,
.tjs-cf-card__addr {
	margin: 4px 0 0 36px;
	font-size: 14px;
}

.tjs-cf-card__person {
	color: var(--tjs-cf-muted);
}

.tjs-cf-card__actions {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr; /* 電話・地図で見る・ルート案内 を1行に */
	gap: 6px;
	margin: auto 0 0; /* カードの高さがそろうよう、ボタンは下にそろえる */
	padding-top: 12px;
}

.tjs-cf-card__actions .tjs-cf__btn {
	padding: 0 6px;
}

.tjs-cf-card__nomap {
	font-size: 12px;
	color: var(--tjs-cf-muted);
	align-self: center;
}

/* ---------- 地図のピン（番号なし・全件） ---------- */

.tjs-cf-pin {
	background: none;
	border: 0;
}

.tjs-cf-pin span {
	display: block;
	width: 22px;
	height: 22px;
	margin: 1px 0 0 1px;
	border-radius: 50% 50% 50% 0;
	transform: rotate(-45deg);
	background: var(--tjs-cf-main, #0285bb);
	border: 2px solid #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .45);
}

/* ピンの真ん中の白い点 */
.tjs-cf-pin span::after {
	content: "";
	position: absolute;
	top: 6px;
	left: 6px;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #fff;
}

.tjs-cf-pin.is-dim span {
	opacity: .35;
	box-shadow: none;
}

.tjs-cf-pin.is-selected span {
	background: var(--tjs-cf-accent, #d93025);
	opacity: 1;
}

/* 東京都柔道整復師会の印（接骨院のピンと区別する紺の建物マーク） */
.tjs-cf-office {
	background: none;
	border: 0;
}

.tjs-cf-office span {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 6px;
	background: #1b2465;
	border: 2px solid #fff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .5);
}

/* ---------- ピンの吹き出し ---------- */

.tjs-cf-pop {
	font-size: 13px;
	line-height: 1.6;
	min-width: 220px;
}

.tjs-cf-pop__name {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	font-size: 15px;
	margin-bottom: 2px;
}

.tjs-cf-pop__dist {
	flex: 0 0 auto;
	color: var(--tjs-cf-accent, #d93025);
	font-size: 12px;
}

.tjs-cf-pop__person {
	color: #667;
}

.tjs-cf-pop__badges {
	margin: 4px 0;
}

.tjs-cf-pop__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 8px;
}

.leaflet-popup-content .tjs-cf-pop__actions a.tjs-cf__btn {
	color: var(--tjs-cf-main-dark, #02648c);
	min-height: 32px;
}

/* ---------- 検索パネルの中の一覧（検索したときだけ） ---------- */

.tjs-cf__plist {
	list-style: none;
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--tjs-cf-line);
	overflow-y: auto;
	flex: 1 1 auto;
	min-height: 120px;
}

.tjs-cf__plist[hidden] {
	display: none;
}

.tjs-cf__plist li {
	margin: 0;
	border-bottom: 1px solid var(--tjs-cf-line);
}

.tjs-cf__prow {
	display: block;
	width: 100%;
	padding: 9px 12px;
	border: 0;
	background: #fff;
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.tjs-cf__prow:hover {
	background: #f3fafd;
}

.tjs-cf__prow.is-selected {
	background: #eaf5fa;
	box-shadow: inset 4px 0 0 var(--tjs-cf-accent, #d93025);
}

.tjs-cf__prow:focus-visible {
	outline: 3px solid #ffbf47;
	outline-offset: -3px;
}

.tjs-cf__prow-head {
	display: flex;
	justify-content: space-between;
	gap: 8px;
}

.tjs-cf__prow-name {
	font-size: 14px;
	font-weight: 700;
	color: var(--tjs-cf-main-dark);
	line-height: 1.35;
}

.tjs-cf__prow-dist {
	flex: 0 0 auto;
	font-size: 12px;
	font-weight: 700;
	color: var(--tjs-cf-accent, #d93025);
}

.tjs-cf__prow-addr {
	display: block;
	margin-top: 2px;
	font-size: 12px;
	color: var(--tjs-cf-muted);
	line-height: 1.4;
}

.tjs-cf__prow-badges {
	display: block;
	margin-top: 3px;
}

.tjs-cf__prow-more {
	padding: 8px 12px;
	font-size: 12px;
	color: var(--tjs-cf-muted);
}

/* 一覧の行にマウスを乗せたときの地図のピン */
.tjs-cf-pin.is-hover span {
	transform: rotate(-45deg) scale(1.35);
	opacity: 1;
	background: var(--tjs-cf-main-dark, #02648c);
}

.tjs-cf-pin.is-hover {
	z-index: 10000 !important;
}

/* 一覧があるときは絞り込み項目の欄の高さを抑える（一覧に場所を譲る） */
.tjs-cf__filter .tjs-cf__features {
	max-height: 170px;
}

/* ---------- 「地図は2本指で動かせます」の案内（スマホで1本指で地図をなぞったとき） ---------- */

.tjs-cf__gesture-hint {
	position: absolute;
	inset: 0;
	z-index: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, .45);
	color: #fff;
	font-size: 18px;
	font-weight: 700;
	pointer-events: none;
	opacity: 0;
	transition: opacity .25s;
}

.tjs-cf__gesture-hint.is-show {
	opacity: 1;
}

@media screen and (max-width: 768px) {
	/* スマホでは地図の部分だけに重ねる（パネルは地図の上にあるので除く） */
	.tjs-cf__gesture-hint {
		inset: auto 0 0 0;
		height: 56vh;
		min-height: 320px;
	}
}

/* ---------- 画面に入る院が多すぎてピンを隠しているときの案内 ---------- */

.tjs-cf__toomany {
	position: absolute;
	inset: 0;
	z-index: 650;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none; /* 地図はそのまま操作できるように（案内の箱だけ押せる） */
}

.tjs-cf__toomany[hidden] {
	display: none;
}

.tjs-cf__toomany-box {
	pointer-events: auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	max-width: 320px;
	margin: 0 16px;
	padding: 16px 20px;
	background: rgba(255, 255, 255, .95);
	border-radius: 8px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, .25);
	text-align: center;
	font-size: 13px;
	line-height: 1.6;
}

.tjs-cf__toomany-box strong {
	font-size: 14px;
	color: var(--tjs-cf-main-dark);
}

@media screen and (min-width: 769px) {
	/* PCでは検索パネルに重ならないよう、パネルの右側の真ん中に出す */
	.tjs-cf__toomany {
		left: 324px;
	}
}

@media screen and (max-width: 768px) {
	/* スマホでは地図の部分だけに重ねる（パネルは地図の上にあるので除く） */
	.tjs-cf__toomany {
		inset: auto 0 0 0;
		height: 56vh;
		min-height: 320px;
	}
}

/* ---------- 検索パネルの中の案内（件数など） ---------- */

.tjs-cf__panel .tjs-cf__status {
	margin: 0 12px 10px;
	font-size: 13px;
	line-height: 1.5;
}

.tjs-cf__list[hidden] {
	display: none;
}

/* ---------- スマホ ---------- */

@media screen and (max-width: 768px) {
	.tjs-cf-page .tjs-cf-lead {
		margin: 0 0 16px;
		font-size: 14px;
	}

	/* パネルは地図に重ねず、地図の上に置く */
	.tjs-cf__map-wrap {
		height: auto;
		min-height: 0;
		border-top: 0;
		display: flex;
		flex-direction: column;
	}

	.tjs-cf__panel {
		order: -1; /* 地図より上に */
		position: static;
		width: auto;
		max-height: none;
		margin: 0 12px 12px;
		box-shadow: none;
		border: 1px solid var(--tjs-cf-line);
	}

	.tjs-cf__features {
		max-height: 220px;
	}

	/* スマホは一覧を地図の下に置く（ページが長くならないよう、高さを決めて一覧の中だけでスクロール） */
	.tjs-cf__plist.is-below-map {
		max-height: 300px;
		overflow-y: auto;
		margin: 12px 12px 0;
		border: 1px solid var(--tjs-cf-line);
		border-radius: 6px;
		background: #fff;
	}

	.tjs-cf__plist.is-below-map li:last-child {
		border-bottom: 0;
	}

	.tjs-cf__map {
		position: relative;
		inset: auto;
		height: 56vh;
		min-height: 320px;
		border-top: 1px solid var(--tjs-cf-line);
	}

	.tjs-cf__redo {
		top: auto;
		bottom: 16px;
	}

	/* 拡大・縮小ボタンがサイトのメニューボタン（右上固定）と重ならないよう少し下げる */
	.tjs-cf .leaflet-top.leaflet-right {
		top: 56px;
	}

	.tjs-cf__results {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	.tjs-cf-card__person,
	.tjs-cf-card__addr,
	.tjs-cf-card__features {
		margin-left: 0;
	}
}
