/* --- SWELL の固定要素との位置関係 ---
   1. ページトップボタン（.p-fixBtnWrap）は画面幅で bottom が変わるため、
      案内ボットを隅に置いたうえで SWELL 側を上へ逃がす。
   2. スマホ・タブレット（959px以下）では SWELL のフッター固定メニュー
      （#fix_bottom_menu：高さ50px＋ホームバー余白）が最下部に出る。
      この場合は案内ボットをその上へ、ページトップをさらに上へ重ねる。
      64px という数値は SWELL 自身が pagetop に使っている値に合わせた。 */
.p-fixBtnWrap {
	bottom: 88px !important;
}

.kgb-root {
	position: fixed;
	right: 16px;
	bottom: 16px;
	z-index: 9990;
	font-family: inherit;
	line-height: 1.7;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 8px;
}

.kgb-fab {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: #1f3f30;
	color: #fff;
	border: 1px solid rgba( 201, 162, 83, .55 );
	border-radius: 999px;
	padding: 10px 20px 10px 13px;
	font-size: 14.5px;
	font-weight: 700;
	letter-spacing: .04em;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 2px 6px rgba( 31, 63, 48, .2 ), 0 8px 22px rgba( 31, 63, 48, .22 );
	transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
	font-family: inherit;
}

.kgb-fab:hover {
	background: #2a5340;
	transform: translateY( -2px );
	box-shadow: 0 3px 8px rgba( 31, 63, 48, .24 ), 0 12px 28px rgba( 31, 63, 48, .26 );
}

.kgb-fab:active {
	transform: translateY( 0 );
}

/* ロゴは透過PNGを想定し、白一色に置き換えて表示する */
.kgb-fab-logo {
	width: 28px;
	height: 28px;
	flex: none;
	display: block;
	filter: brightness( 0 ) invert( 1 );
}

.kgb-fab-ico {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: #c9a253;
	color: #1f3f30;
	font-size: 15px;
	font-weight: 700;
	flex: none;
}

.kgb-open .kgb-fab-txt {
	display: none;
}

.kgb-open .kgb-fab {
	padding: 10px 13px;
}

.kgb-panel {
	width: 352px;
	max-width: calc( 100vw - 24px );
	background: #fff;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 10px 34px rgba( 0, 0, 0, .26 );
	display: flex;
	flex-direction: column;
	max-height: min( 74vh, 620px );
}

.kgb-panel[hidden] {
	display: none;
}

.kgb-head {
	background: #1f3f30;
	color: #fff;
	padding: 12px 14px;
	display: flex;
	align-items: flex-start;
	gap: 10px;
}

.kgb-head-txt {
	flex: 1;
	min-width: 0;
}

.kgb-title {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	color: #fff;
}

.kgb-sub {
	margin: 2px 0 0;
	font-size: 11.5px;
	color: #cfc3a6;
}

.kgb-close {
	background: transparent;
	border: none;
	color: #fff;
	font-size: 22px;
	line-height: 1;
	padding: 2px 4px;
	cursor: pointer;
	flex: none;
}

.kgb-body {
	padding: 14px;
	overflow-y: auto;
	flex: 1;
	background: #fff;
	-webkit-overflow-scrolling: touch;
}

.kgb-bub {
	background: #f4f1ea;
	color: #2c2c2a;
	border-radius: 12px;
	padding: 10px 12px;
	font-size: 13.5px;
	margin: 0 0 10px;
}

.kgb-usr {
	background: #1f3f30;
	color: #fff;
	border-radius: 12px;
	padding: 8px 12px;
	font-size: 13.5px;
	margin: 0 0 10px auto;
	max-width: 82%;
	width: fit-content;
}

.kgb-guard {
	border-left: 3px solid #c9a253;
	background: #fbf6ea;
	padding: 10px 12px;
	font-size: 12.5px;
	color: #4a3c1c;
	margin: 0 0 10px;
}

.kgb-guard strong {
	display: block;
	font-size: 12px;
	color: #7a5f1d;
	margin-bottom: 3px;
}

.kgb-opts {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-bottom: 4px;
}

.kgb-opt {
	display: block;
	width: 100%;
	text-align: left;
	background: #fff;
	color: #1f3f30;
	border: 1px solid #1f3f30;
	border-radius: 8px;
	padding: 9px 12px;
	font-size: 13px;
	cursor: pointer;
	line-height: 1.5;
	font-family: inherit;
}

.kgb-opt:hover {
	background: #f4f1ea;
}

.kgb-again {
	margin-top: 12px;
	border-color: #9a9a92;
	color: #55554f;
	text-align: center;
}

.kgb-lnk {
	display: block;
	border: 1px solid #e2ded3;
	border-left: 3px solid #0f6e56;
	border-radius: 0 8px 8px 0;
	padding: 9px 12px;
	font-size: 13px;
	margin: 0 0 6px;
	background: #fff;
	color: #0f6e56;
	text-decoration: none;
	line-height: 1.55;
}

.kgb-lnk:hover {
	background: #f4f1ea;
	color: #0f6e56;
}

.kgb-cta-wrap {
	margin-top: 14px;
	border-top: 1px solid #ece8de;
	padding-top: 12px;
}

.kgb-note {
	margin: 0 0 8px;
	font-size: 11.5px;
	color: #6b6a63;
}

.kgb-cta {
	display: block;
	text-align: center;
	border-radius: 8px;
	padding: 11px 10px;
	font-size: 13.5px;
	font-weight: 700;
	margin-bottom: 8px;
	text-decoration: none;
}

.kgb-cta-tel {
	background: #c9a253;
	color: #1f3f30;
}

.kgb-cta-form {
	background: #1f3f30;
	color: #fff;
}

.kgb-cta-line {
	background: #fff;
	color: #06603b;
	border: 1px solid #06c755;
}

.kgb-cta:hover {
	opacity: .9;
}

.kgb-foot {
	display: flex;
	gap: 6px;
	padding: 10px 12px 0;
	border-top: 1px solid #ece8de;
	background: #fff;
}

.kgb-input {
	flex: 1;
	min-width: 0;
	border: 1px solid #cfcabd;
	border-radius: 8px;
	padding: 9px 10px;
	font-size: 14px;
	font-family: inherit;
	color: #2c2c2a;
	background: #fff;
}

.kgb-input:focus {
	outline: 2px solid #0f6e56;
	outline-offset: -1px;
}

.kgb-send {
	background: #0f6e56;
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 9px 14px;
	font-size: 13.5px;
	font-weight: 700;
	cursor: pointer;
	flex: none;
	font-family: inherit;
}

.kgb-priv {
	margin: 6px 12px 10px;
	font-size: 10.5px;
	color: #8a8980;
	background: #fff;
}

.kgb-preview {
	background: #7a2b2b;
	color: #fff;
	font-size: 11px;
	padding: 5px 10px;
	border-radius: 6px;
}

/* フッター固定メニューがあるとき（959px以下）だけ、その上へ退避する。
   目印 .kgb-spbar は bot.js が html 要素に付ける。メニューのないサイトでは
   付かないので、この指定は何もしない。 */
@media screen and ( max-width: 959px ) {
	.kgb-spbar .kgb-root {
		bottom: 64px;
		padding-bottom: calc( env( safe-area-inset-bottom ) * .5 );
	}

	.kgb-spbar .p-fixBtnWrap {
		bottom: 124px !important;
	}
}

@media screen and ( max-width: 600px ) {
	.kgb-root {
		right: 12px;
		bottom: 12px;
	}

	.kgb-spbar .kgb-root {
		right: 12px;
		bottom: 62px;
	}

	.kgb-panel {
		width: calc( 100vw - 24px );
		max-height: 66vh;
	}

	.kgb-fab {
		padding: 9px 17px 9px 11px;
		font-size: 13.5px;
	}

	.kgb-fab-logo {
		width: 25px;
		height: 25px;
	}
}

@media print {
	.kgb-root {
		display: none;
	}
}
