.razbot-root,
.razbot-root * {
	box-sizing: border-box;
}

.razbot-root {
	position: fixed;
	right: max(16px, env(safe-area-inset-right));
	bottom: max(16px, env(safe-area-inset-bottom));
	z-index: 2147483000;
	font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 14px;
	line-height: 1.35;
	color: #f8f5ea;
	pointer-events: none;
	color-scheme: dark;
}

.razbot-shell {
	position: relative;
	width: 92px;
	min-height: 92px;
	pointer-events: none;
}

.razbot-panel {
	position: absolute;
	right: 0;
	bottom: 94px;
	width: min(342px, calc(100vw - 32px));
	max-height: min(72vh, 620px);
	overflow: auto;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 18px;
	background:
		linear-gradient(145deg, rgba(33, 33, 36, 0.98), rgba(12, 12, 14, 0.98));
	box-shadow:
		0 18px 50px rgba(0, 0, 0, 0.42),
		0 2px 12px rgba(0, 0, 0, 0.22);
	pointer-events: auto;
	opacity: 1;
	transform: translateY(0) scale(1);
	transition: opacity 180ms ease, transform 180ms ease;
}

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

.razbot-root.is-transient .razbot-panel {
	width: min(310px, calc(100vw - 32px));
}

.razbot-panel-inner {
	padding: 14px;
}

.razbot-head {
	display: grid;
	grid-template-columns: 44px 1fr auto auto;
	align-items: center;
	gap: 9px;
	margin-bottom: 10px;
}

.razbot-panel-avatar-wrap {
	width: 44px;
	height: 44px;
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.08);
	overflow: hidden;
	display: grid;
	place-items: center;
}

.razbot-panel-avatar {
	width: 52px;
	height: 52px;
	object-fit: contain;
	object-position: bottom center;
}

.razbot-title {
	display: block;
	font-size: 14px;
	font-weight: 800;
	letter-spacing: 0.01em;
	color: #fff8d6;
}

.razbot-subtitle {
	display: block;
	font-size: 11px;
	color: rgba(248, 245, 234, 0.72);
}

.razbot-icon-button {
	appearance: none;
	width: 28px;
	height: 28px;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.06);
	color: #f8f5ea;
	cursor: pointer;
	font-size: 18px;
	line-height: 1;
	display: inline-grid;
	place-items: center;
	padding: 0;
}

.razbot-icon-button:hover,
.razbot-icon-button:focus-visible {
	background: rgba(255, 255, 255, 0.14);
	outline: none;
}

.razbot-message {
	margin: 0 0 12px;
	color: #f7f1df;
	font-size: 14px;
}

.razbot-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
}

.razbot-choice,
.razbot-game-reset {
	appearance: none;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.08);
	color: #fff7cf;
	font: inherit;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
	padding: 7px 10px;
	cursor: pointer;
}

.razbot-choice:hover,
.razbot-choice:focus-visible,
.razbot-game-reset:hover,
.razbot-game-reset:focus-visible {
	background: rgba(247, 216, 106, 0.18);
	border-color: rgba(247, 216, 106, 0.55);
	outline: none;
}

.razbot-launcher {
	position: absolute;
	right: 0;
	bottom: 0;
	appearance: none;
	border: 0;
	background: transparent;
	color: #fff8d6;
	padding: 0;
	cursor: pointer;
	pointer-events: auto;
	display: grid;
	justify-items: center;
	gap: 2px;
	filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.38));
}

.razbot-avatar-frame {
	width: 78px;
	height: 78px;
	border-radius: 24px;
	display: grid;
	place-items: end center;
	overflow: hidden;
	background: rgba(12, 12, 14, 0.68);
	border: 1px solid rgba(255, 255, 255, 0.2);
	transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.razbot-launcher:hover .razbot-avatar-frame,
.razbot-launcher:focus-visible .razbot-avatar-frame {
	transform: translateY(-2px);
	border-color: rgba(247, 216, 106, 0.62);
	background: rgba(24, 24, 27, 0.82);
}

.razbot-launcher:focus-visible {
	outline: none;
}

.razbot-launcher-img {
	width: 84px;
	height: 84px;
	object-fit: contain;
	object-position: bottom center;
}

.razbot-label {
	display: inline-block;
	border-radius: 999px;
	padding: 2px 8px;
	font-size: 11px;
	font-weight: 800;
	background: rgba(0, 0, 0, 0.62);
	color: #fff8d6;
	letter-spacing: 0.02em;
}

.razbot-root.is-dismissed .razbot-avatar-frame {
	opacity: 0.62;
	filter: grayscale(0.25);
}

.razbot-trigger {
	cursor: help;
	text-decoration-line: underline;
	text-decoration-style: dotted;
	text-decoration-color: rgba(247, 216, 106, 0.58);
	text-underline-offset: 0.18em;
	border-radius: 3px;
}

.razbot-trigger:hover,
.razbot-trigger:focus-visible {
	background: rgba(247, 216, 106, 0.12);
	outline: none;
}

.razbot-reactive:focus-visible {
	outline: 2px solid rgba(247, 216, 106, 0.88);
	outline-offset: 3px;
	border-radius: 6px;
}

.razbot-game {
	margin-top: 12px;
}

.razbot-game-status {
	margin-bottom: 10px;
	font-size: 13px;
	color: rgba(248, 245, 234, 0.86);
}

.razbot-ttt-grid {
	display: grid;
	grid-template-columns: repeat(3, 56px);
	gap: 7px;
	justify-content: center;
	margin: 10px auto 12px;
}

.razbot-ttt-cell {
	width: 56px;
	height: 56px;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.07);
	color: #fff8d6;
	font-size: 28px;
	font-weight: 900;
	line-height: 1;
	cursor: pointer;
}

.razbot-ttt-cell:hover:not(:disabled),
.razbot-ttt-cell:focus-visible:not(:disabled) {
	background: rgba(247, 216, 106, 0.18);
	border-color: rgba(247, 216, 106, 0.6);
	outline: none;
}

.razbot-ttt-cell:disabled {
	cursor: default;
	opacity: 0.92;
}

.razbot-game-actions {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-bottom: 4px;
}

.razbot-stapi-tool {
	margin-top: 10px;
}

.razbot-stapi-form {
	display: grid;
	gap: 7px;
}

.razbot-stapi-label,
.razbot-stapi-source,
.razbot-stapi-loading,
.razbot-stapi-empty {
	font-size: 12px;
	color: rgba(248, 245, 234, 0.76);
}

.razbot-stapi-row {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 7px;
}

.razbot-stapi-input {
	min-width: 0;
	width: 100%;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.08);
	color: #fff8d6;
	font: inherit;
	font-size: 13px;
	line-height: 1.2;
	padding: 8px 9px;
}

.razbot-stapi-input:focus {
	border-color: rgba(247, 216, 106, 0.6);
	outline: none;
}

.razbot-stapi-input::placeholder {
	color: rgba(248, 245, 234, 0.46);
}

.razbot-stapi-submit {
	appearance: none;
	border: 1px solid rgba(247, 216, 106, 0.55);
	border-radius: 10px;
	background: rgba(247, 216, 106, 0.18);
	color: #fff8d6;
	font: inherit;
	font-size: 12px;
	font-weight: 800;
	padding: 8px 10px;
	cursor: pointer;
}

.razbot-stapi-submit:hover,
.razbot-stapi-submit:focus-visible {
	background: rgba(247, 216, 106, 0.26);
	outline: none;
}

.razbot-stapi-source {
	margin-bottom: 7px;
}

.razbot-stapi-source a {
	color: #fff8d6;
	text-decoration: underline;
	text-decoration-style: dotted;
	text-underline-offset: 0.18em;
}

.razbot-stapi-results {
	display: grid;
	gap: 7px;
}

.razbot-stapi-card {
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.06);
	padding: 8px;
}

.razbot-stapi-card-title {
	display: block;
	color: #fff8d6;
	font-size: 13px;
	line-height: 1.25;
}

.razbot-stapi-meta {
	margin-top: 3px;
	color: rgba(248, 245, 234, 0.72);
	font-size: 11px;
	line-height: 1.35;
	overflow-wrap: anywhere;
}

.razbot-stapi-card-action {
	appearance: none;
	margin-top: 7px;
	border: 1px solid rgba(247, 216, 106, 0.42);
	border-radius: 8px;
	background: rgba(247, 216, 106, 0.12);
	color: #fff8d6;
	font: inherit;
	font-size: 11px;
	font-weight: 800;
	line-height: 1.2;
	padding: 6px 8px;
	cursor: pointer;
}

.razbot-stapi-card-action:hover,
.razbot-stapi-card-action:focus-visible {
	background: rgba(247, 216, 106, 0.22);
	outline: none;
}

.razbot-stapi-dossier {
	display: grid;
	gap: 8px;
	margin-bottom: 9px;
	border: 1px solid rgba(247, 216, 106, 0.18);
	border-radius: 8px;
	background: rgba(247, 216, 106, 0.07);
	padding: 9px;
}

.razbot-stapi-summary {
	margin: 0;
	color: #f7f1df;
	font-size: 12px;
	line-height: 1.38;
}

.razbot-stapi-facts {
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: 4px 8px;
	margin: 0;
	font-size: 11px;
	line-height: 1.3;
}

.razbot-stapi-facts dt {
	color: rgba(248, 245, 234, 0.64);
	font-weight: 800;
}

.razbot-stapi-facts dd {
	margin: 0;
	color: rgba(248, 245, 234, 0.86);
	overflow-wrap: anywhere;
}

.razbot-stapi-related {
	display: grid;
	gap: 5px;
}

.razbot-stapi-related-row {
	display: grid;
	gap: 2px;
	font-size: 11px;
	line-height: 1.32;
}

.razbot-stapi-related-row strong {
	color: #fff8d6;
}

.razbot-stapi-related-row span {
	color: rgba(248, 245, 234, 0.72);
	overflow-wrap: anywhere;
}

.razbot-letterboxd-card,
.razbot-goodreads-card {
	display: grid;
	grid-template-columns: 52px minmax(0, 1fr);
	gap: 8px;
	align-items: start;
}

.razbot-letterboxd-card-no-poster,
.razbot-goodreads-card-no-cover {
	grid-template-columns: 1fr;
}

.razbot-letterboxd-poster,
.razbot-goodreads-cover {
	width: 52px;
	aspect-ratio: 2 / 3;
	object-fit: cover;
	border-radius: 6px;
	background: rgba(255, 255, 255, 0.08);
}

.razbot-letterboxd-card-content,
.razbot-goodreads-card-content {
	min-width: 0;
}

.razbot-letterboxd-review,
.razbot-letterboxd-review-full,
.razbot-goodreads-review,
.razbot-goodreads-review-full {
	margin: 6px 0 0;
	color: rgba(248, 245, 234, 0.82);
	font-size: 11px;
	line-height: 1.38;
	overflow-wrap: anywhere;
}

.razbot-letterboxd-review-full,
.razbot-goodreads-review-full {
	white-space: pre-line;
}

@media (max-width: 640px) {
	.razbot-root {
		right: max(12px, env(safe-area-inset-right));
		bottom: max(12px, env(safe-area-inset-bottom));
		font-size: 13px;
	}

	.razbot-shell {
		width: 72px;
		min-height: 72px;
	}

	.razbot-panel {
		bottom: 76px;
		width: min(322px, calc(100vw - 24px));
		max-height: 64vh;
		border-radius: 16px;
	}

	.razbot-panel-inner {
		padding: 12px;
	}

	.razbot-head {
		grid-template-columns: 38px 1fr auto auto;
	}

	.razbot-panel-avatar-wrap {
		width: 38px;
		height: 38px;
		border-radius: 12px;
	}

	.razbot-panel-avatar {
		width: 46px;
		height: 46px;
	}

	.razbot-avatar-frame {
		width: 62px;
		height: 62px;
		border-radius: 20px;
	}

	.razbot-launcher-img {
		width: 68px;
		height: 68px;
	}

	.razbot-label {
		font-size: 10px;
		padding: 2px 7px;
	}

	.razbot-ttt-grid {
		grid-template-columns: repeat(3, 50px);
	}

	.razbot-ttt-cell {
		width: 50px;
		height: 50px;
		font-size: 25px;
		border-radius: 12px;
	}

	.razbot-stapi-row {
		grid-template-columns: 1fr;
	}

	.razbot-letterboxd-card,
	.razbot-goodreads-card {
		grid-template-columns: 46px minmax(0, 1fr);
	}

	.razbot-letterboxd-card-no-poster,
	.razbot-goodreads-card-no-cover {
		grid-template-columns: 1fr;
	}

	.razbot-letterboxd-poster,
	.razbot-goodreads-cover {
		width: 46px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.razbot-root *,
	.razbot-root *::before,
	.razbot-root *::after {
		animation: none !important;
		transition: none !important;
	}
}
