:root {
	--lb-ink: #121413;
	--lb-ink-soft: #3b423f;
	--lb-paper: #fbfcf8;
	--lb-panel: #ffffff;
	--lb-mist: #e8f2ee;
	--lb-line: #d8e1dc;
	--lb-line-strong: #aebbb4;
	--lb-signal: #18d66a;
	--lb-blue: #165fc7;
	--lb-coral: #ff6b4a;
	--lb-gold: #f2c94c;
	--lb-shadow: 0 18px 45px rgba(18, 20, 19, 0.08);
	--lb-radius: 8px;
	--lb-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--lb-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
	box-sizing: border-box;
}

html,
body {
	width: 100%;
	height: 100%;
	overflow: hidden;
}

body {
	margin: 0;
	background: var(--lb-paper);
	color: var(--lb-ink);
	font-family: var(--lb-font);
	font-size: 16px;
	line-height: 1.5;
	letter-spacing: 0;
}

body:not(.home) {
	overflow: auto;
}

a {
	color: inherit;
	text-decoration-color: var(--lb-signal);
	text-decoration-thickness: 2px;
	text-underline-offset: 0.18em;
}

button,
input,
select,
textarea {
	font: inherit;
	letter-spacing: 0;
}

button {
	cursor: pointer;
}

img {
	max-width: 100%;
	height: auto;
}

h1,
h2,
h3,
p {
	margin-top: 0;
}

h1 {
	margin-bottom: 0;
	font-size: 2rem;
	line-height: 1;
}

h2 {
	margin-bottom: 0.75rem;
	font-size: 1.35rem;
	line-height: 1.1;
}

h3 {
	margin-bottom: 0.45rem;
	font-size: 1rem;
}

.lb-skip-link {
	position: absolute;
	top: 0.75rem;
	left: 0.75rem;
	z-index: 200;
	transform: translateY(-160%);
	background: var(--lb-ink);
	color: var(--lb-paper);
	padding: 0.75rem 1rem;
	border-radius: var(--lb-radius);
}

.lb-skip-link:focus {
	transform: translateY(0);
}

.lb-console {
	display: grid;
	grid-template-columns: 88px minmax(0, 1fr);
	width: 100%;
	height: 100dvh;
	min-height: 0;
	background: var(--lb-paper);
	overflow: hidden;
}

.admin-bar .lb-console {
	height: calc(100dvh - 32px);
}

.lb-rail {
	display: grid;
	grid-template-rows: auto 1fr auto;
	gap: 1rem;
	min-height: 0;
	padding: 0.9rem 0.65rem;
	border-right: 1px solid var(--lb-line);
	background: #f3f7f1;
}

.lb-rail-brand {
	display: grid;
	justify-items: center;
	gap: 0.48rem;
	color: var(--lb-ink);
	font-size: 0.7rem;
	font-weight: 900;
	line-height: 1;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
}

.lb-brand-mark {
	display: block;
	width: 46px;
	height: 46px;
	object-fit: contain;
}

.lb-brand-mark-small {
	width: 34px;
	height: 34px;
}

.lb-brand-mark-text {
	display: grid;
	place-items: center;
	border: 1px solid var(--lb-line-strong);
	border-radius: var(--lb-radius);
	background: var(--lb-ink);
	color: var(--lb-paper);
	font-size: 0.82rem;
	font-weight: 900;
	line-height: 1;
}

.lb-view-nav {
	display: grid;
	align-content: start;
	gap: 0.55rem;
}

.lb-view-nav button {
	display: grid;
	justify-items: center;
	gap: 0.18rem;
	min-height: 62px;
	border: 1px solid transparent;
	border-radius: var(--lb-radius);
	background: transparent;
	color: var(--lb-ink-soft);
	padding: 0.55rem 0.3rem;
	text-align: center;
}

.lb-view-nav button span {
	font-size: 0.84rem;
	font-weight: 900;
}

.lb-view-nav button small {
	font-size: 0.65rem;
}

.lb-view-nav button:hover,
.lb-view-nav button:focus-visible,
.lb-view-nav button.is-active {
	border-color: var(--lb-line);
	background: var(--lb-panel);
	color: var(--lb-ink);
	outline: none;
	box-shadow: 0 8px 18px rgba(18, 20, 19, 0.07);
}

.lb-rail-status {
	display: grid;
	gap: 0.22rem;
	padding: 0.55rem 0.35rem;
	border: 1px solid var(--lb-line);
	border-radius: var(--lb-radius);
	background: var(--lb-panel);
	text-align: center;
}

.lb-rail-status span {
	color: var(--lb-ink-soft);
	font-family: var(--lb-mono);
	font-size: 0.62rem;
	font-weight: 800;
	text-transform: uppercase;
}

.lb-rail-status strong {
	font-size: 0.72rem;
}

.lb-rail-footer {
	min-height: 1px;
}

.lb-console-view {
	display: none;
	grid-template-rows: auto minmax(0, 1fr);
	min-width: 0;
	min-height: 0;
	overflow: hidden;
}

.lb-console-view.is-active {
	display: grid;
}

.lb-view-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.2rem;
	min-height: 84px;
	padding: 1rem clamp(1rem, 2.4vw, 1.5rem);
	border-bottom: 1px solid var(--lb-line);
	background: rgba(251, 252, 248, 0.96);
}

.lb-view-header p:last-child {
	max-width: 720px;
	margin: 0;
	color: var(--lb-ink-soft);
}

.lb-kicker {
	margin: 0 0 0.42rem;
	font-family: var(--lb-mono);
	font-size: 0.72rem;
	font-weight: 900;
	color: var(--lb-blue);
	text-transform: uppercase;
}

.lb-assistant-dashboard {
	min-height: 0;
	padding: 1rem;
	overflow: hidden;
}

.lb-mwai-shell {
	display: grid;
	grid-template-columns: minmax(250px, 320px) minmax(0, 1fr);
	gap: 1rem;
	width: 100%;
	height: 100%;
	min-height: 0;
}

.lb-mwai-sidebar,
.lb-mwai-chat-panel,
.lb-studio,
.lb-empty-state {
	border: 1px solid var(--lb-line);
	border-radius: var(--lb-radius);
	background: var(--lb-panel);
	box-shadow: var(--lb-shadow);
}

.lb-mwai-sidebar {
	display: grid;
	grid-template-rows: auto minmax(0, 1fr) minmax(130px, 0.36fr);
	min-height: 0;
	overflow: hidden;
}

.lb-mwai-sidebar-header {
	display: flex;
	align-items: center;
	gap: 0.72rem;
	padding: 0.9rem;
	border-bottom: 1px solid var(--lb-line);
}

.lb-mwai-sidebar-header strong,
.lb-mwai-sidebar-header small {
	display: block;
	line-height: 1.1;
}

.lb-mwai-sidebar-header small {
	margin-top: 0.18rem;
	color: var(--lb-ink-soft);
	font-size: 0.75rem;
}

.lb-ai-brief-panel {
	display: grid;
	grid-template-rows: auto minmax(0, 1fr);
	gap: 0.5rem;
	min-height: 0;
	padding: 0.85rem;
	border-top: 1px solid var(--lb-line);
	background: #f6f8f4;
}

.lb-ai-brief-panel label {
	font-family: var(--lb-mono);
	font-size: 0.68rem;
	font-weight: 900;
	color: var(--lb-ink-soft);
	text-transform: uppercase;
}

.lb-ai-brief {
	width: 100%;
	min-height: 0;
	resize: none;
	border: 1px solid var(--lb-line);
	border-radius: var(--lb-radius);
	background: var(--lb-paper);
	color: var(--lb-ink);
	padding: 0.75rem;
	font-family: var(--lb-mono);
	font-size: 0.72rem;
	line-height: 1.45;
}

.lb-mwai-chat-panel {
	display: grid;
	grid-template-rows: auto minmax(0, 1fr);
	min-width: 0;
	min-height: 0;
	overflow: hidden;
}

.lb-chat-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.82rem 1rem;
	border-bottom: 1px solid var(--lb-line);
	background: #f6f8f4;
}

.lb-chat-toolbar strong,
.lb-chat-toolbar span {
	display: inline-flex;
	align-items: center;
}

.lb-chat-toolbar strong {
	margin-right: 0.55rem;
	font-size: 0.95rem;
}

.lb-chat-toolbar div span {
	color: var(--lb-ink-soft);
	font-family: var(--lb-mono);
	font-size: 0.74rem;
}

.lb-live-dot {
	min-height: 28px;
	border: 1px solid rgba(24, 214, 106, 0.5);
	border-radius: 999px;
	background: rgba(24, 214, 106, 0.14);
	color: #0a7134;
	padding: 0.28rem 0.7rem;
	font-family: var(--lb-mono);
	font-size: 0.68rem;
	font-weight: 900;
	text-transform: uppercase;
}

.lb-empty-state {
	display: grid;
	align-content: center;
	gap: 0.5rem;
	min-height: 260px;
	padding: 1rem;
	color: var(--lb-ink-soft);
}

.lb-empty-state strong {
	color: var(--lb-ink);
}

.lb-mwai-sidebar .mwai-discussions-container,
.lb-mwai-sidebar .mwai-discussions,
.lb-mwai-chat-panel .mwai-chatbot-container,
.lb-mwai-chat-panel .mwai-chat {
	width: 100% !important;
	height: 100% !important;
	min-height: 0 !important;
	max-height: none !important;
	border: 0 !important;
	box-shadow: none !important;
}

.lb-mwai-sidebar .mwai-discussions-container {
	min-height: 0 !important;
	overflow: hidden !important;
}

.lb-mwai-sidebar .mwai-discussions {
	display: grid !important;
	grid-template-rows: auto minmax(0, 1fr) !important;
	background: var(--lb-panel) !important;
	color: var(--lb-ink) !important;
}

.lb-mwai-sidebar .mwai-discussions .mwai-header {
	padding: 0.75rem !important;
	border-bottom: 1px solid var(--lb-line) !important;
	background: var(--lb-panel) !important;
}

.lb-mwai-sidebar .mwai-discussions .mwai-header button,
.lb-mwai-sidebar .mwai-discussions button {
	min-height: 40px !important;
	border: 1px solid var(--lb-line) !important;
	border-radius: var(--lb-radius) !important;
	background: var(--lb-ink) !important;
	color: var(--lb-paper) !important;
	font-weight: 800 !important;
}

.lb-mwai-sidebar .mwai-discussions .mwai-content {
	min-height: 0 !important;
	overflow: auto !important;
	padding: 0.5rem !important;
}

.lb-mwai-sidebar .mwai-discussion {
	border-radius: var(--lb-radius) !important;
	padding: 0.72rem !important;
	color: var(--lb-ink) !important;
}

.lb-mwai-sidebar .mwai-discussion.mwai-active,
.lb-mwai-sidebar .mwai-discussion:hover {
	background: var(--lb-mist) !important;
}

.lb-local-threads {
	display: grid;
	grid-template-rows: auto minmax(0, 1fr);
	gap: 0.65rem;
	min-height: 0;
	padding: 0.75rem;
	overflow: hidden;
}

.lb-new-thread,
.lb-thread-list button {
	width: 100%;
	border-radius: var(--lb-radius);
	font-weight: 900;
	text-align: left;
}

.lb-new-thread {
	min-height: 42px;
	border: 1px solid var(--lb-ink);
	background: var(--lb-ink);
	color: var(--lb-paper);
	padding: 0.68rem 0.75rem;
}

.lb-thread-list {
	display: grid;
	align-content: start;
	gap: 0.48rem;
	min-height: 0;
	overflow: auto;
}

.lb-thread-list button {
	display: grid;
	gap: 0.18rem;
	min-height: 56px;
	border: 1px solid var(--lb-line);
	background: var(--lb-panel);
	color: var(--lb-ink);
	padding: 0.68rem 0.75rem;
}

.lb-thread-list button span {
	color: var(--lb-ink-soft);
	font-size: 0.72rem;
	font-weight: 600;
}

.lb-thread-list button:hover,
.lb-thread-list button:focus-visible,
.lb-thread-list button.is-active {
	border-color: var(--lb-line-strong);
	background: var(--lb-mist);
	outline: none;
}

.lb-mwai-chat-panel .mwai-chatbot-container {
	min-height: 0 !important;
	overflow: hidden !important;
}

.lb-mwai-chat-panel .mwai-chat {
	display: grid !important;
	grid-template-rows: minmax(0, 1fr) auto !important;
	background: var(--lb-panel) !important;
	color: var(--lb-ink) !important;
}

.lb-mwai-chat-panel .mwai-chat .mwai-header {
	display: none !important;
}

.lb-mwai-chat-panel .mwai-chat .mwai-body,
.lb-mwai-chat-panel .mwai-chat .mwai-content,
.lb-mwai-chat-panel .mwai-chat .mwai-conversation,
.lb-mwai-chat-panel .mwai-chat .mwai-messages {
	min-height: 0 !important;
	max-height: none !important;
	overflow: auto !important;
}

.lb-mwai-chat-panel .mwai-chat .mwai-conversation,
.lb-mwai-chat-panel .mwai-chat .mwai-messages {
	padding: clamp(0.8rem, 2vw, 1.25rem) !important;
	scroll-behavior: smooth;
}

.lb-mwai-chat-panel .mwai-chat .mwai-reply,
.lb-mwai-chat-panel .mwai-chat .mwai-message {
	max-width: 820px !important;
	border-radius: var(--lb-radius) !important;
}

.lb-mwai-chat-panel .mwai-chat .mwai-input,
.lb-mwai-chat-panel .mwai-chat form {
	border-top: 1px solid var(--lb-line) !important;
	background: #f6f8f4 !important;
	padding: 0.8rem !important;
}

.lb-mwai-chat-panel .mwai-chat textarea,
.lb-mwai-chat-panel .mwai-chat input[type="text"] {
	min-height: 48px !important;
	border: 1px solid var(--lb-line-strong) !important;
	border-radius: var(--lb-radius) !important;
	background: var(--lb-panel) !important;
	color: var(--lb-ink) !important;
	padding: 0.78rem 0.9rem !important;
}

.lb-mwai-chat-panel .mwai-chat textarea:focus,
.lb-mwai-chat-panel .mwai-chat input[type="text"]:focus,
.lb-field-grid input:focus,
.lb-field-grid select:focus,
.lb-ai-brief:focus {
	border-color: var(--lb-blue) !important;
	outline: 3px solid rgba(45, 127, 249, 0.16) !important;
}

.lb-mwai-chat-panel .mwai-chat button {
	border-radius: var(--lb-radius) !important;
}

.lb-view-studio {
	background: var(--lb-paper);
}

.lb-view-library,
.lb-view-kit,
.lb-view-brand {
	background: var(--lb-paper);
}

.lb-view-studio > .lb-studio {
	margin: 1rem;
}

.lb-library-dashboard {
	display: grid;
	grid-template-rows: auto minmax(0, 1fr);
	gap: 1rem;
	min-height: 0;
	padding: 1rem;
	overflow: hidden;
}

.lb-library-toolbar {
	display: flex;
	align-items: end;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.95rem;
	border: 1px solid var(--lb-line);
	border-radius: var(--lb-radius);
	background: var(--lb-panel);
	box-shadow: var(--lb-shadow);
}

.lb-library-toolbar label {
	display: grid;
	gap: 0.34rem;
	width: min(420px, 100%);
	color: var(--lb-ink-soft);
	font-size: 0.82rem;
	font-weight: 800;
}

.lb-library-toolbar input {
	width: 100%;
	min-height: 42px;
	border: 1px solid var(--lb-line);
	border-radius: var(--lb-radius);
	background: var(--lb-paper);
	color: var(--lb-ink);
	padding: 0.64rem 0.75rem;
}

.lb-library-toolbar input:focus {
	border-color: var(--lb-blue);
	outline: 3px solid rgba(45, 127, 249, 0.16);
}

.lb-library-toolbar strong {
	white-space: nowrap;
	font-family: var(--lb-mono);
	font-size: 0.82rem;
	text-transform: uppercase;
}

.lb-library-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1rem;
	min-height: 0;
	overflow: auto;
	padding-bottom: 0.25rem;
}

.lb-library-card,
.lb-library-empty {
	border: 1px solid var(--lb-line);
	border-radius: var(--lb-radius);
	background: var(--lb-panel);
	box-shadow: var(--lb-shadow);
}

.lb-library-card {
	display: grid;
	align-content: start;
	gap: 0.85rem;
	padding: 0.95rem;
}

.lb-library-card-header {
	display: grid;
	gap: 0.25rem;
}

.lb-library-card h2 {
	margin: 0;
	font-size: 1.08rem;
}

.lb-library-card-header p {
	margin: 0;
	color: var(--lb-ink-soft);
	font-size: 0.78rem;
}

.lb-library-facts {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 0.38rem 0.7rem;
	margin: 0;
	font-size: 0.82rem;
}

.lb-library-facts dt {
	color: var(--lb-ink-soft);
	font-weight: 800;
}

.lb-library-facts dd {
	min-width: 0;
	margin: 0;
	overflow-wrap: anywhere;
}

.lb-library-swatches {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 0.38rem;
}

.lb-library-swatches .lb-swatch {
	min-height: 42px;
}

.lb-library-swatches .lb-swatch span {
	font-size: 0;
	padding: 0;
}

.lb-library-assets {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.45rem;
	min-height: 76px;
}

.lb-library-assets img,
.lb-library-assets span {
	width: 100%;
	height: 76px;
	border: 1px solid var(--lb-line);
	border-radius: var(--lb-radius);
	background: var(--lb-paper);
	object-fit: cover;
}

.lb-library-assets span {
	grid-column: 1 / -1;
	display: grid;
	place-items: center;
	color: var(--lb-ink-soft);
	font-size: 0.78rem;
}

.lb-library-actions {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.55rem;
}

.lb-library-empty {
	padding: 1rem;
	color: var(--lb-ink-soft);
}

.lb-kit-dashboard {
	display: grid;
	grid-template-rows: auto auto minmax(0, 1fr);
	gap: 1rem;
	min-height: 0;
	padding: 1rem;
	overflow: hidden;
}

.lb-kit-empty[hidden],
.lb-kit-shell[hidden] {
	display: none !important;
}

.lb-kit-switcher {
	display: grid;
	gap: 0.75rem;
	min-width: 0;
	padding: 0.85rem;
	border: 1px solid var(--lb-line);
	border-radius: var(--lb-radius);
	background: var(--lb-panel);
	box-shadow: var(--lb-shadow);
}

.lb-kit-switcher-heading {
	display: flex;
	align-items: end;
	justify-content: space-between;
	gap: 1rem;
}

.lb-kit-switcher-heading h2 {
	margin: 0;
	font-size: 1rem;
}

.lb-kit-switcher-heading strong {
	white-space: nowrap;
	font-family: var(--lb-mono);
	font-size: 0.78rem;
	text-transform: uppercase;
}

.lb-kit-switcher-track {
	display: flex;
	gap: 0.7rem;
	min-width: 0;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	padding: 0 0 0.3rem;
	scroll-snap-type: x proximity;
}

.lb-kit-switch-card {
	display: grid;
	grid-template-columns: 66px minmax(0, 1fr);
	align-items: center;
	flex: 0 0 min(280px, 82vw);
	gap: 0.7rem;
	min-height: 92px;
	padding: 0.65rem;
	border: 1px solid var(--lb-line);
	border-radius: var(--lb-radius);
	background: var(--lb-paper);
	color: var(--lb-ink);
	text-align: left;
	scroll-snap-align: start;
}

.lb-kit-switch-card:hover,
.lb-kit-switch-card:focus-visible,
.lb-kit-switch-card.is-active {
	border-color: var(--lb-ink);
	outline: none;
	box-shadow: 0 0 0 3px rgba(24, 214, 106, 0.18);
}

.lb-kit-switch-card.is-active {
	background: #f4fff8;
}

.lb-kit-switch-media {
	display: grid;
	place-items: center;
	width: 66px;
	height: 66px;
	overflow: hidden;
	border: 1px solid var(--lb-line);
	border-radius: var(--lb-radius);
	background-color: #ffffff;
	background-image:
		linear-gradient(45deg, #d8e1dc 25%, transparent 25%),
		linear-gradient(-45deg, #d8e1dc 25%, transparent 25%),
		linear-gradient(45deg, transparent 75%, #d8e1dc 75%),
		linear-gradient(-45deg, transparent 75%, #d8e1dc 75%);
	background-position: 0 0, 0 8px, 8px -8px, -8px 0;
	background-size: 16px 16px;
	font-family: var(--lb-mono);
	font-weight: 900;
}

.lb-kit-switch-media img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.lb-kit-switch-body {
	display: grid;
	gap: 0.28rem;
	min-width: 0;
}

.lb-kit-switch-body strong,
.lb-kit-switch-body span {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.lb-kit-switch-body strong {
	font-size: 0.92rem;
}

.lb-kit-switch-body span {
	color: var(--lb-ink-soft);
	font-size: 0.74rem;
	font-weight: 800;
}

.lb-kit-switch-swatches {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 0.24rem;
	width: min(138px, 100%);
}

.lb-kit-switch-swatches i {
	display: block;
	height: 10px;
	border: 1px solid rgba(18, 20, 19, 0.14);
	border-radius: 999px;
}

.lb-kit-empty,
.lb-kit-shell {
	min-height: 0;
	border: 1px solid var(--lb-line);
	border-radius: var(--lb-radius);
	background: var(--lb-panel);
	box-shadow: var(--lb-shadow);
}

.lb-kit-empty {
	display: grid;
	align-content: center;
	justify-items: center;
	gap: 0.4rem;
	padding: 2rem;
	color: var(--lb-ink-soft);
	text-align: center;
}

.lb-kit-empty strong {
	color: var(--lb-ink);
}

.lb-kit-shell {
	display: grid;
	grid-template-rows: auto minmax(0, 1fr);
	overflow: hidden;
}

.lb-kit-overview {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 0.8rem 1rem;
	align-items: start;
	padding: 1rem;
	border-bottom: 1px solid var(--lb-line);
	background: #f6f8f4;
}

.lb-kit-overview h2 {
	margin-bottom: 0.25rem;
}

.lb-kit-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 0.55rem;
}

.lb-kit-overview .lb-form-note {
	grid-column: 1 / -1;
	margin: 0;
}

.lb-kit-body {
	display: grid;
	grid-template-columns: minmax(240px, 0.34fr) minmax(0, 1fr);
	min-height: 0;
}

.lb-kit-summary {
	display: grid;
	align-content: start;
	gap: 1rem;
	min-height: 0;
	padding: 1rem;
	border-right: 1px solid var(--lb-line);
	background: #f8faf6;
	overflow: auto;
}

.lb-kit-summary h3 {
	margin-bottom: 0.55rem;
}

.lb-kit-summary dl {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 0.38rem 0.7rem;
	margin: 0;
	font-size: 0.82rem;
}

.lb-kit-summary dt {
	color: var(--lb-ink-soft);
	font-weight: 800;
}

.lb-kit-summary dd {
	min-width: 0;
	margin: 0;
	overflow-wrap: anywhere;
}

.lb-kit-assets {
	display: grid;
	align-content: start;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 1rem;
	min-height: 0;
	padding: 1rem;
	overflow: auto;
}

.lb-kit-asset-card {
	display: grid;
	align-content: start;
	gap: 0.72rem;
	padding: 0.82rem;
	border: 1px solid var(--lb-line);
	border-radius: var(--lb-radius);
	background: var(--lb-panel);
}

.lb-kit-asset-card img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	border: 1px solid rgba(18, 20, 19, 0.12);
	border-radius: var(--lb-radius);
	background: var(--lb-paper);
	object-fit: cover;
}

.lb-kit-asset-card-icon img {
	aspect-ratio: 1;
	width: min(168px, 100%);
}

.lb-kit-asset-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.8rem;
}

.lb-kit-asset-header h3 {
	margin: 0;
}

.lb-kit-asset-card textarea {
	width: 100%;
	min-height: 110px;
	resize: vertical;
	border: 1px solid var(--lb-line);
	border-radius: var(--lb-radius);
	background: var(--lb-paper);
	color: var(--lb-ink-soft);
	padding: 0.68rem;
	font-family: var(--lb-mono);
	font-size: 0.72rem;
	line-height: 1.45;
}

.lb-kit-asset-card textarea:focus {
	border-color: var(--lb-blue);
	outline: 3px solid rgba(45, 127, 249, 0.16);
}

.lb-kit-asset-actions {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.45rem;
}

.lb-brand-dashboard {
	display: grid;
	grid-template-rows: auto minmax(0, 1fr) auto;
	gap: 1rem;
	min-height: 0;
	padding: 1rem;
	overflow: hidden;
}

.lb-brand-system-panel,
.lb-brand-share-panel,
.lb-brand-asset {
	border: 1px solid var(--lb-line);
	border-radius: var(--lb-radius);
	background: var(--lb-panel);
	box-shadow: var(--lb-shadow);
}

.lb-brand-system-panel {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(240px, 360px);
	align-items: center;
	gap: 1rem;
	min-height: 154px;
	padding: 1rem;
	overflow: hidden;
}

.lb-brand-system-panel h2 {
	margin-bottom: 0.42rem;
	font-size: 1.25rem;
}

.lb-brand-system-panel p:not(.lb-kicker) {
	max-width: 64ch;
	margin-bottom: 0;
	color: var(--lb-ink-soft);
}

.lb-brand-system-panel img {
	justify-self: end;
	width: min(330px, 100%);
	max-height: 110px;
	object-fit: contain;
}

.lb-brand-asset-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
	gap: 1rem;
	min-height: 0;
	overflow: auto;
	padding-bottom: 0.25rem;
}

.lb-brand-asset {
	display: grid;
	grid-template-rows: auto minmax(0, 1fr) auto;
	align-content: start;
	gap: 0.85rem;
	min-height: 0;
	padding: 0.95rem;
}

.lb-brand-asset-preview {
	display: grid;
	place-items: center;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border: 1px solid var(--lb-line);
	border-radius: var(--lb-radius);
	background-color: #ffffff;
	background-image:
		linear-gradient(45deg, #d8e1dc 25%, transparent 25%),
		linear-gradient(-45deg, #d8e1dc 25%, transparent 25%),
		linear-gradient(45deg, transparent 75%, #d8e1dc 75%),
		linear-gradient(-45deg, transparent 75%, #d8e1dc 75%);
	background-position: 0 0, 0 8px, 8px -8px, -8px 0;
	background-size: 16px 16px;
}

.lb-brand-asset-preview img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.lb-brand-asset-icon .lb-brand-asset-preview {
	justify-self: center;
	width: min(220px, 100%);
	aspect-ratio: 1;
	background-image: none;
	background-color: #f5faf7;
}

.lb-brand-asset-card-preview .lb-brand-asset-preview {
	aspect-ratio: 120 / 63;
	background-image: none;
	background-color: var(--lb-paper);
}

.lb-brand-asset-copy {
	min-width: 0;
}

.lb-brand-asset-copy h2 {
	margin-bottom: 0.35rem;
	font-size: 1.06rem;
}

.lb-brand-asset-copy p:not(.lb-kicker) {
	margin-bottom: 0;
	color: var(--lb-ink-soft);
	font-size: 0.9rem;
}

.lb-brand-asset-actions {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.5rem;
}

.lb-brand-share-panel {
	display: grid;
	gap: 0.8rem;
	padding: 1rem;
}

.lb-brand-share-panel h2 {
	margin: 0;
	font-size: 1.08rem;
}

.lb-brand-share-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.75rem;
}

.lb-brand-share-grid div {
	display: grid;
	gap: 0.2rem;
	min-width: 0;
	padding: 0.75rem;
	border: 1px solid var(--lb-line);
	border-radius: var(--lb-radius);
	background: #f8faf6;
}

.lb-brand-share-grid strong {
	font-size: 0.9rem;
}

.lb-brand-share-grid span {
	color: var(--lb-ink-soft);
	font-size: 0.8rem;
}

.lb-studio {
	display: grid;
	grid-template-columns: minmax(220px, 0.72fr) minmax(320px, 1fr) minmax(290px, 0.92fr);
	min-height: 0;
	overflow: hidden;
}

.lb-studio-sidebar,
.lb-studio-form,
.lb-preview-panel {
	min-height: 0;
	padding: clamp(0.9rem, 1.7vw, 1.2rem);
	overflow: auto;
}

.lb-studio-sidebar,
.lb-studio-form {
	border-right: 1px solid var(--lb-line);
}

.lb-studio-sidebar {
	display: grid;
	align-content: start;
	gap: 1rem;
	background: #f6f8f4;
}

.lb-lede,
.lb-muted,
.lb-form-note {
	color: var(--lb-ink-soft);
}

.lb-status-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	border: 1px solid var(--lb-line);
	border-radius: var(--lb-radius);
	overflow: hidden;
}

.lb-status-grid div {
	padding: 0.78rem;
}

.lb-status-grid div + div {
	border-left: 1px solid var(--lb-line);
}

.lb-status-grid strong,
.lb-status-grid span {
	display: block;
}

.lb-status-grid strong {
	font-size: 1.2rem;
}

.lb-status-grid span {
	color: var(--lb-ink-soft);
	font-size: 0.8rem;
}

.lb-section-heading {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1rem;
}

.lb-saved-kits {
	display: grid;
	gap: 0.85rem;
}

.lb-kit-list {
	display: grid;
	gap: 0.55rem;
}

.lb-kit-list button {
	width: 100%;
	min-height: 44px;
	border: 1px solid var(--lb-line);
	border-radius: var(--lb-radius);
	background: var(--lb-panel);
	color: var(--lb-ink);
	padding: 0.7rem 0.85rem;
	text-align: left;
}

.lb-kit-list button:hover,
.lb-kit-list button:focus-visible {
	border-color: var(--lb-ink);
	outline: none;
}

.lb-studio-form {
	display: grid;
	align-content: start;
	gap: 1rem;
}

.lb-field-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.78rem;
}

.lb-field-grid label {
	display: grid;
	gap: 0.34rem;
	color: var(--lb-ink-soft);
	font-size: 0.86rem;
}

.lb-field-grid label:nth-child(3),
.lb-field-grid label:nth-child(4) {
	grid-column: span 2;
}

.lb-field-grid input,
.lb-field-grid select {
	width: 100%;
	min-height: 44px;
	border: 1px solid var(--lb-line);
	border-radius: var(--lb-radius);
	background: var(--lb-paper);
	color: var(--lb-ink);
	padding: 0.68rem 0.78rem;
}

.lb-palette-editor {
	display: grid;
	gap: 0.65rem;
	padding: 0.78rem;
	border: 1px solid var(--lb-line);
	border-radius: var(--lb-radius);
	background: var(--lb-panel);
}

.lb-palette-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	color: var(--lb-ink-soft);
	font-size: 0.84rem;
	font-weight: 900;
}

.lb-color-grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 0.5rem;
}

.lb-color-grid label {
	display: grid;
	gap: 0.34rem;
	min-width: 0;
	color: var(--lb-ink-soft);
	font-size: 0.72rem;
	font-weight: 800;
}

.lb-color-grid input[type="color"] {
	width: 100%;
	min-width: 0;
	height: 44px;
	border: 1px solid var(--lb-line);
	border-radius: var(--lb-radius);
	background: var(--lb-paper);
	padding: 0.18rem;
}

.lb-color-grid input[type="color"]:focus {
	border-color: var(--lb-blue);
	outline: 3px solid rgba(45, 127, 249, 0.16);
}

.lb-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.62rem;
}

.lb-primary-button,
.lb-secondary-button,
.lb-icon-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	border-radius: var(--lb-radius);
	padding: 0.68rem 0.9rem;
	font-weight: 900;
	text-decoration: none;
}

.lb-primary-button {
	border: 2px solid var(--lb-ink);
	background: var(--lb-signal);
	color: var(--lb-ink);
	box-shadow: 4px 4px 0 var(--lb-ink);
}

.lb-lb-button {
	background: var(--lb-blue);
	color: var(--lb-paper);
}

.lb-secondary-button,
.lb-icon-button {
	border: 1px solid var(--lb-line);
	background: var(--lb-panel);
	color: var(--lb-ink);
}

.lb-primary-button:hover,
.lb-primary-button:focus-visible,
.lb-secondary-button:hover,
.lb-secondary-button:focus-visible,
.lb-icon-button:hover,
.lb-icon-button:focus-visible {
	transform: translateY(-1px);
	outline: none;
}

.lb-preview-panel {
	display: grid;
	align-content: start;
	gap: 1rem;
	background: #f6f8f4;
}

.lb-brand-preview {
	display: grid;
	grid-template-columns: 76px minmax(0, 1fr);
	gap: 1rem;
	align-items: center;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--lb-line);
}

.lb-logo-draft {
	display: grid;
	place-items: center;
	aspect-ratio: 1;
	border: 2px solid var(--lb-ink);
	border-radius: var(--lb-radius);
	background: var(--lb-signal);
	font-family: var(--lb-mono);
	font-size: 1.18rem;
	font-weight: 900;
	box-shadow: 6px 6px 0 var(--lb-ink);
}

.lb-preview-block {
	padding: 0;
}

.lb-output-panel {
	display: grid;
	gap: 0.8rem;
	padding-top: 1rem;
	border-top: 1px solid var(--lb-line);
}

.lb-visual-panel {
	display: grid;
	gap: 0.8rem;
	padding-top: 1rem;
	border-top: 1px solid var(--lb-line);
}

.lb-output-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.8rem;
}

.lb-output-controls,
.lb-output-section-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
}

.lb-output-content {
	display: grid;
	gap: 0.65rem;
}

.lb-output-content article {
	display: grid;
	gap: 0.5rem;
	padding: 0.72rem;
	border: 1px solid var(--lb-line);
	border-radius: var(--lb-radius);
	background: var(--lb-panel);
}

.lb-output-content h4 {
	margin: 0;
	font-size: 0.82rem;
}

.lb-output-content textarea {
	width: 100%;
	min-height: 118px;
	resize: vertical;
	border: 1px solid var(--lb-line);
	border-radius: var(--lb-radius);
	background: var(--lb-paper);
	color: var(--lb-ink-soft);
	padding: 0.68rem;
	white-space: pre-wrap;
	font-size: 0.88rem;
	line-height: 1.45;
}

.lb-output-content textarea:focus {
	border-color: var(--lb-blue);
	outline: 3px solid rgba(45, 127, 249, 0.16);
}

.lb-output-section-actions {
	justify-content: flex-end;
}

.lb-icon-button:disabled {
	cursor: wait;
	opacity: 0.62;
}

.lb-asset-grid {
	display: grid;
	gap: 0.75rem;
}

.lb-asset-card {
	display: grid;
	gap: 0.52rem;
	padding: 0.72rem;
	border: 1px solid var(--lb-line);
	border-radius: var(--lb-radius);
	background: var(--lb-panel);
}

.lb-asset-card img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	border: 1px solid rgba(18, 20, 19, 0.12);
	border-radius: var(--lb-radius);
	background: var(--lb-paper);
	object-fit: cover;
}

.lb-asset-card-icon img {
	aspect-ratio: 1;
	width: min(132px, 100%);
}

.lb-asset-card h4 {
	margin: 0;
	font-size: 0.86rem;
}

.lb-asset-status {
	justify-self: start;
	min-height: 24px;
	border: 1px solid var(--lb-line);
	border-radius: 999px;
	background: var(--lb-mist);
	color: var(--lb-ink-soft);
	padding: 0.18rem 0.52rem;
	font-family: var(--lb-mono);
	font-size: 0.64rem;
	font-weight: 900;
	text-transform: uppercase;
}

.lb-asset-card textarea {
	width: 100%;
	min-height: 92px;
	resize: vertical;
	border: 1px solid var(--lb-line);
	border-radius: var(--lb-radius);
	background: var(--lb-paper);
	color: var(--lb-ink-soft);
	padding: 0.68rem;
	font-family: var(--lb-mono);
	font-size: 0.72rem;
	line-height: 1.45;
}

.lb-asset-card textarea:focus {
	border-color: var(--lb-blue);
	outline: 3px solid rgba(45, 127, 249, 0.16);
}

.lb-version-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
}

.lb-version-list button {
	min-height: 34px;
	border: 1px solid var(--lb-line);
	border-radius: var(--lb-radius);
	background: var(--lb-panel);
	color: var(--lb-ink);
	padding: 0.42rem 0.62rem;
	font-size: 0.78rem;
	font-weight: 800;
}

.lb-version-list button:hover,
.lb-version-list button:focus-visible,
.lb-version-list button.is-active {
	border-color: var(--lb-blue);
	outline: none;
}

.lb-swatch-row {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 0.45rem;
}

.lb-swatch {
	display: grid;
	align-content: end;
	min-height: 74px;
	border: 1px solid rgba(18, 20, 19, 0.18);
	border-radius: var(--lb-radius);
	overflow: hidden;
}

.lb-swatch span {
	display: block;
	background: rgba(255, 255, 255, 0.84);
	padding: 0.32rem;
	font-family: var(--lb-mono);
	font-size: 0.66rem;
}

.lb-plain-list,
.lb-check-list {
	display: grid;
	gap: 0.44rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.lb-plain-list li,
.lb-check-list li {
	position: relative;
	padding-left: 1.1rem;
}

.lb-plain-list li::before,
.lb-check-list li::before {
	content: "";
	position: absolute;
	top: 0.62em;
	left: 0;
	width: 0.42rem;
	height: 0.42rem;
	border-radius: 50%;
	background: var(--lb-coral);
}

.lb-content-wrap {
	max-width: 860px;
	margin: 0 auto;
	padding: clamp(3rem, 8vw, 6rem) 1rem;
}

.lb-entry-header {
	margin-bottom: 2rem;
}

.lb-entry-content > * + * {
	margin-top: 1rem;
}

.lb-post-list {
	display: grid;
	gap: 1rem;
}

.lb-post-card {
	padding: 1rem;
	border: 1px solid var(--lb-line);
	border-radius: var(--lb-radius);
	background: var(--lb-panel);
}

.lb-error-page {
	text-align: center;
}

.lb-site-header,
.lb-site-footer {
	display: none;
}

.lb-editor-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: grid;
	place-items: center;
	padding: 1rem;
	background: rgba(18, 20, 19, 0.58);
}

.lb-editor-modal[hidden] {
	display: none !important;
}

.lb-editor-panel {
	display: grid;
	grid-template-rows: auto minmax(0, 1fr) auto;
	width: min(1440px, 100%);
	height: min(920px, calc(100dvh - 2rem));
	min-height: 0;
	overflow: hidden;
	border: 1px solid var(--lb-ink);
	border-radius: var(--lb-radius);
	background: var(--lb-paper);
	box-shadow: 0 24px 70px rgba(18, 20, 19, 0.3);
}

.admin-bar .lb-editor-panel {
	height: min(900px, calc(100dvh - 48px));
}

.lb-editor-header,
.lb-editor-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1rem 1.25rem;
	border-bottom: 1px solid var(--lb-line);
	background: var(--lb-panel);
}

.lb-editor-header h2 {
	margin-bottom: 0.2rem;
}

.lb-editor-header .lb-muted {
	margin-bottom: 0;
}

.lb-editor-footer {
	justify-content: flex-end;
	border-top: 1px solid var(--lb-line);
	border-bottom: 0;
}

.lb-editor-layout {
	display: grid;
	grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
	min-height: 0;
}

.lb-editor-tools {
	display: grid;
	align-content: start;
	gap: 1rem;
	min-height: 0;
	padding: 1rem;
	overflow: auto;
	border-right: 1px solid var(--lb-line);
	background: #f5f8f2;
}

.lb-editor-tools section {
	display: grid;
	gap: 0.7rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--lb-line);
}

.lb-editor-tools section:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.lb-editor-tools h3 {
	margin: 0;
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0;
}

.lb-editor-tool-grid,
.lb-editor-button-row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.45rem;
}

.lb-editor-tool-grid button,
.lb-editor-button-row button {
	min-height: 38px;
	padding: 0.55rem 0.65rem;
	border: 1px solid var(--lb-line-strong);
	border-radius: var(--lb-radius);
	background: var(--lb-panel);
	color: var(--lb-ink);
	font-size: 0.82rem;
	font-weight: 800;
}

.lb-editor-tool-grid button.is-active,
.lb-editor-button-row button:active {
	border-color: var(--lb-ink);
	background: var(--lb-ink);
	color: var(--lb-paper);
}

.lb-editor-control-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.65rem;
}

.lb-editor-control-grid label,
.lb-editor-tools label {
	display: grid;
	gap: 0.35rem;
	font-size: 0.78rem;
	font-weight: 800;
}

.lb-editor-control-grid input[type="color"] {
	width: 100%;
	height: 42px;
	padding: 0.2rem;
	border: 1px solid var(--lb-line-strong);
	border-radius: var(--lb-radius);
	background: var(--lb-panel);
}

.lb-editor-control-grid input[type="range"],
.lb-editor-tools input[type="range"] {
	width: 100%;
	accent-color: var(--lb-signal);
}

.lb-editor-check {
	grid-template-columns: auto 1fr;
	align-items: center;
	grid-column: 1 / -1;
}

.lb-editor-check input {
	width: 18px;
	height: 18px;
}

.lb-editor-tools textarea {
	width: 100%;
	min-height: 82px;
	resize: vertical;
	padding: 0.75rem;
	border: 1px solid var(--lb-line);
	border-radius: var(--lb-radius);
	background: var(--lb-panel);
}

.lb-editor-file input {
	width: 100%;
	padding: 0.65rem;
	border: 1px dashed var(--lb-line-strong);
	border-radius: var(--lb-radius);
	background: var(--lb-panel);
}

.lb-editor-stage {
	position: relative;
	min-width: 0;
	min-height: 0;
	overflow: auto;
	background-color: #edf3ee;
	background-image:
		linear-gradient(45deg, rgba(174, 187, 180, 0.34) 25%, transparent 25%),
		linear-gradient(-45deg, rgba(174, 187, 180, 0.34) 25%, transparent 25%),
		linear-gradient(45deg, transparent 75%, rgba(174, 187, 180, 0.34) 75%),
		linear-gradient(-45deg, transparent 75%, rgba(174, 187, 180, 0.34) 75%);
	background-position: 0 0, 0 12px, 12px -12px, -12px 0;
	background-size: 24px 24px;
}

.lb-editor-stage-toolbar {
	position: sticky;
	top: 0.75rem;
	left: 0.75rem;
	z-index: 10;
	display: flex;
	align-items: center;
	gap: 0.35rem;
	width: max-content;
	margin: 0.75rem 0 -0.35rem 0.75rem;
	padding: 0.35rem;
	border: 1px solid var(--lb-line-strong);
	border-radius: var(--lb-radius);
	background: rgba(255, 255, 255, 0.94);
	box-shadow: 0 10px 28px rgba(18, 20, 19, 0.14);
}

.lb-editor-stage-toolbar button,
.lb-editor-stage-toolbar span {
	display: inline-grid;
	place-items: center;
	min-height: 34px;
	padding: 0.45rem 0.62rem;
	border-radius: var(--lb-radius);
	font-size: 0.78rem;
	font-weight: 900;
	line-height: 1;
}

.lb-editor-stage-toolbar button {
	border: 1px solid var(--lb-line-strong);
	background: var(--lb-panel);
	color: var(--lb-ink);
}

.lb-editor-stage-toolbar button:hover,
.lb-editor-stage-toolbar button:focus-visible {
	border-color: var(--lb-ink);
	background: var(--lb-ink);
	color: var(--lb-paper);
}

.lb-editor-stage-toolbar span {
	min-width: 58px;
	border: 1px solid var(--lb-line);
	background: #f5f8f2;
	color: var(--lb-ink);
}

.lb-editor-canvas-wrap {
	display: grid;
	place-items: center;
	min-width: max-content;
	min-height: 100%;
	padding: 2rem;
}

.lb-editor-canvas-wrap canvas {
	display: block;
	max-width: none;
	background-color: #ffffff;
	background-image:
		linear-gradient(45deg, #d8e1dc 25%, transparent 25%),
		linear-gradient(-45deg, #d8e1dc 25%, transparent 25%),
		linear-gradient(45deg, transparent 75%, #d8e1dc 75%),
		linear-gradient(-45deg, transparent 75%, #d8e1dc 75%);
	background-position: 0 0, 0 12px, 12px -12px, -12px 0;
	background-size: 24px 24px;
	border: 1px solid var(--lb-ink);
	border-radius: var(--lb-radius);
	box-shadow: 0 18px 45px rgba(18, 20, 19, 0.18);
	touch-action: none;
	transform-origin: center;
}

/* LB assistant integration layer. */
.lb-mwai-chat-panel .mwai-chatgpt-theme,
.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-chat,
.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-body {
	--mwai-spacing: 14px;
	--mwai-fontSize: 0.95rem;
	--mwai-lineHeight: 1.55;
	--mwai-borderRadius: var(--lb-radius);
	--mwai-borderColor: var(--lb-line);
	--mwai-fontColor: var(--lb-ink);
	--mwai-backgroundPrimaryColor: var(--lb-panel);
	--mwai-backgroundSecondaryColor: var(--lb-paper);
	--mwai-backgroundHeaderColor: #f6f8f4;
	--mwai-bubbleColor: var(--lb-panel);
	--mwai-accentColor: var(--lb-blue);
	--mwai-headerColor: var(--lb-ink);
	--mwai-conversationsBackgroundColor: var(--lb-panel);
	--mwai-conversationsTextColor: var(--lb-ink);
	--mwai-errorBackgroundColor: #fff3ed;
	--mwai-errorTextColor: #8c2d16;
}

.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-body {
	display: grid !important;
	grid-template-rows: minmax(0, 1fr) auto !important;
	min-height: 0 !important;
	background: var(--lb-panel) !important;
	color: var(--lb-ink) !important;
}

.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-conversation,
.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-messages,
.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-content {
	min-height: 0 !important;
	max-height: none !important;
	background: linear-gradient(180deg, #ffffff 0%, #f8faf6 100%) !important;
	scrollbar-color: var(--lb-line-strong) transparent;
}

.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-conversation::-webkit-scrollbar,
.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-messages::-webkit-scrollbar,
.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-content::-webkit-scrollbar,
.lb-thread-list::-webkit-scrollbar {
	width: 10px;
}

.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-conversation::-webkit-scrollbar-thumb,
.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-messages::-webkit-scrollbar-thumb,
.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-content::-webkit-scrollbar-thumb,
.lb-thread-list::-webkit-scrollbar-thumb {
	border: 3px solid transparent;
	border-radius: 999px;
	background: var(--lb-line-strong);
	background-clip: padding-box;
}

.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-reply,
.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-message {
	width: min(860px, 100%) !important;
	max-width: min(860px, 100%) !important;
	margin: 0 0 0.9rem !important;
	padding: 0 !important;
	color: var(--lb-ink) !important;
}

.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-reply.mwai-user,
.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-message.mwai-user {
	margin-left: auto !important;
}

.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-reply .mwai-name,
.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-message .mwai-name {
	display: flex !important;
	align-items: center !important;
	gap: 0.42rem !important;
	margin: 0 0 0.34rem !important;
	color: var(--lb-ink-soft) !important;
	font-family: var(--lb-mono) !important;
	font-size: 0.68rem !important;
	font-weight: 900 !important;
	letter-spacing: 0 !important;
	line-height: 1.1 !important;
	text-transform: uppercase !important;
}

.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-reply.mwai-user .mwai-name,
.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-message.mwai-user .mwai-name {
	justify-content: flex-end !important;
}

.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-name .mwai-avatar {
	display: grid !important;
	place-items: center !important;
	width: 28px !important;
	height: 28px !important;
	min-width: 28px !important;
	border: 1px solid var(--lb-line) !important;
	border-radius: 50% !important;
	background: var(--lb-paper) !important;
	box-shadow: none !important;
}

.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-reply.mwai-ai .mwai-name .mwai-avatar,
.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-message.mwai-ai .mwai-name .mwai-avatar {
	border-color: rgba(24, 214, 106, 0.6) !important;
	background: var(--lb-signal) !important;
}

.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-reply.mwai-user .mwai-name .mwai-avatar,
.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-message.mwai-user .mwai-name .mwai-avatar {
	border-color: var(--lb-ink) !important;
	background: var(--lb-ink) !important;
}

.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-name .mwai-avatar img,
.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-name .mwai-avatar svg {
	width: 18px !important;
	height: 18px !important;
	object-fit: contain !important;
}

.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-reply .mwai-text,
.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-message .mwai-text {
	max-width: 100% !important;
	border: 1px solid var(--lb-line) !important;
	border-radius: var(--lb-radius) !important;
	background: var(--lb-panel) !important;
	color: var(--lb-ink) !important;
	padding: 0.82rem 0.92rem !important;
	box-shadow: 0 10px 22px rgba(18, 20, 19, 0.05) !important;
	font-size: 0.95rem !important;
	line-height: 1.55 !important;
}

.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-reply.mwai-ai .mwai-text,
.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-message.mwai-ai .mwai-text {
	border-left: 4px solid var(--lb-signal) !important;
	background: #fbfdf9 !important;
}

.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-reply.mwai-user .mwai-text,
.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-message.mwai-user .mwai-text {
	border-color: var(--lb-ink) !important;
	background: var(--lb-ink) !important;
	color: var(--lb-paper) !important;
	box-shadow: 4px 4px 0 var(--lb-signal) !important;
}

.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-reply.mwai-user .mwai-text *,
.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-message.mwai-user .mwai-text * {
	color: var(--lb-paper) !important;
}

.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-reply .mwai-text a,
.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-message .mwai-text a {
	color: var(--lb-blue) !important;
	text-decoration-color: var(--lb-signal) !important;
}

.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-reply .mwai-text pre,
.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-reply .mwai-text code,
.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-message .mwai-text pre,
.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-message .mwai-text code {
	border-radius: var(--lb-radius) !important;
	background: #edf3ee !important;
	color: var(--lb-ink) !important;
	font-family: var(--lb-mono) !important;
}

.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-input,
.lb-mwai-chat-panel .mwai-chatgpt-theme form.mwai-input {
	gap: 0.62rem !important;
	margin: 0 !important;
	border: 0 !important;
	border-top: 1px solid var(--lb-line) !important;
	border-radius: 0 !important;
	background: #f6f8f4 !important;
	padding: 0.82rem !important;
	box-shadow: none !important;
}

.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-input .mwai-input-text {
	min-height: 56px !important;
	border: 1px solid var(--lb-line-strong) !important;
	border-radius: var(--lb-radius) !important;
	background: var(--lb-panel) !important;
	box-shadow: inset 0 1px 0 rgba(18, 20, 19, 0.04) !important;
}

.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-input textarea,
.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-input input[type="text"] {
	min-height: 50px !important;
	background: transparent !important;
	color: var(--lb-ink) !important;
	font-size: 0.95rem !important;
	line-height: 1.45 !important;
}

.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-input textarea::placeholder,
.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-input input[type="text"]::placeholder {
	color: rgba(59, 66, 63, 0.72) !important;
}

.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-input button.mwai-input-submit {
	width: 42px !important;
	height: 42px !important;
	min-width: 42px !important;
	min-height: 42px !important;
	border: 1px solid var(--lb-ink) !important;
	border-radius: var(--lb-radius) !important;
	background: var(--lb-panel) !important;
	color: var(--lb-ink) !important;
	padding: 0 !important;
	box-shadow: none !important;
}

.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-input button.mwai-input-submit.mwai-has-content {
	background: var(--lb-signal) !important;
	color: var(--lb-ink) !important;
	box-shadow: 3px 3px 0 var(--lb-ink) !important;
}

.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-input button.mwai-input-submit:hover,
.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-input button.mwai-input-submit:focus-visible {
	transform: translateY(-1px) !important;
	outline: 3px solid rgba(24, 214, 106, 0.2) !important;
}

.lb-mwai-chat-panel .mwai-chatgpt-theme button:not(.mwai-input-submit) {
	border-radius: var(--lb-radius) !important;
	font-weight: 900 !important;
}

.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-reply-actions {
	border: 1px solid var(--lb-line) !important;
	border-radius: var(--lb-radius) !important;
	background: rgba(255, 255, 255, 0.92) !important;
	box-shadow: 0 8px 18px rgba(18, 20, 19, 0.06) !important;
}

.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-reply-actions button,
.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-reply-actions .mwai-copy-button,
.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-reply-actions .mwai-download-button,
.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-reply-actions .mwai-pdf-button {
	color: var(--lb-ink) !important;
	fill: var(--lb-ink) !important;
}

.lb-local-threads {
	background: linear-gradient(180deg, #ffffff 0%, #f8faf6 100%);
}

.lb-new-thread,
.lb-thread-list button {
	transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.lb-new-thread:hover,
.lb-new-thread:focus-visible {
	transform: translateY(-1px);
	outline: 3px solid rgba(24, 214, 106, 0.18);
	box-shadow: 3px 3px 0 var(--lb-signal);
}

.lb-thread-list button {
	position: relative;
	overflow: hidden;
}

.lb-thread-list button::before {
	content: "";
	position: absolute;
	top: 0.65rem;
	bottom: 0.65rem;
	left: 0;
	width: 4px;
	border-radius: 0 999px 999px 0;
	background: transparent;
}

.lb-thread-list button.is-active {
	border-color: var(--lb-ink);
	background: #f4fff8;
	box-shadow: 0 0 0 3px rgba(24, 214, 106, 0.16);
}

.lb-thread-list button.is-active::before {
	background: var(--lb-signal);
}

.lb-ai-brief-panel {
	background: linear-gradient(180deg, #f6f8f4 0%, #eef5f0 100%);
}

.lb-ai-brief:placeholder-shown,
.lb-ai-brief:read-only {
	color: var(--lb-ink-soft);
}

@media (max-width: 720px) {
	.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-conversation,
	.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-messages,
	.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-content {
		padding: 0.75rem !important;
	}

	.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-reply,
	.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-message {
		max-width: 100% !important;
	}

	.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-reply .mwai-text,
	.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-message .mwai-text {
		font-size: 0.9rem !important;
	}

	.lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-input,
	.lb-mwai-chat-panel .mwai-chatgpt-theme form.mwai-input {
		padding: 0.68rem !important;
	}
}

.lb-mwai-chat-panel.has-lb-tools {
	grid-template-rows: auto auto auto minmax(0, 1fr);
}

.lb-mwai-chat-panel.has-lb-tools > .mwai-chatbot-container {
	grid-row: 4;
}

.lb-mwai-chat-panel.has-lb-tools .lb-tool-thread {
	max-height: min(220px, 32dvh);
}

.lb-toolbelt {
	display: grid;
	grid-template-columns: repeat(3, minmax(84px, auto)) minmax(150px, 1fr) auto;
	gap: 8px;
	align-items: center;
	padding: 10px 12px;
	border-bottom: 1px solid rgba(18, 20, 19, .08);
	background: rgba(251, 252, 248, .94);
}

.lb-tool-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 34px;
	padding: 0 10px;
	border: 1px solid rgba(18, 20, 19, .12);
	border-radius: 8px;
	background: #fff;
	color: rgba(18, 20, 19, .78);
	font-size: .78rem;
	font-weight: 800;
	line-height: 1;
	cursor: pointer;
}

.lb-tool-toggle input {
	accent-color: #18d66a;
	inline-size: 14px;
	block-size: 14px;
	margin: 0;
}

.lb-tool-kit-select {
	inline-size: 100%;
	min-width: 0;
	min-height: 34px;
	border: 1px solid rgba(18, 20, 19, .12);
	border-radius: 8px;
	background: #fff;
	color: #121413;
	font: inherit;
	font-size: .82rem;
	font-weight: 750;
	padding: 0 10px;
}

.lb-tool-status {
	grid-column: 1 / -1;
	min-height: 16px;
	color: #3b423f;
	font-size: .76rem;
	font-weight: 750;
}

.lb-tool-thread {
	min-height: 0;
	overflow: auto;
	display: grid;
	align-content: start;
	gap: 10px;
	padding: 12px;
	background: linear-gradient(180deg, rgba(24, 214, 106, .05), rgba(45, 127, 249, .04));
	border-bottom: 1px solid rgba(18, 20, 19, .08);
}

.lb-tool-thread::-webkit-scrollbar {
	inline-size: 9px;
}

.lb-tool-thread::-webkit-scrollbar-thumb {
	background: rgba(18, 20, 19, .2);
	border-radius: 999px;
}

.lb-tool-empty {
	margin: 0;
	color: rgba(18, 20, 19, .55);
	font-size: .82rem;
	font-weight: 750;
}

.lb-tool-message {
	display: grid;
	gap: 6px;
	max-width: min(760px, 100%);
	padding: 10px 12px;
	border: 1px solid rgba(18, 20, 19, .1);
	border-radius: 10px;
	background: rgba(255, 255, 255, .94);
	box-shadow: 0 12px 28px rgba(18, 20, 19, .06);
}

.lb-tool-message-user {
	justify-self: end;
	background: #121413;
	color: #fbfcf8;
}

.lb-tool-message-label {
	color: #0a7134;
	font-size: .68rem;
	font-weight: 900;
	text-transform: uppercase;
	letter-spacing: 0;
}

.lb-tool-message-user .lb-tool-message-label {
	color: #f2c94c;
}

.lb-tool-message-text {
	white-space: pre-wrap;
	color: inherit;
	font-size: .88rem;
	line-height: 1.55;
}

.lb-tool-message small {
	color: #3b423f;
	font-size: .72rem;
	font-weight: 800;
}

.lb-tool-message-user small {
	color: rgba(251, 252, 248, .68);
}

.lb-tool-sources {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.lb-tool-sources a {
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	border: 1px solid rgba(45, 127, 249, .18);
	border-radius: 999px;
	background: rgba(45, 127, 249, .08);
	color: #174f9c;
	font-size: .72rem;
	font-weight: 850;
	line-height: 1;
	padding: 7px 9px;
	text-decoration: none;
}

.lb-tool-media-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 10px;
}

.lb-tool-media-card {
	display: grid;
	gap: 9px;
	overflow: hidden;
	border: 1px solid rgba(18, 20, 19, .1);
	border-radius: 8px;
	background: #fbfcf8;
}

.lb-tool-media-card img {
	display: block;
	inline-size: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	background: #121413;
}

.lb-tool-media-body {
	display: grid;
	gap: 7px;
	padding: 0 9px 9px;
}

.lb-tool-media-body strong {
	color: #121413;
	font-size: .84rem;
}

.lb-tool-media-body p {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin: 0;
	color: rgba(18, 20, 19, .6);
	font-size: .76rem;
	line-height: 1.4;
}

.lb-tool-media-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.lb-tool-media-actions .lb-icon-button {
	min-height: 30px;
	padding: 0 8px;
	font-size: .7rem;
}

@media (max-width: 720px) {
	.lb-mwai-chat-panel.has-lb-tools {
		grid-template-rows: auto auto minmax(116px, .36fr) minmax(0, 1fr);
	}

	.lb-toolbelt {
		grid-template-columns: repeat(3, 1fr);
		padding: 8px;
	}

	.lb-tool-kit-select,
	.lb-toolbelt [data-lb-tool-run],
	.lb-tool-status {
		grid-column: 1 / -1;
	}

	.lb-tool-toggle {
		min-width: 0;
		padding: 0 6px;
	}

	.lb-tool-thread {
		padding: 9px;
	}
}

@media (max-width: 1180px) {
	.lb-mwai-shell {
		grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
	}

	.lb-studio {
		grid-template-columns: minmax(210px, 0.75fr) minmax(300px, 1.1fr);
	}

	.lb-preview-panel {
		grid-column: 1 / -1;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		border-top: 1px solid var(--lb-line);
	}

	.lb-brand-preview,
	.lb-preview-block:first-of-type,
	.lb-visual-panel {
		grid-column: span 2;
	}
}

@media (max-width: 900px) {
	.lb-console {
		grid-template-columns: 72px minmax(0, 1fr);
	}

	.lb-rail {
		padding: 0.75rem 0.5rem;
	}

	.lb-rail-brand span:not(.lb-brand-mark),
	.lb-rail-status {
		display: none;
	}

	.lb-mwai-shell {
		grid-template-columns: minmax(190px, 230px) minmax(0, 1fr);
		gap: 0.75rem;
	}

	.lb-view-header {
		min-height: 76px;
	}

	.lb-view-header p:last-child {
		display: none;
	}
}

@media (max-width: 720px) {
	.lb-console {
		grid-template-columns: 1fr;
		grid-template-rows: 68px minmax(0, 1fr);
	}

	.admin-bar .lb-console {
		height: calc(100dvh - 46px);
	}

	.lb-rail {
		grid-template-columns: auto 1fr auto;
		grid-template-rows: 1fr;
		align-items: center;
		padding: 0.55rem 0.75rem;
		border-right: 0;
		border-bottom: 1px solid var(--lb-line);
	}

	.lb-rail-brand {
		display: flex;
	}

	.lb-view-nav {
		display: flex;
		justify-content: flex-start;
		min-width: 0;
		overflow-x: auto;
		overscroll-behavior-x: contain;
		padding-bottom: 0.2rem;
	}

	.lb-view-nav button {
		flex: 0 0 auto;
		min-width: 72px;
		min-height: 44px;
	}

	.lb-mwai-shell {
		grid-template-columns: 1fr;
	}

	.lb-mwai-sidebar {
		display: none;
	}

	.lb-assistant-dashboard,
	.lb-view-studio > .lb-studio,
	.lb-library-dashboard,
	.lb-kit-dashboard,
	.lb-brand-dashboard {
		padding: 0.7rem;
		margin: 0;
	}

	.lb-library-toolbar,
	.lb-library-actions,
	.lb-kit-overview,
	.lb-kit-body,
	.lb-kit-actions,
	.lb-kit-asset-actions,
	.lb-brand-system-panel,
	.lb-brand-share-grid,
	.lb-brand-asset-actions {
		display: grid;
		grid-template-columns: 1fr;
	}

	.lb-kit-body {
		grid-template-columns: 1fr;
	}

	.lb-kit-summary {
		border-right: 0;
		border-bottom: 1px solid var(--lb-line);
	}

	.lb-editor-modal {
		padding: 0;
	}

	.lb-editor-panel {
		width: 100%;
		height: 100dvh;
		border-radius: 0;
		border-left: 0;
		border-right: 0;
	}

	.lb-editor-layout {
		grid-template-columns: 1fr;
		grid-template-rows: minmax(210px, 35dvh) minmax(0, 1fr);
	}

	.lb-editor-tools {
		grid-row: 2;
		border-right: 0;
		border-top: 1px solid var(--lb-line);
	}

	.lb-editor-stage {
		grid-row: 1;
	}

	.lb-studio {
		grid-template-columns: 1fr;
	}

	.lb-studio-sidebar,
	.lb-studio-form {
		border-right: 0;
		border-bottom: 1px solid var(--lb-line);
	}

	.lb-preview-panel,
	.lb-brand-preview,
	.lb-preview-block:first-of-type,
	.lb-visual-panel,
	.lb-field-grid,
	.lb-field-grid label:nth-child(3),
	.lb-field-grid label:nth-child(4) {
		grid-template-columns: 1fr;
		grid-column: auto;
	}

	.lb-actions {
		display: grid;
	}

	.lb-color-grid {
		grid-template-columns: repeat(5, minmax(38px, 1fr));
	}

	.lb-primary-button,
	.lb-secondary-button,
	.lb-icon-button {
		width: 100%;
	}
}

@media (max-width: 520px) {
	h1 {
		font-size: 1.55rem;
	}

	.lb-view-header {
		min-height: 64px;
		padding: 0.7rem 0.8rem;
	}

	.lb-kicker {
		font-size: 0.62rem;
	}

	.lb-swatch-row,
	.lb-color-grid,
	.lb-status-grid {
		grid-template-columns: 1fr;
	}
}

/* Responsive accessibility pass: tab semantics, touch targets, and compact view behavior. */
.lb-view-nav[role="tablist"] {
	scroll-snap-type: x proximity;
}

.lb-view-nav [role="tab"] {
	scroll-snap-align: start;
}

.lb-tool-toggle,
.lb-tool-kit-select,
.lb-version-list button,
.lb-editor-tool-grid button,
.lb-editor-button-row button,
.lb-editor-stage-toolbar button {
	min-height: 42px;
}

.lb-tool-toggle input {
	inline-size: 16px;
	block-size: 16px;
}

.lb-tool-media-actions .lb-icon-button,
.lb-tool-sources a {
	min-height: 42px;
}

.lb-tool-sources a {
	display: inline-flex;
	align-items: center;
}

@media (max-width: 900px) {
	.lb-mwai-shell {
		grid-template-columns: 1fr;
	}

	.lb-mwai-sidebar {
		display: none;
	}

	.lb-mwai-chat-panel {
		min-height: min(720px, calc(100dvh - 160px));
	}

	.lb-chat-toolbar {
		flex-wrap: wrap;
		align-items: flex-start;
	}
}

@media (max-width: 720px) {
	.lb-view-nav {
		scrollbar-width: none;
	}

	.lb-view-nav::-webkit-scrollbar {
		display: none;
	}

	.lb-view-nav button {
		flex-basis: min(76px, 24vw);
	}

	.lb-tool-media-actions .lb-icon-button,
	.lb-version-list button {
		width: 100%;
	}

	.lb-kit-switch-card {
		flex-basis: min(260px, 78vw);
	}

	.lb-kit-assets {
		grid-template-columns: minmax(0, 1fr);
	}

	.lb-kit-asset-header {
		align-items: flex-start;
		flex-direction: column;
	}
}

@media (max-width: 720px) {
	.lb-console-view {
		overflow: auto;
		-webkit-overflow-scrolling: touch;
	}

	.lb-view-studio > .lb-studio,
	.lb-library-dashboard,
	.lb-kit-dashboard,
	.lb-brand-dashboard {
		height: auto;
		min-height: auto;
		overflow: visible;
	}

	.lb-studio,
	.lb-studio-sidebar,
	.lb-studio-form,
	.lb-preview-panel,
	.lb-library-grid,
	.lb-kit-shell,
	.lb-kit-body,
	.lb-kit-summary,
	.lb-kit-assets,
	.lb-brand-asset-grid {
		min-height: auto;
		overflow: visible;
	}

	.lb-library-dashboard {
		grid-template-rows: auto auto;
	}

	.lb-kit-dashboard,
	.lb-brand-dashboard {
		grid-template-rows: auto;
	}

	.lb-kit-shell {
		display: block;
	}

	.lb-brand-asset {
		grid-template-rows: auto auto auto;
	}
}

/* LB chat shell: keep the conversation surface stretched to the active viewport. */
.lb-view-lb .lb-assistant-dashboard,
.lb-view-lb .lb-mwai-shell,
.lb-view-lb .lb-mwai-chat-panel,
.lb-view-lb .mwai-chatbot-container,
.lb-view-lb .mwai-chatgpt-theme,
.lb-view-lb .mwai-chat,
.lb-view-lb .mwai-body {
	height: 100% !important;
	min-height: 0 !important;
}

.lb-view-lb .mwai-body {
	align-self: stretch !important;
}

/* LB mobile chat shell: drawer-based threads and anchored composer. */
.lb-thread-drawer-toggle,
.lb-thread-drawer-close,
.lb-thread-drawer-backdrop {
	display: none;
}

.lb-tool-thread[hidden] {
	display: none !important;
}

@media (max-width: 900px) {
	.lb-view-lb {
		overflow: hidden;
	}

	.lb-view-lb .lb-assistant-dashboard {
		height: 100%;
		min-height: 0;
		padding: 0;
		overflow: hidden;
	}

	.lb-view-lb .lb-mwai-shell {
		display: block;
		position: relative;
		height: 100%;
		min-height: 0;
	}

	.lb-view-lb .lb-mwai-chat-panel {
		height: 100%;
		min-height: 0;
		border: 0;
		border-radius: 0;
		box-shadow: none;
	}

	.lb-view-lb .lb-chat-toolbar {
		position: relative;
		z-index: 2;
		flex-wrap: nowrap;
		align-items: center;
		gap: 0.65rem;
		min-height: 58px;
		padding: 0.55rem 0.7rem;
		background: rgba(251, 252, 248, 0.97);
	}

	.lb-thread-drawer-toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: auto;
		min-width: 0;
		min-height: 42px;
		border: 1px solid var(--lb-line-strong);
		border-radius: var(--lb-radius);
		background: var(--lb-panel);
		color: var(--lb-ink);
		padding: 0 0.78rem;
		font-weight: 900;
	}

	.lb-thread-drawer-toggle[aria-expanded="true"] {
		border-color: var(--lb-ink);
		background: var(--lb-ink);
		color: var(--lb-paper);
	}

	.lb-view-lb .lb-live-dot {
		margin-left: auto;
	}

	.lb-view-lb .lb-mwai-sidebar {
		display: grid;
		position: fixed;
		top: 68px;
		bottom: 0;
		left: 0;
		z-index: 180;
		width: min(86vw, 340px);
		max-width: calc(100vw - 44px);
		min-height: 0;
		border-top: 0;
		border-left: 0;
		border-radius: 0 var(--lb-radius) var(--lb-radius) 0;
		box-shadow: 18px 0 44px rgba(18, 20, 19, 0.18);
		transform: translateX(-105%);
		transition: transform 180ms ease;
	}

	.admin-bar .lb-view-lb .lb-mwai-sidebar {
		top: 114px;
	}

	.lb-view-lb .lb-mwai-shell.is-thread-drawer-open .lb-mwai-sidebar {
		transform: translateX(0);
	}

	.lb-thread-drawer-close {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: auto;
		min-height: 42px;
		margin-left: auto;
		border: 1px solid var(--lb-line-strong);
		border-radius: var(--lb-radius);
		background: var(--lb-panel);
		color: var(--lb-ink);
		padding: 0 0.72rem;
		font-size: 0.78rem;
		font-weight: 900;
	}

	.lb-thread-drawer-backdrop {
		display: block;
		position: fixed;
		top: 68px;
		right: 0;
		bottom: 0;
		left: 0;
		z-index: 170;
		border: 0;
		background: rgba(18, 20, 19, 0.34);
		padding: 0;
		opacity: 1;
	}

	.admin-bar .lb-thread-drawer-backdrop {
		top: 114px;
	}

	.lb-thread-drawer-backdrop[hidden] {
		display: none !important;
	}

	.lb-view-lb .mwai-chatbot-container,
	.lb-view-lb .mwai-chatgpt-theme,
	.lb-view-lb .mwai-chat,
	.lb-view-lb .mwai-body {
		min-height: 0 !important;
		height: 100% !important;
	}

	.lb-view-lb .mwai-body {
		align-self: stretch !important;
	}

	.lb-view-lb .lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-input,
	.lb-view-lb .lb-mwai-chat-panel .mwai-chatgpt-theme form.mwai-input,
	.lb-view-lb .lb-mwai-chat-panel .mwai-chat .mwai-input,
	.lb-view-lb .lb-mwai-chat-panel .mwai-chat form {
		position: sticky !important;
		bottom: 0 !important;
		z-index: 4 !important;
		box-shadow: 0 -14px 30px rgba(18, 20, 19, 0.08) !important;
	}
}

@media (max-width: 720px) {
	.lb-view-lb {
		grid-template-rows: minmax(0, 1fr);
		overflow: hidden;
	}

	.lb-view-lb .lb-view-header {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		clip-path: inset(50%);
		white-space: nowrap;
	}

	.lb-view-lb .lb-mwai-chat-panel {
		min-height: 0;
	}

	.lb-view-lb .lb-mwai-chat-panel.has-lb-tools {
		grid-template-rows: auto auto auto minmax(0, 1fr);
	}

	.lb-view-lb .lb-toolbelt {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 0.45rem;
		padding: 0.55rem;
	}

	.lb-view-lb .lb-tool-thread {
		max-height: 30dvh;
	}

	.lb-view-lb .mwai-chatbot-container,
	.lb-view-lb .mwai-chatgpt-theme,
	.lb-view-lb .mwai-chat,
	.lb-view-lb .mwai-body {
		min-height: 0 !important;
	}

	.lb-view-lb .mwai-body {
		height: 100% !important;
		align-self: stretch !important;
	}

	.lb-view-lb .lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-conversation,
	.lb-view-lb .lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-messages,
	.lb-view-lb .lb-mwai-chat-panel .mwai-chatgpt-theme .mwai-content {
		padding-bottom: 1rem !important;
	}
}

@media (min-width: 901px) {
	.lb-view-lb .lb-mwai-sidebar {
		transform: none !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	* {
		scroll-behavior: auto !important;
		transition: none !important;
	}
}
