.boss-guide-chatbot,
.boss-guide-chatbot * {
	box-sizing: border-box;
}

html.boss-guide-chatbot-open,
body.boss-guide-chatbot-open {
	overflow: hidden;
	overscroll-behavior: none;
}

.boss-guide-chatbot {
	--boss-chat-bg: #ffffff;
	--boss-chat-surface: #f5f5f5;
	--boss-chat-ink: #121212;
	--boss-chat-accent: #645638;
	--boss-chat-gold: #c5a563;
	--boss-chat-line: #ecedef;
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 99999;
	font-family: "DM Sans", "Noto Sans JP", system-ui, sans-serif;
	color: var(--boss-chat-ink);
}

.boss-guide-chatbot button,
.boss-guide-chatbot a {
	font: inherit;
}

.boss-guide-chatbot__launcher {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 52px;
	padding: 10px 18px 10px 10px;
	border: 1px solid var(--boss-chat-accent);
	border-radius: 8px;
	background: var(--boss-chat-accent);
	color: #ffffff;
	box-shadow: 0 10px 28px rgba(52, 44, 29, 0.18);
	cursor: pointer;
	font-weight: 600;
	line-height: 1.2;
}

.boss-guide-chatbot__launcher-mark {
	display: block;
	width: 32px;
	height: 32px;
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.65);
	border-radius: 50%;
	background: #ffffff;
}

.boss-guide-chatbot__launcher-mark img {
	display: block;
	width: 52px;
	height: 52px;
	max-width: none;
	transform: translate(-10px, -2px) rotate(-8deg);
	transform-origin: 50% 50%;
	object-fit: contain;
}

.boss-guide-chatbot__panel {
	position: absolute;
	right: 0;
	bottom: 66px;
	display: flex;
	flex-direction: column;
	width: min(390px, calc(100vw - 32px));
	max-height: min(650px, calc(100vh - 120px));
	overflow: hidden;
	border: 1px solid var(--boss-chat-line);
	border-radius: 8px;
	background: var(--boss-chat-bg);
	box-shadow: 0 18px 48px rgba(52, 44, 29, 0.2);
}

.boss-guide-chatbot__panel[hidden] {
	display: none;
}

.boss-guide-chatbot__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 16px 18px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.22);
	background: var(--boss-chat-accent);
	color: #ffffff;
}

.boss-guide-chatbot__brand {
	margin: 0 0 2px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.12em;
}

.boss-guide-chatbot__header h2 {
	margin: 0;
	color: inherit;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.15;
}

.boss-guide-chatbot__close {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.55);
	border-radius: 4px;
	background: transparent;
	color: #ffffff;
	cursor: pointer;
	font-size: 26px;
	font-weight: 300;
	line-height: 1;
}

.boss-guide-chatbot__log {
	flex: 1;
	min-height: 250px;
	padding: 18px;
	overflow-y: auto;
	background: var(--boss-chat-surface);
	scroll-behavior: smooth;
}

.boss-guide-chatbot__message {
	width: fit-content;
	max-width: 100%;
	margin: 0;
	padding: 11px 13px;
	border-radius: 8px;
	font-size: 14px;
	line-height: 1.65;
	white-space: pre-wrap;
}

.boss-guide-chatbot__message-row {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	max-width: 94%;
	margin: 0 0 12px;
}

.boss-guide-chatbot__message-row--user {
	justify-content: flex-end;
	margin-left: auto;
}

.boss-guide-chatbot__avatar {
	flex: 0 0 38px;
	width: 38px;
	height: 38px;
	overflow: hidden;
	border: 1px solid var(--boss-chat-line);
	border-radius: 50%;
	background: #ffffff;
}

.boss-guide-chatbot__avatar img {
	display: block;
	width: 62px;
	height: 62px;
	max-width: none;
	transform: translate(-12px, -2px) rotate(-8deg);
	transform-origin: 50% 50%;
	object-fit: contain;
}

.boss-guide-chatbot__message--assistant {
	position: relative;
	border: 1px solid var(--boss-chat-line);
	background: var(--boss-chat-bg);
}

.boss-guide-chatbot__message--assistant::before {
	position: absolute;
	bottom: 15px;
	left: -7px;
	width: 12px;
	height: 12px;
	border-bottom: 1px solid var(--boss-chat-line);
	border-left: 1px solid var(--boss-chat-line);
	background: var(--boss-chat-bg);
	content: "";
	transform: rotate(45deg);
}

.boss-guide-chatbot__message--user {
	background: var(--boss-chat-accent);
	color: #ffffff;
}

.boss-guide-chatbot__choices,
.boss-guide-chatbot__links {
	display: grid;
	gap: 8px;
	margin: 0 0 16px;
}

.boss-guide-chatbot__choice,
.boss-guide-chatbot__link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	min-height: 44px;
	padding: 10px 12px;
	border: 1px solid var(--boss-chat-accent);
	border-radius: 4px;
	background: #ffffff;
	color: var(--boss-chat-accent);
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	text-align: left;
	text-decoration: none;
}

.boss-guide-chatbot__choice::after,
.boss-guide-chatbot__link::after {
	content: "›";
	margin-left: 10px;
	font-size: 20px;
	font-weight: 400;
	line-height: 1;
}

.boss-guide-chatbot__choice:hover,
.boss-guide-chatbot__link:hover {
	background: var(--boss-chat-accent);
	color: #ffffff;
}

.boss-guide-chatbot__choice:disabled {
	border-color: #d8d8d8;
	background: #eeeeee;
	color: #717171;
	cursor: default;
}

.boss-guide-chatbot__choice:disabled::after {
	content: "";
}

.boss-guide-chatbot__footer {
	padding: 12px 16px 14px;
	border-top: 1px solid var(--boss-chat-line);
	background: var(--boss-chat-bg);
}

.boss-guide-chatbot__reset,
.boss-guide-chatbot__back {
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--boss-chat-accent);
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.boss-guide-chatbot__back {
	margin-right: 16px;
}

.boss-guide-chatbot__back:disabled {
	color: var(--boss-chat-accent);
	cursor: default;
	opacity: 0.5;
	text-decoration: none;
}

.boss-guide-chatbot__footer p {
	margin: 8px 0 0;
	color: #5a5a5a;
	font-size: 11px;
	line-height: 1.5;
}

.boss-guide-chatbot button:focus-visible,
.boss-guide-chatbot a:focus-visible {
	outline: 3px solid var(--boss-chat-gold);
	outline-offset: 2px;
}

.boss-guide-chatbot button:active,
.boss-guide-chatbot a:active {
	transform: translateY(1px);
}

.boss-guide-chatbot__prefill-note {
	margin: 0 0 20px;
	padding: 12px 14px;
	border-left: 3px solid #645638;
	background: #f5f5f5;
	color: #121212;
	font-family: "DM Sans", "Noto Sans JP", system-ui, sans-serif;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.5;
}

@media (max-width: 600px) {
	.boss-guide-chatbot {
		right: 16px;
		bottom: 16px;
	}

	.boss-guide-chatbot__launcher {
		min-height: 48px;
		padding-right: 14px;
	}

	.boss-guide-chatbot__panel {
		position: fixed;
		right: 12px;
		bottom: 76px;
		left: 12px;
		width: auto;
		max-height: calc(100vh - 96px);
	}

	.boss-guide-chatbot__log {
		min-height: 210px;
		padding: 14px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.boss-guide-chatbot__log {
		scroll-behavior: auto;
	}
}
