@import url('https://fonts.googleapis.com/css2?family=Inter:wght@500;700&display=swap');

:root {
	--background: white;
	--text: hsl(0, 0%, 11%);
	--gray-light: #f5f5f5;
	--gray-dark: #e8e8e8;
	--black-transparent-lighter: rgba(0, 0, 0, 0.07);
	--black-transparent-light: rgba(0, 0, 0, 0.3);
	--black-transparent-dark: rgba(0, 0, 0, 0.5);
	--black-transparent-darker: rgba(0, 0, 0, 0.7);
	--focus: hsl(214, 84%, 56%);
	--whiteboard: hsl(210, 20%, 98%);
	color-scheme: light;
}

html,
body {
	padding: 0;
	margin: 0;
	font-family: 'Inter', sans-serif;
	min-height: 100vh;
	/* mobile viewport bug fix */
	min-height: -webkit-fill-available;
	height: 100%;
	/* prevent two-finger swipe to go back */
	overscroll-behavior: none;
	background-color: var(--background);
	color: var(--text);
}

@media screen and (max-width: 600px) {
	html,
	body {
		font-size: 14px;
	}
}

html,
* {
	box-sizing: border-box;
}

/* NB: If we did position: fixed, Safari on iOS 18 and MacOS 15 would
 * have several rendering issues. This must stay position: absolute. */

.tldraw__editor {
	position: absolute;
	inset: 0px;
	overflow: hidden;
	overscroll-behavior: none;
	touch-action: none;
}

.example {
	display: grid;
	grid-template-columns: auto 1fr;
	grid-auto-flow: column;
}

.example__content {
	position: relative;
	height: 100%;
	width: 100%;
	overflow: auto;
}

@media screen and (max-width: 500px) {
	.example {
		display: grid;
		grid-template-columns: 1fr;
		grid-auto-flow: column;
	}
	.example__sidebar {
		display: none;
	}
}

/* --------------------- Sidebar -------------------- */

.example__sidebar {
	width: 256px;
	min-width: 256px;
	display: grid;
	grid-template-rows: auto 48px 48px 1fr auto;
	border-right: 1px solid var(--black-transparent-light);
	overflow: hidden;
	font-size: 14px;
	font-weight: 500;
	max-height: 100%;
}

.example__sidebar a {
	text-decoration: none;
	color: inherit;
}

.example__sidebar__filter {
	margin: 8px;
	padding: 8px;
	border-radius: 6px;
	border: 1px solid var(--gray-dark);
	font-size: 14px;
}

/* Header */

.example__sidebar__header {
	display: flex;
	height: 40px;
	align-items: center;
	max-width: 100%;
	padding: 0 4px 0 8px;
}

.example__sidebar__header__logo {
	all: unset;
	cursor: pointer;
	flex: none;
	font-size: 1.15rem;
	display: flex;
	align-items: center;
	justify-content: start;
	overflow: hidden;
	padding: 0px;
}

.examples__tldraw__logo {
	height: 18px;
	width: auto;
}

/* Categories */

ul.example__sidebar__categories {
	list-style: none;
	padding: 0;
	margin: 0;
	overflow: auto;
}

.example__sidebar__category__header {
	display: grid;
	grid-template-columns: 1fr auto;
	font-weight: 800;
	align-items: center;
	padding: 8px 12px;
	margin: 0px;
	font-size: 14px;
}

/* Category */

li.example__sidebar__category {
	display: none;
	position: relative;
	padding: 8px 0px;
}

.example__sidebar__category:has(> ul > li) {
	display: block;
}

ul.example__sidebar__category__items {
	list-style: none;
	padding: 0px 0px 0px 4px;
	margin: 0px;
}

li.examples__sidebar__item {
	position: relative;
	margin: 0px;
	height: 32px;
}

.examples__sidebar__item__title {
	flex-grow: 2;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	padding-right: 32px;
}

.examples__sidebar__item__link {
	display: block;
	font-weight: 500;
	margin: 0px;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	position: absolute;
	z-index: 2;
	inset: 0;
	padding: 0px 8px;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	flex-direction: row;
}

.examples__sidebar__item::after {
	content: '';
	position: absolute;
	inset: 2px 8px 2px 4px;
	z-index: 1;
	background-color: var(--gray-light);
	border-radius: 4px;
	opacity: 0;
	pointer-events: none;
}

.examples__sidebar__item__details {
	width: 100%;
	margin: 8px 0 0 0;
}

.examples__sidebar__item[data-active='true']::after {
	opacity: 1;
}

.examples__sidebar__item[data-active='false']:hover::after {
	opacity: 1;
}

/* -------------------- List Item ------------------- */

.example__sidebar__item__buttons {
	display: flex;
	flex-direction: row;
	height: 32px;
	margin-right: 0px;
	color: black;
	position: relative;
	z-index: 20;
	flex-shrink: 0;
}

.example__sidebar__item__button {
	all: unset;
	cursor: pointer;
	position: relative;
	display: block;
	opacity: 0.8;
	height: 100%;
	width: 32px;
	z-index: 10;
	color: inherit;
	display: flex;
	align-items: center;
	justify-content: center;
}

.example__sidebar__item__button:hover {
	z-index: 20;
}

.example__sidebar__item__button:nth-of-type(n + 1) {
	margin-left: -4px;
}

.example {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: stretch;
}

/* ----------------- Header/Footer Buttons ----------------- */

.example__sidebar__header-links,
.example__sidebar__footer-links {
	display: flex;
	flex-direction: column;
	gap: 8px;
	font-size: 13px;
	font-weight: 400;
	padding: 8px;
	border-top: 1px solid var(--gray-dark);
}

.example__sidebar__header-link,
.example__sidebar__footer-link {
	padding: 8px 8px;
	border-radius: 6px;
	background-color: hsl(214, 92%, 50%);
	display: flex;
	flex: 1 1 auto;
	text-align: center;
	align-items: center;
	justify-content: center;
	color: #fff;
	text-decoration: none;
	box-shadow:
		0px 1px 2px rgba(0, 0, 0, 0.12),
		0px 1px 3px rgba(0, 0, 0, 0.04);
}

a.example__sidebar__header-link {
	color: white;
}

.example__sidebar__footer-link--grey {
	background-color: var(--gray-light);
	color: black;
	border: 1px solid var(--gray-dark);
	font-size: 14px;
}

/* ------------------ Social Links ------------------ */

.example__sidebar__header__socials {
	display: flex;
	flex-direction: row;
	justify-content: flex-end;
	flex-grow: 2;
}

.example__sidebar__header__socials a {
	color: var(--text);
	height: 32px;
	width: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
}

.example__sidebar__icon {
	flex-shrink: 0;
	width: 16px;
	height: 16px;
	color: var(--text);
	background-color: var(--text);
}

/* --------------------- Scroll --------------------- */

.scroll-light {
	scrollbar-width: thin;
}

.scroll-light::-webkit-scrollbar {
	display: block;
	width: 8px;
	height: 8px;
	position: absolute;
	top: 0;
	left: 0;
	background-color: inherit;
}

.scroll-light::-webkit-scrollbar-button {
	display: none;
	width: 0;
	height: 10px;
}

.scroll-light::-webkit-scrollbar-thumb {
	background-clip: padding-box;
	width: 0;
	min-height: 36px;
	border: 2px solid transparent;
	border-radius: 6px;
	background-color: var(--black-transparent-light);
}

.scroll-light::-webkit-scrollbar-thumb:hover {
	background-color: var(--black-transparent-light);
}

/* ---------------------- Hover --------------------- */

.hoverable::after {
	display: block;
	content: '';
	position: absolute;
	inset: 1px;
	opacity: 0;
	z-index: -1;
	background-color: var(--gray-light);
	border-radius: 4px;
}

.hoverable:hover::after {
	opacity: 1;
}

/* --------------------- Dialog --------------------- */

.example__dialog__overlay {
	position: fixed;
	inset: 0;
	z-index: 9999999998;
	background-color: var(--black-transparent-dark);
}

.example__dialog__content {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 9999999999;
	width: 680px;
	max-width: calc(100% - 40px);
	max-height: calc(100vh - 40px);
	overflow: auto;
	border-radius: 8px;
	box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.12);
	padding: 16px;
	background-color: white;
}

.example__dialog__content h1 {
	font-size: 20px;
	margin: 0px;
}

.example__dialog__markdown {
	min-height: 40px;
	line-height: 1.5;
	font-size: 16px;
}

.example__dialog__markdown p {
	margin: 12px 0px;
}

.example__dialog__markdown a {
	color: royalblue;
	text-decoration: none;
}

.example__dialog__markdown a:hover {
	text-decoration: underline;
}

.example__dialog__actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 24px;
	gap: 16px;
}

.example__dialog__actions a,
.example__dialog__actions button {
	cursor: pointer;
	padding: 8px 12px;
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	gap: 8px;
	background-color: var(--gray-light);
	color: black;
	border: 1px solid var(--gray-dark);
	font-size: 14px;
}

.example__dialog__content p > code {
	font-size: 14px;
	font-family: monospace;
	padding: 1px 4px;
	margin: 0px -2px;
	background-color: var(--black-transparent-lighter);
	border-radius: 4px;
}

.example__dialog__close {
	all: unset;
}

:root:has(.tl-theme__dark) .MultiplayerExampleWrapper {
	--background: black;
	--text: hsl(0, 9%, 94%);
	--gray-light: #333;
	--gray-dark: #444;
	--black-transparent-lighter: rgba(255, 255, 255, 0.15);
	--black-transparent-light: rgba(255, 255, 255, 0.4);
	--black-transparent-dark: rgba(255, 255, 255, 0.6);
	--black-transparent-darker: rgba(255, 255, 255, 0.7);
	--focus: hsl(217, 89%, 61%);
	--whiteboard: hsl(240, 5%, 6.5%);
	color-scheme: dark;
}

.MultiplayerExampleWrapper {
	display: flex;
	flex-direction: column;
	/* container: example / size; */
	position: absolute;
	inset: 0px;
}

.MultiplayerExampleWrapper-picker {
	display: flex;
	flex-direction: row;
	justify-content: flex-start;
	align-items: center;
	padding: 8px 16px;
	gap: 16px;
	background: var(--background);
	border-bottom: 1px solid var(--gray-dark);
	color: var(--text);
	font-size: 14px;
}

.MultiplayerExampleWrapper-copy {
	background: var(--black-transparent-lighter);
	border: 1px solid var(--gray-dark);
	border-radius: 4px;
	padding: 4px 12px;
	height: 24px;
	cursor: pointer;
	position: relative;
	text-align: center;
}

.MultiplayerExampleWrapper-copy:has(.MultiplayerExampleWrapper-copied) {
	color: transparent;
}

.MultiplayerExampleWrapper-copied {
	color: var(--text);
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.MultiplayerExampleWrapper-copy:hover {
	border: 1px solid var(--black-transparent-lighter);
}

.MultiplayerExampleWrapper-example {
	position: relative;
	flex: 1;
}
/* THIS CSS FILE IS GENERATED! DO NOT EDIT. OR EDIT. I'M A COMMENT NOT A COP */ 
/* This file is created by the copy-css-files.mjs script in packages/tldraw. */
/* It combines @tldraw/editor's editor.css and tldraw's ui.css */

/* @tldraw/editor */

.tl-container {
	width: 100%;
	height: 100%;
	font-size: 12px;
	/* Spacing */
	--tl-space-1: 2px;
	--tl-space-2: 4px;
	--tl-space-3: 8px;
	--tl-space-4: 12px;
	--tl-space-5: 16px;
	--tl-space-6: 20px;
	--tl-space-7: 28px;
	--tl-space-8: 32px;
	--tl-space-9: 64px;
	--tl-space-10: 72px;
	/* Radius */
	--tl-radius-0: 2px;
	--tl-radius-1: 4px;
	--tl-radius-2: 6px;
	--tl-radius-3: 9px;
	--tl-radius-4: 11px;

	/* Canvas z-index */
	--tl-layer-canvas-hidden: -999999;
	--tl-layer-canvas-background: 100;
	--tl-layer-canvas-grid: 150;
	--tl-layer-watermark: 200;
	--tl-layer-canvas-shapes: 300;
	--tl-layer-canvas-overlays: 500;
	--tl-layer-canvas-in-front: 600;
	--tl-layer-canvas-blocker: 10000;

	/* Canvas overlays z-index */
	--tl-layer-overlays-collaborator-scribble: 10;
	--tl-layer-overlays-collaborator-brush: 20;
	--tl-layer-overlays-collaborator-shape-indicator: 30;
	--tl-layer-overlays-user-scribble: 40;
	--tl-layer-overlays-user-brush: 50;
	--tl-layer-overlays-user-snapline: 90;
	--tl-layer-overlays-selection-fg: 100;
	/* User handles need to be above selection edges / corners, matters for sticky note clone handles */
	--tl-layer-overlays-user-handles: 105;
	--tl-layer-overlays-user-indicator-hint: 110;
	--tl-layer-overlays-custom: 115;
	--tl-layer-overlays-collaborator-cursor-hint: 120;
	--tl-layer-overlays-collaborator-cursor: 130;

	/* Text editor z-index */
	--tl-layer-text-container: 1;
	--tl-layer-text-content: 3;
	--tl-layer-text-editor: 4;

	/* Error fallback z-index */
	--tl-layer-error-overlay: 1;
	--tl-layer-error-canvas: 2;
	--tl-layer-error-canvas-after: 3;
	--tl-layer-error-content: 4;

	/* Misc */
	--tl-zoom: 1;

	/* Cursor SVGs */
	--tl-cursor-none: none;
	--tl-cursor-default:
		url("data:image/svg+xml,<svg height='32' width='32' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg' style='color: black;'><defs><filter id='shadow' y='-40%' x='-40%' width='180px' height='180%' color-interpolation-filters='sRGB'><feDropShadow dx='1' dy='1' stdDeviation='1.2' flood-opacity='.5'/></filter></defs><g fill='none' transform='rotate(0 16 16)' filter='url(%23shadow)'><path d='m12 24.4219v-16.015l11.591 11.619h-6.781l-.411.124z' fill='white'/><path d='m21.0845 25.0962-3.605 1.535-4.682-11.089 3.686-1.553z' fill='white'/><path d='m19.751 24.4155-1.844.774-3.1-7.374 1.841-.775z' fill='black'/><path d='m13 10.814v11.188l2.969-2.866.428-.139h4.768z' fill='black'/></g></svg>")
			12 8,
		default;
	--tl-cursor-pointer:
		url("data:image/svg+xml,<svg height='32' width='32' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg' style='color: black;'><defs><filter id='shadow' y='-40%' x='-40%' width='180px' height='180%' color-interpolation-filters='sRGB'><feDropShadow dx='1' dy='1' stdDeviation='1.2' flood-opacity='.5'/></filter></defs><g fill='none' transform='rotate(0 16 16)' filter='url(%23shadow)'><path d='m13.3315 21.3799c-.284-.359-.629-1.093-1.243-1.984-.348-.504-1.211-1.453-1.468-1.935-.223-.426-.199-.617-.146-.97.094-.628.738-1.117 1.425-1.051.519.049.959.392 1.355.716.239.195.533.574.71.788.163.196.203.277.377.509.23.307.302.459.214.121-.071-.496-.187-1.343-.355-2.092-.128-.568-.159-.657-.281-1.093-.129-.464-.195-.789-.316-1.281-.084-.348-.235-1.059-.276-1.459-.057-.547-.087-1.439.264-1.849.275-.321.906-.418 1.297-.22.512.259.803 1.003.936 1.3.239.534.387 1.151.516 1.961.164 1.031.466 2.462.476 2.763.024-.369-.068-1.146-.004-1.5.058-.321.328-.694.666-.795.286-.085.621-.116.916-.055.313.064.643.288.766.499.362.624.369 1.899.384 1.831.086-.376.071-1.229.284-1.584.14-.234.497-.445.687-.479.294-.052.655-.068.964-.008.249.049.586.345.677.487.218.344.342 1.317.379 1.658.015.141.074-.392.293-.736.406-.639 1.843-.763 1.898.639.025.654.02.624.02 1.064 0 .517-.012.828-.04 1.202-.031.4-.117 1.304-.242 1.742-.086.301-.371.978-.652 1.384 0 0-1.074 1.25-1.191 1.813-.118.562-.079.566-.102.965-.023.398.121.922.121.922s-.802.104-1.234.035c-.391-.063-.875-.841-1-1.079-.172-.328-.539-.265-.682-.023-.225.383-.709 1.07-1.051 1.113-.668.084-2.054.031-3.139.02 0 0 .185-1.011-.227-1.358-.305-.259-.83-.784-1.144-1.06z' fill='white'/><g stroke='black' stroke-linecap='round' stroke-width='.75'><path d='m13.3315 21.3799c-.284-.359-.629-1.093-1.243-1.984-.348-.504-1.211-1.453-1.468-1.935-.223-.426-.199-.617-.146-.97.094-.628.738-1.117 1.425-1.051.519.049.959.392 1.355.716.239.195.533.574.71.788.163.196.203.277.377.509.23.307.302.459.214.121-.071-.496-.187-1.343-.355-2.092-.128-.568-.159-.657-.281-1.093-.129-.464-.195-.789-.316-1.281-.084-.348-.235-1.059-.276-1.459-.057-.547-.087-1.439.264-1.849.275-.321.906-.418 1.297-.22.512.259.803 1.003.936 1.3.239.534.387 1.151.516 1.961.164 1.031.466 2.462.476 2.763.024-.369-.068-1.146-.004-1.5.058-.321.328-.694.666-.795.286-.085.621-.116.916-.055.313.064.643.288.766.499.362.624.369 1.899.384 1.831.086-.376.071-1.229.284-1.584.14-.234.497-.445.687-.479.294-.052.655-.068.964-.008.249.049.586.345.677.487.218.344.342 1.317.379 1.658.015.141.074-.392.293-.736.406-.639 1.843-.763 1.898.639.025.654.02.624.02 1.064 0 .517-.012.828-.04 1.202-.031.4-.117 1.304-.242 1.742-.086.301-.371.978-.652 1.384 0 0-1.074 1.25-1.191 1.813-.118.562-.079.566-.102.965-.023.398.121.922.121.922s-.802.104-1.234.035c-.391-.063-.875-.841-1-1.079-.172-.328-.539-.265-.682-.023-.225.383-.709 1.07-1.051 1.113-.668.084-2.054.031-3.139.02 0 0 .185-1.011-.227-1.358-.305-.259-.83-.784-1.144-1.06z' stroke-linejoin='round'/><path d='m21.5664 21.7344v-3.459'/><path d='m19.5508 21.7461-.016-3.473'/><path d='m17.5547 18.3047.021 3.426'/></g></g></svg>")
			14 10,
		pointer;
	--tl-cursor-cross:
		url("data:image/svg+xml,<svg height='32' width='32' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg' style='color: black;'><defs><filter id='shadow' y='-40%' x='-40%' width='180px' height='180%' color-interpolation-filters='sRGB'><feDropShadow dx='1' dy='1' stdDeviation='1.2' flood-opacity='.5'/></filter></defs><g fill='none' transform='rotate(0 16 16)' filter='url(%23shadow)'><path d='m25 16h-6.01v-6h-2.98v6h-6.01v3h6.01v6h2.98v-6h6.01z' fill='white'/><path d='m23.9902 17.0103h-6v-6.01h-.98v6.01h-6v.98h6v6.01h.98v-6.01h6z' fill='%23231f1f'/></g></svg>")
			16 16,
		crosshair;
	--tl-cursor-move:
		url("data:image/svg+xml,<svg height='32' width='32' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg' style='color: black;'><defs><filter id='shadow' y='-40%' x='-40%' width='180px' height='180%' color-interpolation-filters='sRGB'><feDropShadow dx='1' dy='1' stdDeviation='1.2' flood-opacity='.5'/></filter></defs><g fill='none' transform='rotate(0 16 16)' filter='url(%23shadow)'><path d='m19 14h1v1h-1zm1 6h-1v-1h1zm-5-5h-1v-1h1zm0 5h-1v-1h1zm2-10.987-7.985 7.988 5.222 5.221 2.763 2.763 7.984-7.985z' fill='white'/><g fill='black'><path d='m23.5664 16.9971-2.557-2.809v1.829h-4.009-4.001v-1.829l-2.571 2.809 2.572 2.808-.001-1.808h4.001 4.009l-.001 1.808z'/><path d='m17.9873 17h.013v-4.001l1.807.001-2.807-2.571-2.809 2.57h1.809v4.001h.008v4.002l-1.828-.001 2.807 2.577 2.805-2.576h-1.805z'/></g></g></svg>")
			16 16,
		move;
	--tl-cursor-grab:
		url("data:image/svg+xml,<svg height='32' width='32' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg' style='color: black;'><defs><filter id='shadow' y='-40%' x='-40%' width='180px' height='180%' color-interpolation-filters='sRGB'><feDropShadow dx='1' dy='1' stdDeviation='1.2' flood-opacity='.5'/></filter></defs><g fill='none' transform='rotate(0 16 16)' filter='url(%23shadow)'><path d='m13.5557 17.5742c-.098-.375-.196-.847-.406-1.552-.167-.557-.342-.859-.47-1.233-.155-.455-.303-.721-.496-1.181-.139-.329-.364-1.048-.457-1.44-.119-.509.033-.924.244-1.206.253-.339.962-.49 1.357-.351.371.13.744.512.916.788.288.46.357.632.717 1.542.393.992.564 1.918.611 2.231l.085.452c-.001-.04-.043-1.122-.044-1.162-.035-1.029-.06-1.823-.038-2.939.002-.126.064-.587.084-.715.078-.5.305-.8.673-.979.412-.201.926-.215 1.401-.017.423.173.626.55.687 1.022.014.109.094.987.093 1.107-.013 1.025.006 1.641.015 2.174.004.231.003 1.625.017 1.469.061-.656.094-3.189.344-3.942.144-.433.405-.746.794-.929.431-.203 1.113-.07 1.404.243.285.305.446.692.482 1.153.032.405-.019.897-.02 1.245 0 .867-.021 1.324-.037 2.121-.001.038-.015.298.023.182.094-.28.188-.542.266-.745.049-.125.241-.614.359-.859.114-.234.211-.369.415-.688.2-.313.415-.448.668-.561.54-.235 1.109.112 1.301.591.086.215.009.713-.028 1.105-.061.647-.254 1.306-.352 1.648-.128.447-.274 1.235-.34 1.601-.072.394-.234 1.382-.359 1.82-.086.301-.371.978-.652 1.384 0 0-1.074 1.25-1.192 1.812-.117.563-.078.567-.101.965-.024.399.121.923.121.923s-.802.104-1.234.034c-.391-.062-.875-.841-1-1.078-.172-.328-.539-.265-.682-.023-.225.383-.709 1.07-1.051 1.113-.668.084-2.054.03-3.139.02 0 0 .185-1.011-.227-1.358-.305-.26-.83-.784-1.144-1.06l-.832-.921c-.284-.36-.629-1.093-1.243-1.985-.348-.504-1.027-1.085-1.284-1.579-.223-.425-.331-.954-.19-1.325.225-.594.675-.897 1.362-.832.519.05.848.206 1.238.537.225.19.573.534.75.748.163.195.203.276.377.509.23.307.302.459.214.121' fill='white'/><g stroke='black' stroke-linecap='round' stroke-width='.75'><path d='m13.5557 17.5742c-.098-.375-.196-.847-.406-1.552-.167-.557-.342-.859-.47-1.233-.155-.455-.303-.721-.496-1.181-.139-.329-.364-1.048-.457-1.44-.119-.509.033-.924.244-1.206.253-.339.962-.49 1.357-.351.371.13.744.512.916.788.288.46.357.632.717 1.542.393.992.564 1.918.611 2.231l.085.452c-.001-.04-.043-1.122-.044-1.162-.035-1.029-.06-1.823-.038-2.939.002-.126.064-.587.084-.715.078-.5.305-.8.673-.979.412-.201.926-.215 1.401-.017.423.173.626.55.687 1.022.014.109.094.987.093 1.107-.013 1.025.006 1.641.015 2.174.004.231.003 1.625.017 1.469.061-.656.094-3.189.344-3.942.144-.433.405-.746.794-.929.431-.203 1.113-.07 1.404.243.285.305.446.692.482 1.153.032.405-.019.897-.02 1.245 0 .867-.021 1.324-.037 2.121-.001.038-.015.298.023.182.094-.28.188-.542.266-.745.049-.125.241-.614.359-.859.114-.234.211-.369.415-.688.2-.313.415-.448.668-.561.54-.235 1.109.112 1.301.591.086.215.009.713-.028 1.105-.061.647-.254 1.306-.352 1.648-.128.447-.274 1.235-.34 1.601-.072.394-.234 1.382-.359 1.82-.086.301-.371.978-.652 1.384 0 0-1.074 1.25-1.192 1.812-.117.563-.078.567-.101.965-.024.399.121.923.121.923s-.802.104-1.234.034c-.391-.062-.875-.841-1-1.078-.172-.328-.539-.265-.682-.023-.225.383-.709 1.07-1.051 1.113-.668.084-2.054.03-3.139.02 0 0 .185-1.011-.227-1.358-.305-.26-.83-.784-1.144-1.06l-.832-.921c-.284-.36-.629-1.093-1.243-1.985-.348-.504-1.027-1.085-1.284-1.579-.223-.425-.331-.954-.19-1.325.225-.594.675-.897 1.362-.832.519.05.848.206 1.238.537.225.19.573.534.75.748.163.195.203.276.377.509.23.307.302.459.214.121' stroke-linejoin='round'/><path d='m20.5664 21.7344v-3.459'/><path d='m18.5508 21.7461-.016-3.473'/><path d='m16.5547 18.3047.021 3.426'/></g></g></svg>")
			16 16,
		grab;
	--tl-cursor-grabbing:
		url("data:image/svg+xml,<svg height='32' width='32' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg' style='color: black;'><defs><filter id='shadow' y='-40%' x='-40%' width='180px' height='180%' color-interpolation-filters='sRGB'><feDropShadow dx='1' dy='1' stdDeviation='1.2' flood-opacity='.5'/></filter></defs><g fill='none' transform='rotate(0 16 16)' filter='url(%23shadow)'><path d='m13.5732 12.0361c.48-.178 1.427-.069 1.677.473.213.462.396 1.241.406 1.075.024-.369-.024-1.167.137-1.584.117-.304.347-.59.686-.691.285-.086.62-.116.916-.055.313.064.642.287.765.499.362.623.368 1.899.385 1.831.064-.272.07-1.229.283-1.584.141-.235.497-.445.687-.479.294-.052.656-.068.964-.008.249.049.586.344.677.487.219.344.342 1.316.379 1.658.016.141.074-.393.293-.736.406-.639 1.844-.763 1.898.639.026.654.02.624.02 1.064 0 .516-.012.828-.04 1.202-.03.399-.116 1.304-.241 1.742-.086.301-.371.978-.653 1.384 0 0-1.074 1.25-1.191 1.812-.117.563-.078.567-.102.965-.023.399.121.923.121.923s-.801.104-1.234.034c-.391-.062-.875-.84-1-1.078-.172-.328-.539-.265-.682-.023-.224.383-.709 1.07-1.05 1.113-.669.084-2.055.03-3.14.02 0 0 .185-1.011-.227-1.358-.305-.26-.83-.784-1.144-1.06l-.832-.921c-.283-.36-1.002-.929-1.243-1.985-.213-.936-.192-1.395.037-1.77.232-.381.67-.589.854-.625.208-.042.692-.039.875.062.223.123.313.159.488.391.23.307.312.456.213.121-.076-.262-.322-.595-.434-.97-.109-.361-.401-.943-.38-1.526.008-.221.103-.771.832-1.042' fill='white'/><g stroke='black' stroke-width='.75'><path d='m13.5732 12.0361c.48-.178 1.427-.069 1.677.473.213.462.396 1.241.406 1.075.024-.369-.024-1.167.137-1.584.117-.304.347-.59.686-.691.285-.086.62-.116.916-.055.313.064.642.287.765.499.362.623.368 1.899.385 1.831.064-.272.07-1.229.283-1.584.141-.235.497-.445.687-.479.294-.052.656-.068.964-.008.249.049.586.344.677.487.219.344.342 1.316.379 1.658.016.141.074-.393.293-.736.406-.639 1.844-.763 1.898.639.026.654.02.624.02 1.064 0 .516-.012.828-.04 1.202-.03.399-.116 1.304-.241 1.742-.086.301-.371.978-.653 1.384 0 0-1.074 1.25-1.191 1.812-.117.563-.078.567-.102.965-.023.399.121.923.121.923s-.801.104-1.234.034c-.391-.062-.875-.84-1-1.078-.172-.328-.539-.265-.682-.023-.224.383-.709 1.07-1.05 1.113-.669.084-2.055.03-3.14.02 0 0 .185-1.011-.227-1.358-.305-.26-.83-.784-1.144-1.06l-.832-.921c-.283-.36-1.002-.929-1.243-1.985-.213-.936-.192-1.395.037-1.77.232-.381.67-.589.854-.625.208-.042.692-.039.875.062.223.123.313.159.488.391.23.307.312.456.213.121-.076-.262-.322-.595-.434-.97-.109-.361-.401-.943-.38-1.526.008-.221.103-.771.832-1.042z' stroke-linejoin='round'/><path d='m20.5664 19.7344v-3.459' stroke-linecap='round'/><path d='m18.5508 19.7461-.016-3.473' stroke-linecap='round'/><path d='m16.5547 16.3047.021 3.426' stroke-linecap='round'/></g></g></svg>")
			16 16,
		grabbing;
	--tl-cursor-text:
		url("data:image/svg+xml,<svg height='32' width='32' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg' style='color: black;'><defs><filter id='shadow' y='-40%' x='-40%' width='180px' height='180%' color-interpolation-filters='sRGB'><feDropShadow dx='1' dy='1' stdDeviation='1.2' flood-opacity='.5'/></filter></defs><g fill='none' transform='rotate(0 16 16)' filter='url(%23shadow)'><path fill='white' d='M7.94 0a5.25 5.25 0 0 0-3.47 1.17A5.27 5.27 0 0 0 1 0H0v3h1c1.41 0 1.85.7 2 1v3.94H2v3h1v3c-.13.3-.57 1-2 1H0v3h1a5.27 5.27 0 0 0 3.47-1.17c.98.8 2.21 1.21 3.47 1.17h1v-3h-1c-1.41 0-1.85-.7-2-1v-3H7v-3H6V4c.13-.3.57-1 2-1h1V0H7.94z'/><path fill='black' d='M7.94 2V1a4 4 0 0 0-3.47 1.64A4 4 0 0 0 1 1v1c1.3-.17 2.56.6 3 1.84v5.1H3v1h1v4.16c-.45 1.24-1.7 2-3 1.84v1a4.05 4.05 0 0 0 3.47-1.63 4.05 4.05 0 0 0 3.47 1.63v-1A2.82 2.82 0 0 1 5 14.1V9.93h1v-1H5V3.85A2.81 2.81 0 0 1 7.94 2z'/></g></svg>")
			4 10,
		text;
	--tl-cursor-zoom-in:
		url("data:image/svg+xml,<svg height='32' width='32' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg' style='color: black;'><defs><filter id='shadow' y='-40%' x='-40%' width='180px' height='180%' color-interpolation-filters='sRGB'><feDropShadow dx='1' dy='1' stdDeviation='1.2' flood-opacity='.5'/></filter></defs><g fill='none' transform='rotate(0 16 16)' filter='url(%23shadow)'><path d='m20.5 15c0 3.038-2.462 5.5-5.5 5.5s-5.5-2.462-5.5-5.5 2.462-5.5 5.5-5.5 5.5 2.462 5.5 5.5' fill='white'/><path d='m20.5 15c0 3.038-2.462 5.5-5.5 5.5s-5.5-2.462-5.5-5.5 2.462-5.5 5.5-5.5 5.5 2.462 5.5 5.5z' stroke='black'/><g fill='black'><path d='m18 14h-2v-2h-2v2h-2v1.98h2v2.02h2v-2.02h2z'/><path d='m23.5859 25 1.414-1.414-5.449-5.449-1.414 1.414z'/></g></g></svg>")
			16 16,
		zoom-in;
	--tl-cursor-zoom-out:
		url("data:image/svg+xml,<svg height='32' width='32' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg' style='color: black;'><defs><filter id='shadow' y='-40%' x='-40%' width='180px' height='180%' color-interpolation-filters='sRGB'><feDropShadow dx='1' dy='1' stdDeviation='1.2' flood-opacity='.5'/></filter></defs><g fill='none' transform='rotate(0 16 16)' filter='url(%23shadow)'><path d='m20.5 15c0 3.038-2.462 5.5-5.5 5.5s-5.5-2.462-5.5-5.5 2.462-5.5 5.5-5.5 5.5 2.462 5.5 5.5' fill='white'/><path d='m20.5 15c0 3.038-2.462 5.5-5.5 5.5s-5.5-2.462-5.5-5.5 2.462-5.5 5.5-5.5 5.5 2.462 5.5 5.5z' stroke='black'/><g fill='black'><path d='m18 16h-5.98v-1.98h5.98z'/><path d='m23.5859 25 1.414-1.414-5.449-5.449-1.414 1.414z'/></g></g></svg>")
			16 16,
		zoom-out;

	/* These cursor values get programmatically overridden */
	/* They're just here to help your editor autocomplete */
	--tl-cursor: var(--tl-cursor-default);
	--tl-cursor-resize-edge: ew-resize;
	--tl-cursor-resize-corner: nesw-resize;
	--tl-cursor-ew-resize: ew-resize;
	--tl-cursor-ns-resize: ns-resize;
	--tl-cursor-nesw-resize: nesw-resize;
	--tl-cursor-nwse-resize: nwse-resize;
	--tl-cursor-rotate: pointer;
	--tl-cursor-nwse-rotate: pointer;
	--tl-cursor-nesw-rotate: pointer;
	--tl-cursor-senw-rotate: pointer;
	--tl-cursor-swne-rotate: pointer;
	--tl-scale: calc(1 / var(--tl-zoom));
	/* fonts */
	--tl-font-draw: 'tldraw_draw', sans-serif;
	--tl-font-sans: 'tldraw_sans', sans-serif;
	--tl-font-serif: 'tldraw_serif', serif;
	--tl-font-mono: 'tldraw_mono', monospace;
	/* text outline */
	--tl-text-outline-a: calc(min(0.5, 1 / var(--tl-zoom)) * 2px);
	--tl-text-outline-b: calc(min(0.5, 1 / var(--tl-zoom)) * -2px);
	--tl-text-outline-reference:
		0 var(--tl-text-outline-b) 0 var(--tl-color-background),
		0 var(--tl-text-outline-a) 0 var(--tl-color-background),
		var(--tl-text-outline-b) var(--tl-text-outline-b) 0 var(--tl-color-background),
		var(--tl-text-outline-a) var(--tl-text-outline-b) 0 var(--tl-color-background),
		var(--tl-text-outline-a) var(--tl-text-outline-a) 0 var(--tl-color-background),
		var(--tl-text-outline-b) var(--tl-text-outline-a) 0 var(--tl-color-background);
	--tl-text-outline: var(--tl-text-outline-reference);
	/* own properties */
	position: relative;
	inset: 0px;
	height: 100%;
	width: 100%;
	overflow: clip;
	color: var(--tl-color-text);
}

.tl-theme__light {
	/* Canvas */
	--tl-color-snap: hsl(0, 76%, 60%);
	--tl-color-selection-fill: hsl(210, 100%, 56%, 24%);
	--tl-color-selection-stroke: hsl(214, 84%, 56%);
	--tl-color-background: hsl(210, 20%, 98%);
	--tl-color-brush-fill: hsl(0, 0%, 56%, 10.2%);
	--tl-color-brush-stroke: hsl(0, 0%, 56%, 25.1%);
	--tl-color-grid: hsl(0, 0%, 43%);
	/* UI */
	--tl-color-low: hsl(204, 16%, 94%);
	--tl-color-low-border: hsl(204, 16%, 92%);
	--tl-color-culled: hsl(204, 14%, 93%);
	--tl-color-muted-none: hsl(0, 0%, 0%, 0%);
	--tl-color-muted-0: hsl(0, 0%, 0%, 2%);
	--tl-color-muted-1: hsl(0, 0%, 0%, 10%);
	--tl-color-muted-2: hsl(0, 0%, 0%, 4.3%);
	--tl-color-hint: hsl(0, 0%, 0%, 5.5%);
	--tl-color-overlay: hsl(0, 0%, 0%, 20%);
	--tl-color-divider: hsl(0, 0%, 91%);
	--tl-color-panel: hsl(0, 0%, 99%);
	--tl-color-panel-contrast: hsl(0, 0%, 100%);
	--tl-color-panel-overlay: hsl(0, 0%, 100%, 82%);
	--tl-color-panel-transparent: hsla(0, 0%, 99%, 0%);
	--tl-color-selected: hsl(214, 84%, 56%);
	--tl-color-selected-contrast: hsl(0, 0%, 100%);
	--tl-color-focus: hsl(219, 65%, 50%);
	--tl-color-tooltip: hsla(200, 14%, 4%, 1);
	/* Text */
	--tl-color-text: hsl(0, 0%, 0%);
	--tl-color-text-0: hsl(0, 0%, 11%);
	--tl-color-text-1: hsl(0, 0%, 18%);
	--tl-color-text-3: hsl(204, 4%, 45%);
	--tl-color-text-shadow: hsl(0, 0%, 100%);
	--tl-color-text-highlight: hsl(52, 100%, 50%);
	--tl-color-text-highlight-p3: color(display-p3 0.972 0.8205 0.05);
	/* Named */
	--tl-color-primary: hsl(214, 84%, 56%);
	--tl-color-success: hsl(123, 46%, 34%);
	--tl-color-info: hsl(201, 98%, 41%);
	--tl-color-warning: hsl(27, 98%, 47%);
	--tl-color-danger: hsl(0, 90%, 43%);
	--tl-color-laser: hsl(0, 100%, 50%);
	/* Shadows */
	--tl-shadow-1: 0px 1px 2px hsl(0, 0%, 0%, 25%), 0px 1px 3px hsl(0, 0%, 0%, 9%);
	--tl-shadow-2:
		0px 0px 2px hsl(0, 0%, 0%, 16%), 0px 2px 3px hsl(0, 0%, 0%, 24%),
		0px 2px 6px hsl(0, 0%, 0%, 0.1), inset 0px 0px 0px 1px var(--tl-color-panel-contrast);
	--tl-shadow-3:
		0px 1px 2px hsl(0, 0%, 0%, 28%), 0px 2px 6px hsl(0, 0%, 0%, 14%),
		inset 0px 0px 0px 1px var(--tl-color-panel-contrast);
	--tl-shadow-4:
		0px 0px 3px hsl(0, 0%, 0%, 19%), 0px 5px 4px hsl(0, 0%, 0%, 16%),
		0px 2px 16px hsl(0, 0%, 0%, 6%), inset 0px 0px 0px 1px var(--tl-color-panel-contrast);
}

.tl-theme__dark {
	/* Canvas */
	--tl-color-snap: hsl(0, 76%, 60%);
	--tl-color-selection-fill: hsl(209, 100%, 57%, 20%);
	--tl-color-selection-stroke: hsl(214, 84%, 56%);
	--tl-color-background: hsl(240, 5%, 6.5%);
	--tl-color-brush-fill: hsl(0, 0%, 71%, 5.1%);
	--tl-color-brush-stroke: hsl(0, 0%, 71%, 25.1%);
	--tl-color-grid: hsl(0, 0%, 40%);
	/* UI */
	--tl-color-low: hsl(260, 4.5%, 10.5%);
	--tl-color-low-border: hsl(207, 10%, 10%);
	--tl-color-culled: hsl(210, 11%, 19%);
	--tl-color-muted-none: hsl(0, 0%, 100%, 0%);
	--tl-color-muted-0: hsl(0, 0%, 100%, 2%);
	--tl-color-muted-1: hsl(0, 0%, 100%, 10%);
	--tl-color-muted-2: hsl(0, 0%, 100%, 5%);
	--tl-color-hint: hsl(0, 0%, 100%, 7%);
	--tl-color-overlay: hsl(0, 0%, 0%, 50%);
	--tl-color-divider: hsl(240, 9%, 22%);
	--tl-color-panel: hsl(235, 6.8%, 13.5%);
	--tl-color-panel-contrast: hsl(245, 12%, 23%);
	--tl-color-panel-overlay: hsl(210, 10%, 24%, 82%);
	--tl-color-panel-transparent: hsla(235, 6.8%, 13.5%, 0%);
	--tl-color-selected: hsl(217, 89%, 61%);
	--tl-color-selected-contrast: hsl(0, 0%, 100%);
	--tl-color-focus: hsl(217, 76%, 80%);
	--tl-color-tooltip: hsla(0, 0%, 100%, 1);
	/* Text */
	--tl-color-text: hsl(210, 17%, 98%);
	--tl-color-text-0: hsl(0, 9%, 94%);
	--tl-color-text-1: hsl(0, 0%, 85%);
	--tl-color-text-3: hsl(204, 4%, 75%);
	--tl-color-text-shadow: hsl(210, 13%, 18%);
	--tl-color-text-highlight: hsl(52, 100%, 41%);
	--tl-color-text-highlight-p3: color(display-p3 0.8078 0.6225 0.0312);
	/* Named */
	--tl-color-primary: hsl(214, 84%, 56%);
	--tl-color-success: hsl(123, 38%, 57%);
	--tl-color-info: hsl(199, 92%, 56%);
	--tl-color-warning: hsl(36, 100%, 57%);
	--tl-color-danger: hsl(0, 82%, 66%);
	--tl-color-laser: hsl(0, 100%, 50%);
	/* Shadows */
	--tl-shadow-1:
		0px 1px 2px hsl(0, 0%, 0%, 16.1%), 0px 1px 3px hsl(0, 0%, 0%, 22%),
		inset 0px 0px 0px 1px var(--tl-color-panel-contrast);
	--tl-shadow-2:
		0px 1px 3px hsl(0, 0%, 0%, 66.6%), 0px 2px 6px hsl(0, 0%, 0%, 33%),
		inset 0px 0px 0px 1px var(--tl-color-panel-contrast);
	--tl-shadow-3:
		0px 1px 3px hsl(0, 0%, 0%, 50%), 0px 2px 12px hsl(0, 0%, 0%, 50%),
		inset 0px 0px 0px 1px var(--tl-color-panel-contrast);
}

.tl-counter-scaled {
	transform: scale(var(--tl-scale));
	transform-origin: top left;
	width: calc(100% * var(--tl-zoom));
	height: calc(100% * var(--tl-zoom));
}

.tl-container,
.tl-container * {
	-webkit-touch-callout: none;
	-webkit-tap-highlight-color: transparent;
	scrollbar-highlight-color: transparent;
	-webkit-user-select: none;
	user-select: none;
	box-sizing: border-box;
	outline: none;
}

.tl-container a {
	-webkit-touch-callout: initial;
}

.tl-container__focused {
	outline: 1px solid var(--tl-color-low);
}

input,
*[contenteditable],
*[contenteditable] * {
	user-select: text;
}

/* --------------------- Canvas --------------------- */

.tl-canvas {
	position: absolute;
	inset: 0px;
	height: 100%;
	width: 100%;
	color: var(--tl-color-text);
	cursor: var(--tl-cursor);
	overflow: clip;
	content-visibility: auto;
	touch-action: none;
	contain: strict;
}

.tl-canvas__in-front {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: var(--tl-layer-canvas-in-front);
}

.tl-shapes {
	position: relative;
	z-index: var(--tl-layer-canvas-shapes);
}

.tl-overlays {
	position: absolute;
	top: 0px;
	left: 0px;
	height: 100%;
	width: 100%;
	contain: strict;
	pointer-events: none;
	z-index: var(--tl-layer-canvas-overlays);
}

.tl-overlays__item {
	position: absolute;
	top: 0px;
	left: 0px;
	overflow: visible;
	pointer-events: none;
	transform-origin: top left;
}

.tl-svg-context {
	position: absolute;
	top: 0px;
	left: 0px;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

/* ------------------- Background ------------------- */

.tl-background__wrapper {
	z-index: var(--tl-layer-canvas-background);
	position: absolute;
	inset: 0px;
	height: 100%;
	width: 100%;
}

.tl-background {
	background-color: var(--tl-color-background);
	width: 100%;
	height: 100%;
}

/* --------------------- Grid Layer --------------------- */

.tl-grid {
	position: absolute;
	inset: 0px;
	width: 100%;
	height: 100%;
	touch-action: none;
	pointer-events: none;
	z-index: var(--tl-layer-canvas-grid);
	contain: strict;
}

.tl-grid-dot {
	fill: var(--tl-color-grid);
}

/* --------------------- Layers --------------------- */

.tl-html-layer {
	position: absolute;
	top: 0px;
	left: 0px;
	width: 1px;
	height: 1px;
	contain: layout style size;
}

/* --------------- Overlay Stack --------------- */

/* back of the stack, behind user's stuff */
.tl-collaborator__scribble {
	z-index: var(--tl-layer-overlays-collaborator-scribble);
}

.tl-collaborator__brush {
	z-index: var(--tl-layer-overlays-collaborator-brush);
}

.tl-collaborator__shape-indicator {
	z-index: var(--tl-layer-overlays-collaborator-shape-indicator);
}

.tl-user-scribble {
	z-index: var(--tl-layer-overlays-user-scribble);
}

.tl-user-brush {
	z-index: var(--tl-layer-overlays-user-brush);
}

.tl-user-handles {
	z-index: var(--tl-layer-overlays-user-handles);
}

.tl-user-snapline {
	z-index: var(--tl-layer-overlays-user-snapline);
}

.tl-selection__fg {
	pointer-events: none;
	z-index: var(--tl-layer-overlays-selection-fg);
}

.tl-user-indicator__hint {
	z-index: var(--tl-layer-overlays-user-indicator-hint);
	stroke-width: calc(2.5px * var(--tl-scale));
}

.tl-custom-overlays {
	z-index: var(--tl-layer-overlays-custom);
}

/* behind collaborator cursor */
.tl-collaborator__cursor-hint {
	z-index: var(--tl-layer-overlays-collaborator-cursor-hint);
}

.tl-collaborator__cursor {
	z-index: var(--tl-layer-overlays-collaborator-cursor);
}

.tl-cursor {
	overflow: visible;
}

/* -------------- Selection foreground -------------- */

.tl-selection__bg {
	position: absolute;
	top: 0px;
	left: 0px;
	transform-origin: top left;
	background-color: transparent;
	pointer-events: all;
}

.tl-selection__fg__outline {
	fill: none;
	pointer-events: none;
	stroke: var(--tl-color-selection-stroke);
	stroke-width: calc(1.5px * var(--tl-scale));
}

.tl-corner-handle {
	pointer-events: none;
	stroke: var(--tl-color-selection-stroke);
	fill: var(--tl-color-background);
	stroke-width: calc(1.5px * var(--tl-scale));
}

.tl-text-handle {
	pointer-events: none;
	fill: var(--tl-color-selection-stroke);
}

.tl-corner-crop-handle {
	pointer-events: none;
	fill: none;
	stroke: var(--tl-color-selection-stroke);
}

.tl-corner-crop-edge-handle {
	pointer-events: none;
	fill: none;
	stroke: var(--tl-color-selection-stroke);
}

.tl-mobile-rotate__bg {
	pointer-events: all;
	cursor: var(--tl-cursor-grab);
}

.tl-mobile-rotate__fg {
	pointer-events: none;
	stroke: var(--tl-color-selection-stroke);
	fill: var(--tl-color-background);
	stroke-width: calc(1.5px * var(--tl-scale));
}

.tl-transparent {
	fill: transparent;
	stroke: transparent;
}

.tl-hidden {
	opacity: 0;
	pointer-events: none;
}

/* -------------- Nametag / cursor chat ------------- */

.tl-nametag {
	position: absolute;
	top: 16px;
	left: 13px;
	width: fit-content;
	height: fit-content;
	max-width: 120px;
	padding: 3px 6px;
	white-space: nowrap;
	position: absolute;
	overflow: hidden;
	text-overflow: ellipsis;
	font-size: 12px;
	font-family: var(--font-body);
	border-radius: var(--tl-radius-2);
	color: var(--tl-color-selected-contrast);
}

.tl-nametag-title {
	position: absolute;
	top: -2px;
	left: 13px;
	width: fit-content;
	height: fit-content;
	padding: 0px 6px;
	max-width: 120px;
	white-space: nowrap;
	position: absolute;
	overflow: hidden;
	text-overflow: ellipsis;
	font-size: 12px;
	font-family: var(--font-body);
	text-shadow: var(--tl-text-outline);
	color: var(--tl-color-selected-contrast);
}

.tl-nametag-chat {
	position: absolute;
	top: 16px;
	left: 13px;
	width: fit-content;
	height: fit-content;
	color: var(--tl-color-selected-contrast);
	white-space: nowrap;
	position: absolute;
	padding: 3px 6px;
	font-size: 12px;
	font-family: var(--font-body);
	opacity: 1;
	border-radius: var(--tl-radius-2);
}

.tl-cursor-chat {
	position: absolute;
	color: var(--tl-color-selected-contrast);
	white-space: nowrap;
	padding: 3px 6px;
	font-size: 12px;
	font-family: var(--font-body);
	pointer-events: none;
	z-index: var(--tl-layer-cursor);
	margin-top: 16px;
	margin-left: 13px;
	opacity: 1;
	border: none;
	user-select: text;
	border-radius: var(--tl-radius-2);
}

.tl-cursor-chat .tl-cursor-chat__bubble {
	padding-right: 12px;
}

.tl-cursor-chat::selection {
	background: var(--tl-color-selected);
	color: var(--tl-color-selected-contrast);
	text-shadow: none;
}

.tl-cursor-chat::placeholder {
	color: var(--tl-color-selected-contrast);
	opacity: 0.7;
}

/* ---------------------- Text ---------------------- */

.tl-text-shape-label {
	position: relative;
	font-weight: normal;
	min-width: 1px;
	padding: 0px;
	margin: 0px;
	border: none;
	width: fit-content;
	height: fit-content;
	font-variant: normal;
	font-style: normal;
	pointer-events: all;
	white-space: pre-wrap;
	overflow-wrap: break-word;
	text-shadow: var(--tl-text-outline);
}

.tl-text-wrapper[data-font='draw'] {
	font-family: var(--tl-font-draw);
}

.tl-text-wrapper[data-font='sans'] {
	font-family: var(--tl-font-sans);
}

.tl-text-wrapper[data-font='serif'] {
	font-family: var(--tl-font-serif);
}

.tl-text-wrapper[data-font='mono'] {
	font-family: var(--tl-font-mono);
}

.tl-text-wrapper[data-align='start'],
.tl-text-wrapper[data-align='start-legacy'] {
	text-align: left;
}

.tl-text-wrapper[data-align='middle'],
.tl-text-wrapper[data-align='middle-legacy'] {
	text-align: center;
}

.tl-text-wrapper[data-align='end'],
.tl-text-wrapper[data-align='end-legacy'] {
	text-align: right;
}

.tl-plain-text-wrapper[data-isediting='true'] .tl-text-content {
	opacity: 0;
}

.tl-rich-text-wrapper[data-isediting='true'] .tl-text-content {
	display: none;
}

.tl-text {
	/* remove overflow from textarea on windows */
	margin: 0px;
	padding: 0px;

	appearance: auto;
	background: none;
	border-image: none;
	border: 0px;
	caret-color: var(--tl-color-text);
	color: inherit;
	column-count: initial !important;
	display: inline-block;
	font-family: inherit;
	font-feature-settings: normal;
	font-kerning: auto;
	font-optical-sizing: auto;
	font-size: inherit;
	font-stretch: 100%;
	font-style: inherit;
	font-variant: inherit;
	font-variation-settings: normal;
	font-weight: inherit;
	letter-spacing: inherit;
	line-height: inherit;
	outline: none;
	overflow-wrap: break-word;
	text-align: inherit;
	text-indent: 0px;
	text-rendering: auto;
	text-shadow: inherit;
	text-transform: none;
	white-space: pre-wrap;
	line-break: normal;
	word-spacing: 0px;
	word-wrap: break-word;
	writing-mode: horizontal-tb !important;
}

.tl-text-measure {
	z-index: var(--tl-layer-canvas-hidden);
	opacity: 0;
	visibility: hidden;

	/* pointer-events: all; */
	/* opacity: 1; */
	/* z-index: 99999;  */

	position: absolute;
	top: 0px;
	left: 0px;
	width: max-content;
	box-sizing: border-box;
	pointer-events: none;
	white-space: pre-wrap;
	word-wrap: break-word;
	overflow-wrap: break-word;
	resize: none;
	border: none;
	user-select: none;
	contain: style paint;
	/* N.B. This property, while discouraged ("intended for Document Type Definition (DTD) designers") is necessary for ensuring correct mixed RTL/LTR behavior when exporting SVGs. */
	unicode-bidi: plaintext;
	-webkit-user-select: none;
}

.tl-text-input,
.tl-text-content {
	position: absolute;
	inset: 0px;
	height: 100%;
	width: 100%;
	min-width: 1px;
	min-height: 1px;
	outline: none;
}

.tl-text-content__wrapper {
	position: relative;
	width: fit-content;
	height: fit-content;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	min-height: auto;
}

.tl-text-content {
	overflow: visible;
	pointer-events: none;
}

.tl-text-input {
	resize: none;
	user-select: all;
	-webkit-user-select: text;
	cursor: var(--tl-cursor-text);
}

.tl-text-input:not(.tl-rich-text) {
	/*
	 * Note: this `overflow: hidden` is key for scrollbars to not show up
	 * plaintext/<textarea> editors.
	 */
	overflow: hidden;
}

.tl-text-input::selection {
	background: var(--tl-color-selected);
	color: var(--tl-color-selected-contrast);
	text-shadow: none;
}

/* Text label */

.tl-text-label {
	display: flex;
	justify-content: center;
	align-items: center;
	color: var(--tl-color-text);
	text-shadow: var(--tl-text-outline);
	line-height: inherit;
	position: absolute;
	inset: 0px;
	height: 100%;
	width: 100%;
}

.tl-text-label[data-hastext='false'][data-isediting='false'] > .tl-text-label__inner {
	width: 40px;
	height: 40px;
}

.tl-text-label[data-hastext='true'][data-isediting='false'] .tl-text-content {
	pointer-events: all;
}

.tl-text-label__inner > .tl-text-input.tl-rich-text {
	display: none;
	position: static;
}

.tl-text-wrapper[data-isediting='false'] .tl-text-input {
	opacity: 0;
	cursor: var(--tl-cursor-default);
}

.tl-rich-text[data-is-ready-for-editing='true'],
.tl-text-wrapper[data-is-ready-for-editing='true'] .tl-text-input {
	cursor: var(--tl-cursor-text);
}

.tl-text-label[data-textwrap='true'] > .tl-text-label__inner {
	max-width: 100%;
}

.tl-text-label[data-isediting='true'] {
	background-color: transparent;
	min-height: auto;
}

.tl-text-wrapper .tl-text-content {
	pointer-events: all;
	z-index: var(--tl-layer-text-content);
}

.tl-text-label__inner > .tl-text-content {
	position: relative;
	top: 0px;
	left: 0px;
	padding: inherit;
	height: fit-content;
	width: fit-content;
	border-radius: var(--tl-radius-1);
	max-width: 100%;
}

.tl-text-label__inner > .tl-text-input {
	position: absolute;
	inset: 0px;
	height: 100%;
	width: 100%;
	padding: inherit;
}

.tl-text-wrapper[data-isselected='true'] .tl-text-input {
	z-index: var(--tl-layer-text-editor);
	pointer-events: all;
}

/* This part of the rule helps preserve the occlusion rules for the shapes so we
 * don't click on shapes that are behind other shapes.
 * One extra nuance is we don't use this behavior for:
 *  - arrows which have weird geometry and just gets in the way.
 *  - draw/line shapes, because it feels restrictive to have them be 'in the way' of clicking on a textfield
 *  - shapes that are not filled
 */
.tl-canvas:is([data-iseditinganything='true'], [data-isselectinganything='true'])
	.tl-shape:not(
		[data-shape-type='arrow'],
		[data-shape-type='draw'],
		[data-shape-type='line'],
		[data-shape-type='highlight'],
		[data-shape-is-filled='false']
	) {
	pointer-events: all;
}

.tl-rich-text .ProseMirror {
	word-wrap: break-word;
	overflow-wrap: break-word;
	white-space: pre-wrap;

	/**
	 * Note: ProseMirror disables this in https://github.com/ProseMirror/prosemirror-view/commit/6b3b2205e2f3029cb8e8e86c55a190a22491df31
	 * However, that was from 8 years ago and the browser caret issue
	 * it mentions seems to be fixed. So, we're re-enabling it.
	 * We'll tell ProseMirror maybe to get rid of this on their end.
	 *
	 */
	-webkit-font-variant-ligatures: inherit;
	font-variant-ligatures: inherit;
	font-feature-settings: inherit;

	/**
	 * N.B. This following CSS Rule comes standard with the tiptap editor.
	 * Combined with the above rule that it supersedes, it allows for
	 * the auto-linking to work in text. Say, when typing example.com
	 * this helps it automatically turn that bit of text into a link.
	 *
	 * However, specifically, the break-spaces features seems to cause
	 * rendering differences when going in-and-out of edit mode. For example,
	 * the statically rendered text 'the rain in spain falls mainly on the plain'
	 * in a note shape will render differently when going in-and-out of edit mode.
	 *
	 * So, this is commented out to help make both the autolinking work (which now
	 * relies on the white-space: pre-wrap to work and to make the static/edit-mode
	 * rendering consistent.
	 * In the future, we might consider just making the static rendering just use
	 * white-space: break-spaces to make it consistent with the edit mode if need be.
	 *
	 * Also, the amount of ink I've spilt in my career writing comments explaining
	 * white-space in contenteditable is incredible.
	 *
	/* white-space: break-spaces; */
}

.tl-rich-text p {
	margin: 0;
	/* Depending on the extensions, <p> tags can be empty, without a <br />. */
	min-height: 1lh;
}

.tl-rich-text ul,
.tl-rich-text ol {
	text-align: left;
	margin: 0;
	padding-left: 3.25ch;
	/* Some resets, like Tailwind, nix the list styling. */
	list-style: revert;
}

.tl-rich-text ol:has(> li:nth-child(10)) {
	padding-left: 4.25ch;
}

.tl-rich-text ol:has(> li:nth-child(100)) {
	padding-left: 5.25ch;
}

.tl-rich-text h1,
.tl-rich-text h2,
.tl-rich-text h3,
.tl-rich-text h4,
.tl-rich-text h5,
.tl-rich-text h6 {
	margin-top: 5px;
	margin-bottom: 10px;
}

.tl-rich-text a {
	color: var(--tl-color-primary);
	text-decoration: underline;
}

.tl-rich-text[data-is-select-tool-active='false'] a {
	cursor: inherit;
}

.tl-rich-text code {
	font-family: var(--tl-font-mono);
}

.tl-rich-text mark {
	background-color: #fddd00;
	color: currentColor;
	border-radius: 2px;
}

.tl-theme__light .tl-rich-text mark {
	text-shadow: none;
}

.tl-theme__dark .tl-rich-text mark {
	background-color: var(--tl-color-text-highlight);
	color: currentColor;
}

@supports (color: color(display-p3 1 1 1)) {
	@media (color-gamut: p3) {
		.tl-container:not(.tl-theme__force-sRGB) .tl-rich-text mark {
			background-color: var(--tl-color-text-highlight-p3);
		}
	}
}

.tl-text-wrapper[data-isediting='true'] .tl-rich-text {
	display: block;
}

/* --------------------- Loading -------------------- */

.tl-loading {
	background-color: var(--tl-color-background);
	color: var(--tl-color-text-1);
	height: 100%;
	width: 100%;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: var(--tl-space-2);
	font-size: 14px;
	font-weight: 500;
	opacity: 0;
	animation: tl-fade-in 0.2s ease-in-out forwards;
	animation-delay: 0.2s;
	position: absolute;
	inset: 0px;
	z-index: var(--tl-layer-canvas-blocker);
}

@keyframes tl-fade-in {
	0% {
		opacity: 0;
	}
	100% {
		opacity: 1;
	}
}

.tl-spinner {
	animation: tl-spin 1s linear infinite;
}

@keyframes tl-spin {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

/* ---------------------- Brush --------------------- */

.tl-brush {
	stroke-width: calc(var(--tl-scale) * 1px);
	contain: size layout;
}

.tl-brush__default {
	stroke: var(--tl-color-brush-stroke);
	fill: var(--tl-color-brush-fill);
}

/* -------------------- Scribble -------------------- */

.tl-scribble {
	stroke-linejoin: round;
	stroke-linecap: round;
	pointer-events: none;
	contain: size layout;
}

/* ---------------------- Snaps --------------------- */

.tl-snap-indicator {
	stroke: var(--tl-color-snap);
	stroke-width: calc(1px * var(--tl-scale));
	fill: none;
}

.tl-snap-point {
	stroke: var(--tl-color-snap);
	stroke-width: calc(1px * var(--tl-scale));
	fill: none;
}

/* ---------------- Hyperlink Button ---------------- */

.tl-hyperlink-button {
	background: none;
	margin: 0px;
	position: absolute;
	top: 0px;
	right: 0px;
	height: 44px;
	width: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 400;
	color: var(--tl-color-text-1);
	padding: 13px;
	cursor: var(--tl-cursor-pointer);
	border: none;
	outline: none;
	pointer-events: all;
	z-index: 1;
}

.tl-hyperlink-button::after {
	content: '';
	z-index: -1;
	position: absolute;
	right: 6px;
	bottom: 6px;
	display: block;
	width: calc(100% - 12px);
	height: calc(100% - 12px);
	border-radius: var(--tl-radius-1);
	background-color: var(--tl-color-background);
	pointer-events: none;
}

.tl-hyperlink-button:focus-visible {
	color: var(--tl-color-selected);
}

.tl-hyperlink__icon {
	width: 15px;
	height: 15px;
	background-color: currentColor;
	pointer-events: none;
}

.tl-hyperlink-button__hidden {
	display: none;
}

/* --------------------- Handles -------------------- */

.tl-handle {
	pointer-events: all;
}

.tl-handle__bg {
	fill: transparent;
	stroke: transparent;
	pointer-events: all;
}

.tl-handle__fg {
	fill: var(--tl-color-selected-contrast);
	stroke: var(--tl-color-selection-stroke);
	stroke-width: calc(1.5px * var(--tl-scale));
	pointer-events: none;
}

.tl-handle__create {
	opacity: 0;
}

.tl-handle__clone > .tl-handle__fg {
	fill: var(--tl-color-selection-stroke);
	stroke: none;
}

.tl-handle__bg:active {
	fill: none;
}

@media (pointer: coarse) {
	.tl-handle__bg:active {
		fill: var(--tl-color-selection-fill);
	}

	.tl-handle__create {
		opacity: 1;
	}
}

.tl-rotate-corner:not(:hover),
.tl-resize-handle:not(:hover) {
	cursor: none;
}

/* ----------------- Shape indicator ---------------- */

.tl-shape-indicator {
	transform-origin: top left;
	fill: none;
	stroke-width: calc(1.5px * var(--tl-scale));
	contain: size layout;
}

/* ---------------------- Shape --------------------- */

.tl-shape {
	position: absolute;
	pointer-events: none;
	overflow: visible;
	transform-origin: top left;
	contain: size layout;
}

/* ---------------- Shape Containers ---------------- */

.tl-svg-container {
	position: absolute;
	inset: 0px;
	height: 100%;
	width: 100%;
	pointer-events: none;
	stroke-linecap: round;
	stroke-linejoin: round;
	transform-origin: top left;
	overflow: visible;
}

.tl-html-container {
	position: absolute;
	inset: 0px;
	height: 100%;
	width: 100%;
	pointer-events: none;
	stroke-linecap: round;
	stroke-linejoin: round;
	/* content-visibility: auto; */
	transform-origin: top left;
	color: var(--tl-color-text-1);
}

/* -------------------- Group shape ------------------ */

.tl-group {
	stroke: var(--tl-color-text);
	stroke-width: calc(1px * var(--tl-scale));
	opacity: 0.5;
}

/* --------------------- Arrow shape -------------------- */

.tl-shape[data-shape-type='arrow'] .tl-text-label {
	position: absolute;
	top: -1px;
	left: -1px;
	width: 2px;
	height: 2px;
	padding: 0px;
	display: flex;
	justify-content: center;
	align-items: center;
	text-align: center;
	color: var(--tl-color-text);
	text-shadow: var(--tl-text-outline);
}

.tl-shape[data-shape-type='arrow'] .tl-text-label__inner {
	border-radius: var(--tl-radius-1);
	box-sizing: content-box;
	height: max-content;
	width: max-content;
}

.tl-shape[data-shape-type='arrow'] .tl-text {
	height: max-content;
}

.tl-arrow-hint {
	stroke: var(--tl-color-text-1);
	fill: none;
	stroke-linecap: round;
	overflow: visible;
}

.tl-arrow-hint-handle {
	fill: var(--tl-color-selected-contrast);
	stroke: var(--tl-color-selection-stroke);
	stroke-width: calc(1.5px * var(--tl-scale));
	r: calc(4px * var(--tl-scale));
}

.tl-arrow-hint-snap {
	stroke: transparent;
	fill: var(--tl-color-selection-fill);
	r: calc(12px * var(--tl-scale));
}

.tl-arrow-hint-snap__none,
.tl-arrow-hint-snap__center,
.tl-arrow-hint-snap__axis {
	display: none;
}

.tl-arrow-hint-snap__edge {
	r: calc(8px * var(--tl-scale));
}

/* ------------------- Bookmark shape ------------------- */

.tl-bookmark__container {
	width: 100%;
	height: 100%;
	position: relative;
	border: 1px solid var(--tl-color-panel-contrast);
	background-color: var(--tl-color-panel);
	border-radius: var(--tl-radius-2);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.tl-bookmark__container--safariExport {
	border: 1px solid var(--tl-color-divider);
}

.tl-bookmark__image_container {
	flex: 1 1 100%;
	overflow: hidden;
	border-top-left-radius: var(--tl-radius-1);
	border-top-right-radius: var(--tl-radius-1);
	width: 100%;
	height: 100%;
	display: flex;
	justify-content: flex-end;
	align-items: flex-start;
	box-shadow: inset 0px 0px 0px 1px var(--tl-color-divider);
}

.tl-bookmark__image_container > .tl-hyperlink-button::after {
	background-color: var(--tl-color-panel);
}

.tl-bookmark__placeholder {
	width: 100%;
	height: 100%;
	background-color: var(--tl-color-muted-2);
	border-bottom: 1px solid var(--tl-color-muted-2);
}

.tl-bookmark__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	border-bottom: 1px solid var(--tl-color-muted-2);
}

.tl-bookmark__copy_container {
	background-color: var(--tl-color-muted-0);
	padding: var(--tl-space-4);
	pointer-events: all;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	flex: 1;
}

.tl-bookmark__copy_container:has(.tl-bookmark__link:only-child) {
	justify-content: center;
}

.tl-bookmark__heading,
.tl-bookmark__description,
.tl-bookmark__link {
	margin: 0px;
	width: 100%;
	font-family: inherit;
}

.tl-bookmark__heading {
	font-size: 16px;
	line-height: 1.6;
	font-weight: bold;
	padding-bottom: var(--tl-space-2);
	overflow: hidden;
	max-height: calc((16px * 1.6) * 2);
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	text-overflow: ellipsis;
	display: -webkit-box;
}

.tl-bookmark__description {
	font-size: 12px;
	line-height: 1.5;
	overflow: hidden;
	max-height: calc((12px * 1.5) * 3);
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	text-overflow: ellipsis;
	display: -webkit-box;
	color: var(--tl-color-text-1);
	margin: var(--tl-space-2) 0px;
}

.tl-bookmark__heading + .tl-bookmark__link,
.tl-bookmark__description + .tl-bookmark__link {
	margin-top: var(--tl-space-3);
}
.tl-bookmark__link {
	font-size: 12px;
	pointer-events: all;
	display: flex;
	color: var(--tl-color-text-1);
	align-items: center;
	cursor: var(--tl-cursor-pointer);
	width: fit-content;
	max-width: 100%;
	text-decoration: none;
}

.tl-bookmark__link > span {
	flex-shrink: 0px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.tl-bookmark__link > .tl-hyperlink__icon {
	margin-right: 8px;
	flex-shrink: 0;
}

.tl-bookmark__link > .tl-bookmark__favicon {
	margin-right: 8px;
	width: 16px;
	height: 16px;
	flex-shrink: 0;
}

/* -------------- Image and video shape ------------- */

.tl-image,
.tl-video {
	object-fit: cover;
	background-size: cover;
	width: 100%;
	height: 100%;
}

.tl-video-container,
.tl-image-container,
.tl-embed-container {
	width: 100%;
	height: 100%;
	pointer-events: all;
	/* background-color: var(--tl-color-background); */

	display: flex;
	justify-content: center;
	align-items: center;
}

.tl-image-container {
	position: relative;
}

.tl-image {
	position: absolute;
	inset: 0;
}

.tl-video.tl-video-is-fullscreen {
	object-fit: contain;
	background-size: contain;
}

/* -------------------- Note shape ------------------- */

.tl-note__container {
	position: relative;
	width: 100%;
	height: 100%;
	pointer-events: all;
	opacity: 1;
	z-index: var(--tl-layer-text-container);
	border-radius: 1px;
}

.tl-note__container > .tl-text-label {
	text-shadow: none;
	color: currentColor;
}

/* ------------------- Frame shape ------------------- */

.tl-frame__body {
	stroke-width: calc(1px * var(--tl-scale));
}

.tl-frame__creating {
	stroke: var(--tl-color-selected);
	fill: none;
}

.tl-frame-heading {
	--tl-frame-padding-x: 6px;
	--tl-frame-height: 24px;
	--tl-frame-minimum-width: 32px;
	--tl-frame-offset-width: 16px;
	display: flex;
	align-items: center;
	position: absolute;
	transform-origin: 0% 100%;
	overflow: hidden;
	max-width: 100%;
	min-width: var(--tl-frame-minimum-width);
	height: auto;
	font-size: 12px;
	padding-bottom: 4px;
	pointer-events: all;
}

.tl-frame-heading-hit-area {
	pointer-events: all;
	/* scale from bottom left corner so we can pin it to the top left corner of the frame */
	transform-origin: 0% 100%;
	display: flex;
	height: var(--tl-frame-height);
	width: 100%;
	align-items: center;
	border-radius: var(--tl-radius-1);
}

.tl-frame-label {
	pointer-events: all;
	overflow: hidden;
	text-overflow: ellipsis;
	padding: 0px var(--tl-frame-padding-x);
	border-radius: var(--tl-radius-1);
	position: relative;
	font-size: inherit;
	white-space: pre;
}

.tl-frame-label__editing {
	color: transparent;
	white-space: pre;
	width: auto;
	min-width: var(--tl-frame-minimum-width);
	height: 100%;
	overflow: visible;
	background-color: var(--tl-color-panel);
	border-color: var(--tl-color-selected);
	box-shadow: inset 0px 0px 0px 1.5px var(--tl-color-selected);
}

.tl-frame-name-input {
	position: absolute;
	border: none;
	background: none;
	outline: none;
	padding: 0px var(--tl-frame-padding-x);
	inset: 0px;
	height: 100%;
	width: 100%;
	font-size: inherit;
	font-family: inherit;
	font-weight: inherit;
	width: 100%;
	color: var(--tl-color-text-1);
	border-radius: var(--tl-radius-1);
	user-select: all;
	-webkit-user-select: text;
	white-space: pre;
	cursor: var(--tl-cursor-text);
}

/* If mobile use 16px as font size */
/* On iOS, font size under 16px in an input will make the page zoom into the input 🤦‍♂️ */
/* https://css-tricks.com/16px-or-larger-text-prevents-ios-form-zoom/ */
@media (max-width: 600px) {
	.tl-frame-heading {
		font-size: 16px;
	}
}

/* ------------------- Embed Shape ------------------ */

.tl-embed {
	border: none;
	border-radius: var(--tl-radius-2);
}

/* -------------- Shape error boundary -------------- */

.tl-shape-error-boundary {
	width: 100%;
	height: 100%;
	background-color: var(--tl-color-muted-1);
	border-width: calc(1px * var(--tl-scale));
	border-color: var(--tl-color-muted-1);
	border-style: solid;
	border-radius: calc(var(--tl-radius-1) * var(--tl-scale));
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: left;
	position: relative;
	pointer-events: all;
	overflow: hidden;
	padding: var(--tl-space-2);
}

.tl-shape-error-boundary::before {
	transform: scale(var(--tl-scale));
	content: 'Error';
	font-size: 12px;
	font-family: inherit;
	color: var(--tl-color-text-0);
}

/* ----------------- Error boundary ----------------- */

.tl-error-boundary {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: var(--tl-space-4);
	background-color: var(--tl-color-background);
	color: var(--tl-color-text-1);
	position: absolute;
}

.tl-error-boundary__overlay {
	position: absolute;
	inset: 0px;
	height: 100%;
	width: 100%;
	z-index: var(--tl-layer-error-overlay);
	background-color: var(--tl-color-overlay);
}

.tl-error-boundary__content * {
	user-select: all;
	-webkit-user-select: text;
	pointer-events: all;
}

.tl-error-boundary__canvas {
	pointer-events: none;
	position: absolute;
	inset: 0px;
	height: 100%;
	width: 100%;
	z-index: var(--tl-layer-error-canvas);
}

/* some browsers seem to have some weird interactions between stacking contexts
and pointer-events. this ::after pseudo element covers the canvas and prevents
it from receiving any pointer events or affecting the cursor. */
.tl-error-boundary__canvas::after {
	content: ' ';
	display: block;
	position: absolute;
	inset: 0px;
	height: 100%;
	width: 100%;
	z-index: var(--tl-layer-error-canvas-after);
	pointer-events: all;
}

.tl-error-boundary__content {
	width: fit-content;
	height: fit-content;
	max-width: 100%;
	width: 400px;
	max-height: 100%;
	background-color: var(--tl-color-panel);
	padding: 16px;
	border-radius: 16px;
	box-shadow: var(--tl-shadow-2);
	font-size: 14px;
	font-weight: 400;
	display: flex;
	flex-direction: column;
	overflow: auto;
	z-index: var(--tl-layer-error-content);
	gap: 12px;
}

.tl-error-boundary__content__expanded {
	width: 600px;
}

.tl-error-boundary__content h2 {
	font-size: 16px;
	margin: 0px;
	font-weight: 500;
}

.tl-error-boundary__content h4 {
	border: 1px solid var(--tl-color-low-border);
	margin: -6px 0 0 0;
	padding: var(--tl-space-5);
	border-radius: var(--tl-radius-2);
	font-weight: normal;
}

.tl-error-boundary__content p {
	line-height: 1.5;
	margin: 0px;
}

.tl-error-boundary__content pre {
	background-color: var(--tl-color-muted-2);
	margin-top: 0;
	padding: var(--tl-space-5);
	border-radius: var(--tl-radius-2);
	overflow: auto;
	font-size: 12px;
	max-height: 320px;
}

.tl-error-boundary__content button {
	background: none;
	border: none;
	font-family: inherit;
	font-size: 14px;
	font-weight: 500;
	padding: var(--tl-space-4);
	border-radius: var(--tl-radius-3);
	cursor: var(--tl-cursor-pointer);
	color: inherit;
	background-color: transparent;
}

.tl-error-boundary__content a {
	color: var(--tl-color-selected);
	font-weight: 500;
	text-decoration: none;
}

.tl-error-boundary__content__error {
	position: relative;
	margin: -6px 0 0 0;
}

.tl-error-boundary__content__error button {
	position: absolute;
	top: var(--tl-space-2);
	right: var(--tl-space-2);
	font-size: 12px;
	padding: var(--tl-space-2) var(--tl-space-3);
	background-color: var(--tl-color-panel);
	border-radius: var(--tl-radius-1);
}

.tl-error-boundary__content__actions {
	display: flex;
	justify-content: space-between;
	gap: var(--tl-space-4);
	margin: 0px;
	margin-left: -4px;
}
.tl-error-boundary__content__actions__group {
	display: flex;
	gap: var(--tl-space-4);
}
.tl-error-boundary__content .tl-error-boundary__reset {
	color: var(--tl-color-danger);
}
.tl-error-boundary__content .tl-error-boundary__refresh {
	background-color: var(--tl-color-primary);
	color: var(--tl-color-selected-contrast);
}
.tl-container__focused:not(.tl-container__no-focus-ring)
	.tlui-button.tl-error-boundary__refresh:focus-visible {
	border-radius: 8px;
	outline-offset: 0;
}

/* ---------------- Hit test blocker ---------------- */

.tl-hit-test-blocker {
	position: absolute;
	z-index: var(--tl-layer-canvas-blocker);
	inset: 0px;
	width: 100%;
	height: 100%;
	pointer-events: all;
}

.tl-hit-test-blocker__hidden {
	display: none;
}

/* --------------------- Hovers --------------------- */

@media (hover: hover) {
	.tl-handle__create:hover {
		opacity: 1;
	}

	.tl-handle__bg:hover {
		cursor: var(--tl-cursor-grab);
		fill: var(--tl-color-selection-fill);
	}

	.tl-bookmark__link:hover {
		color: var(--tl-color-selected);
	}

	.tl-hyperlink-button:hover {
		color: var(--tl-color-selected);
	}

	.tl-error-boundary__content button:hover {
		background-color: var(--tl-color-low);
	}
	.tl-error-boundary__content a:hover {
		color: var(--tl-color-text-1);
	}
	.tl-error-boundary__content .tl-error-boundary__refresh:hover {
		background-color: var(--tl-color-primary);
		opacity: 0.9;
	}

	/* These three rules help preserve clicking into specific points in text areas *while*
 * already in edit mode when jumping from shape to shape. */
	.tl-canvas[data-iseditinganything='true'] .tl-text-wrapper:hover .tl-text-input {
		z-index: var(--tl-layer-text-editor);
		pointer-events: all;
	}
}

/* @tldraw/ui */

.tl-container {
	--tl-layer-above: 1;
	--tl-layer-focused-input: 10;
	--tl-layer-menu-click-capture: 250;
	--tl-layer-panels: 300;
	--tl-layer-menus: 400;
	--tl-layer-toasts: 650;
	--tl-layer-cursor: 700;
	--tl-layer-header-footer: 999;
	--tl-layer-following-indicator: 1000;
}

/* Button */

.tlui-button {
	position: relative;
	height: 40px;
	min-width: 40px;
	padding: 0px 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: transparent;
	border: transparent;
	color: currentColor;
	cursor: pointer;
	pointer-events: all;
	font-weight: inherit;
	font-family: inherit;
	line-height: inherit;
	text-rendering: optimizeLegibility;
	font-size: 12px;
	gap: 0px;
	color: var(--tl-color-text-1);
	z-index: 0;
}

.tlui-button:disabled {
	color: var(--tl-color-text-3);
	text-shadow: none;
	cursor: default;
}

.tlui-button:disabled .tlui-kbd {
	color: var(--tl-color-text-3);
}

.tlui-button > * {
	position: relative;
	z-index: var(--tl-layer-above);
}

.tlui-button__label {
	font-size: 12px;
	flex-grow: 2;
	text-align: left;
}

/*
 * We only want to show the focus ring if:
 * - the container is focused
 * - we're not using the mouse to interact (which is the .tl-container__no-focus-ring)
 */
.tl-container__focused:not(.tl-container__no-focus-ring) .tlui-button:focus-visible {
	border-radius: 10px;
	outline: 2px solid var(--tl-color-focus);
	outline-offset: -5px;
}
.tl-container__focused:not(.tl-container__no-focus-ring) .tlui-button__tool:focus-visible {
	border-radius: 12px;
}
.tlui-slider__container:has(.tlui-slider__thumb:focus-visible) {
	border-radius: 10px;
	outline: 2px solid var(--tl-color-focus);
	outline-offset: -5px;
}

.tlui-button::after {
	display: block;
	content: '';
	position: absolute;
	inset: 4px;
	border-radius: var(--tl-radius-2);
	background: var(--tl-color-muted-2);
	opacity: 0;
}

.tlui-button__menu[data-highlighted]::after {
	opacity: 1;
}

.tlui-button[data-isactive='true']::after,
.tlui-button[data-isactive='true']:not(:disabled, :focus-visible):active:after {
	background: var(--tl-color-hint);
	opacity: 1;
}

.tlui-button[aria-expanded='true'][data-direction='left'] {
	background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
	opacity: 1;
}

@media (hover: hover) {
	.tlui-button[aria-expanded='true'][data-direction='left']:not(:hover)::after {
		background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
		opacity: 1;
	}

	.tlui-button:not(:disabled):hover {
		z-index: 1;
	}

	.tlui-button:not(:disabled):hover::after {
		opacity: 1;
	}
}

.tlui-button__icon + .tlui-button__label {
	margin-left: var(--tl-space-2);
}

/* Low button  */

.tlui-button__low {
	border-radius: var(--tl-radius-3);
	background-color: var(--tl-color-low);
}

.tlui-button__low::after {
	background-color: var(--tl-color-muted-2);
	opacity: 0;
}

@media (hover: hover) {
	.tlui-button__low:hover::after {
		opacity: 1;
	}
}

/* Primary / danger buttons */

.tlui-button__primary {
	color: var(--tl-color-primary);
}

.tlui-button__danger {
	color: var(--tl-color-danger);
	text-shadow: none;
}

@media (hover: hover) {
	.tlui-button__primary:not(:disabled, :focus-visible):hover {
		color: var(--tl-color-primary);
	}

	.tlui-button__danger:not(:disabled, :focus-visible):hover {
		color: var(--tl-color-danger);
		text-shadow: none;
	}
}

/* Menu button */

.tlui-button__menu {
	height: 40px;
	min-height: 40px;
	width: 100%;
	gap: 8px;
	margin-top: -4px;
}

.tlui-button__menu::after {
	inset: 4px;
	border-radius: var(--tl-radius-2);
}

.tlui-button__menu > .tlui-icon + .tlui-button__label {
	margin-left: 0px;
}

.tlui-button__menu:nth-child(1) {
	margin-top: 0px;
}

.tlui-button__menu:nth-last-child(1) {
	margin-bottom: 0px;
}

/* Menu checkbox button */

.tlui-button__checkbox {
	padding-left: 8px;
}

.tlui-button__checkbox__indicator {
	width: 15px;
	height: 15px;
}

/* Tool lock button */

.tlui-main-toolbar__lock-button {
	position: absolute;
	pointer-events: all;
	height: 40px;
	width: 40px;
	border-radius: var(--tl-radius-2);
}

.tlui-main-toolbar--horizontal .tlui-main-toolbar__lock-button {
	top: 4px;
	right: 0px;
	min-width: 0px;
}

.tlui-main-toolbar--vertical .tlui-main-toolbar__lock-button {
	bottom: 0px;
	min-height: 0px;
}

.tlui-main-toolbar__lock-button::after {
	top: 4px;
	left: 8px;
	inset: 4px;
}

/* Tool button  */

.tlui-button__tool {
	position: relative;
	height: 48px;
	width: 48px;
}

.tlui-button__tool::after {
	inset: 4px;
	border-radius: 8px;
}

.tlui-button__tool[aria-pressed='true'] {
	color: var(--tl-color-selected-contrast);
}

.tlui-button__tool[aria-pressed='true']:not(:disabled, :focus-visible):active {
	color: var(--tl-color-selected-contrast);
}

.tlui-button__tool[aria-pressed='true']:not(:disabled)::after {
	background: var(--tl-color-selected);
	opacity: 1;
}

.tlui-layout__mobile .tlui-main-toolbar--horizontal .tlui-button__tool {
	height: 48px;
	width: 43px;
}

.tlui-layout__mobile .tlui-main-toolbar--horizontal .tlui-button__tool > .tlui-icon {
	height: 16px;
	width: 16px;
}

/* Row layout */

.tlui-row {
	display: flex;
	flex-direction: row;
	padding: 0 2px;
}
.tlui-row > * {
	margin-left: -2px;
	margin-right: -2px;
}

/* Column layout */

.tlui-column {
	display: flex;
	flex-direction: column;
	padding: 2px 0;
}
.tlui-column > * {
	margin-top: -2px;
	margin-bottom: -2px;
}

/* Grid layout */

.tlui-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	grid-auto-flow: row;
	overflow: hidden;
	padding: 2px;
}
.tlui-grid > * {
	margin: -2px;
}

/* Zoom button */

.tlui-zoom-menu__button {
	width: 60px;
	min-width: 60px;
	text-align: center;
}

/* --------------------- Layout --------------------- */

.tlui-layout {
	position: relative;
	display: grid;
	grid-template-columns: 1fr;
	grid-template-rows: minmax(0px, 1fr) auto;
	grid-auto-rows: auto;
	height: 100%;
	max-height: 100%;
	overflow: clip;
	pointer-events: none;
	user-select: none;
	contain: strict;
	z-index: var(--tl-layer-panels);
	transform: translate3d(0, 0, 0);
	--tl-sab: env(safe-area-inset-bottom);
	font-weight: 500;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	font-smooth: antialiased;
	text-rendering: optimizeLegibility;
}

.tlui-layout__top {
	grid-column: 1;
	grid-row: 1;
	display: flex;
	min-width: 0px;
	justify-content: space-between;
}

.tlui-layout__top__left {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: flex-start;
	width: 100%;
	height: 100%;
	flex: 0 1 0;
}

.tlui-layout__top__right {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	justify-content: flex-start;
	height: 100%;
	flex: 0 0 auto;
	min-width: 0px;
}

.tlui-scrollable,
.tlui-scrollable * {
	pointer-events: all;
	touch-action: auto;
	overscroll-behavior: none;
}

/* ----------------- Helper Buttons ---------------- */

.tlui-helper-buttons {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	align-items: flex-start;
	width: min-content;
	gap: var(--tl-space-3);
	margin: var(--tl-space-2) var(--tl-space-3);
	white-space: nowrap;
	pointer-events: none;
	z-index: var(--tl-layer-panels);
}

/* ---------------------- Icon ---------------------- */

.tlui-icon {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	background-color: currentColor;
}

.tlui-icon__placeholder {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	background-color: transparent;
}

.tlui-icon__small {
	width: 15px;
	height: 15px;
}

/* --------------------- Slider --------------------- */

.tlui-slider__container {
	width: 100%;
	padding: 0px var(--tl-space-4);
}

.tlui-slider {
	position: relative;
	display: flex;
	align-items: center;
	user-select: none;
	touch-action: none;
	width: 100%;
}

.tlui-slider__track {
	position: relative;
	flex-grow: 1;
	height: 44px;
	cursor: pointer;
}

.tlui-slider__track::after {
	display: block;
	position: absolute;
	top: calc(50% - 2px);
	content: '';
	height: 3px;
	width: 100%;
	background-color: var(--tl-color-muted-1);
	border-radius: 14px;
}

.tlui-slider__range {
	position: absolute;
	top: calc(50% - 2px);
	left: 0px;
	height: 3px;
	background-color: var(--tl-color-selected);
	border-radius: 14px;
}

.tlui-slider__thumb {
	all: unset;
	cursor: grab;
	display: block;
	width: 18px;
	height: 18px;
	position: relative;
	top: -1px;
	background-color: var(--tl-color-panel);
	border-radius: 999px;
	box-shadow: inset 0px 0px 0px 2px var(--tl-color-text-1);
}

.tlui-slider__thumb:active {
	cursor: grabbing;
	box-shadow:
		inset 0px 0px 0px 2px var(--tl-color-text-1),
		var(--tl-shadow-1);
}

/* ---------------------- Input --------------------- */

.tlui-input {
	background: none;
	margin: 0px;
	position: relative;
	z-index: var(--tl-layer-above);
	height: 40px;
	max-height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: inherit;
	font-size: 12px;
	font-weight: inherit;
	color: var(--tl-color-text-1);
	padding: var(--tl-space-4);
	padding-left: 0px;
	border: none;
	outline: none;
	text-overflow: ellipsis;
	width: 100%;
	user-select: all;
	text-rendering: optimizeLegibility;
	-webkit-user-select: auto !important;
}

.tlui-input::placeholder {
	color: var(--tl-color-text-3);
}

.tlui-input__wrapper {
	width: 100%;
	height: 44px;
	display: flex;
	align-items: center;
	gap: var(--tl-space-4);
	color: var(--tl-color-text);
}

.tlui-input__wrapper > .tlui-icon {
	flex-shrink: 0;
}

/* If mobile use 16px as font size */
/* On iOS, font size under 16px in an input will make the page zoom into the input 🤦‍♂️ */
/* https://css-tricks.com/16px-or-larger-text-prevents-ios-form-zoom/ */
@media (max-width: 600px) {
	@supports (-webkit-touch-callout: none) {
		/* CSS specific to iOS devices */
		.tlui-input {
			font-size: 16px;
		}
	}
}

/* ----------------------- Kbd ---------------------- */

.tlui-kbd {
	font-family: inherit;
	font-size: 11px;
	line-height: 11px;
	display: grid;
	justify-items: center;
	grid-auto-flow: column;
	grid-template-columns: auto;
	grid-auto-columns: minmax(1em, auto);
	align-self: bottom;
	color: currentColor;
	margin-left: var(--tl-space-4);
}

.tlui-kbd > span {
	width: 100%;
	text-align: center;
	display: inline;
	margin: 0px;
	padding: 2px;
	border-radius: 2px;
}

.tlui-kbd > span:last-child {
	padding-right: 0;
}

.tlui-kbd:not(:last-child) {
	margin-right: var(--tl-space-2);
}

/* Focus Mode Button */

.tlui-focus-button {
	z-index: var(--tl-layer-panels);
	pointer-events: all;
}

/* ---------------------- Menu ---------------------- */

.tlui-menu:empty {
	display: none;
}

.tlui-menu {
	z-index: var(--tl-layer-menus);
	height: fit-content;
	width: fit-content;
	border-radius: var(--tl-radius-3);
	pointer-events: all;
	touch-action: auto;
	overflow-y: auto;
	overscroll-behavior: none;
	background-color: var(--tl-color-panel);
	box-shadow: var(--tl-shadow-3);
}

@media (max-height: 600px) {
	.tlui-menu {
		max-height: 70vh;
	}
}

.tlui-menu::-webkit-scrollbar {
	display: none;
}

/* Menu groups */

.tlui-menu__group {
	width: 100%;
}

.tlui-menu__group:empty {
	display: none;
}

.tlui-menu__group {
	border-bottom: 1px solid var(--tl-color-divider);
}
.tlui-menu__group:nth-last-of-type(1) {
	border-bottom: none;
}

/* Submenu triggers */

.tlui-menu__submenu__trigger[data-state='open']::after {
	opacity: 1;
	background: linear-gradient(90deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
}

.tlui-menu__submenu__trigger[data-direction='left'][data-state='open']::after {
	opacity: 1;
	background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
}

@media (hover: hover) {
	.tlui-menu__submenu__trigger[data-state='open']:not(:hover)::after {
		opacity: 1;
		background: linear-gradient(90deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
	}

	.tlui-menu__submenu__trigger[data-direction='left'][data-state='open']:not(:hover)::after {
		opacity: 1;
		background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
	}
}

/* Menu Sizes */

.tlui-menu[data-size='large'] > .tlui-menu__group {
	min-width: initial;
}

.tlui-menu[data-size='medium'] > .tlui-menu__group {
	min-width: 144px;
}

.tlui-menu[data-size='small'] > .tlui-menu__group {
	min-width: 96px;
}

.tlui-menu[data-size='tiny'] > .tlui-menu__group {
	min-width: 0px;
}

.tlui-menu-click-capture {
	position: fixed;
	inset: 0;
	z-index: var(--tl-layer-menu-click-capture);
}

/* --------------------- Popover -------------------- */

.tlui-popover {
	position: relative;
	display: flex;
	align-content: stretch;
}

.tlui-popover__content {
	position: relative;
	max-height: calc(var(--radix-popover-content-available-height) - 8px);
	margin: 0px;
	border: none;
	border-radius: var(--tl-radius-3);
	background-color: var(--tl-color-panel);
	box-shadow: var(--tl-shadow-3);
	z-index: var(--tl-layer-menus);
	overflow: hidden;
	overflow-y: auto;
	touch-action: auto;
	overscroll-behavior: none;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

/* -------------------- Menu Zone ------------------- */

.tlui-menu-zone {
	position: relative;
	z-index: var(--tl-layer-panels);
	width: fit-content;
	border-right: 2px solid var(--tl-color-background);
	border-bottom: 2px solid var(--tl-color-background);
	border-bottom-right-radius: var(--tl-radius-4);
	background-color: var(--tl-color-low);
}

.tlui-menu-zone *[data-state='open']::after {
	background: linear-gradient(180deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
	opacity: 1;
}

@media (hover: hover) {
	.tlui-menu-zone *[data-state='open']:not(:hover)::after {
		background: linear-gradient(180deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
		opacity: 1;
	}
}

/* ------------------- Page Select ------------------ */

.tlui-page-menu__wrapper {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 260px;
	height: fit-content;
	max-height: 50vh;
}

.tlui-page-menu__trigger {
	width: auto;
}

.tlui-page-menu__header {
	display: flex;
	flex-direction: row;
	align-items: center;
	width: 100%;
	height: 40px;
	padding-left: var(--tl-space-4);
	border-bottom: 1px solid var(--tl-color-divider);
}

.tlui-page-menu__header > .tlui-button:nth-of-type(1) {
	margin-right: -4px;
}

.tlui-page-menu__header__title {
	color: var(--tl-color-text);
	font-size: 12px;
	flex-grow: 2;
}

.tlui-page-menu__name {
	flex-grow: 2;
	text-align: left;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.tlui-page-menu__list {
	position: relative;
	touch-action: auto;
	flex-direction: column;
	max-height: 100%;
	overflow-x: hidden;
	overflow-y: auto;
	touch-action: auto;
}

.tlui-page-menu__item {
	position: relative;
}

.tlui-page_menu__item__submenu[data-isediting='true'] > .tlui-button[data-state='open'] {
	opacity: 1;
}

@media (hover: hover) {
	.tlui-page-menu__item:hover > .tlui-page_menu__item__submenu > .tlui-button {
		opacity: 1;
	}
}

.tlui-page-menu__item:nth-of-type(n + 2) {
	margin-top: -4px;
}

.tlui-page-menu__item__button {
	width: 100%;
}

.tlui-page-menu__item__button:not(:only-child) {
	flex-grow: 2;
	margin-right: -2px;
}

.tlui-page-menu__item__button > span {
	display: block;
	flex-grow: 2;
	text-align: left;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.tlui-page-menu__item__button > span {
	padding-right: calc(40px - 12px);
}

@media (hover: hover) {
	.tlui-page-menu__item__button > span {
		padding-right: 0px;
	}

	.tlui-page-menu__item:hover > .tlui-page-menu__item__button > span {
		padding-right: calc(40px - 12px);
	}
}

.tlui-page-menu__item__button__checkbox {
	padding-left: 35px;
}

.tlui-page-menu__item__button__check {
	position: absolute;
	left: 0px;
	width: 24px;
	padding-left: 10px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--tl-color-text);
}

.tlui-page_menu__item__sortable {
	position: absolute;
	top: 0px;
	left: 0px;
	width: 100%;
	height: fit-content;
	display: flex;
	flex-direction: row;
	align-items: center;
	overflow: hidden;
	z-index: var(--tl-layer-above);
}

.tlui-page_menu__item__sortable__title {
	flex: 1;
}

.tlui-page_menu__item__sortable__title > .tlui-input__wrapper {
	height: 100%;
}

.tlui-page_menu__item__sortable:focus-visible {
	z-index: var(--tl-layer-focused-input);
}

.tlui-page_menu__item__sortable__handle {
	touch-action: none;
	width: 32px;
	min-width: 0px;
	height: 40px;
	cursor: grab;
	color: var(--tl-color-text-3);
	flex-shrink: 0;
	margin-right: -9px;
}

.tlui-page_menu__item__sortable__handle:active {
	cursor: grabbing;
}

.tlui-page-menu__item__input {
	margin-left: 12px;
	height: 100%;
}

/* The more menu has complex CSS here: */
/* If the user can hover, then visible but opacity zero until hover */
/* If the user cannot hover, then not displayed unless editing, and then opacity 1 */

.tlui-page_menu__item__submenu {
	pointer-events: all;
	position: absolute;
	right: 0px;
	top: 0px;
	height: 100%;
	cursor: pointer;
	margin: 0px;
	margin-left: -2px;
	z-index: 10;
}

.tlui-page_menu__item__submenu > .tlui-button {
	opacity: 0;
}

.tlui-page_menu__item__sortable:focus-visible > .tlui-page_menu__item__submenu > .tlui-button,
.tlui-page_menu__item__submenu[data-isediting='true'],
.tlui-page_menu__item__submenu > .tlui-button[data-state='open'],
.tlui-page_menu__item__submenu > .tlui-button:focus-visible {
	opacity: 1;
}

.tlui-page_menu__item__submenu > .tlui-button[data-state='open']::after {
	background: linear-gradient(90deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
	opacity: 1;
}

@media (hover: hover) {
	.tlui-page_menu__item__submenu > .tlui-button[data-state='open']:not(:hover)::after {
		background: linear-gradient(90deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
		opacity: 1;
	}
}

@media (any-pointer: coarse) {
	.tlui-page_menu__item__submenu > .tlui-button {
		opacity: 1;
	}
}

.tlui-button__icon {
	padding: 0px;
}

.tlui-page-menu__item__button .tlui-button__icon {
	margin-right: 4px;
}

@media (hover: hover) {
	.tlui-page_menu__item__submenu[data-isediting='true'] > .tlui-button {
		opacity: 0;
	}

	.tlui-page_menu__item__submenu:hover > .tlui-button {
		opacity: 1;
	}
}

/* -------------- Skip to main content -------------- */

.tl-skip-to-main-content {
	position: fixed;
	top: 48px;
	left: -9999px;
	padding: 8px 16px;
	z-index: var(--tl-layer-toasts);
}

.tl-skip-to-main-content:focus {
	left: 8px;
}

/* ---------------- Offline indicator --------------- */

.tlui-offline-indicator {
	display: flex;
	flex-direction: row;
	gap: var(--tl-space-3);
	color: var(--tl-color-text);
	background-color: var(--tl-color-low);
	border: 3px solid var(--tl-color-background);
	padding: 0px var(--tl-space-5);
	height: 42px;
	align-items: center;
	justify-content: center;
	border-radius: 99px;
	opacity: 0;
	animation: tl-fade-in;
	animation-duration: 0.12s;
	animation-delay: 2s;
	animation-fill-mode: forwards;
}

/* ------------------- Style panel ------------------ */

.tlui-style-panel__wrapper {
	box-shadow: var(--tl-shadow-2);
	border-radius: var(--tl-radius-3);
	pointer-events: all;
	background-color: var(--tl-color-panel);
	height: fit-content;
	max-height: 100%;
	margin: 8px;
	margin-top: 4px;
	touch-action: auto;
	overscroll-behavior: none;
	overflow-y: auto;
	overflow-x: hidden;
	color: var(--tl-color-text);
}
/* if the style panel is the only child (ie no share menu), increase the margin */
.tlui-style-panel__wrapper:only-child {
	margin-top: 8px;
}

.tlui-style-panel {
	position: relative;
	z-index: var(--tl-layer-panels);
	pointer-events: all;
	width: 148px;
	max-width: 148px;
}

.tlui-style-panel[data-enhanced-a11y-mode='true'] .tlui-button[data-isactive='true'] {
	border-radius: 10px;
	outline: 2px solid var(--tl-color-text);
	outline-offset: -5px;
}

.tlui-style-panel::-webkit-scrollbar {
	display: none;
}

.tlui-style-panel .tlui-button.select {
	width: 100%;
}

.tlui-style-panel__section {
	display: flex;
	position: relative;
	flex-direction: column;
}

/*
add a border to the bottom of all but the last section. we have to handle empty sections too, which
are hidden and shouldn't be counted
*/
.tlui-style-panel__section:not(:nth-last-child(-n + 1 of .tlui-style-panel__section:not(:empty))) {
	border-bottom: 1px solid var(--tl-color-divider);
}
/*
if a section ends with a slider and we're adding a border, we need some extra space for visual
balance. we need to handle empty sections as above. is this the most complex css selector in all of
tldraw? probably.
*/
.tlui-style-panel__section:has(.tlui-slider__container:last-child):not(
		:nth-last-child(-n + 1 of .tlui-style-panel__section:not(:empty))
	) {
	margin-bottom: 7px;
}

.tlui-style-panel__section:empty {
	display: none;
}

/*
 * This is used in a couple places, like Align and Vertical Align.
 * It's because we have a toolbar with a Toggle Group but then an adjacent button
 * next to it that opens a popup.
 */
.tlui-style-panel__section .tlui-toolbar:has(.tlui-toolbar) {
	flex-wrap: wrap;
}

.tlui-style-panel__section .tlui-toolbar:has(.tlui-toolbar) .tlui-style-panel__subheading {
	margin-left: -2px;
}

.tlui-style-panel__section__common:not(:only-child) {
	margin-bottom: 7px;
	border-bottom: 1px solid var(--tl-color-divider);
}

.tlui-style-panel__dropdown-picker:only-child {
	flex: 1;
}

.tlui-style-panel__double-select-picker {
	display: flex;
	grid-template-columns: 1fr auto;
	align-items: center;
	padding-left: var(--tl-space-4);
	color: var(--tl-color-text-1);
	font-size: 12px;
}

.tlui-style-panel__double-select-picker-label {
	text-overflow: ellipsis;
	overflow: hidden;
	white-space: nowrap;
	flex-grow: 2;
	max-width: 100%;
}

.tlui-style-panel .tlui-button[data-state='open']::after {
	opacity: 1;
	background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
}

@media (hover: hover) {
	.tlui-style-panel .tlui-button[aria-expanded='true'] {
		background: none;
	}
	.tlui-style-panel .tlui-button[data-state='open']:not(:hover)::after {
		opacity: 1;
		background: linear-gradient(270deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
	}
}

/* Accessibility subheadings */

.tlui-style-panel__section .tlui-style-panel__subheading,
.tlui-style-panel__section__common .tlui-style-panel__subheading,
.tlui-style-panel__subheading + .tlui-slider__container {
	margin: 0;
	padding: var(--tl-space-2) var(--tl-space-3) 0px var(--tl-space-4);
	font-size: 12px;
	font-weight: inherit;
	line-height: inherit;
}

.tlui-style-panel .tlui-style-panel__subheading:nth-of-type(1) {
	padding-top: var(--tl-space-3);
}

.tlui-style-panel__subheading + .tlui-slider__container {
	padding-top: 0px;
}

/* --------------------- Bottom --------------------- */

.tlui-layout__bottom {
	grid-row: 2;
	width: 100%;
}

.tlui-layout__bottom__main {
	width: 100%;
	display: flex;
	align-items: flex-end;
	justify-content: center;
}

/* ------------------- Navigation ------------------- */

.tlui-navigation-panel {
	display: flex;
	width: min-content;
	flex-direction: column;
	z-index: var(--tl-layer-panels);
	pointer-events: all;
	position: absolute;
	left: 0px;
}

.tlui-navigation-panel::before {
	content: '';
	display: block;
	position: absolute;
	z-index: -1;
	inset: -2px -2px 0px 0px;
	border-radius: 0;
	border-top: 2px solid var(--tl-color-background);
	border-right: 2px solid var(--tl-color-background);
	border-top-right-radius: var(--tl-radius-4);
	background-color: var(--tl-color-low);
}

.tlui-navigation-panel[data-a11y='true']::before {
	display: none;
}

/* Minimap */

.tlui-minimap {
	width: 100%;
	height: 96px;
	min-height: 96px;
	overflow: hidden;
	padding: var(--tl-space-3);
	padding-top: 0px;
}

.tlui-minimap__canvas {
	position: relative;
	width: 100%;
	height: 100%;
}

/* --------------------- Toolbar -------------------- */

/* Wide container */
.tlui-main-toolbar {
	grid-column: 1 / span 3;
	grid-row: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-grow: 2;
}

.tlui-main-toolbar--horizontal {
	padding-bottom: calc(var(--tl-space-3) + var(--tl-sab));
	max-width: 100%;
}

.tlui-main-toolbar--vertical {
	position: absolute;
	left: 0;
	top: 90px; /* height of page menu + 'back to content' button */
	bottom: 140px; /* height of expanded mini-map */
	padding-left: calc(var(--tl-space-3) + var(--tl-sab));
}

[data-breakpoints-below*='6'] .tlui-main-toolbar--vertical {
	bottom: 90px; /* collapsed mini-map, but same as top to keep things looking even */
}

/* Centered Content */
.tlui-main-toolbar__inner {
	position: relative;
	width: fit-content;
	display: flex;
	gap: var(--tl-space-3);
	align-items: flex-start;
}

.tlui-main-toolbar--vertical .tlui-main-toolbar__inner {
	flex-direction: column;
}

.tlui-main-toolbar--horizontal .tlui-main-toolbar__left {
	width: fit-content;
}
.tlui-main-toolbar--vertical .tlui-main-toolbar__left {
	display: flex;
	height: fit-content;
}

/* Row of controls + lock button */
.tlui-main-toolbar__extras {
	position: relative;
	z-index: var(--tl-layer-above);
	pointer-events: none;
	align-self: stretch;
}

.tlui-main-toolbar__extras:empty {
	display: none;
}

.tlui-main-toolbar--horizontal .tlui-main-toolbar__extras {
	height: 48px;
	top: 6px;
}

.tlui-main-toolbar--vertical .tlui-main-toolbar__extras {
	width: 48px;
	order: 1;
}

.tlui-main-toolbar__extras__controls {
	position: relative;
	z-index: var(--tl-layer-above);
	background-color: var(--tl-color-low);
	border: 2px solid var(--tl-color-background);
	pointer-events: all;
}

.tlui-main-toolbar--horizontal .tlui-main-toolbar__extras__controls {
	border-top-left-radius: var(--tl-radius-4);
	border-top-right-radius: var(--tl-radius-4);
	margin-left: 8px;
	margin-right: 0px;
	width: fit-content;
}

.tlui-main-toolbar--vertical .tlui-main-toolbar__extras__controls {
	border-top-right-radius: var(--tl-radius-4);
	border-bottom-right-radius: var(--tl-radius-4);
	margin-top: 8px;
	margin-left: -2px;
	margin-bottom: 0px;
	width: fit-content;
}

.tlui-main-toolbar__tools {
	border-radius: var(--tl-radius-4);
	z-index: var(--tl-layer-panels);
	pointer-events: all;
	position: relative;
	background: var(--tl-color-panel);
	box-shadow: var(--tl-shadow-2);
}

.tlui-main-toolbar--horizontal .tlui-main-toolbar__mobile-style-panel {
	align-self: flex-end;
}
.tlui-main-toolbar--vertical .tlui-main-toolbar__mobile-style-panel {
	align-self: flex-start;
}

.tlui-main-toolbar--horizontal .tlui-main-toolbar__overflow {
	width: 40px;
	margin-left: 2px;
}
.tlui-main-toolbar--vertical .tlui-main-toolbar__overflow {
	height: 40px;
	margin-top: 2px;
}

.tlui-layout__mobile .tlui-main-toolbar--horizontal .tlui-main-toolbar__overflow {
	width: 32px;
	padding: 0px;
}

.tlui-main-toolbar--horizontal *[data-state='open']::after {
	background: linear-gradient(0deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
	opacity: 1;
}
.tlui-main-toolbar--vertical *[data-state='open']::after {
	background: linear-gradient(90deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
	opacity: 1;
}

.tlui-main-toolbar__overflow-content {
	touch-action: none;
}

.tlui-main-toolbar__tools [data-toolbar-visible='false'],
.tlui-main-toolbar__overflow-content [data-toolbar-visible='false'] {
	display: none;
}

.tlui-main-toolbar__group:empty {
	display: none;
}
.tlui-row.tlui-main-toolbar__group:not(:nth-last-child(-n + 1 of [data-toolbar-visible='true'])) {
	border-right: 1px solid var(--color-divider);
	margin-right: 2px;
}
.tlui-column.tlui-main-toolbar__group:not(
		:nth-last-child(-n + 1 of [data-toolbar-visible='true'])
	) {
	border-bottom: 1px solid var(--color-divider);
	margin-bottom: 2px;
}
.tlui-grid.tlui-main-toolbar__group {
	grid-column: 1 / span 4;
}
.tlui-grid.tlui-main-toolbar__group:not(:nth-last-child(-n + 1 of [data-toolbar-visible='true'])) {
	border-bottom: 1px solid var(--color-divider);
	margin-bottom: 2px;
}

@media (hover: hover) {
	.tlui-main-toolbar--horizontal *[data-state='open']:not(:hover)::after {
		background: linear-gradient(0deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
		opacity: 1;
	}
	.tlui-main-toolbar--vertical *[data-state='open']:not(:hover)::after {
		background: linear-gradient(90deg, rgba(144, 144, 144, 0) 0%, var(--tl-color-muted-2) 100%);
		opacity: 1;
	}
}

/* ------------------- Tooltip -------------------- */

.tlui-tooltip {
	font-size: 12px;
	padding: 2px 8px;
	border-radius: 4px;
	background-color: var(--tl-color-tooltip);
	box-shadow: none;
	color: var(--tl-color-text-shadow);
	max-width: 400px;
	width: fit-content;
	text-align: center;
	will-change: transform, opacity;
	z-index: 2;
}

.tlui-tooltip__arrow {
	fill: var(--tl-color-tooltip);
	will-change: opacity;
}

[data-radix-popper-content-wrapper]:has(.tlui-tooltip) {
	z-index: var(--tl-layer-toasts) !important;
	pointer-events: none;
}

/* ------------------- Debug panel ------------------ */

.tlui-debug-panel {
	background-color: var(--tl-color-low);
	width: 100%;
	display: grid;
	align-items: center;
	grid-template-columns: 1fr auto auto auto;
	justify-content: space-between;
	padding-left: var(--tl-space-4);
	border-top: 1px solid var(--tl-color-background);
	font-size: 12px;
	color: var(--tl-color-text-1);
	z-index: var(--tl-layer-panels);
	pointer-events: all;
}

.tlui-debug-panel__current-state {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.tlui-debug-panel__fps {
	margin-right: 8px;
}

.tlui-debug-panel__fps__slow {
	font-weight: bold;
	color: var(--tl-color-danger);
}

.tlui-a11y-audit {
	border-collapse: collapse;
}

.tlui-a11y-audit th,
.tlui-a11y-audit td {
	padding: 8px;
	border: 1px solid var(--tl-color-low-border);
}

/* --------------------- Toasts --------------------- */

.tlui-toast__viewport {
	position: absolute;
	inset: 0px;
	margin: 0px;
	display: flex;
	align-items: flex-end;
	justify-content: flex-end;
	flex-direction: column;
	gap: var(--tl-space-3);
	pointer-events: none;
	padding: 0px var(--tl-space-3) 64px 0px;
	z-index: var(--tl-layer-toasts);
}

.tlui-toast__viewport > * {
	pointer-events: all;
}

.tlui-toast__icon {
	padding-top: 11px;
	padding-left: var(--tl-space-4);
	color: var(--tl-color-text-1);
}

.tlui-toast__container {
	min-width: 200px;
	display: flex;
	flex-direction: row;
	background-color: var(--tl-color-panel);
	box-shadow: var(--tl-shadow-2);
	border-radius: var(--tl-radius-3);
	font-size: 12px;
}

.tlui-toast__container[data-severity='success'] .tlui-icon {
	color: var(--tl-color-success);
}

.tlui-toast__container[data-severity='info'] .tlui-icon {
	color: var(--tl-color-info);
}

.tlui-toast__container[data-severity='warning'] .tlui-icon {
	color: var(--tl-color-warning);
}

.tlui-toast__container[data-severity='error'] .tlui-icon {
	color: var(--tl-color-danger);
}

.tlui-toast__main {
	flex-grow: 2;
	max-width: 280px;
}

.tlui-toast__content {
	padding: var(--tl-space-4);
	display: flex;
	line-height: 1.4;
	flex-direction: column;
	gap: var(--tl-space-3);
}

.tlui-toast__main[data-actions='true'] .tlui-toast__content {
	padding-bottom: var(--tl-space-2);
}

.tlui-toast__title {
	font-weight: bold;
	color: var(--tl-color-text-1);
	/* this makes the default toast look better */
	line-height: 16px;
}

.tlui-toast__description {
	color: var(--tl-color-text-1);
	padding: var(--tl-space-3);
	margin: 0px;
	padding: 0px;
}

.tlui-toast__icon + .tlui-toast__main > .tlui-toast__actions {
	padding-left: 0px;
}

.tlui-toast__actions {
	display: flex;
	flex-direction: row;
	justify-content: flex-start;
	margin-left: 0;
}

.tlui-toast__close {
	align-self: flex-end;
	flex-shrink: 0;
}

@media (prefers-reduced-motion: no-preference) {
	.tlui-toast__container[data-state='open'] {
		animation: tlui-slide-in 200ms cubic-bezier(0.785, 0.135, 0.15, 0.86);
	}

	.tlui-toast__container[data-state='closed'] {
		animation: tlui-fade-out 100ms ease-in;
	}

	.tlui-toast__container[data-swipe='move'] {
		transform: translateX(var(--radix-toast-swipe-move-x));
	}

	.tlui-toast__container[data-swipe='cancel'] {
		transform: translateX(0);
		transition: transform 200ms ease-out;
	}

	.tlui-toast__container[data-swipe='end'] {
		animation: tlui-slide-out 100ms ease-out;
	}
}

/* ---------------- Dialog ---------------- */

.tlui-dialog__overlay {
	position: absolute;
	top: 0px;
	left: 0px;
	width: 100%;
	height: 100%;
	z-index: var(--tl-layer-canvas-overlays);
	background-color: var(--tl-color-overlay);
	pointer-events: all;
	animation: tl-fade-in 0.12s ease-out;
	display: grid;
	place-items: center;
	overflow-y: auto;
	padding: 0px var(--tl-space-3);
}

.tlui-dialog__content {
	display: flex;
	flex-direction: column;
	position: relative;
	cursor: default;
	background-color: var(--tl-color-panel);
	box-shadow: var(--tl-shadow-3);
	border-radius: var(--tl-radius-3);
	font-size: 12px;
	overflow: hidden;
	min-width: 300px;
	max-width: 100%;
	max-height: 80%;
}

.tlui-dialog__header {
	position: relative;
	display: flex;
	align-items: center;
	flex: 0;
	z-index: var(--tl-layer-header-footer);
	padding-left: var(--tl-space-4);
	color: var(--tl-color-text);
	height: 40px;
}

.tlui-dialog__header__title {
	flex: 1;
	font-weight: inherit;
	font-size: 12px;
	margin: 0px;
	color: var(--tl-color-text-1);
}

.tlui-dialog__header__close {
	justify-self: flex-end;
}

.tlui-dialog__body {
	padding: var(--tl-space-4) var(--tl-space-4);
	flex: 0 1;
	overflow-y: auto;
	overflow-x: hidden;
	color: var(--tl-color-text-1);
	user-select: all;
	-webkit-user-select: text;
}
.tlui-dialog__body a {
	color: var(--tl-color-selected);
}

.tlui-dialog__body ul,
.tlui-dialog__body ol {
	padding-left: 16px;
	display: flex;
	flex-direction: column;
	gap: var(--tl-space-2);
}

.tlui-dialog__footer {
	position: relative;
	min-height: 12px;
	z-index: var(--tl-layer-header-footer);
}

.tlui-dialog__footer__actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
}

.tlui-dialog__footer__actions > .tlui-button:nth-last-child(n + 2) {
	margin-right: -4px;
}

/* --------------------- Dialogs -------------------- */

/* Edit Link Dialog */

.tlui-edit-link-dialog {
	display: flex;
	flex-direction: column;
	gap: var(--tl-space-4);
	color: var(--tl-color-text);
}

.tlui-edit-link-dialog__input {
	background-color: var(--tl-color-muted-2);
	flex-grow: 2;
	border-radius: var(--tl-radius-2);
	padding: 0px var(--tl-space-4);
}

/* Embed Dialog */

.tlui-embed__spacer {
	flex-grow: 2;
	min-height: 0px;
	margin-left: calc(-1 * var(--tl-space-4));
	margin-top: calc(-1 * var(--tl-space-4));
	pointer-events: none;
}

.tlui-embed-dialog__list {
	display: flex;
	flex-direction: column;
	padding: 0px var(--tl-space-3) var(--tl-space-4) var(--tl-space-3);
}

.tlui-embed-dialog__item__image {
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center center;
	background-color: var(--tl-color-selected-contrast);
	border-radius: var(--tl-radius-1);
}

.tlui-embed-dialog__enter {
	display: flex;
	flex-direction: column;
	gap: var(--tl-space-4);
	color: var(--tl-color-text-1);
}

.tlui-embed-dialog__input {
	background-color: var(--tl-color-muted-2);
	flex-grow: 2;
	border-radius: var(--tl-radius-2);
	padding: 0px var(--tl-space-4);
}

.tlui-embed-dialog__warning {
	color: var(--tl-color-danger);
	text-shadow: none;
}

.tlui-embed-dialog__instruction__link {
	display: flex;
	gap: var(--tl-space-1);
	margin-top: var(--tl-space-4);
}

.tlui-embed-dialog__enter a {
	color: var(--tl-color-text-1);
}

/* --------------- Keyboard shortcuts --------------- */

.tlui-shortcuts-dialog__header {
	border-bottom: 1px solid var(--tl-color-divider);
}

.tlui-shortcuts-dialog__body {
	position: relative;
	columns: 3;
	column-gap: var(--tl-space-9);
	pointer-events: all;
	touch-action: auto;

	/* Terrible fix to allow firefox users to scroll the dialog */
	overflow-x: auto;
}

.tlui-shortcuts-dialog__body__tablet {
	columns: 2;
}

.tlui-shortcuts-dialog__body__mobile {
	columns: 1;
}

.tlui-shortcuts-dialog__group {
	break-inside: avoid-column;
	padding-bottom: var(--tl-space-6);
}

.tlui-shortcuts-dialog__group__title {
	font-size: inherit;
	font-weight: inherit;
	margin: 0px;
	color: var(--tl-color-text-3);
	height: 32px;
	display: flex;
	align-items: center;
}

.tlui-shortcuts-dialog__group__content {
	display: flex;
	flex-direction: column;
	color: var(--tl-color-text-1);
}

.tlui-shortcuts-dialog__key-pair {
	display: flex;
	gap: var(--tl-space-4);
	align-items: center;
	justify-content: space-between;
	height: 32px;
}

.tlui-shortcuts-dialog__key-pair__key {
	flex: 1;
	font-size: 12px;
}

/* ------------------ Language menu ----------------- */

.tlui-language-menu {
	max-height: 500px;
}

.tlui-language-menu::after {
	content: '';
	display: block;
	position: absolute;
	bottom: 0px;
	left: 0px;
	right: 0px;
	height: 24px;
	background: linear-gradient(
		to bottom,
		var(--tl-color-panel-transparent) 0%,
		var(--tl-color-panel) 90%,
		var(--tl-color-panel) 100%
	);
	border-bottom-left-radius: var(--tl-radius-3);
	border-bottom-right-radius: var(--tl-radius-3);
	pointer-events: none;
}

/* ------------------ Actions menu ------------------ */

.tlui-actions-menu {
	max-height: calc(100vh - 150px);
}

/* -------------------- Help menu ------------------- */

.tlui-help-menu {
	pointer-events: all;
	position: absolute;
	bottom: var(--tl-space-2);
	right: var(--tl-space-2);
	z-index: var(--tl-layer-panels);
	border: 2px solid var(--tl-color-background);
	border-radius: 100%;
}

/* ------------------- Da share zone ------------------ */

.tlui-share-zone {
	padding: 0px 0px 0px 0px;
	display: flex;
	flex-direction: row;
	justify-content: flex-end;
	z-index: var(--tl-layer-panels);
	align-items: center;
	padding-top: 2px;
	padding-right: 4px;
}

/* ------------------- People Menu ------------------- */

.tlui-people-menu__avatars-button {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	background: none;
	border: none;
	cursor: pointer;
	pointer-events: all;
	border-radius: var(--tl-radius-1);
	padding-right: 1px;
	height: 100%;
}

.tlui-people-menu__avatars {
	display: flex;
	flex-direction: row;
}

.tlui-people-menu__avatar {
	height: 24px;
	width: 24px;
	border: 2px solid var(--tl-color-background);
	background-color: var(--tl-color-low);
	border-radius: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	font-size: 10px;
	font-weight: bold;
	text-align: center;
	color: var(--tl-color-selected-contrast);
	z-index: 2;
}

.tlui-people-menu__avatar:nth-of-type(n + 2) {
	margin-left: -12px;
}

.tlui-people-menu__avatars-button[data-state='open'] {
	opacity: 1;
}

@media (hover: hover) {
	.tlui-people-menu__avatars-button:hover .tlui-people-menu__avatar {
		border-color: var(--tl-color-low);
	}
}

.tlui-people-menu__more {
	min-width: 0px;
	font-size: 11px;
	font-weight: 600;
	color: var(--tl-color-text-1);
	font-family: inherit;
	padding: 0px 4px;
}
.tlui-people-menu__more::after {
	border-radius: var(--tl-radius-2);
	inset: 0px;
}

.tlui-people-menu__wrapper {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 220px;
	height: fit-content;
	max-height: 50vh;
}

.tlui-people-menu__section {
	position: relative;
	touch-action: auto;
	flex-direction: column;
	max-height: 100%;
	overflow-x: hidden;
	overflow-y: auto;
	touch-action: auto;
}

.tlui-people-menu__section:first-child,
.tlui-people-menu__section:last-child {
	flex-shrink: 0;
}

.tlui-people-menu__section:not(:last-child) {
	border-bottom: 1px solid var(--tl-color-divider);
}

.tlui-people-menu__user {
	display: flex;
	justify-content: flex-start;
	align-items: center;
}

.tlui-people-menu__user__color {
	flex-shrink: 0;
}

.tlui-people-menu__user__name {
	text-align: left;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 12px;
	color: var(--tl-color-text-1);
	max-width: 100%;
	flex-grow: 1;
	flex-shrink: 100;
}

.tlui-people-menu__user__label {
	text-align: left;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 12px;
	color: var(--tl-color-text-3);
	flex-grow: 100;
	flex-shrink: 0;
	margin-left: 4px;
}

.tlui-people-menu__user__input {
	flex-grow: 2;
	height: 100%;
	padding: 0px;
	margin: 0px;
}

.tlui-people-menu__user > .tlui-input__wrapper {
	width: auto;
	display: flex;
	align-items: auto;
	flex-grow: 2;
	gap: 8px;
	height: 100%;
	padding: 0px;
}

.tlui-people-menu__item {
	position: relative;
}

.tlui-people-menu__item:last-of-type .tlui-button__menu {
	margin-bottom: 0;
}

.tlui-people-menu__item__button {
	padding: 0 11px;
	overflow: hidden;
}

.tlui-people-menu__item > .tlui-button__menu {
	width: auto;
	display: flex;
	align-items: auto;
	justify-content: flex-start;
	flex-grow: 2;
	gap: 11px;
}

.tlui-people-menu__name {
	text-align: left;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.tlui-people-menu__item__follow {
	position: absolute;
	top: 0px;
	right: 0px;
	max-width: 40px;
	flex-shrink: 0;
}

.tlui-people-menu__item[data-follow='true'],
.tlui-people-menu__item:has(.tlui-button:focus-visible) {
	padding-right: 36px;
}

.tlui-people-menu__item[data-follow='true'] .tlui-people-menu__item__follow,
.tlui-people-menu__item:has(.tlui-button:focus-visible) .tlui-people-menu__item__follow {
	opacity: 1;
}

@media (hover: hover) {
	.tlui-people-menu__item__follow {
		opacity: 0;
	}

	.tlui-people-menu__item:hover {
		padding-right: 36px;
	}
	.tlui-people-menu__item:hover .tlui-people-menu__item__follow {
		opacity: 1;
	}
}

/* --------------- Following indicator -------------- */

.tlui-following-indicator {
	display: block;
	position: absolute;
	inset: 0px;
	border-width: 2px;
	border-style: solid;
	z-index: var(--tl-layer-following-indicator);
	pointer-events: none;
}

/* --------------- Contextual toolbar --------------- */

.tlui-contextual-toolbar {
	position: absolute;
}

/**
 * N.B. We hide the toolbar while mousing down, so no need to turn these off.
 */
.tlui-contextual-toolbar,
.tlui-contextual-toolbar * {
	pointer-events: all;
}

.tlui-contextual-toolbar [data-isactive='true']::after {
	background-color: var(--tl-color-muted-2);
	opacity: 1;
}

.tlui-contextual-toolbar {
	opacity: 0;
	transition: opacity 0.08s ease-in-out;
}

.tlui-contextual-toolbar,
.tlui-contextual-toolbar * {
	pointer-events: none;
}

.tlui-contextual-toolbar[data-visible='true'] {
	opacity: 1;
	z-index: var(--tl-layer-menus);
}

.tlui-contextual-toolbar[data-interactive='true'],
.tlui-contextual-toolbar[data-interactive='true'] * {
	pointer-events: all;
}

.tlui-rich-text__toolbar-link-input {
	margin-left: 12px;
	/*
	 * Nice touch tweak: keep the link editor toolbar the same as the default toolbar.
	 * This is so the toolbar size stays stable going in and out of the link editor.
	 */
	width: 148px;
}

.tlui-media__toolbar-alt-text-input {
	margin-left: 12px;
	/*
	 * Nice touch tweak: keep the link editor toolbar the same as the default toolbar.
	 * This is so the toolbar size stays stable going in and out of the alt text editor.
	 */
	min-width: 200px;
}

.tlui-contextual-toolbar .tlui-input__wrapper {
	height: 40px;
}

.tlui-image__toolbar .tlui-slider__container {
	width: 125px;
}

.tlui-image__toolbar .tlui-slider {
	height: 100%;
}

.tlui-image__toolbar .tlui-slider__track {
	height: 32px;
}

.tlui-image__toolbar .tlui-slider__thumb {
	width: 14px;
	height: 14px;
}

/* ------------------- Animations ------------------- */
@keyframes tlui-fade-out {
	0% {
		opacity: 1;
	}
	100% {
		opacity: 0;
	}
}

@keyframes tlui-slide-in {
	from {
		transform: translateX(calc(100% + var(--tl-space-3)));
	}
	to {
		transform: translateX(0px);
	}
}

@keyframes tlui-slide-out {
	from {
		transform: translateX(var(--radix-toast-swipe-end-x));
	}
	to {
		transform: translateX(calc(100% + var(--tl-space-3)));
	}
}

/**
 * Canvas Global Overrides
 * 覆盖 tldraw 默认样式，确保与 Figma 设计一致
 */

/* 画布容器背景 - 浅灰白色 */
.tldraw__editor {
	background-color: #fafafa !important;
}

/* 确保画布本身也是浅色背景 */
.tl-background {
	fill: #fafafa !important;
}

/* 网格颜色调整为浅色 */
.tl-grid-dot {
	fill: rgba(0, 0, 0, 0.08) !important;
}

/* Frame 边框颜色 - 按 Figma 设计 #EEEEEE */
/* 注意：.tl-frame__body 是 tldraw 实际的 frame 边框元素 */
.tl-frame__body {
	stroke: #EEEEEE !important;
}

/* 选择框颜色调整 */
.tl-selection__bg {
	fill: rgba(77, 143, 157, 0.08) !important;
}

.tl-selection__fg {
	stroke: #4d8f9d !important;
}

/* 确保页面背景是浅色 */
.tldraw__editor .tl-canvas {
	background-color: #fafafa !important;
}

/* 工具栏按钮在浅色背景下的样式 */
.tldraw__editor .tlui-toolbar {
	background-color: transparent !important;
}

/* 隐藏默认的暗黑模式样式 */
.tldraw__editor[data-color-scheme='light'] {
	--color-background: #fafafa;
	--color-low: #f5f5f5;
	--color-low-border: rgba(0, 0, 0, 0.08);
}

/* 隐藏 tldraw 默认的左上角菜单按钮 */
.tlui-menu-zone {
	display: none !important;
}

/* 隐藏主菜单按钮 */
.tlui-main-menu,
.tlui-main-menu__button {
	display: none !important;
}

/* 隐藏页面菜单（如果有） */
.tlui-page-menu {
	display: none !important;
}

/* 隐藏导航面板 */
.tlui-navigation-panel {
	display: none !important;
}

/* 隐藏 tldraw 默认工具栏，使用自定义工具栏 */
.tlui-toolbar {
	display: none !important;
}

/* 隐藏垂直主工具栏 */
.tlui-main-toolbar,
.tlui-main-toolbar--vertical {
	display: none !important;
}

/* 隐藏工具栏容器 */
.tlui-toolbar__tools,
.tlui-toolbar__extras {
	display: none !important;
}

/* 隐藏左下角的缩放控件，使用自定义的 */
.tlui-zoom-menu {
	display: none !important;
}

/* 隐藏样式面板和其他 UI 元素 */
.tlui-style-panel,
.tlui-style-panel__wrapper {
	display: none !important;
}

/* 隐藏 tldraw 默认的 Frame 标签，使用自定义的 FrameLabels 组件 */
.tl-frame__name,
.tl-frame-label,
.tl-frame-heading {
	display: none !important;
}

/* 确保自定义标签可见 */
.frame-labels-overlay {
	pointer-events: none;
	z-index: 100;
}

/* 覆盖 tldraw 默认字体，使用系统默认字体 */
/* 确保英文字体与中文字体保持一致的外观风格 */
.tldraw__editor {
	--tl-font-draw: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
	--tl-font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
	--tl-font-serif: Georgia, 'Noto Serif SC', 'Source Han Serif SC', 'Source Han Serif', serif !important;
	--tl-font-mono: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace !important;
}

/* 确保文本形状使用系统字体 */
.tl-text-shape__wrapper,
.tl-text {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
}

/* 确保笔迹文字风格 */
[data-font="draw"] {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
}

[data-font="sans"] {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
}

[data-font="serif"] {
	font-family: Georgia, 'Noto Serif SC', 'Source Han Serif SC', 'Source Han Serif', serif !important;
}

[data-font="mono"] {
	font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace !important;
}
/* 知识图谱 Side Panel 样式 */
.kg-panel {
	width: 240px;
	height: 100%;
	background: var(--tl-color-panel);
	border-left: 1px solid var(--tl-color-panel-contrast);
	display: flex;
	flex-direction: column;
	font-family: var(--tl-font-sans);
	overflow: hidden;
	box-shadow: -4px 0 12px rgba(0, 0, 0, 0.1);
	animation: slideInFromRight 0.3s ease-out;
	flex-shrink: 0;
	color: var(--tl-color-text);
}

@keyframes slideInFromRight {
	from {
		transform: translateX(100%);
		opacity: 0;
	}
	to {
		transform: translateX(0);
		opacity: 1;
	}
}

/* 标题栏 */
.kg-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 12px 8px;
	border-bottom: 1px solid var(--tl-color-panel-contrast);
}

.kg-title {
	margin: 0;
	font-size: 13px;
	font-weight: 600;
	color: var(--tl-color-text);
}

.kg-close-button {
	background: none;
	border: none;
	padding: 4px;
	cursor: pointer;
	color: var(--tl-color-text-3);
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
	transition: all 0.15s;
}

.kg-close-button:hover {
	background: var(--tl-color-muted-1);
	color: var(--tl-color-text);
}

/* 顶部分类标签（带左右滚动按钮）*/
.kg-tabs {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 8px 8px;
	border-bottom: 1px solid var(--tl-color-panel-contrast);
	background: var(--tl-color-panel);
	flex-shrink: 0;
}

.kg-scroll-btn {
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	padding: 0;
	background: transparent;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	color: var(--tl-color-text-3);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.15s;
}

.kg-scroll-btn:hover {
	background: var(--tl-color-muted-1);
	color: var(--tl-color-text);
}

.kg-tabs-scroll {
	flex: 1;
	display: flex;
	gap: 4px;
	overflow-x: auto;
	scrollbar-width: none;
}

.kg-tabs-scroll::-webkit-scrollbar {
	display: none;
}

.kg-tab {
	flex-shrink: 0;
	padding: 4px 10px;
	font-size: 11px;
	font-weight: 400;
	color: var(--tl-color-text-3);
	background: transparent;
	border: none;
	border-radius: 12px;
	cursor: pointer;
	transition: all 0.15s;
	white-space: nowrap;
}

.kg-tab:hover {
	background: var(--tl-color-muted-1);
	color: var(--tl-color-text);
}

.kg-tab.active {
	background: var(--tl-color-selected);
	color: var(--tl-color-selected-contrast);
	font-weight: 500;
}

/* 内容区域 */
.kg-content {
	flex: 1;
	overflow-y: auto;
	padding: 12px 12px;
}

/* 子分类区块 */
.kg-section {
	margin-bottom: 16px;
}

.kg-section:last-child {
	margin-bottom: 0;
}

/* 子分类标题 */
.kg-section-title {
	font-size: 11px;
	font-weight: 500;
	color: var(--tl-color-text-1);
	margin-bottom: 8px;
	padding-left: 2px;
}

/* 子分类标签 */
.kg-subtabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 20px;
	padding-bottom: 4px;
}

.kg-subtab {
	padding: 6px 16px;
	font-size: 14px;
	font-weight: 400;
	color: #999;
	background: transparent;
	border: 1px solid #444;
	border-radius: 16px;
	cursor: pointer;
	transition: all 0.2s;
}

.kg-subtab:hover {
	background: #2a2a2a;
	border-color: #555;
	color: #ffffff;
}

.kg-subtab.active {
	background: transparent;
	border-color: #666;
	color: #ffffff;
}

/* 关键词列表 */
.kg-keywords {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.kg-keyword {
	padding: 5px 10px;
	font-size: 11px;
	color: var(--tl-color-text);
	background: transparent;
	border: 1px solid var(--tl-color-panel-contrast);
	border-radius: 12px;
	cursor: pointer;
	transition: all 0.15s;
	display: inline-flex;
	align-items: center;
	gap: 2px;
	font-weight: 400;
	line-height: 1.2;
}

.kg-keyword:hover {
	background: var(--tl-color-muted-1);
	border-color: var(--tl-color-text-3);
}

.kg-keyword.selected {
	background: #426786 !important;
	border-color: #426786 !important;
	color: white !important;
	font-weight: 500;
}

.kg-keyword.selected:hover {
	background: #375a6d !important;
	border-color: #375a6d !important;
	color: white !important;
	opacity: 1;
}

/* 滚动条样式 */
.kg-content::-webkit-scrollbar {
	width: 4px;
}

.kg-content::-webkit-scrollbar-track {
	background: transparent;
}

.kg-content::-webkit-scrollbar-thumb {
	background: var(--tl-color-panel-contrast);
	border-radius: 2px;
}

.kg-content::-webkit-scrollbar-thumb:hover {
	background: var(--tl-color-text-3);
}

/* 🎯 暗黑模式样式增强 */
.kg-panel-dark {
	background: #1e1e1e;
	border-left-color: #333;
	box-shadow: -4px 0 12px rgba(0, 0, 0, 0.3);
}

.kg-panel-dark .kg-header {
	border-bottom-color: #333;
}

.kg-panel-dark .kg-title {
	color: #e0e0e0;
}

.kg-panel-dark .kg-close-button {
	color: #888;
}

.kg-panel-dark .kg-close-button:hover {
	background: #333;
	color: #fff;
}

.kg-panel-dark .kg-tabs {
	border-bottom-color: #333;
	background: #1e1e1e;
}

.kg-panel-dark .kg-scroll-btn {
	color: #666;
}

.kg-panel-dark .kg-scroll-btn:hover {
	background: #333;
	color: #fff;
}

.kg-panel-dark .kg-tab {
	color: #888;
}

.kg-panel-dark .kg-tab:hover {
	background: #333;
	color: #e0e0e0;
}

.kg-panel-dark .kg-tab.active {
	background: #426786;
	color: #fff;
}

.kg-panel-dark .kg-section-title {
	color: #999;
}

.kg-panel-dark .kg-keyword {
	color: #ccc;
	background: transparent;
	border-color: #444;
}

.kg-panel-dark .kg-keyword:hover {
	background: #333;
	border-color: #666;
}

.kg-panel-dark .kg-content::-webkit-scrollbar-thumb {
	background: #444;
}

.kg-panel-dark .kg-content::-webkit-scrollbar-thumb:hover {
	background: #555;
}


/* ========================================
   垂直工具栏布局 - 左侧垂直排列
   ======================================== */

/* 不要覆盖 .tlui-layout__bottom，让它保持默认布局 */
/* 垂直工具栏的定位由 tldraw 原生 CSS 处理 */

.tlui-layout__bottom__main {
	justify-content: flex-start;
	pointer-events: auto;
}

/* 主工具栏样式 */
.tlui-main-toolbar {
	pointer-events: auto;
}

/* 垂直模式工具栏 - 垂直居中对齐 */
.tlui-main-toolbar--vertical {
	/* 工具栏整体宽度48px，减少padding让按钮更大 */
	width: 48px !important;
	min-width: 48px !important;
	
	/* 垂直居中定位 */
	top: 50% !important;
	transform: translateY(-50%) !important;
	bottom: auto !important;
	height: fit-content !important;
	
	/* 配色与首页和画布页面风格一致 */
	background: rgba(55, 65, 75, 0.95) !important;
	backdrop-filter: blur(12px) !important;
	border: 1px solid rgba(255, 255, 255, 0.08) !important;
	border-radius: 12px !important;
	padding: 2px !important;  /* 减少padding让按钮更大 */
	pointer-events: auto !important;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2) !important;
}

.tlui-main-toolbar--vertical .tlui-main-toolbar__inner {
	flex-direction: column !important;
	gap: 2px !important;  /* 减少间距 */
}

.tlui-main-toolbar--vertical .tlui-main-toolbar__left {
	flex-direction: column !important;
	gap: 2px !important;  /* 减少间距 */
}

/* 工具栏工具样式 - 移除额外背景 */
.tlui-main-toolbar__tools {
	border-radius: 8px;
	padding: 0 !important;  /* 移除内部padding */
	pointer-events: auto;
	background: transparent !important;
	box-shadow: none !important;
}

.tlui-main-toolbar--vertical .tlui-main-toolbar__tools {
	background: transparent !important;
	box-shadow: none !important;
	padding: 0 !important;
}

/* 工具按钮样式 - 在48px宽度内最大化 */
.tlui-main-toolbar .tlui-button__tool {
	width: 44px !important;   /* 增大按钮尺寸 */
	height: 44px !important;
	min-width: 44px !important;
	min-height: 44px !important;
	pointer-events: auto;
}

/* 按钮内部焦点区域调整 */
.tlui-main-toolbar .tlui-button__tool::after {
	inset: 2px !important;  /* 减少内边距 */
	border-radius: 10px !important;
}

/* 隐藏额外控件（展开更多按钮等） */
.tlui-main-toolbar__extras {
	display: none !important;
}

/* 隐藏工具栏溢出按钮 */
.tlui-main-toolbar__overflow {
	display: none !important;
}

/* 隐藏工具栏展开按钮（>箭头） */
.tlui-popover-trigger[data-testid="main.overflow"] {
	display: none !important;
}

/* ========================================
   原有样式
   ======================================== */

/* 顶部 Logo 样式 - 在整个画布中居中 */
.custom-top-logo {
	position: fixed;
	top: 12px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 500;
	pointer-events: none;
}

.custom-top-logo img {
	pointer-events: all;
	filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.15));
}

/* AI 输入面板样式 - 底部居中 */
.ai-input-panel {
	position: fixed;
	bottom: 24px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 999;
	pointer-events: all;
	animation: slideUp 0.2s ease-out;
	width: auto;
	min-width: 400px;
	max-width: 600px;
}

@keyframes slideUp {
	from {
		opacity: 0;
		transform: translateX(-50%) translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateX(-50%) translateY(0);
	}
}

.ai-input-container {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 8px;
	width: 100%;
	padding: 8px 12px;
	background-color: var(--tl-color-panel);
	border: 1px solid var(--tl-color-low-container);
	border-radius: 24px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* 单行输入框布局 */
.ai-input-row {
	display: flex;
	align-items: center;
	width: 100%;
}

/* 第二行：按钮行 - 简化版隐藏 */
.ai-button-row {
	display: none;
}

/* 按钮组 */
.ai-button-group {
	display: flex;
	align-items: center;
	gap: 8px;
}

/* 左侧组 */
.ai-button-group-left {
	justify-content: flex-start;
}

/* 中间组 */
.ai-button-group-center {
	flex: 1;
	justify-content: center;
}

/* 右侧组 */
.ai-button-group-right {
	justify-content: flex-end;
}

.ai-input-textarea {
	flex: 1;
	min-width: 0;
	min-height: 36px;
	max-height: 36px;
	padding: 8px 0;
	font-size: 14px;
	line-height: 20px;
	color: var(--tl-color-text);
	background-color: transparent;
	border: none;
	resize: none;
	overflow-y: hidden;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
	outline: none;
	transition: none;
}

.ai-input-textarea:focus {
	border-color: transparent;
}

.ai-input-textarea::placeholder {
	color: var(--tl-color-text-3);
}

.ai-input-actions {
	display: flex;
	align-items: center;
	gap: 6px;
}

.ai-voice-button,
.ai-send-button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	min-width: 36px;
	min-height: 36px;
	padding: 0;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	background-color: transparent;
	transition: all 0.2s;
	flex-shrink: 0;
}

/* 发送按钮可用时使用指定颜色 */
.ai-send-button:not(:disabled) {
	background: #488396;
	border-radius: 50%;
}

.ai-send-button:not(:disabled) img {
	filter: brightness(0) invert(1); /* 白色图标 */
}

.ai-voice-button:hover,
.ai-send-button:disabled:hover {
	background-color: var(--tl-color-muted-1);
}

.ai-send-button:not(:disabled):hover {
	background: #375a6d;
	transform: translateY(-1px);
	box-shadow: 0 4px 8px rgba(66, 103, 134, 0.3);
}

.ai-voice-button:active,
.ai-send-button:disabled:active {
	transform: scale(0.95);
}

.ai-send-button:not(:disabled):active {
	transform: translateY(-1px) scale(0.95);
}

.ai-voice-button img,
.ai-send-button img {
	width: 18px;
	height: 18px;
	color: var(--tl-color-text);
}

.ai-voice-button.recording {
	background-color: #ef4444;
	animation: pulse 1.5s ease-in-out infinite;
}

.ai-voice-button.recording img {
	filter: brightness(0) invert(1);
}

@keyframes pulse {
	0%,
	100% {
		opacity: 1;
	}
	50% {
		opacity: 0.7;
	}
}

.ai-send-button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.ai-send-button:disabled:hover {
	background-color: var(--tl-color-low);
	transform: none;
}

/* 问题2：图片尺寸和比例选择器样式 */
.ai-options-row {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
}

.ai-option-group {
	display: flex;
	align-items: center;
	gap: 4px;
	flex: 1;
}

.ai-option-label {
	font-size: 12px;
	color: var(--tl-color-text-3);
	white-space: nowrap;
}

.ai-option-buttons {
	display: flex;
	gap: 4px;
	flex-wrap: wrap;
}

.ai-option-button {
	padding: 4px 8px;
	font-size: 12px;
	min-height: 24px;
	border: 1px solid var(--tl-color-low-container);
	border-radius: var(--tl-radius-2);
	background-color: var(--tl-color-low);
	color: var(--tl-color-text);
	cursor: pointer;
	transition: all 0.2s;
}

.ai-option-button:hover {
	background-color: var(--tl-color-muted-1);
}

.ai-option-button.active {
	background-color: var(--tl-color-primary);
	color: white;
	border-color: var(--tl-color-primary);
}

.ai-option-button.active:hover {
	opacity: 0.9;
}

/* 比例按钮中的icon */
.ai-ratio-icon {
	display: inline-block;
	width: 12px;
	height: 12px;
	margin-right: 4px;
	vertical-align: middle;
}

/* 下拉菜单容器 */
.ai-dropdown {
	position: relative;
}

.ai-dropdown-button {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 6px 10px;
	font-size: 13px;
	color: var(--tl-color-text);
	background-color: var(--tl-color-low);
	border: 1px solid var(--tl-color-low-container);
	border-radius: var(--tl-radius-2);
	cursor: pointer;
	transition: all 0.2s;
	white-space: nowrap;
	flex-shrink: 0;
}

.ai-dropdown-button:hover {
	background-color: var(--tl-color-muted-1);
	border-color: var(--tl-color-focus);
}

.ai-dropdown-button .ai-ratio-icon {
	margin-right: 0;
}

.ai-dropdown-menu {
	position: absolute;
	bottom: 100%;
	left: 0;
	margin-bottom: 4px;
	background-color: var(--tl-color-panel);
	border: 1px solid var(--tl-color-low-container);
	border-radius: var(--tl-radius-2);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	overflow: hidden;
	z-index: 1001;
	min-width: 100px;
}

.ai-dropdown-item {
	display: flex;
	align-items: center;
	gap: 6px;
	width: 100%;
	padding: 8px 12px;
	font-size: 13px;
	color: var(--tl-color-text);
	background-color: var(--tl-color-panel);
	border: none;
	text-align: left;
	cursor: pointer;
	transition: background-color 0.15s;
}

.ai-dropdown-item:hover {
	background-color: var(--tl-color-muted-1);
}

.ai-dropdown-item.active {
	background-color: var(--tl-color-primary);
	color: white;
}

.ai-dropdown-item .ai-ratio-icon {
	margin-right: 0;
}

/* 二级菜单样式 */
.ai-dropdown-with-submenu {
	position: relative;
}

.ai-dropdown-menu-with-submenu {
	min-width: 80px;
}

.ai-dropdown-item-with-submenu {
	position: relative;
}

.ai-dropdown-item.ai-dropdown-parent {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-right: 8px;
	cursor: pointer;
}

.ai-dropdown-item.ai-dropdown-parent:hover {
	background-color: var(--tl-color-muted-1);
}

.ai-dropdown-item.ai-dropdown-parent svg {
	opacity: 0.5;
	transition: opacity 0.15s;
}

.ai-dropdown-item-with-submenu:hover .ai-dropdown-parent svg {
	opacity: 1;
}

.ai-dropdown-submenu {
	position: absolute;
	right: 100%;
	top: 0;
	margin-right: 4px;
	background-color: var(--tl-color-panel);
	border: 1px solid var(--tl-color-low-container);
	border-radius: var(--tl-radius-2);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	overflow: hidden;
	z-index: 1002;
	min-width: 120px;
	display: none;
	pointer-events: auto;
}

.ai-dropdown-item-with-submenu:hover > .ai-dropdown-submenu {
	display: block;
}

.ai-dropdown-submenu .ai-dropdown-item {
	gap: 8px;
	padding: 6px 12px;
}

.ai-expand-mode-number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	font-size: 11px;
	font-weight: 600;
	background-color: var(--tl-color-muted-1);
	border-radius: 4px;
	color: var(--tl-color-text-2);
}

.ai-dropdown-submenu .ai-dropdown-item.active .ai-expand-mode-number {
	background-color: rgba(255, 255, 255, 0.2);
	color: white;
}

/* 取消按钮样式 */
.ai-cancel-button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	min-width: 36px;
	min-height: 36px;
	padding: 0;
	border: none;
	border-radius: var(--tl-radius-2);
	cursor: pointer;
	background-color: var(--tl-color-low);
	transition: all 0.2s;
	flex-shrink: 0;
}

.ai-cancel-button:hover {
	background-color: #ef4444;
}

.ai-cancel-button:hover svg {
	color: white;
}

.ai-cancel-button:active {
	transform: scale(0.95);
}

.ai-cancel-button svg {
	width: 18px;
	height: 18px;
	color: var(--tl-color-text);
	transition: color 0.2s;
}

/* 深色模式适配 */
.tl-theme__dark .ai-input-container {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* AI 按钮独立容器样式（参考 mobile-style-panel）*/
.tlui-main-toolbar__ai-button {
	position: relative;
	z-index: var(--tl-layer-panels);
	pointer-events: all;
	background: var(--tl-color-panel);
	box-shadow: var(--tl-shadow-2);
}

.tlui-main-toolbar--horizontal .tlui-main-toolbar__ai-button {
	align-self: flex-end;
}

.tlui-main-toolbar--vertical .tlui-main-toolbar__ai-button {
	align-self: flex-start;
}

/* 确保 AI 按钮图标保持原始颜色（彩色）*/
.tlui-main-toolbar__ai-button .tlui-button[data-testid='tools.ai-generate'] .tlui-icon svg {
	color: inherit !important;
	filter: none !important;
}

.tlui-main-toolbar__ai-button .tlui-button[data-testid='tools.ai-generate'] .tlui-icon {
	filter: none !important;
}

/* 艺术创作按钮样式 - "+" 号 */
.ai-create-button {
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #488396 0%, #3a6e7e 100%);
	border: none;
	border-radius: var(--tl-radius-2, 8px);
	cursor: pointer;
	color: white;
	transition: all 0.2s;
	box-shadow: 0 2px 8px rgba(72, 131, 150, 0.3);
}

.ai-create-button:hover {
	background: linear-gradient(135deg, #5999ab 0%, #4a7d8f 100%);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(72, 131, 150, 0.4);
}

.ai-create-button:active {
	transform: scale(0.95);
}

.ai-create-button svg {
	color: white;
}

/* 保持 AI.svg 的原始颜色 */
.tlui-main-toolbar__ai-button .tlui-icon svg {
	fill: currentColor;
	stroke: currentColor;
}

/* ==================== AI 功能面板样式 ==================== */

/* AI 功能面板容器 - 移动到画布最左边 */
.ai-feature-panel {
	position: fixed;
	left: 16px;  /* 从LEFT左侧显示 */
	top: 50%;
	transform: translateY(-50%);
	z-index: 999;
	width: auto;  /* 自适应宽度以容纳 icon+文字 */
	max-height: 80vh;
	overflow-y: auto;
	background-color: var(--tl-color-panel);
	border: 1px solid var(--tl-color-low-container);
	border-radius: var(--tl-radius-3);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	pointer-events: all;
	padding: 8px;
}

.ai-feature-panel__buttons {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ai-feature-button {
	position: relative;
	width: auto;  /* 自适应宽度 */
	height: auto;  /* 自适应高度 */
	min-height: 36px;  /* 参考 tldraw toolbar 按钮高度 */
	padding: 6px 12px;  /* 参考 tldraw 按钮内边距 */
	display: flex;
	align-items: center;
	justify-content: flex-start;  /* 左对齐 */
	gap: 8px;  /* icon 和文字之间的间距 */
	background-color: transparent;
	border: none;
	border-radius: var(--tl-radius-2);
	cursor: pointer;
	transition: all 0.2s;
	overflow: visible;
	white-space: nowrap;  /* 防止文字换行 */
}

.ai-feature-button:hover {
	background-color: var(--tl-color-muted-1);
}

/* 选中状态（可选，为未来功能预留） */
.ai-feature-button[data-active="true"] {
	background-color: var(--tl-color-selected);
	color: var(--tl-color-selected-contrast);
}

.ai-feature-button:active {
	transform: scale(0.95);
}

.ai-feature-button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* 图标样式 */
.ai-feature-icon {
	width: 20px;  /* 参考 tldraw icon 大小 */
	height: 20px;
	object-fit: contain;
	display: block;
	flex-shrink: 0;  /* 防止图标被压缩 */
}

/* 文字标签 - 始终显示，参考 tldraw 样式 */
.ai-feature-name {
	position: relative;  /* 改为相对定位，在按钮内显示 */
	display: inline-block;
	color: var(--tl-color-text);  /* 使用 tldraw 文字颜色 */
	font-size: 12px;  /* 参考 tldraw UI 字体大小 */
	font-weight: 500;  /* 参考 tldraw 字体粗细 */
	line-height: 1.4;
	opacity: 1;  /* 始终显示 */
	pointer-events: auto;
	user-select: none;  /* 防止文字被选中 */
}

/* 滚动条样式优化 */
.ai-feature-panel::-webkit-scrollbar {
	width: 4px;
}

.ai-feature-panel::-webkit-scrollbar-thumb {
	background-color: var(--tl-color-low-container);
	border-radius: 2px;
}

.ai-feature-panel::-webkit-scrollbar-thumb:hover {
	background-color: var(--tl-color-text-3);
}

/* 输入对话框 */
.ai-input-dialog-overlay {
	position: fixed;
	inset: 0;
	background-color: rgba(0, 0, 0, 0.5);
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: all;
}

.ai-input-dialog {
	width: 90%;
	max-width: 500px;
	background-color: var(--tl-color-panel);
	border-radius: var(--tl-radius-3);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
	padding: 24px;
}

.ai-input-dialog__title {
	font-size: 18px;
	font-weight: 600;
	color: var(--tl-color-text);
	margin: 0 0 16px 0;
}

.ai-input-dialog__textarea {
	width: 100%;
	min-height: 100px;
	padding: 12px;
	font-size: 14px;
	color: var(--tl-color-text);
	background-color: var(--tl-color-low);
	border: 1px solid var(--tl-color-low-container);
	border-radius: var(--tl-radius-2);
	resize: vertical;
	font-family: inherit;
	outline: none;
	transition: border-color 0.2s;
}

.ai-input-dialog__textarea:focus {
	border-color: var(--tl-color-focus);
}

.ai-input-dialog__textarea::placeholder {
	color: var(--tl-color-text-3);
}

.ai-input-dialog__buttons {
	display: flex;
	gap: 12px;
	margin-top: 16px;
	justify-content: flex-end;
}

.ai-input-dialog__button {
	padding: 8px 16px;
	font-size: 14px;
	border-radius: var(--tl-radius-2);
	cursor: pointer;
	transition: all 0.2s;
	border: none;
}

.ai-input-dialog__button--cancel {
	background-color: var(--tl-color-low);
	color: var(--tl-color-text);
}

.ai-input-dialog__button--cancel:hover {
	background-color: var(--tl-color-muted-1);
}

.ai-input-dialog__button--confirm {
	background-color: var(--tl-color-primary);
	color: white;
}

.ai-input-dialog__button--confirm:hover {
	opacity: 0.9;
}

.ai-input-dialog__button--confirm:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* 处理中提示 */
.ai-processing-overlay {
	position: fixed;
	inset: 0;
	background-color: rgba(0, 0, 0, 0.6);
	z-index: 10001;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: all;
}

.ai-processing-dialog {
	background-color: var(--tl-color-panel);
	border-radius: var(--tl-radius-3);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
	padding: 32px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
}

.ai-processing-spinner {
	width: 48px;
	height: 48px;
	border: 4px solid var(--tl-color-low);
	border-top-color: var(--tl-color-primary);
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

.ai-processing-message {
	font-size: 14px;
	color: var(--tl-color-text);
	margin: 0;
	text-align: center;
}

/* 深色模式适配 */
.tl-theme__dark .ai-feature-panel,
.tl-theme__dark .ai-input-dialog,
.tl-theme__dark .ai-processing-dialog {
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* ========================================
   欢迎页样式
   ======================================== */

/* 欢迎页 - 嵌入画布中心 */
.welcome-screen-canvas {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}

.welcome-screen-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 32px;
	pointer-events: all;
	max-width: 680px;
	width: 90vw;
}

/* 主标题 */
.welcome-title {
	font-size: 32px;
	font-weight: 600;
	color: var(--tl-color-text);
	margin: 0;
	text-align: center;
	line-height: 1.2;
	letter-spacing: -0.02em;
}

/* 输入大卡片 */
.welcome-input-card {
	width: 680px; /* 与 toolbar 宽度一致 */
	background-color: var(--tl-color-panel);
	border: 1px solid var(--tl-color-panel-contrast);
	border-radius: 20px;
	padding: 20px;
	box-shadow: var(--tl-shadow-big);
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/* 输入框容器（包含知识图谱按钮） */
.welcome-input-container {
	position: relative;
	width: 100%;
}

/* 输入框 */
.welcome-input {
	width: 100%;
	height: 48px;
	padding: 0 48px 0 16px; /* 右侧留出按钮空间 */
	font-size: 15px;
	color: var(--tl-color-text);
	background-color: #f1f5f9;
	border: none;
	border-radius: 12px;
	outline: none;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

.welcome-input::placeholder {
	color: var(--tl-color-text-3);
}

/* 知识图谱按钮（在输入框内） */
.welcome-knowledge-btn-inner {
	position: absolute;
	right: 8px;
	top: 50%;
	transform: translateY(-50%);
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: transparent;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.15s;
	color: var(--tl-color-text-2);
}

.welcome-knowledge-btn-inner:hover {
	background-color: rgba(0, 0, 0, 0.05);
	color: var(--tl-color-text);
}

/* 底部操作栏 */
.welcome-input-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

/* 左侧按钮组 */
.welcome-footer-left {
	display: flex;
	align-items: center;
	gap: 6px;
}

/* 右侧按钮组 */
.welcome-footer-right {
	display: flex;
	align-items: center;
	gap: 6px;
}

/* 选项和语音按钮 */
.welcome-option-group {
	position: relative;
}

.welcome-option-button,
.welcome-voice-button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	height: 32px;
	padding: 0 10px;
	font-size: 12px;
	font-weight: 500;
	color: var(--tl-color-text-2);
	background-color: transparent;
	border: 1px solid var(--tl-color-low-container);
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.15s;
}

.welcome-option-button:hover,
.welcome-voice-button:hover {
	background-color: var(--tl-color-muted-1);
	border-color: var(--tl-color-text-3);
}

.welcome-voice-button {
	width: 36px;
	height: 36px;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--tl-color-text-2);
	background-color: transparent;
	border: 1px solid var(--tl-color-low-container);
	border-radius: 10px;
	cursor: pointer;
	transition: all 0.15s;
}

.welcome-voice-button:hover {
	background-color: var(--tl-color-muted-1);
	border-color: var(--tl-color-text-3);
}

.welcome-voice-button.recording {
	background-color: #ef4444;
	color: white;
	border-color: #ef4444;
	animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
	0%, 100% {
		opacity: 1;
	}
	50% {
		opacity: 0.6;
	}
}

/* 发送按钮 */
.welcome-send-button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: none;
	border-radius: 10px;
	background: linear-gradient(135deg, #488396 0%, #3a6e7e 100%);
	color: white;
	cursor: pointer;
	transition: all 0.2s;
	flex-shrink: 0;
}

.welcome-send-button:hover:not(:disabled) {
	background: linear-gradient(135deg, #5999ab 0%, #4a7d8f 100%);
	transform: scale(1.05);
	box-shadow: 0 4px 12px rgba(72, 131, 150, 0.4);
}

.welcome-send-button:active:not(:disabled) {
	transform: scale(0.98);
}

.welcome-send-button:disabled {
	opacity: 0.3;
	cursor: not-allowed;
}

/* 下拉菜单 */
.welcome-dropdown {
	position: absolute;
	bottom: calc(100% + 6px);
	left: 0;
	min-width: 70px;
	background-color: var(--tl-color-panel);
	border: 1px solid var(--tl-color-panel-contrast);
	border-radius: 8px;
	box-shadow: var(--tl-shadow-big);
	z-index: 1000;
	overflow: hidden;
}

.welcome-dropdown-item {
	width: 100%;
	padding: 8px 12px;
	font-size: 12px;
	color: var(--tl-color-text);
	background: none;
	border: none;
	text-align: left;
	cursor: pointer;
	transition: background-color 0.15s;
}

.welcome-dropdown-item:hover {
	background-color: var(--tl-color-muted-1);
}

.welcome-dropdown-item.active {
	background-color: var(--tl-color-selected);
	color: var(--tl-color-selected-contrast);
}

/* ========================================
   知识图谱浮层（右侧显示）
   ======================================== */

.knowledge-graph-panel-side {
	position: absolute;
	left: calc(100% + 12px); /* 显示在输入框右侧 */
	top: 0;
	width: 400px;
	max-height: 600px;
	background-color: var(--tl-color-panel);
	border: 1px solid var(--tl-color-panel-contrast);
	border-radius: 16px;
	box-shadow: var(--tl-shadow-big);
	display: flex;
	flex-direction: column;
	z-index: 1001;
	animation: slideInRight 0.2s ease-out;
}

@keyframes slideInRight {
	from {
		opacity: 0;
		transform: translateX(-10px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

/* 关闭按钮 */
.knowledge-graph-close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 28px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: transparent;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.15s;
	color: var(--tl-color-text-2);
	z-index: 1;
}

.knowledge-graph-close:hover {
	background-color: var(--tl-color-muted-1);
	color: var(--tl-color-text);
}

/* 标题 */
.knowledge-graph-title {
	font-size: 16px;
	font-weight: 600;
	color: var(--tl-color-text);
	margin: 0;
	padding: 16px 16px 12px 16px;
	border-bottom: 1px solid var(--tl-color-low-container);
}

/* 顶部标签栏 */
.knowledge-graph-tabs {
	display: flex;
	gap: 6px;
	padding: 12px 16px;
	border-bottom: 1px solid var(--tl-color-low-container);
	flex-wrap: wrap;
}

.knowledge-graph-tab {
	padding: 6px 12px;
	font-size: 12px;
	font-weight: 500;
	color: var(--tl-color-text-2);
	background-color: transparent;
	border: 1px solid var(--tl-color-low-container);
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.15s;
	white-space: nowrap;
}

.knowledge-graph-tab:hover {
	background-color: var(--tl-color-muted-1);
	border-color: var(--tl-color-text-3);
}

.knowledge-graph-tab.active {
	background: linear-gradient(135deg, #488396 0%, #3a6e7e 100%);
	color: white;
	border-color: transparent;
}

/* 内容区域 */
.knowledge-graph-content {
	flex: 1;
	overflow-y: auto;
	padding: 12px 16px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/* 子分类标签 */
.knowledge-graph-subtabs {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
}

.knowledge-graph-subtab {
	padding: 5px 10px;
	font-size: 12px;
	font-weight: 500;
	color: var(--tl-color-text-3);
	background-color: var(--tl-color-low);
	border: none;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.15s;
	white-space: nowrap;
}

.knowledge-graph-subtab:hover {
	background-color: var(--tl-color-muted-1);
	color: var(--tl-color-text-2);
}

.knowledge-graph-subtab.active {
	background-color: var(--tl-color-primary);
	color: white;
}

/* 关键词列表 */
.knowledge-graph-keywords {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.knowledge-graph-keyword {
	padding: 5px 12px;
	font-size: 12px;
	font-weight: 400;
	color: var(--tl-color-text);
	background-color: var(--tl-color-low);
	border: 1px solid var(--tl-color-low-container);
	border-radius: 16px;
	cursor: pointer;
	transition: all 0.15s;
	white-space: nowrap;
	display: flex;
	align-items: center;
}

.knowledge-graph-keyword:hover {
	background-color: var(--tl-color-muted-1);
	border-color: var(--tl-color-text-3);
	transform: translateY(-1px);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.knowledge-graph-keyword.selected {
	background: linear-gradient(135deg, #488396 0%, #3a6e7e 100%);
	color: white;
	border-color: transparent;
}

.knowledge-graph-keyword:active {
	transform: translateY(0);
	box-shadow: none;
}

/* 滚动条样式 */
.knowledge-graph-content::-webkit-scrollbar {
	width: 8px;
}

.knowledge-graph-content::-webkit-scrollbar-track {
	background: transparent;
}

.knowledge-graph-content::-webkit-scrollbar-thumb {
	background: var(--tl-color-low-container);
	border-radius: 4px;
}

.knowledge-graph-content::-webkit-scrollbar-thumb:hover {
	background: var(--tl-color-text-3);
}

/* ========================================
   艺术创作弹窗样式
   ======================================== */

.art-creation-modal-overlay {
	position: fixed;
	inset: 0;
	background-color: rgba(0, 0, 0, 0.5);
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: all;
	animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

.art-creation-modal {
	position: relative;
	width: 66.67vw;
	min-width: 600px;
	max-width: 1200px;
	height: 66.67vh;
	min-height: 480px;
	max-height: 720px;
	background-color: var(--tl-color-panel);
	border-radius: var(--tl-radius-4, 16px);
	box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
	padding: 32px 40px;
	animation: scaleIn 0.25s ease-out;
	display: flex;
	flex-direction: column;
}

@keyframes scaleIn {
	from { 
		opacity: 0; 
		transform: scale(0.9); 
	}
	to { 
		opacity: 1; 
		transform: scale(1); 
	}
}

.art-creation-modal__close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: transparent;
	border: none;
	border-radius: var(--tl-radius-2);
	cursor: pointer;
	color: var(--tl-color-text-2);
	transition: all 0.15s;
}

.art-creation-modal__close:hover {
	background-color: var(--tl-color-muted-1);
	color: var(--tl-color-text);
}

/* 顶部大标题 */
.art-creation-modal__header {
	font-size: 32px;
	font-weight: 700;
	color: var(--tl-color-text);
	text-align: center;
	margin: 0 0 24px 0;
	padding-top: 16px;
	letter-spacing: 0.08em;
	background: linear-gradient(135deg, #488396 0%, #3a6e7e 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	flex-shrink: 0;
}

.art-creation-modal__modules {
	display: flex;
	gap: 32px;
	flex: 1;
	padding: 16px 0;
	min-height: 0;
}

.art-creation-module {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 20px;
	padding: 40px 28px;
	background-color: var(--tl-color-low);
	border: 2px solid transparent;
	border-radius: var(--tl-radius-3, 12px);
	cursor: pointer;
	transition: all 0.2s;
	min-height: 0;
}

.art-creation-module:hover {
	background-color: var(--tl-color-muted-1);
	border-color: var(--tl-color-primary);
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.art-creation-module:active {
	transform: scale(0.98);
}

/* 语音模块特殊处理：不响应整体点击 */
.art-creation-module--voice {
	cursor: default;
}

.art-creation-module--voice:hover {
	transform: none;
}

.art-creation-module--voice:active {
	transform: none;
}

.art-creation-module__icon {
	width: 88px;
	height: 88px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #488396 0%, #3a6e7e 100%);
	border-radius: 50%;
	color: white;
	margin-bottom: 8px;
	box-shadow: 0 8px 24px rgba(72, 131, 150, 0.25);
}

.art-creation-module__icon svg {
	width: 44px;
	height: 44px;
	color: white;
}

.art-creation-module__title {
	font-size: 22px;
	font-weight: 600;
	color: var(--tl-color-text);
	text-align: center;
	margin-top: 8px;
}

.art-creation-module__desc {
	font-size: 15px;
	color: var(--tl-color-text-2);
	text-align: center;
	line-height: 1.6;
	margin-top: 4px;
}

/* 副标题中的超链接样式 */
.art-creation-module__link {
	color: #488396;
	cursor: pointer;
	text-decoration: underline;
	transition: all 0.15s;
}

.art-creation-module__link:hover {
	color: #5999ab;
}

/* 可点击的图标按钮 */
.art-creation-module__icon--clickable {
	cursor: pointer;
	border: none;
	transition: all 0.2s;
}

.art-creation-module__icon--clickable:hover {
	transform: scale(1.08);
	box-shadow: 0 8px 24px rgba(72, 131, 150, 0.4);
}

.art-creation-module__icon--clickable:active {
	transform: scale(0.95);
}

/* 录音状态的图标 */
.art-creation-module__icon--clickable.recording {
	background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
	animation: pulse 1.5s ease-in-out infinite;
	box-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
}

/* 录音提示文字 */
.art-creation-module__recording-tip {
	font-size: 13px;
	color: #ef4444;
	font-weight: 500;
	animation: pulse 1.5s ease-in-out infinite;
}

/* 语音模块的按钮组 */
.art-creation-module__buttons {
	display: flex;
	gap: 12px;
	margin-top: 12px;
}

.art-creation-voice-btn,
.art-creation-text-btn {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	font-size: 14px;
	font-weight: 500;
	border: 1px solid var(--tl-color-low-container);
	border-radius: var(--tl-radius-2);
	cursor: pointer;
	transition: all 0.15s;
	background-color: var(--tl-color-panel);
	color: var(--tl-color-text);
}

.art-creation-voice-btn:hover,
.art-creation-text-btn:hover {
	background-color: var(--tl-color-muted-1);
	border-color: var(--tl-color-primary);
}

.art-creation-voice-btn.recording {
	background-color: #ef4444;
	border-color: #ef4444;
	color: white;
	animation: pulse 1.5s ease-in-out infinite;
}

.art-creation-voice-btn.recording svg {
	color: white;
}

/* ========================================
   草图创作模式 - 开始生成按钮
   ======================================== */

.sketch-generate-button {
	position: fixed;
	z-index: 999;
	padding: 12px 24px;
	font-size: 15px;
	font-weight: 600;
	color: white;
	background: linear-gradient(135deg, #488396 0%, #3a6e7e 100%);
	border: none;
	border-radius: var(--tl-radius-3, 12px);
	box-shadow: 0 4px 16px rgba(72, 131, 150, 0.4);
	cursor: pointer;
	transition: all 0.2s;
	pointer-events: all;
}

.sketch-generate-button:hover {
	background: linear-gradient(135deg, #5999ab 0%, #4a7d8f 100%);
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(72, 131, 150, 0.5);
}

.sketch-generate-button:active {
	transform: translateY(0);
}

/* 深色模式适配 */
.tl-theme__dark .art-creation-modal {
	box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

.tl-theme__dark .art-creation-module {
	background-color: var(--tl-color-low);
}

.tl-theme__dark .art-creation-module:hover {
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
/**
 * 智能输入框样式
 * 支持紧凑/展开两种模式
 */

/* 底部输入框容器 - 固定在底部居中 */
.bottom-chat-input {
	position: fixed;
	bottom: 24px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 999;
	pointer-events: all;
	display: flex;
	align-items: center; /* 改为居中对齐 */
	gap: 12px;
	transition: all 0.3s ease;
}

/* 左侧独立的草图按钮 - 与添加图片按钮样式一致 */
.bottom-chat-sketch-btn {
	width: 40px;
	height: 40px;
	background: rgba(255, 255, 255, 0.08); /* 与添加图片按钮相同 */
	border: none;
	border-radius: 8px; /* 与添加图片按钮相同 */
	color: rgba(255, 255, 255, 0.6);
	flex-shrink: 0;
	cursor: pointer;
	transition: all 0.2s ease;
	display: flex;
	align-items: center;
	justify-content: center;
}

.bottom-chat-sketch-btn:hover {
	background: rgba(255, 255, 255, 0.15); /* 与添加图片按钮悬停样式一致 */
	color: rgba(255, 255, 255, 0.9);
}

/* 输入框主容器 - 圆角胶囊样式 */
.bottom-chat-container {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	background: rgba(55, 65, 75, 0.95);
	backdrop-filter: blur(12px);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 28px;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
	min-width: 480px;
	max-width: 680px;
	transition: all 0.3s ease;
}

/* 展开模式容器 */
.bottom-chat-container.expanded {
	flex-direction: column;
	align-items: stretch;
	padding: 16px;
	border-radius: 20px;
	min-width: 580px;
	max-width: 800px;
	gap: 12px;
}

/* === 展开模式样式 === */

/* 上部输入区域 */
.bottom-chat-expanded-top {
	display: flex;
	gap: 12px;
	min-height: 100px;
}

/* 媒体区域（加号按钮或图片预览） */
.bottom-chat-media-area {
	flex-shrink: 0;
	min-width: 100px;
	min-height: 100px;
}

/* 图片列表包装器 */
.bottom-chat-images-wrapper {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: flex-start;
	padding: 4px 12px 12px 4px; /* 给右下角的加号按钮留出空间 */
}

/* 大加号按钮 */
.bottom-chat-add-btn-large {
	width: 80px;
	height: 80px;
	background: rgba(255, 255, 255, 0.04);
	border: 2px dashed rgba(255, 255, 255, 0.2);
	border-radius: 12px;
	color: rgba(255, 255, 255, 0.35);
	transition: all 0.2s ease;
}

.bottom-chat-add-btn-large:hover {
	background: rgba(255, 255, 255, 0.1);
	border-color: rgba(255, 255, 255, 0.35);
	color: rgba(255, 255, 255, 0.7);
}

/* 图片预览 */
.bottom-chat-image-preview {
	position: relative;
	width: 80px;
	height: 80px;
	border-radius: 12px;
	overflow: visible; /* 允许子元素溢出，用于显示右下角的加号按钮 */
	border: 1px solid rgba(255, 255, 255, 0.15);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	background: rgba(0, 0, 0, 0.2);
}

.bottom-chat-image-preview img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 12px;
}

.bottom-chat-image-remove {
	position: absolute;
	top: 4px;
	right: 4px;
	width: 20px;
	height: 20px;
	background: rgba(0, 0, 0, 0.65);
	border: none;
	border-radius: 50%;
	color: white;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.15s;
	opacity: 0;
}

.bottom-chat-image-preview:hover .bottom-chat-image-remove {
	opacity: 1;
}

.bottom-chat-image-remove:hover {
	background: rgba(239, 68, 68, 0.85);
}

/* 添加更多图片按钮（在最后一张图片右下角） */
.bottom-chat-add-more-btn {
	position: absolute;
	bottom: -8px;
	right: -8px;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #3a3a3a;
	border: 2px solid #555;
	color: rgba(255, 255, 255, 0.85);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.2s ease;
	z-index: 10;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.bottom-chat-add-more-btn:hover {
	background: #4a4a4a;
	border-color: rgba(72, 143, 155, 0.6);
	color: #6fd3e0;
	transform: scale(1.1);
}

/* 多行输入框 */
.bottom-chat-textarea {
	flex: 1;
	min-height: 80px;
	max-height: 150px;
	padding: 12px;
	font-size: 15px;
	color: rgba(255, 255, 255, 0.9);
	background: transparent;
	border: none;
	outline: none;
	resize: none;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
	line-height: 1.5;
}

.bottom-chat-textarea::placeholder {
	color: rgba(255, 255, 255, 0.4);
}

/* 下部功能按钮区 */
.bottom-chat-expanded-bottom {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-top: 8px;
	border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* 左侧功能按钮组 */
.bottom-chat-feature-btns {
	display: flex;
	gap: 8px;
}

/* 功能按钮通用样式 */
.bottom-chat-feature-btn {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 8px;
	color: rgba(255, 255, 255, 0.75);
	font-size: 13px;
	cursor: pointer;
	transition: all 0.2s ease;
	white-space: nowrap;
}

.bottom-chat-feature-btn:hover {
	background: rgba(255, 255, 255, 0.12);
	color: rgba(255, 255, 255, 0.95);
	border-color: rgba(255, 255, 255, 0.2);
}

/* Agent模式激活状态 */
.bottom-chat-feature-btn.active {
	background: rgba(72, 143, 155, 0.35);
	border-color: rgba(72, 143, 155, 0.5);
	color: #6fd3e0;
}

.bottom-chat-feature-btn.active:hover {
	background: rgba(72, 143, 155, 0.45);
}

/* 右侧操作按钮组 */
.bottom-chat-action-btns {
	display: flex;
	gap: 8px;
	align-items: center;
}

/* 下拉菜单包装器 */
.bottom-chat-dropdown-wrapper {
	position: relative;
}

/* 下拉菜单 */
.bottom-chat-dropdown {
	position: absolute;
	bottom: calc(100% + 8px);
	left: 0;
	min-width: 180px;
	background: rgba(45, 55, 65, 0.98);
	backdrop-filter: blur(16px);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 12px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
	padding: 12px;
	z-index: 1000;
}

.bottom-chat-dropdown-section {
	margin-bottom: 12px;
}

.bottom-chat-dropdown-section:last-child {
	margin-bottom: 0;
}

.bottom-chat-dropdown-label {
	font-size: 11px;
	color: rgba(255, 255, 255, 0.5);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 8px;
}

.bottom-chat-dropdown-options {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.bottom-chat-dropdown-option {
	padding: 6px 10px;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 6px;
	color: rgba(255, 255, 255, 0.7);
	font-size: 12px;
	cursor: pointer;
	transition: all 0.15s;
}

.bottom-chat-dropdown-option:hover {
	background: rgba(255, 255, 255, 0.12);
	color: white;
}

.bottom-chat-dropdown-option.active {
	background: rgba(72, 143, 155, 0.3);
	border-color: rgba(72, 143, 155, 0.5);
	color: #6fd3e0;
}

/* 功能选择下拉菜单特殊样式 */
.bottom-chat-dropdown.feature-dropdown {
	min-width: 160px;
	max-height: 300px;
	overflow-y: auto;
}

.bottom-chat-dropdown-options.feature-options {
	flex-direction: column;
	gap: 4px;
}

.bottom-chat-dropdown-options.feature-options .bottom-chat-dropdown-option {
	width: 100%;
	text-align: left;
	justify-content: flex-start;
}

/* 空状态提示 */
.bottom-chat-dropdown-empty {
	padding: 12px;
	color: rgba(255, 255, 255, 0.4);
	font-size: 12px;
	text-align: center;
}

/* 左侧按钮组 */
.bottom-chat-left {
	display: flex;
	align-items: center;
	gap: 4px;
	flex-shrink: 0;
}

/* 右侧按钮组 */
.bottom-chat-right {
	display: flex;
	align-items: center;
	gap: 4px;
	flex-shrink: 0;
}

/* 通用按钮样式 */
.bottom-chat-btn {
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: none;
	border-radius: 10px;
	cursor: pointer;
	color: rgba(255, 255, 255, 0.6);
	transition: all 0.2s ease;
}

.bottom-chat-btn:hover {
	background: rgba(255, 255, 255, 0.1);
	color: rgba(255, 255, 255, 0.9);
}

.bottom-chat-btn:active {
	transform: scale(0.95);
}

/* 编辑按钮 - 带边框 */
.bottom-chat-edit-btn {
	border: 1.5px dashed rgba(255, 255, 255, 0.3);
	border-radius: 8px;
}

.bottom-chat-edit-btn:hover {
	border-color: rgba(255, 255, 255, 0.5);
	background: rgba(255, 255, 255, 0.08);
}

/* 加号按钮 */
.bottom-chat-add-btn {
	background: rgba(255, 255, 255, 0.08);
	border-radius: 8px;
}

.bottom-chat-add-btn:hover {
	background: rgba(255, 255, 255, 0.15);
}

/* Frame按钮 - 创建画框 */
.bottom-chat-frame-btn {
	background: rgba(255, 255, 255, 0.08);
	border-radius: 8px;
}

.bottom-chat-frame-btn:hover {
	background: rgba(72, 131, 150, 0.3);
	color: #5999ab;
}

/* 语音按钮 */
.bottom-chat-voice-btn {
	color: rgba(255, 255, 255, 0.5);
}

.bottom-chat-voice-btn:hover {
	color: rgba(255, 255, 255, 0.9);
}

.bottom-chat-voice-btn.recording {
	background: #ef4444;
	color: white;
	animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.7; }
}

/* 发送按钮 */
.bottom-chat-send-btn {
	background: rgba(255, 255, 255, 0.1);
	color: rgba(255, 255, 255, 0.4);
}

.bottom-chat-send-btn:disabled {
	cursor: not-allowed;
	opacity: 0.5;
}

.bottom-chat-send-btn.active {
	background: rgba(255, 255, 255, 0.2);
	color: rgba(255, 255, 255, 0.9);
}

.bottom-chat-send-btn.active:hover {
	background: rgba(255, 255, 255, 0.25);
}

/* 发送中状态 */
.bottom-chat-send-btn.sending {
	background: rgba(72, 143, 155, 0.4);
	color: #6fd3e0;
	cursor: wait;
	pointer-events: none;
	animation: sending-pulse 1s ease-in-out infinite;
}

@keyframes sending-pulse {
	0%, 100% { 
		opacity: 1;
		transform: scale(1);
	}
	50% { 
		opacity: 0.7;
		transform: scale(0.95);
	}
}

/* 输入框 */
.bottom-chat-input-field {
	flex: 1;
	min-width: 200px;
	height: 40px;
	padding: 0 12px;
	font-size: 15px;
	color: rgba(255, 255, 255, 0.9);
	background: transparent;
	border: none;
	outline: none;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

.bottom-chat-input-field::placeholder {
	color: rgba(255, 255, 255, 0.4);
}

.bottom-chat-input-field:focus {
	outline: none;
}

/* 响应式调整 */
@media (max-width: 640px) {
	.bottom-chat-container {
		min-width: calc(100vw - 32px);
		max-width: calc(100vw - 32px);
	}
	
	.bottom-chat-input-field {
		min-width: 100px;
	}
}
/**
 * 画布顶部栏样式 - 按照 Figma 设计稿实现
 */

/* ========== 顶部栏容器 ========== */
.canvas-topbar {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: 68px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 19px;
	z-index: 500;
	pointer-events: none;
}

.canvas-topbar-left,
.canvas-topbar-center,
.canvas-topbar-right {
	display: flex;
	align-items: center;
	gap: 8px;
	pointer-events: all;
}

/* Logo 偏移：当左侧边栏打开时向右移动 */
.canvas-topbar-left--offset {
	margin-left: 268px; /* 边栏宽度 260px + 左边距 8px */
	transition: margin-left 0.25s ease;
}

.canvas-topbar-left {
	transition: margin-left 0.25s ease;
}

/* ========== 左侧: Logo (118x34) ========== */
.canvas-topbar-brand-btn {
	width: 118px;
	height: 34px;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	background: transparent;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.canvas-topbar-brand-btn:hover {
	opacity: 0.8;
}

.canvas-topbar-brand-btn:active {
	transform: scale(0.98);
}

.canvas-topbar-brand-img {
	height: 34px;
	width: auto;
	max-width: 118px;
	object-fit: contain;
}

/* ========== 中间: 标签页导航 ========== */
.canvas-topbar-center {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
}

.canvas-topbar-tabs {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 0 24px;
	height: 48px;
	backdrop-filter: blur(45px);
	-webkit-backdrop-filter: blur(45px);
	border-radius: 25px;
}

.canvas-topbar-tab {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 9px 17px;
	border: none;
	border-radius: 24px;
	background: transparent;
	color: #4D8F9D;
	font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 14px;
	font-weight: 500;
	line-height: 20px;
	cursor: pointer;
	transition: all 0.25s ease;
	white-space: nowrap;
}

.canvas-topbar-tab:hover {
	background: rgba(77, 143, 157, 0.1);
}

.canvas-topbar-tab--active {
	background: #4D8F9D;
	color: #FFFFFF;
	font-weight: 700;
}

.canvas-topbar-tab--active:hover {
	background: #3d7f8d;
}

/* ========== 右侧: 用户信息 + 智能体 ========== */
.canvas-topbar-right {
	gap: 12px;
	transition: margin-right 0.25s ease;
}

/* 右侧偏移：当右边栏打开时向左移动 */
.canvas-topbar-right--offset {
	margin-right: 316px; /* 右边栏宽度 300px + 间距 16px */
}

/* 用户头像按钮 */
.canvas-topbar-user-container {
	position: relative;
}

.canvas-topbar-user-btn {
	width: 34px;
	height: 34px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #FFFFFF;
	border: none;
	border-radius: 50%;
	box-shadow:
		0px 2px 8px 0px rgba(0, 0, 0, 0.08),
		0px 4px 20px 0px rgba(0, 0, 0, 0.12);
	cursor: pointer;
	transition: all 0.2s ease;
}

.canvas-topbar-user-btn:hover {
	box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1);
	transform: scale(1.05);
}

.canvas-topbar-user-initials {
	font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 12px;
	font-weight: 500;
	color: #3B352B;
	text-align: center;
	line-height: 16px;
}

/* 登录按钮 */
.canvas-topbar-login-btn {
	height: 34px;
	padding: 0 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #FFFFFF;
	border: none;
	border-radius: 17px;
	box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.05);
	font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 12px;
	font-weight: 500;
	color: #3B352B;
	cursor: pointer;
	transition: all 0.2s ease;
}

.canvas-topbar-login-btn:hover {
	box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1);
}

/* 智能体按钮 */
.canvas-topbar-agent-container {
	position: relative;
}

.canvas-topbar-agent-btn {
	width: 82px;
	height: 34px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	background: #FFFFFF;
	border: none;
	border-radius: 12px;
	box-shadow:
		0px 2px 8px 0px rgba(0, 0, 0, 0.08),
		0px 4px 20px 0px rgba(0, 0, 0, 0.12);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	cursor: pointer;
	transition: all 0.2s ease;
	padding: 7px 11px 7px 14px;
}

.canvas-topbar-agent-btn:hover {
	background: rgba(255, 255, 255, 0.95);
	box-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.08);
}

.canvas-topbar-agent-btn--active {
	background: #4D8F9D;
	color: white;
}

.canvas-topbar-agent-btn--active span {
	color: white;
}

.canvas-topbar-agent-btn--active svg {
	color: white;
}

.canvas-topbar-agent-btn--active:hover {
	background: #3d7f8d;
}

.canvas-topbar-agent-btn span {
	font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 12px;
	font-weight: 500;
	color: #000000;
	line-height: 20px;
}

.canvas-topbar-agent-btn svg {
	color: #333;
}

/* ========== 下拉菜单通用样式 ========== */
.canvas-topbar-user-dropdown,
.canvas-topbar-agent-dropdown {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	min-width: 200px;
	background: #FFFFFF;
	border-radius: 12px;
	box-shadow: 0px 8px 32px rgba(0, 0, 0, 0.15);
	overflow: hidden;
	animation: dropdownSlideDown 0.2s ease;
	z-index: 1000;
}

@keyframes dropdownSlideDown {
	from {
		opacity: 0;
		transform: translateY(-8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.canvas-topbar-dropdown-header {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px;
}

.canvas-topbar-dropdown-avatar {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: linear-gradient(135deg, #4D8F9D, #3d7f8d);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	font-weight: 600;
	color: white;
}

.canvas-topbar-dropdown-info {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.canvas-topbar-dropdown-email {
	font-size: 13px;
	font-weight: 500;
	color: #333;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.canvas-topbar-dropdown-label {
	font-size: 11px;
	color: #999;
}

.canvas-topbar-dropdown-title {
	font-size: 13px;
	font-weight: 600;
	color: #333;
}

.canvas-topbar-dropdown-divider {
	height: 1px;
	background: rgba(0, 0, 0, 0.08);
}

.canvas-topbar-dropdown-item {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 12px 14px;
	background: transparent;
	border: none;
	color: #333;
	font-size: 13px;
	cursor: pointer;
	transition: all 0.15s ease;
	text-align: left;
}

.canvas-topbar-dropdown-item:hover {
	background: rgba(77, 143, 157, 0.08);
}

.canvas-topbar-dropdown-item svg {
	flex-shrink: 0;
	color: #666;
}

.canvas-topbar-dropdown-item--selected {
	background: rgba(77, 143, 157, 0.1);
	color: #4D8F9D;
}

.canvas-topbar-dropdown-item--selected svg {
	color: #4D8F9D;
}

.canvas-topbar-dropdown-item--danger {
	color: #ef4444;
}

.canvas-topbar-dropdown-item--danger:hover {
	background: rgba(239, 68, 68, 0.1);
}

.canvas-topbar-dropdown-item--danger svg {
	color: #ef4444;
}

/* ========== 侧边栏（从 CanvasMenuButton.css 合并） ========== */

/* 侧边栏遮罩 */
.canvas-sidebar-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 998;
	animation: fadeIn 0.2s ease;
	pointer-events: all;
}

@keyframes fadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

/* 抽屉式侧边栏 */
.canvas-sidebar {
	position: fixed;
	left: 0;
	top: 0;
	bottom: 0;
	width: 240px;
	background: rgba(10, 15, 20, 0.98);
	backdrop-filter: blur(12px);
	border-right: 1px solid rgba(255, 255, 255, 0.08);
	z-index: 999;
	display: flex;
	flex-direction: column;
	transform: translateX(-100%);
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	overflow-y: auto;
	pointer-events: all;
}

.canvas-sidebar.open {
	transform: translateX(0);
}

/* Logo */
.canvas-sidebar-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 12px 12px 20px;
	flex-shrink: 0;
}

.canvas-sidebar-logo {
	cursor: pointer;
	transition: opacity 0.2s;
	pointer-events: all;
}

.canvas-sidebar-logo:hover {
	opacity: 0.8;
}

.canvas-sidebar-logo img {
	height: 24px;
	width: auto;
}

/* 收起边栏按钮 */
.canvas-sidebar-close-btn {
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 8px;
	cursor: pointer;
	color: rgba(255, 255, 255, 0.7);
	transition: all 0.2s ease;
	flex-shrink: 0;
	pointer-events: all;
}

.canvas-sidebar-close-btn:hover {
	background: rgba(255, 255, 255, 0.15);
	color: rgba(255, 255, 255, 0.95);
}

.canvas-sidebar-close-btn:active {
	transform: scale(0.95);
}

/* 导航 */
.canvas-sidebar-nav {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 0 12px;
}

.canvas-sidebar-nav.secondary {
	gap: 2px;
}

.canvas-nav-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	background: transparent;
	border: none;
	border-radius: 10px;
	color: rgba(255, 255, 255, 0.7);
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
	text-align: left;
	width: 100%;
	pointer-events: all;
}

.canvas-nav-item:hover {
	background: rgba(255, 255, 255, 0.08);
	color: rgba(255, 255, 255, 0.95);
}

.canvas-nav-item.active {
	background: linear-gradient(135deg, rgba(72, 131, 150, 0.3), rgba(72, 131, 150, 0.15));
	color: #6bc4db;
}

.canvas-nav-item svg {
	flex-shrink: 0;
	opacity: 0.8;
}

.canvas-nav-item.active svg {
	opacity: 1;
}

.canvas-sidebar-nav.secondary .canvas-nav-item {
	padding: 10px 16px;
	font-size: 13px;
	font-weight: 400;
}

/* 分隔线 */
.canvas-sidebar-divider {
	height: 1px;
	background: rgba(255, 255, 255, 0.08);
	margin: 12px 16px;
}

/* 区块 */
.canvas-sidebar-section {
	margin-top: 8px;
}

.canvas-section-title {
	padding: 8px 28px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: rgba(255, 255, 255, 0.4);
}

/* 底部区域 */
.canvas-sidebar-footer {
	margin-top: auto;
	padding-bottom: 16px;
}

.canvas-footer-links {
	padding: 0 12px 8px;
}

.canvas-footer-link {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 16px;
	background: transparent;
	border: none;
	border-radius: 8px;
	color: rgba(255, 255, 255, 0.5);
	font-size: 13px;
	cursor: pointer;
	transition: all 0.2s ease;
	width: 100%;
	text-align: left;
	pointer-events: all;
}

.canvas-footer-link:hover {
	background: rgba(255, 255, 255, 0.06);
	color: rgba(255, 255, 255, 0.8);
}

/* 用户账户 */
.canvas-user-menu-container {
	position: relative;
	padding: 0 12px;
}

.canvas-user-account-btn {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 10px 12px;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 10px;
	color: rgba(255, 255, 255, 0.9);
	cursor: pointer;
	transition: all 0.2s ease;
	pointer-events: all;
}

.canvas-user-account-btn:hover {
	background: rgba(255, 255, 255, 0.1);
	border-color: rgba(255, 255, 255, 0.15);
}

.canvas-user-avatar {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: linear-gradient(135deg, #488396, #3a6e7e);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	font-weight: 600;
	color: white;
	flex-shrink: 0;
}

.canvas-user-email {
	flex: 1;
	font-size: 13px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.canvas-menu-arrow {
	flex-shrink: 0;
	opacity: 0.6;
	transition: transform 0.2s;
}

.canvas-user-account-btn:hover .canvas-menu-arrow {
	opacity: 1;
}

/* 用户下拉菜单 */
.canvas-user-dropdown {
	position: absolute;
	bottom: calc(100% + 8px);
	left: 12px;
	right: 12px;
	background: rgba(20, 25, 30, 0.98);
	backdrop-filter: blur(12px);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 12px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
	overflow: hidden;
	animation: slideUp 0.2s ease;
	pointer-events: all;
	z-index: 1000;
}

@keyframes slideUp {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.canvas-dropdown-header {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px;
}

.canvas-dropdown-avatar {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: linear-gradient(135deg, #488396, #3a6e7e);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 15px;
	font-weight: 600;
	color: white;
	flex-shrink: 0;
}

.canvas-dropdown-user-info {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.canvas-dropdown-email {
	font-size: 13px;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.95);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.canvas-dropdown-label {
	font-size: 11px;
	color: rgba(255, 255, 255, 0.5);
}

.canvas-dropdown-divider {
	height: 1px;
	background: rgba(255, 255, 255, 0.08);
}

.canvas-dropdown-item {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 12px 14px;
	background: transparent;
	border: none;
	color: rgba(255, 255, 255, 0.8);
	font-size: 13px;
	cursor: pointer;
	transition: all 0.15s ease;
	text-align: left;
	pointer-events: all;
}

.canvas-dropdown-item:hover {
	background: rgba(255, 255, 255, 0.08);
	color: rgba(255, 255, 255, 1);
}

.canvas-dropdown-item svg {
	flex-shrink: 0;
	opacity: 0.7;
}

.canvas-dropdown-item:hover svg {
	opacity: 1;
}

.canvas-dropdown-item-danger {
	color: #f87171;
}

.canvas-dropdown-item-danger:hover {
	background: rgba(248, 113, 113, 0.15);
	color: #fca5a5;
}

.canvas-dropdown-item-danger svg {
	color: currentColor;
}

/* 登录按钮 */
.canvas-login-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: calc(100% - 24px);
	margin: 0 12px;
	padding: 12px 16px;
	background: linear-gradient(135deg, #488396, #3a6e7e);
	border: none;
	border-radius: 10px;
	color: white;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
	pointer-events: all;
}

.canvas-login-btn:hover {
	background: linear-gradient(135deg, #5999ab, #4a7d8f);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(72, 131, 150, 0.4);
}

.canvas-login-btn:active {
	transform: translateY(0);
}

/* 滚动条样式 */
.canvas-sidebar::-webkit-scrollbar {
	width: 6px;
}

.canvas-sidebar::-webkit-scrollbar-track {
	background: transparent;
}

.canvas-sidebar::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.15);
	border-radius: 3px;
}

.canvas-sidebar::-webkit-scrollbar-thumb:hover {
	background: rgba(255, 255, 255, 0.25);
}
/**
 * 自定义图片工具栏样式
 * 基于Figma设计稿：白色毛玻璃效果 + 双层边框
 */

/* 顶部工具栏容器 */
.custom-image-toolbar {
	position: fixed;
	display: flex;
	gap: 4px;
	padding: 8px;
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border-radius: 12px;
	box-shadow: 
		0px 2px 8px 0px rgba(0, 0, 0, 0.04),
		0px 4px 20px 0px rgba(0, 0, 0, 0.07),
		inset 0px 0px 0px 2px rgba(255, 255, 255, 1);
	pointer-events: all;
	z-index: 1000;
	transform: translateX(-50%);
	justify-content: space-between;
	align-items: center;
}

/* 工具栏按钮基础样式 */
.custom-image-toolbar__button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	height: 32px;
	padding: 0 12px;
	background: transparent;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	font-size: 13px;
	font-weight: 500;
	color: #333;
	transition: background 0.15s;
	white-space: nowrap;
	position: relative;
}

.custom-image-toolbar__button:hover {
	background: rgba(0, 0, 0, 0.05);
}

.custom-image-toolbar__button:active {
	background: rgba(0, 0, 0, 0.1);
}

.custom-image-toolbar__button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* 按钮加载状态 */
.custom-image-toolbar__button--loading,
.custom-image-quick-edit__button--loading {
	position: relative;
	pointer-events: none;
	opacity: 0.6;
}

.custom-image-toolbar__button--loading::after,
.custom-image-quick-edit__button--loading::after {
	content: '';
	position: absolute;
	width: 14px;
	height: 14px;
	border: 2px solid #6366f1;
	border-top-color: transparent;
	border-radius: 50%;
	animation: spin 0.6s linear infinite;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

/* 按钮图标 */
.custom-image-toolbar__button-icon {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
}

/* 图标样式（SVG） */
.custom-image-toolbar__button svg {
	width: 16px;
	height: 16px;
	stroke: currentColor;
	fill: none;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* New标签 */
.custom-image-toolbar__button-badge {
	position: absolute;
	top: -4px;
	right: -4px;
	padding: 2px 4px;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	font-size: 9px;
	font-weight: 600;
	border-radius: 3px;
	line-height: 1;
	text-transform: uppercase;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* 图标按钮（无文字） */
.custom-image-toolbar__button--icon-only {
	padding: 0;
	width: 32px;
}

/* 分隔线 */
.custom-image-toolbar__divider {
	width: 1px;
	height: 20px;
	background: rgba(0, 0, 0, 0.1);
	margin: 0 2px;
	align-self: center;
}

/* 底部Quick Edit区域 */
.custom-image-quick-edit {
	position: fixed;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 8px 8px 12px;
	background: #FFFFFF;
	box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.05);
	border-radius: 12px;
	pointer-events: all;
	z-index: 1000;
	transform: translateX(-50%);
}

/* Quick Edit语音按钮 */
.custom-image-quick-edit__voice-btn {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	background: transparent;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	color: #666;
	transition: all 0.2s;
	flex-shrink: 0;
}

.custom-image-quick-edit__voice-btn:hover {
	background: rgba(0, 0, 0, 0.05);
	color: #333;
}

.custom-image-quick-edit__voice-btn--active {
	color: #4D8F9D;
	background: rgba(77, 143, 157, 0.1);
}

.custom-image-quick-edit__voice-btn--active:hover {
	background: rgba(77, 143, 157, 0.15);
}

.custom-image-quick-edit__voice-btn svg {
	width: 18px;
	height: 18px;
}

/* 语音脉冲动画 */
.custom-image-quick-edit__voice-pulse {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: rgba(77, 143, 157, 0.2);
	animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
	0%, 100% {
		transform: translate(-50%, -50%) scale(1);
		opacity: 0.6;
	}
	50% {
		transform: translate(-50%, -50%) scale(1.5);
		opacity: 0;
	}
}

/* Quick Edit输入框 */
.custom-image-quick-edit__input {
	flex: 1;
	min-width: 280px;
	height: 20px;
	padding: 0;
	background: transparent;
	border: none;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	font-size: 14px;
	color: #333;
	outline: none;
}

.custom-image-quick-edit__input::placeholder {
	color: #999;
}

/* Quick Edit生成按钮 */
.custom-image-quick-edit__button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	height: 34px;
	padding: 9px 16px 8px 15px;
	background: #4D8F9D;
	border: none;
	border-radius: 12px;
	cursor: pointer;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	font-size: 14px;
	font-weight: 500;
	color: #FFFFFF;
	transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
	box-shadow: 0 2px 8px rgba(77, 143, 157, 0.2);
	flex-shrink: 0;
}

.custom-image-quick-edit__button:hover {
	background: #5BA0AE;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(77, 143, 157, 0.3);
}

.custom-image-quick-edit__button:active {
	transform: translateY(0);
	background: #3E7A87;
}

.custom-image-quick-edit__button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none;
}

.custom-image-quick-edit__button svg {
	width: 16px;
	height: 16px;
	stroke: currentColor;
	fill: none;
	stroke-width: 2;
}

/* 发给Agent按钮 - 灰色调 */
.custom-image-quick-edit__button--secondary {
	background: #6B7280;
	box-shadow: 0 2px 8px rgba(107, 114, 128, 0.2);
}

.custom-image-quick-edit__button--secondary:hover {
	background: #7C8594;
	box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

.custom-image-quick-edit__button--secondary:active {
	background: #5A6169;
}

/* 加载状态 */
.custom-image-toolbar__button--loading {
	pointer-events: none;
	opacity: 0.7;
}

.custom-image-toolbar__button--loading::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: inherit;
	border: 2px solid transparent;
	border-top-color: currentColor;
	animation: spin 0.8s linear infinite;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

/**
 * 图片编辑器 Lightbox 样式
 */

/* 全屏遮罩层 - z-index 设为最高值确保在 custom-image-toolbar 之上 */
.image-editor-lightbox {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(30, 41, 46, 0.95);
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	animation: lightbox-fade-in 0.2s ease-out;
	/* 关键：确保事件不被底层画布拦截 */
	pointer-events: auto !important;
}

@keyframes lightbox-fade-in {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

/* 内容容器 */
.image-editor-content {
	position: relative;
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	animation: lightbox-scale-in 0.2s ease-out;
	pointer-events: auto !important;
}

@keyframes lightbox-scale-in {
	from {
		transform: scale(0.95);
		opacity: 0;
	}
	to {
		transform: scale(1);
		opacity: 1;
	}
}

/* 画布容器 */
.image-editor-canvas-container {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 60px;
	padding-left: 120px; /* 为左侧工具栏留空间 */
	padding-bottom: 100px; /* 为底部按钮留空间 */
}

.image-editor-canvas-wrapper {
	position: relative;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.image-editor-canvas {
	display: block;
	cursor: crosshair;
}

.image-editor-overlay-canvas {
	position: absolute;
	top: 0;
	left: 0;
	pointer-events: none;
}

/* 分割蒙版画布 */
.image-editor-segment-canvas {
	position: absolute;
	top: 0;
	left: 0;
	pointer-events: none;
}

.image-editor-loading {
	color: rgba(255, 255, 255, 0.6);
	font-size: 16px;
}

/* 分割中遮罩 */
.image-editor-segmenting-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	color: #fff;
	font-size: 14px;
	z-index: 10;
}

.image-editor-segmenting-spinner {
	width: 32px;
	height: 32px;
	border: 3px solid rgba(255, 255, 255, 0.3);
	border-top-color: #fff;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

/* 文字输入框 */
.image-editor-text-input-container {
	position: absolute;
	display: flex;
	gap: 4px;
	z-index: 10;
}

.image-editor-text-input-container input {
	padding: 6px 12px;
	border: 2px solid #488f9b;
	border-radius: 4px;
	background: rgba(30, 41, 46, 0.95);
	color: #fff;
	font-size: 14px;
	outline: none;
	min-width: 150px;
}

.image-editor-text-input-container button {
	padding: 6px 12px;
	background: #488f9b;
	color: #fff;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
}

.image-editor-text-input-container button:hover {
	background: #5ba8b5;
}

/* 右侧工具栏 */
.image-editor-toolbar {
	position: absolute;
	left: 30px;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 12px;
	background: rgba(255, 255, 255, 0.95);
	border-radius: 16px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	pointer-events: auto !important;
	z-index: 10;
}

/* 工具栏分隔线 */
.image-editor-toolbar-divider {
	width: 100%;
	height: 1px;
	background: rgba(0, 0, 0, 0.1);
	margin: 4px 0;
}

.image-editor-tool-btn {
	position: relative;
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: none;
	border-radius: 12px;
	cursor: pointer;
	color: #333;
	transition: all 0.15s ease;
	pointer-events: auto !important;
}

.image-editor-tool-btn:hover {
	background: rgba(72, 143, 155, 0.1);
}

.image-editor-tool-btn.active {
	background: rgba(72, 143, 155, 0.15);
	color: #488f9b;
}

.image-editor-tool-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.image-editor-tool-btn svg {
	width: 24px;
	height: 24px;
}

/* 加载动画 */
.image-editor-loading-spinner {
	width: 20px;
	height: 20px;
	border: 2px solid rgba(72, 143, 155, 0.3);
	border-top-color: #488f9b;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

/* 错误指示器 */
.tool-error-indicator {
	position: absolute;
	top: 4px;
	right: 4px;
	width: 14px;
	height: 14px;
	background: #ff4444;
	color: #fff;
	border-radius: 50%;
	font-size: 10px;
	font-weight: bold;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* 画笔颜色指示器 */
.tool-indicator {
	position: absolute;
	bottom: 4px;
	right: 4px;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	border: 2px solid #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* 底部操作按钮 */
.image-editor-actions {
	position: absolute;
	bottom: 30px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 16px;
	pointer-events: auto !important;
	z-index: 10;
}

.image-editor-cancel-btn,
.image-editor-save-btn,
.image-editor-clear-mask-btn,
.image-editor-export-btn {
	padding: 12px 32px;
	border-radius: 24px;
	font-size: 15px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.15s ease;
	border: none;
	pointer-events: auto !important;
}

.image-editor-cancel-btn {
	background: rgba(255, 255, 255, 0.9);
	color: #333;
}

.image-editor-cancel-btn:hover {
	background: #fff;
}

.image-editor-save-btn {
	background: #488f9b;
	color: #fff;
}

.image-editor-save-btn:hover {
	background: #5ba8b5;
}

/* 清除蒙版按钮 */
.image-editor-clear-mask-btn {
	background: rgba(255, 68, 68, 0.9);
	color: #fff;
}

.image-editor-clear-mask-btn:hover {
	background: #ff4444;
}

/* 导出抠图按钮 */
.image-editor-export-btn {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #fff;
}

.image-editor-export-btn:hover {
	background: linear-gradient(135deg, #5a6fd6 0%, #6a4295 100%);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* 分割工具提示 */
.image-editor-segment-hint {
	position: absolute;
	top: 30px;
	left: 50%;
	transform: translateX(-50%);
	padding: 10px 20px;
	background: rgba(0, 0, 0, 0.7);
	color: #fff;
	border-radius: 20px;
	font-size: 14px;
	pointer-events: none;
	z-index: 10;
}

.image-editor-segment-hint .error {
	color: #ff6b6b;
}

/* 颜色和粗细选择器 */
.image-editor-options {
	position: absolute;
	bottom: 100px;
	left: 30px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 12px;
	background: rgba(30, 41, 46, 0.95);
	border-radius: 12px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	pointer-events: auto !important;
	z-index: 10;
}

.image-editor-colors {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	max-width: 200px;
}

.color-btn {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 2px solid transparent;
	cursor: pointer;
	transition: all 0.15s ease;
	pointer-events: auto !important;
}

.color-btn:hover {
	transform: scale(1.1);
}

.color-btn.active {
	border-color: #fff;
	box-shadow: 0 0 0 2px #488f9b;
}

.image-editor-sizes {
	display: flex;
	gap: 8px;
	align-items: center;
}

.size-btn {
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.15s ease;
	pointer-events: auto !important;
}

.size-btn:hover {
	background: rgba(255, 255, 255, 0.1);
}

.size-btn.active {
	background: rgba(72, 143, 155, 0.3);
	border-color: #488f9b;
}

.size-btn span {
	background: #fff;
	border-radius: 50%;
}

/* 绘制层画布 */
.image-editor-drawing-canvas {
	position: absolute;
	top: 0;
	left: 0;
	cursor: crosshair;
}

/* 新功能红点 */
.tool-new-badge {
	position: absolute;
	top: -4px;
	right: -4px;
	background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
	color: #fff;
	font-size: 8px;
	font-weight: 700;
	padding: 2px 4px;
	border-radius: 6px;
	box-shadow: 0 2px 4px rgba(255, 107, 107, 0.4);
}

/* ========== 新版布局样式 ========== */

/* 头部 */
.image-editor-header {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 60px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 24px;
	background: rgba(30, 41, 46, 0.98);
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	z-index: 20;
}

.image-editor-title {
	font-size: 18px;
	font-weight: 600;
	color: #fff;
}

.image-editor-header-actions {
	display: flex;
	gap: 12px;
}

.image-editor-btn {
	padding: 8px 20px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	border: none;
	transition: all 0.15s ease;
}

.image-editor-btn.primary {
	background: #488f9b;
	color: #fff;
}

.image-editor-btn.primary:hover {
	background: #5ba8b5;
}

.image-editor-btn.secondary {
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
}

.image-editor-btn.secondary:hover {
	background: rgba(255, 255, 255, 0.2);
}

/* 新工具栏布局 */
.toolbar-section {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding-bottom: 8px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.toolbar-section:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.section-label {
	font-size: 11px;
	color: #666;
	text-align: center;
	margin-bottom: 4px;
}

.tool-btn {
	position: relative;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: none;
	border-radius: 10px;
	cursor: pointer;
	color: #333;
	transition: all 0.15s ease;
}

.tool-btn:hover {
	background: rgba(72, 143, 155, 0.1);
}

.tool-btn.active {
	background: rgba(72, 143, 155, 0.15);
	color: #488f9b;
}

.tool-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.tool-btn svg {
	width: 22px;
	height: 22px;
}

/* NEW 红点 */
.new-badge {
	position: absolute;
	top: -2px;
	right: -2px;
	background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
	color: #fff;
	font-size: 7px;
	font-weight: 700;
	padding: 2px 4px;
	border-radius: 4px;
	box-shadow: 0 2px 4px rgba(255, 107, 107, 0.4);
}

/* 颜色选择器 */
.color-picker {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	justify-content: center;
}

.color-picker .color-btn {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	border: 2px solid transparent;
	cursor: pointer;
	transition: all 0.15s ease;
}

.color-picker .color-btn:hover {
	transform: scale(1.1);
}

.color-picker .color-btn.active {
	border-color: #488f9b;
	box-shadow: 0 0 0 2px rgba(72, 143, 155, 0.3);
}

/* 大小选择器 */
.size-picker {
	display: flex;
	gap: 4px;
	justify-content: center;
}

.size-picker .size-btn {
	width: 28px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.15s ease;
}

.size-picker .size-btn:hover {
	background: rgba(72, 143, 155, 0.1);
}

.size-picker .size-btn.active {
	background: rgba(72, 143, 155, 0.15);
	border-color: #488f9b;
}

.size-picker .size-dot {
	background: #333;
	border-radius: 50%;
}

/* HSL 控件 */
.hsl-controls {
	padding: 12px;
}

.slider-group {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-bottom: 12px;
}

.slider-group:last-of-type {
	margin-bottom: 8px;
}

.slider-group label {
	font-size: 11px;
	color: #666;
}

.slider-group input[type="range"] {
	width: 100%;
	height: 6px;
	-webkit-appearance: none;
	background: #ddd;
	border-radius: 3px;
	outline: none;
}

.slider-group input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 14px;
	height: 14px;
	background: #488f9b;
	border-radius: 50%;
	cursor: pointer;
}

/* 滤镜选择器 */
.filter-controls {
	padding: 8px;
}

.filter-picker {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.filter-btn {
	padding: 6px 8px;
	font-size: 11px;
	background: transparent;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.15s ease;
	color: #333;
}

.filter-btn:hover {
	background: rgba(72, 143, 155, 0.1);
}

.filter-btn.active {
	background: rgba(72, 143, 155, 0.15);
	border-color: #488f9b;
	color: #488f9b;
}

/* 状态文字 */
.status-text {
	font-size: 11px;
	color: #666;
	text-align: center;
}

.status-text.error {
	color: #ff4444;
}

/* Canvas 容器 */
.canvas-wrapper {
	position: relative;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.editor-canvas {
	display: block;
}

.editor-canvas.bg-canvas {
	position: absolute;
	top: 0;
	left: 0;
}

.editor-canvas.drawing-canvas {
	position: absolute;
	top: 0;
	left: 0;
}

.editor-canvas.segment-canvas {
	position: absolute;
	top: 0;
	left: 0;
	pointer-events: none;
}

.editor-canvas.overlay-canvas {
	position: relative;
	cursor: crosshair;
}
/**
 * 保存状态指示器样式
 */

.save-status-indicator {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 10px;
	border-radius: 4px;
	font-size: 12px;
	color: rgba(255, 255, 255, 0.8);
	background: rgba(0, 0, 0, 0.3);
	transition: all 0.2s ease;
	user-select: none;
}

.save-status-indicator.compact {
	padding: 4px 6px;
}

.save-status-indicator .status-icon {
	font-size: 10px;
	line-height: 1;
}

.save-status-indicator .status-label {
	font-weight: 500;
}

.save-status-indicator .status-time {
	opacity: 0.7;
	font-size: 11px;
}

.save-status-indicator .status-retry {
	font-size: 10px;
	background: rgba(255, 100, 100, 0.3);
	padding: 1px 4px;
	border-radius: 2px;
}

/* 已保存状态 */
.save-status-indicator.synced {
	color: rgba(100, 255, 100, 0.9);
}

.save-status-indicator.synced .status-icon {
	color: #4CAF50;
}

/* 保存中状态 */
.save-status-indicator.syncing {
	color: rgba(100, 200, 255, 0.9);
}

.save-status-indicator.syncing .status-icon {
	animation: pulse 1s infinite;
	color: #2196F3;
}

@keyframes pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.4; }
}

/* 待保存状态 */
.save-status-indicator.pending {
	color: rgba(255, 200, 100, 0.9);
}

.save-status-indicator.pending .status-icon {
	color: #FF9800;
}

/* 离线状态 */
.save-status-indicator.offline {
	color: rgba(150, 150, 150, 0.9);
}

.save-status-indicator.offline .status-icon {
	font-size: 12px;
}

/* 错误状态 */
.save-status-indicator.error {
	color: rgba(255, 100, 100, 0.9);
	cursor: pointer;
}

.save-status-indicator.error:hover {
	background: rgba(255, 100, 100, 0.2);
}

.save-status-indicator.error .status-icon {
	color: #F44336;
}
/**
 * CanvasHeader 样式
 * 精确还原 Figma 设计稿的视觉效果
 */

.canvas-header {
	/* 定位：固定在顶部居中 */
	position: fixed;
	top: 12px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 1000;

	/* 尺寸 */
	width: 820px;
	height: 48px;

	/* 视觉效果 */
	background: rgba(255, 255, 255, 0.9);
	box-shadow: 0px 4px 20px 1px rgba(0, 0, 0, 0.1);
	backdrop-filter: blur(45px);
	-webkit-backdrop-filter: blur(45px);
	border-radius: 25px;

	/* 防止用户选中文本 */
	user-select: none;
	-webkit-user-select: none;

	/* 过渡动画 */
	transition: all 0.3s ease;
}

.canvas-header__tablist {
	/* 定位 */
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);

	/* 布局 */
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;

	/* 尺寸 */
	height: 36px;
	padding: 0 24px 0 40px;

	/* 视觉效果 */
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border-radius: 23px;
}

.canvas-header__tab {
	/* 重置按钮样式 */
	border: none;
	outline: none;
	background: transparent;
	cursor: pointer;
	padding: 0;

	/* 布局 */
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;

	/* 尺寸 */
	height: 34px;
	min-width: 113px;
	padding: 9px 17px 9px 18px;

	/* 字体 */
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	font-size: 14px;
	font-weight: 500;
	line-height: 20px;
	text-align: center;
	white-space: nowrap;

	/* 视觉效果 */
	border-radius: 24px;
	color: #4d8f9d;
	transition: all 0.2s ease;
}

/* 激活状态 */
.canvas-header__tab--active {
	background-color: #4d8f9d;
	color: #ffffff;
	font-weight: 700;
}

/* 悬停状态 */
.canvas-header__tab:hover:not(.canvas-header__tab--active) {
	background-color: rgba(77, 143, 157, 0.1);
}

.canvas-header__tab:active {
	transform: scale(0.98);
}

.canvas-header__tab-label {
	flex: 0 0 auto;
}

.canvas-header__tab-close {
	/* 重置按钮样式 */
	border: none;
	outline: none;
	background: transparent;
	cursor: pointer;
	padding: 0;

	/* 布局 */
	display: flex;
	align-items: center;
	justify-content: center;

	/* 尺寸 */
	width: 18px;
	height: 18px;

	/* 视觉效果 */
	border-radius: 50%;
	color: currentColor;
	opacity: 0.7;
	transition: all 0.2s ease;
}

.canvas-header__tab-close:hover {
	opacity: 1;
	background-color: rgba(0, 0, 0, 0.1);
}

.canvas-header__tab--active .canvas-header__tab-close:hover {
	background-color: rgba(255, 255, 255, 0.2);
}

.canvas-header__tab-close:active {
	transform: scale(0.9);
}

/* 响应式：平板 */
@media (max-width: 1024px) {
	.canvas-header {
		width: calc(100% - 32px);
		max-width: 820px;
		left: 16px;
		right: 16px;
		transform: none;
	}

	.canvas-header__tablist {
		padding: 0 16px;
		gap: 12px;
	}

	.canvas-header__tab {
		min-width: auto;
		padding: 9px 14px;
		font-size: 13px;
	}
}

/* 响应式：手机 */
@media (max-width: 768px) {
	.canvas-header {
		width: calc(100% - 16px);
		left: 8px;
		right: 8px;
		height: 44px;
		top: 8px;
	}

	.canvas-header__tablist {
		padding: 0 8px;
		gap: 8px;
	}

	.canvas-header__tab {
		min-width: auto;
		padding: 8px 12px;
		font-size: 12px;
		gap: 4px;
	}

	.canvas-header__tab-label {
		/* 在手机上截断过长的文本 */
		max-width: 80px;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.canvas-header__tab-close {
		width: 16px;
		height: 16px;
	}
}

/* 暗黑模式支持 */
@media (prefers-color-scheme: dark) {
	.canvas-header {
		background: rgba(30, 30, 30, 0.9);
		box-shadow: 0px 4px 20px 1px rgba(0, 0, 0, 0.3);
	}

	.canvas-header__tab:hover:not(.canvas-header__tab--active) {
		background-color: rgba(77, 143, 157, 0.15);
	}
}

/* 键盘导航焦点样式 */
.canvas-header__tab:focus-visible {
	outline: 2px solid #4d8f9d;
	outline-offset: 2px;
}

.canvas-header__tab-close:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 1px;
}
/**
 * CanvasToolbar 样式 - 按照 Figma 设计稿
 * 白色背景 + 阴影效果
 */

/* ========== 工具栏容器 ========== */
.canvas-toolbar {
	position: fixed;
	left: 19px;
	top: 50%;
	transform: translateY(-50%);
	z-index: 500;

	/* 布局 */
	display: flex;
	flex-direction: column;
	width: 52px;
	padding: 8px;

	/* 视觉效果 - 白色背景 + 阴影 */
	background: #FFFFFF;
	box-shadow:
		0px 2px 8px 0px rgba(0, 0, 0, 0.08),
		0px 4px 20px 0px rgba(0, 0, 0, 0.12);
	border-radius: 16px;

	/* 指针事件 */
	pointer-events: all;

	/* 偏移动画 */
	transition: left 0.3s ease;
}

/* 左侧边栏打开时的偏移样式 */
.canvas-toolbar--offset {
	left: 280px; /* 8px + 260px + 12px */
}

/* ========== 工具按钮列表 ========== */
.canvas-toolbar__tools {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

/* ========== 单个工具按钮 ========== */
.canvas-toolbar__tool {
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;

	/* 基础样式 */
	background: transparent;
	border: none;
	border-radius: 8px;
	color: #333;
	cursor: pointer;
	transition: all 0.2s ease;
}

.canvas-toolbar__tool:hover {
	background-color: rgba(77, 143, 157, 0.08);
}

.canvas-toolbar__tool--active {
	background-color: rgba(77, 143, 157, 0.15);
	color: #4d8f9d;
}

.canvas-toolbar__tool--active:hover {
	background-color: rgba(77, 143, 157, 0.2);
}

/* 录音状态 - 红色指示 */
.canvas-toolbar__tool--recording {
	background-color: rgba(255, 68, 68, 0.15);
	animation: pulse-recording 1.5s ease-in-out infinite;
}

.canvas-toolbar__tool--recording:hover {
	background-color: rgba(255, 68, 68, 0.25);
}

@keyframes pulse-recording {
	0%, 100% {
		box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.4);
	}
	50% {
		box-shadow: 0 0 0 8px rgba(255, 68, 68, 0);
	}
}

.canvas-toolbar__tool:active {
	transform: scale(0.95);
}

.canvas-toolbar__tool:focus-visible {
	outline: 2px solid #4d8f9d;
	outline-offset: 2px;
}

/* ========== 工具图标 ========== */
.canvas-toolbar__tool-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
}

.canvas-toolbar__tool-icon svg {
	width: 20px;
	height: 20px;
}

/* ========== 工具提示 ========== */
.canvas-toolbar__tooltip {
	position: absolute;
	left: calc(100% + 12px);
	top: 50%;
	transform: translateY(-50%);
	
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	
	background: #FFFFFF;
	border-radius: 8px;
	box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.15);
	
	white-space: nowrap;
	z-index: 100;
	
	animation: tooltipFadeIn 0.15s ease;
}

@keyframes tooltipFadeIn {
	from {
		opacity: 0;
		transform: translateY(-50%) translateX(-4px);
	}
	to {
		opacity: 1;
		transform: translateY(-50%) translateX(0);
	}
}

.canvas-toolbar__tooltip-label {
	font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 13px;
	font-weight: 500;
	color: #333;
}

.canvas-toolbar__tooltip-shortcut {
	font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 11px;
	font-weight: 500;
	color: #999;
	padding: 2px 6px;
	background: #f5f5f5;
	border-radius: 4px;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
	.canvas-toolbar {
		left: 12px;
		width: 44px;
		padding: 6px;
	}

	.canvas-toolbar__tool {
		width: 32px;
		height: 32px;
	}

	.canvas-toolbar__tool-icon svg {
		width: 18px;
		height: 18px;
	}
}

/* ========== 图层按钮（左下角独立） ========== */
.canvas-layer-btn {
	position: fixed;
	left: 19px;
	bottom: 24px;
	z-index: 500;

	/* 布局 */
	width: 34px;
	height: 34px;
	display: flex;
	align-items: center;
	justify-content: center;

	/* 视觉效果 - 白色背景 + 阴影 */
	background: #FFFFFF;
	border: none;
	border-radius: 12px;
	box-shadow:
		0px 2px 8px 0px rgba(0, 0, 0, 0.08),
		0px 4px 20px 0px rgba(0, 0, 0, 0.12);

	/* 交互 */
	cursor: pointer;
	pointer-events: all;
	transition: all 0.2s ease;
}

.canvas-layer-btn:hover {
	background: #f5f5f5;
	transform: scale(1.05);
}

.canvas-layer-btn:active {
	transform: scale(0.95);
}

.canvas-layer-btn svg {
	width: 18px;
	height: 18px;
	color: #333;
}
/**
 * CanvasZoomControl 样式
 * 白色背景 + 阴影效果
 */

.canvas-zoom-control {
	/* 定位：固定在左下角，图层按钮右侧 */
	position: fixed;
	left: 71px;
	bottom: 24px;
	z-index: 500;

	/* 尺寸 */
	width: 99px;
	height: 34px;

	/* 视觉效果 - 白色背景 + 阴影 */
	background: #FFFFFF;
	border: none;
	box-shadow:
		0px 2px 8px 0px rgba(0, 0, 0, 0.08),
		0px 4px 20px 0px rgba(0, 0, 0, 0.12);
	border-radius: 12px;

	/* 防止用户选中 */
	user-select: none;
	-webkit-user-select: none;

	/* 过渡动画 */
	transition: all 0.3s ease;

	/* 指针事件 */
	pointer-events: all;
}

/* 左侧边栏打开时的偏移样式 */
.canvas-zoom-control--offset {
	left: 280px; /* 8px + 260px + 12px */
}

.canvas-zoom-control__inner {
	/* 布局 */
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 4px;
	padding: 3px 8px;
	margin: 3px;

	/* 尺寸 */
	height: 28px;

	/* 视觉效果 */
	background: transparent;
	border-radius: 24px;
}

.canvas-zoom-control__button {
	/* 重置按钮样式 */
	border: none;
	outline: none;
	background: transparent;
	cursor: pointer;
	padding: 0;
	margin: 0;

	/* 布局 */
	display: flex;
	align-items: center;
	justify-content: center;

	/* 尺寸 */
	width: 18px;
	height: 18px;

	/* 视觉效果 */
	color: #2f3640;
	border-radius: 4px;
	transition: all 0.2s ease;
}

.canvas-zoom-control__button:hover:not(:disabled) {
	background-color: rgba(77, 143, 157, 0.1);
	color: #4d8f9d;
	transform: scale(1.1);
}

.canvas-zoom-control__button:active:not(:disabled) {
	transform: scale(0.95);
}

.canvas-zoom-control__button:disabled {
	opacity: 0.3;
	cursor: not-allowed;
}

.canvas-zoom-control__percent {
	/* 重置按钮样式 */
	border: none;
	outline: none;
	background: transparent;
	cursor: pointer;
	padding: 0;
	margin: 0;

	/* 布局 */
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 1;

	/* 字体 */
	font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	font-size: 12px;
	line-height: 16px;
	color: #2f3640;
	text-align: center;

	/* 视觉效果 */
	min-width: 26px;
	height: 16px;
	border-radius: 4px;
	transition: all 0.2s ease;
}

.canvas-zoom-control__percent:hover {
	background-color: rgba(77, 143, 157, 0.05);
	color: #4d8f9d;
}

.canvas-zoom-control__percent:active {
	transform: scale(0.95);
}

/* 响应式：平板 */
@media (max-width: 1024px) {
	.canvas-zoom-control {
		left: 50%;
		transform: translateX(-50%);
		bottom: 20px;
	}
}

/* 响应式：手机 */
@media (max-width: 768px) {
	.canvas-zoom-control {
		left: 50%;
		transform: translateX(-50%);
		bottom: 80px; /* 底部留出更多空间给聊天输入框 */
		width: 90px;
		height: 32px;
	}

	.canvas-zoom-control__inner {
		width: 78px;
		height: 26px;
		padding: 4px 6px;
		gap: 3px;
	}

	.canvas-zoom-control__button {
		width: 16px;
		height: 16px;
	}

	.canvas-zoom-control__percent {
		font-size: 11px;
		min-width: 24px;
	}
}

/* 暗黑模式已禁用 - 保持白色背景 */

/* 键盘导航焦点样式 */
.canvas-zoom-control__button:focus-visible,
.canvas-zoom-control__percent:focus-visible {
	outline: 2px solid #4d8f9d;
	outline-offset: 2px;
}
/**
 * CanvasInitialLayout 样式
 */

.canvas-initial-layout__loading {
	/* 全屏居中 */
	position: fixed;
	inset: 0;
	z-index: 9999;

	/* 布局 */
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 16px;

	/* 🔑 完全透明背景，避免闪烁 */
	background: transparent;
	pointer-events: none;

	/* 文字样式 */
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	font-size: 14px;
	color: transparent;
}

.canvas-initial-layout__spinner {
	/* 🔑 隐藏 spinner，避免闪烁 */
	display: none;
}

/* ========== 图层按钮（左下角独立） ========== */
.canvas-layer-btn {
	position: fixed;
	left: 19px;
	bottom: 24px;
	z-index: 500;

	/* 布局 */
	width: 34px;
	height: 34px;
	display: flex;
	align-items: center;
	justify-content: center;

	/* 视觉效果 - 白色背景 + 阴影 */
	background: #FFFFFF;
	border: none;
	border-radius: 12px;
	box-shadow:
		0px 2px 8px 0px rgba(0, 0, 0, 0.08),
		0px 4px 20px 0px rgba(0, 0, 0, 0.12);

	/* 交互 */
	cursor: pointer;
	pointer-events: all;
	transition: all 0.2s ease;
}

.canvas-layer-btn:hover {
	background: #f5f5f5;
	transform: scale(1.05);
}

.canvas-layer-btn:active {
	transform: scale(0.95);
}

.canvas-layer-btn svg {
	width: 18px;
	height: 18px;
	color: #333;
}

/* 暗黑模式 */
@media (prefers-color-scheme: dark) {
	.canvas-initial-layout__loading {
		background: rgba(30, 30, 30, 0.95);
		color: #ccc;
	}

	.canvas-initial-layout__spinner {
		border-color: rgba(77, 143, 157, 0.3);
		border-top-color: #6db9ca;
	}
}
/* FramePreviewButton - 预览按钮样式 */

.frame-preview-btn {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 8px;
	margin-left: 8px;
	background: rgba(99, 102, 241, 0.1);
	border: 1px solid rgba(99, 102, 241, 0.3);
	border-radius: 4px;
	color: #6366f1;
	font-size: 12px;
	cursor: pointer;
	transition: all 0.2s;
	font-family: inherit;
}

.frame-preview-btn:hover:not(:disabled) {
	background: rgba(99, 102, 241, 0.2);
	border-color: rgba(99, 102, 241, 0.5);
	transform: translateY(-1px);
}

.frame-preview-btn:active:not(:disabled) {
	transform: translateY(0);
}

.frame-preview-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.frame-preview-btn.loading {
	background: rgba(99, 102, 241, 0.2);
	border-color: rgba(99, 102, 241, 0.5);
}

.frame-preview-btn svg {
	flex-shrink: 0;
}

.frame-preview-btn .spinning {
	animation: spin 1s linear infinite;
}

@keyframes spin {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

.frame-preview-btn span {
	white-space: nowrap;
}
/**
 * FrameLabels 样式
 * 自定义 Frame 标签显示
 */

.frame-labels-overlay {
	position: absolute;
	top: 0;
	left: 0;
	pointer-events: none;
	z-index: 100;
}

.frame-label-container {
	position: absolute;
	display: flex;
	justify-content: space-between;
	align-items: center;
	height: 20px;
	pointer-events: none;
	user-select: none;
}

.frame-label-name {
	display: flex;
	align-items: center;
	gap: 6px;
	color: #919191;
	font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 14px;
	font-weight: 400;
	line-height: 16px;
	white-space: nowrap;
}

.frame-label-name svg {
	color: #919191;
	flex-shrink: 0;
}

.frame-label-size {
	display: flex;
	align-items: center;
	gap: 8px;
	color: rgba(51, 51, 51, 0.6);
	font-family: Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 14px;
	font-weight: 400;
	line-height: 16px;
	white-space: nowrap;
	text-align: right;
}

/* 预览按钮需要可点击 */
.frame-label-size .frame-preview-btn {
	pointer-events: auto;
}
/**
 * LeftSidebar 样式 - 按照 Figma 设计稿
 * 设计稿节点: 1:345 Background+Border+OverlayBlur
 */

/* ========== 边栏容器 ========== */
.left-sidebar {
	position: fixed;
	left: 8px;
	top: 8px;
	width: 260px;
	height: calc(100vh - 16px); /* 884px in Figma, use viewport */
	z-index: 300;

	/* 视觉效果 - 毛玻璃 (Figma: rgba(255, 255, 255, 0.95) + blur(8px)) */
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border-radius: 12px;
	box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.05);

	/* 布局 */
	display: flex;
	flex-direction: column;
	overflow: hidden;

	/* 指针事件 */
	pointer-events: all;

	/* 字体 */
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

/* ========== 收起按钮 (Figma: 1:342) ========== */
.left-sidebar__collapse-btn {
	position: absolute;
	left: 12px;
	bottom: 12px;
	width: 32px;
	height: 32px;
	
	display: flex;
	align-items: center;
	justify-content: center;

	/* 毛玻璃效果 */
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border: none;
	border-radius: 50%;
	box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1);

	color: #666;
	cursor: pointer;
	transition: all 0.2s ease;
	z-index: 10;
}

.left-sidebar__collapse-btn:hover {
	background: #f0f0f0;
	color: #333;
	transform: scale(1.05);
}

.left-sidebar__collapse-btn:active {
	transform: scale(0.95);
}

/* ========== 素材库容器 ========== */
.left-sidebar__material {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	min-height: 0;
	flex-shrink: 0;
}

/* ========== 可拖动的分隔条 ========== */
.left-sidebar__resizer {
	height: 12px;
	cursor: ns-resize;
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	transition: background 0.2s ease;
	flex-shrink: 0;
	user-select: none;
}

.left-sidebar__resizer:hover {
	background: rgba(77, 143, 157, 0.1);
}

.left-sidebar__resizer-handle {
	width: 40px;
	height: 4px;
	background: #ddd;
	border-radius: 2px;
	transition: background 0.2s ease;
}

.left-sidebar__resizer:hover .left-sidebar__resizer-handle {
	background: #4D8F9D;
}

/* 拖动状态 */
.left-sidebar--dragging {
	cursor: ns-resize;
	user-select: none;
}

.left-sidebar--dragging .left-sidebar__resizer-handle {
	background: #4D8F9D;
}

/* ========== 图层面板容器 ========== */
.left-sidebar__layer {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	min-height: 0;
	border-top: 1px solid #E5E6EC;
	padding-bottom: 50px; /* 为收起按钮留空间 */
}

/* ========== 素材库区域 ========== */
.material-library {
	flex: 1;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	min-height: 0; /* 确保 flex 子元素可以正确收缩 */
}

/* 标签栏 - Figma: 1:347 HorizontalBorder */
.material-library__tabs {
	display: flex;
	align-items: center;
	height: 48px;
	min-height: 48px;
	padding: 0 12px;
	border-bottom: 1px solid #E5E6EC;
	gap: 16px;
	position: relative;
}

/* 单个标签 - Figma: fontSize 12px, fontWeight 500/700 */
.material-library__tab {
	padding: 4px 8px;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'PingFang SC', sans-serif;
	font-size: 12px;
	font-weight: 500;
	line-height: 20px;
	color: #2F3640;
	background: transparent;
	border: none;
	border-radius: 3px;
	cursor: pointer;
	transition: all 0.2s ease;
	white-space: nowrap;
}

.material-library__tab:hover {
	background: #f5f5f5;
}

/* 激活状态 - Figma: color #4D8F9D, fontWeight 700, background #F5F5F5 */
.material-library__tab--active {
	color: #4D8F9D;
	font-weight: 700;
	background: #F5F5F5;
}

/* 图片网格 - 使用 columns 实现瀑布流布局 */
.material-library__grid {
	flex: 1;
	overflow-y: auto;
	overflow-x: hidden;
	padding: 12px;
	/* 瀑布流布局 */
	column-count: 2;
	column-gap: 12px;
	min-height: 0; /* 确保可以滚动 */
}

/* 滚动条样式 */
.material-library__grid::-webkit-scrollbar {
	width: 6px;
}

.material-library__grid::-webkit-scrollbar-track {
	background: transparent;
	border-radius: 3px;
}

.material-library__grid::-webkit-scrollbar-thumb {
	background: #d1d1d1;
	border-radius: 3px;
}

.material-library__grid::-webkit-scrollbar-thumb:hover {
	background: #b0b0b0;
}

/* 单个图片项 - Figma: borderRadius 5px, border 1px solid #DCDCDC */
.material-library__item {
	position: relative;
	border-radius: 5px;
	overflow: hidden;
	border: 1px solid #DCDCDC;
	cursor: pointer;
	transition: all 0.2s ease;
	background: #fafafa;
	/* 瀑布流布局：防止跨列断裂 */
	break-inside: avoid;
	margin-bottom: 12px;
	/* 显示为inline-block以确保宽width生效 */
	display: inline-block;
	width: 100%;
}

/* 图片加载完成后，保持自然高度 */
.material-library__item--loaded {
	/* 图片加载完成，无需特殊处理 */
}

/* 选中状态 - Figma: border #4D8F9D */
.material-library__item:hover {
	border-color: #4D8F9D;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.material-library__item--selected {
	border-color: #4D8F9D;
	border-width: 2px;
}

.material-library__item img {
	width: 100%;
	height: auto;
	display: block;
	object-fit: cover;
}

/* 图片占位符 - 骨架屏动画 */
.material-library__item-placeholder {
	width: 100%;
	min-height: 80px;
	padding-bottom: 75%; /* 保持 4:3 占位比例 */
	background: linear-gradient(90deg, #f5f5f5 25%, #ebebeb 50%, #f5f5f5 75%);
	background-size: 200% 100%;
	animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
	0% { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

/* 图片加载失败 */
.material-library__item-error {
	width: 100%;
	height: 60px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #999;
	font-size: 11px;
	background: #f9f9f9;
}

/* 加载状态 */
.material-library__loading {
	column-span: all;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px;
	color: #999;
	font-size: 13px;
}

.material-library__empty {
	column-span: all;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px;
	color: #999;
	font-size: 13px;
}

/* ========== 图层面板区域 ========== */
.layer-panel {
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
}

/* 标题栏 - Figma: height 48px, border #E5E6EC */
.layer-panel__header {
	display: flex;
	align-items: center;
	height: 48px;
	min-height: 48px;
	padding: 0 16px;
	border-bottom: 1px solid #E5E6EC;
	flex-shrink: 0;
}

/* 图层标题 - Figma: fontSize 12px, fontWeight 500, color #2F3640 */
.layer-panel__title {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'PingFang SC', sans-serif;
	font-size: 12px;
	font-weight: 500;
	line-height: 20px;
	color: #2F3640;
}

/* 图层列表 */
.layer-panel__list {
	flex: 1;
	overflow-y: auto;
	padding: 4px 0;
}

.layer-panel__list::-webkit-scrollbar {
	width: 4px;
}

.layer-panel__list::-webkit-scrollbar-track {
	background: transparent;
}

.layer-panel__list::-webkit-scrollbar-thumb {
	background: #ddd;
	border-radius: 2px;
}

/* 图层项 */
.layer-panel__item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 6px 12px;
	cursor: pointer;
	transition: background 0.15s ease;
}

.layer-panel__item:hover {
	background: rgba(0, 0, 0, 0.03);
}

.layer-panel__item--selected {
	background: #E8F4FE;
}

.layer-panel__item--child-selected {
	background: #F3F9FE;
}

.layer-panel__item--hidden {
	opacity: 0.5;
}

.layer-panel__item-name {
	flex: 1;
	font-size: 12px;
	color: #333;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.layer-panel__item-name-input {
	flex: 1;
	font-size: 12px;
	border: none;
	background: transparent;
	padding: 0;
	outline: none;
}

.layer-panel__visibility-btn {
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	color: #999;
	flex-shrink: 0;
}

.layer-panel__visibility-btn:hover {
	background: rgba(0, 0, 0, 0.05);
	color: #666;
}

.layer-panel__empty {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	color: #999;
	font-size: 12px;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
	.left-sidebar {
		width: 240px;
	}
}
/* ==================== Agent Chat 样式（基于Figma设计稿）==================== */

.agent-chat-container {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: linear-gradient(180deg, #FFFFFF 0%, #E8EEF5 100%);
	border-radius: 12px;
}

.agent-messages {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
	padding-bottom: 218px; /* 排除input-area和frame选中状态条高度 */
	display: flex;
	flex-direction: column;
	gap: 12px;
	/* 确保独立滚动区域 */
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
}

/* ==================== 消息气泡 ==================== */
.message-wrapper {
	display: flex;
	animation: slideUpFade 0.3s ease-out;
}

.message-wrapper.user {
	justify-content: flex-end;
}

.message-wrapper.assistant,
.message-wrapper.system {
	justify-content: flex-start;
}

.message-bubble {
	max-width: 85%;
	padding: 12px 16px;
	border-radius: 12px;
	font-size: 14px;
	line-height: 1.6;
	color: #2F3640;
	word-wrap: break-word;
	
	/* 关键修复：允许选中和复制 */
	user-select: text;
	-webkit-user-select: text;
	-moz-user-select: text;
	-ms-user-select: text;
	cursor: text;
}

.message-wrapper.user .message-bubble {
	background: #F7F7F7;
	color: #363636;
}

/* AI回复样式（根据Figma：无背景） */
.message-wrapper.assistant .message-bubble {
	background: transparent; /* 关键修复：移除白色背景 */
	border: none; /* 移除边框 */
	box-shadow: none; /* 移除阴影 */
	padding: 0 16px; /* 左右16px留白 */
	color: #2F3640; /* 按Figma色值 */
	font-size: 14px;
	line-height: 23px; /* 按Figma行高 */
	max-width: 100%;
	width: 100%;
	box-sizing: border-box;
}

.message-wrapper.system .message-bubble {
	background: rgba(82, 109, 135, 0.1);
	font-size: 13px;
	color: #6B7280;
	text-align: center;
}

/* ==================== Markdown 内容 ==================== */
.markdown-content {
	font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.markdown-content p {
	margin: 8px 0;
}

.markdown-content code {
	background: rgba(0, 0, 0, 0.05);
	padding: 2px 6px;
	border-radius: 4px;
	font-size: 13px;
	font-family: 'Monaco', 'Courier New', monospace;
}

.markdown-content pre {
	background: #F5F5F5;
	padding: 12px;
	border-radius: 8px;
	overflow-x: auto;
	margin: 12px 0;
}

.markdown-content pre code {
	background: none;
	padding: 0;
}

.markdown-content img {
	max-width: 100%;
	border-radius: 8px;
	margin: 12px 0;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Markdown内容可选中 */
.markdown-content,
.markdown-content *,
.markdown-content pre,
.markdown-content code {
	user-select: text;
	-webkit-user-select: text;
	cursor: text;
}

/* ==================== 方案选择卡片 ==================== */
.plan-options {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-top: 8px;
}

.plan-option-card {
	background: #FFFFFF;
	border: 2px solid #E1E1E1;
	border-radius: 12px;
	padding: 16px;
	cursor: pointer;
	transition: all 0.2s ease;
	box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.08);
}

.plan-option-card:hover {
	border-color: #4D8F9D;
	box-shadow: 0 4px 12px rgba(77, 143, 157, 0.2);
	transform: translateY(-2px);
}

.plan-header {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
}

.plan-number {
	background: linear-gradient(135deg, #4D8F9D 0%, #3A6D7A 100%);
	color: white;
	font-size: 12px;
	font-weight: 600;
	padding: 4px 10px;
	border-radius: 12px;
}

.plan-header h4 {
	font-size: 15px;
	font-weight: 600;
	color: #2F3640;
	margin: 0;
}

.plan-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 8px;
}

.plan-tag {
	background: rgba(77, 143, 157, 0.1);
	color: #4D8F9D;
	font-size: 12px;
	padding: 4px 10px;
	border-radius: 8px;
	font-weight: 500;
}

.plan-description {
	font-size: 14px;
	color: #2F3640;
	line-height: 1.5;
	margin: 8px 0;
	white-space: pre-line;
}

.plan-reason {
	font-size: 13px;
	color: #6B7280;
	line-height: 1.4;
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px solid #E1E1E1;
}

.plan-reason strong {
	color: #2F3640;
}

/* ==================== 工具调用卡片 ==================== */
.tool-calls-section {
	margin-top: 12px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.tool-call-card {
	background: rgba(82, 109, 135, 0.1);
	border: 1px solid rgba(225, 225, 225, 0.5);
	border-radius: 12px;
	transition: all 0.2s ease;
}

.tool-call-card:hover {
	border-color: #4D8F9D;
	box-shadow: 0 2px 8px rgba(77, 143, 157, 0.15);
}

.tool-call-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px;
	cursor: pointer;
	gap: 8px;
}

.tool-call-header:hover {
	background: rgba(77, 143, 157, 0.05);
}

.tool-call-title {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 1;
}

.tool-call-icon {
	background: linear-gradient(135deg, #4D8F9D 0%, #3A6D7A 100%);
	padding: 8px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	box-shadow: 0 2px 4px rgba(77, 143, 157, 0.3);
}

.tool-call-icon svg {
	width: 16px;
	height: 16px;
	color: white;
	stroke: white;
}

.tool-call-name {
	font-size: 14px;
	font-weight: 600;
	color: #2F3640;
}

.tool-call-badge {
	font-size: 11px;
	color: white;
	background: linear-gradient(135deg, #4D8F9D 0%, #3A6D7A 100%);
	padding: 4px 10px;
	border-radius: 12px;
	font-weight: 500;
	display: flex;
	align-items: center;
	gap: 6px;
}

.tool-call-badge.success {
	background: linear-gradient(135deg, #10B981 0%, #059669 100%);
}

.tool-call-badge.error {
	background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
}

.tool-call-expand svg {
	stroke: #A4A9B2;
	transition: transform 0.2s ease;
}

.tool-call-expand.expanded svg {
	stroke: #4D8F9D;
	transform: rotate(180deg);
}

.tool-call-result {
	padding: 12px 16px;
	border-top: 1px solid rgba(225, 225, 225, 0.5);
	background: rgba(255, 255, 255, 0.5);
}

.tool-call-result pre {
	background: #F5F5F5;
	padding: 12px;
	border-radius: 8px;
	overflow-x: auto;
	margin: 0;
	font-size: 13px;
}

.tool-call-result code {
	font-family: 'Monaco', 'Courier New', monospace;
	color: #2F3640;
}

/* ==================== 工具执行进度条 ==================== */
.tool-progress {
	width: 100%;
	height: 4px;
	background: rgba(225, 225, 225, 0.5);
	border-radius: 2px;
	overflow: hidden;
	margin-top: 8px;
	display: none;
}

.tool-progress.show {
	display: block;
}

.tool-progress-bar {
	height: 100%;
	background: linear-gradient(90deg, #4D8F9D 0%, #3A6D7A 100%);
	border-radius: 2px;
	width: 0%;
	transition: width 0.3s ease;
}

.tool-progress-bar.animate {
	width: 60%;
	animation: progressPulse 1.5s ease-in-out infinite;
}

@keyframes progressPulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.7; }
}

/* ==================== 小型加载动画 ==================== */
.spinner-sm {
	display: inline-block;
	width: 12px;
	height: 12px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-top-color: white;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

@keyframes spin {
	to { transform: rotate(360deg); }
}

/* ==================== 滑入动画 ==================== */
@keyframes slideUpFade {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ==================== AI思考动画 ==================== */
.thinking-bubble {
	background: rgba(82, 109, 135, 0.08);
	border: 1px solid rgba(225, 225, 225, 0.5);
	border-radius: 12px;
	padding: 16px;
	animation: fadeIn 0.3s ease-out;
}

.thinking-header {
	display: flex;
	align-items: flex-start;
	gap: 12px;
}

.thinking-icon {
	font-size: 24px;
	line-height: 1;
}

.thinking-text {
	flex: 1;
}

.thinking-title {
	font-size: 14px;
	font-weight: 600;
	color: #2F3640;
	margin: 0 0 4px 0;
}

.thinking-subtitle {
	font-size: 13px;
	color: #6B7280;
	margin: 0;
}

.thinking-progress {
	width: 100%;
	height: 4px;
	background: rgba(225, 225, 225, 0.5);
	border-radius: 2px;
	overflow: hidden;
	margin-top: 12px;
}

.thinking-progress-bar {
	height: 100%;
	background: linear-gradient(90deg, #4D8F9D 0%, #3A6D7A 100%);
	border-radius: 2px;
	width: 0%;
	animation: thinkingProgress 2s ease-in-out infinite;
}

@keyframes thinkingProgress {
	0% { width: 0%; }
	50% { width: 70%; }
	100% { width: 100%; opacity: 0.3; }
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ==================== 流式响应指示器 ==================== */
.message-bubble.streaming {
	position: relative;
}

.streaming-indicator {
	position: absolute;
	bottom: 12px;
	right: 12px;
	color: #4D8F9D;
	font-size: 18px;
	animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.3; }
}

/* ==================== 滚动条样式 ==================== */
.agent-messages::-webkit-scrollbar {
	width: 6px;
}

.agent-messages::-webkit-scrollbar-track {
	background: transparent;
}

.agent-messages::-webkit-scrollbar-thumb {
	background: rgba(0, 0, 0, 0.2);
	border-radius: 3px;
}

.agent-messages::-webkit-scrollbar-thumb:hover {
	background: rgba(0, 0, 0, 0.3);
}

/* ==================== 图片操作按钮 ==================== */
.chat-image-wrapper {
	position: relative;
	margin: 8px 0;
	display: inline-block;
}

.chat-image-wrapper img {
	transition: transform 0.2s, box-shadow 0.2s;
}

.chat-image-wrapper:hover img {
	transform: scale(1.02);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.chat-image-actions {
	position: absolute;
	bottom: 8px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 8px;
	padding: 4px;
	background: rgba(0, 0, 0, 0.75);
	border-radius: 8px;
	opacity: 0;
	transition: opacity 0.2s;
}

.chat-image-wrapper:hover .chat-image-actions {
	opacity: 1;
}

.chat-image-btn {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 6px 12px;
	border: none;
	border-radius: 6px;
	background: rgba(255, 255, 255, 0.15);
	color: white;
	font-size: 12px;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.2s;
}

.chat-image-btn:hover {
	background: rgba(255, 255, 255, 0.25);
}

.chat-image-btn svg {
	width: 14px;
	height: 14px;
	flex-shrink: 0;
}

.chat-image-btn.chat-image-insert {
	background: #4F46E5;
}

.chat-image-btn.chat-image-insert:hover {
	background: #4338CA;
}

.chat-image-btn.inserted {
	background: #10B981 !important;
}
/**
 * RightSidebar 样式 - 按照 Figma 设计稿实现
 * 宽度: 300px
 * 背景: 渐变 + 毛玻璃
 * 圆角: 12px
 */

.right-sidebar {
	position: fixed;
	top: 12px;
	right: 16px;
	bottom: 12px;
	width: 300px;
	background: linear-gradient(180deg, #FFFFFF 0%, #E8EEF5 100%);
	border: 1px solid #E1E1E1;
	border-radius: 12px;
	box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.15);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	display: flex;
	flex-direction: column;
	z-index: 600;
	/* 关键修复4：右边栏主容器禁止滚动，只让内部消息列表滚动 */
	overflow: visible;
	animation: slideInRight 0.25s ease;
	/* 确保可以交互和选择文本 */
	pointer-events: auto;
	user-select: text;
	-webkit-user-select: text;
	-moz-user-select: text;
	-ms-user-select: text;
	/* 宽度动画过渡 */
	transition: width 0.3s ease-out;
}

/* 展开状态 - 40%宽度 */
.right-sidebar--expanded {
	width: 40vw;
	min-width: 400px;
	max-width: 800px;
}

@keyframes slideInRight {
	from {
		opacity: 0;
		transform: translateX(20px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

/* ========== 头部区域 ========== */
.right-sidebar__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 11px 18px 10px 17px;
	border-bottom: 1px solid #E1E1E1;
	/* 关键修复4：固定头部，防止被滚动 */
	flex-shrink: 0;
	position: sticky;
	top: 0;
	background: linear-gradient(180deg, #FFFFFF 0%, #E8EEF5 100%);
	z-index: 10;
}

.right-sidebar__header-left {
	width: 27px;
	height: 28px;
}

.right-sidebar__avatar {
	width: 27px;
	height: 27px;
	border-radius: 50%;
	object-fit: cover;
}

.right-sidebar__header-center {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 1;
	padding-left: 12px;
}

.right-sidebar__title-wrapper {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 1;
}

.right-sidebar__title {
	font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 14px;
	font-weight: 600;
	color: #2B2F36;
	line-height: 20px;
}

/* WebSocket 连接状态 */
.right-sidebar__connection-status {
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 11px;
	color: #666;
}

.right-sidebar__status-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	animation: pulse 2s ease-in-out infinite;
}

.right-sidebar__status-dot--connected {
	background: #4CAF50;
}

.right-sidebar__status-dot--disconnected {
	background: #F44336;
	animation: none;
}

.right-sidebar__status-text {
	font-size: 10px;
	opacity: 0.8;
}

@keyframes pulse {
	0%, 100% {
		opacity: 1;
		transform: scale(1);
	}
	50% {
		opacity: 0.6;
		transform: scale(1.2);
	}
}

.right-sidebar__history-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	background: transparent;
	border: none;
	cursor: pointer;
	border-radius: 4px;
	transition: background 0.15s;
	pointer-events: all;
	z-index: 10;
}

.right-sidebar__history-btn:hover {
	background: rgba(0, 0, 0, 0.05);
}

.right-sidebar__history-btn--active {
	background: rgba(77, 143, 157, 0.15);
}

.right-sidebar__history-btn--active:hover {
	background: rgba(77, 143, 157, 0.25);
}

.right-sidebar__history-btn img {
	width: 20px;
	height: 20px;
}

.right-sidebar__history-btn--active img {
	filter: brightness(0) saturate(100%) invert(48%) sepia(12%) saturate(1685%) hue-rotate(143deg) brightness(93%) contrast(89%);
}

.right-sidebar__close-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	background: transparent;
	border: none;
	cursor: pointer;
	border-radius: 6px;
	transition: background 0.15s;
	pointer-events: all;
	z-index: 10;
}

.right-sidebar__close-btn:hover {
	background: rgba(0, 0, 0, 0.08);
}

/* ========== 历史图片区域 ========== */
.right-sidebar__history {
	flex: 1;
	overflow-y: auto;
	padding: 16px 18px;
}

.right-sidebar__history-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	height: 100%;
	color: #999;
	text-align: center;
}

.right-sidebar__history-empty p {
	margin: 8px 0;
}

.right-sidebar__history-empty-hint {
	font-size: 12px;
	color: #BFBFBF;
}

.right-sidebar__history-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 8px;
}

.right-sidebar__history-item {
	position: relative;
	background: #F0F0F0;
	border-radius: 4px;
	overflow: hidden;
	cursor: pointer;
	transition: transform 0.2s;
}

.right-sidebar__history-item:hover {
	transform: scale(1.02);
}

.right-sidebar__history-image {
	width: 100%;
	height: auto;
	display: block;
	object-fit: cover;
}

.right-sidebar__history-info {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 6px 8px;
	background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 11px;
	color: white;
	opacity: 0;
	transition: opacity 0.2s;
}

.right-sidebar__history-item:hover .right-sidebar__history-info {
	opacity: 1;
}

.right-sidebar__history-feature {
	font-weight: 500;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.right-sidebar__history-time {
	font-size: 10px;
	opacity: 0.9;
	flex-shrink: 0;
	margin-left: 8px;
}

.right-sidebar__history-placeholder {
	width: 100%;
	background: linear-gradient(135deg, #E1E1E1 0%, #F0F0F0 100%);
}

/* ========== AI思考中状态 (AG-UI优化版) ========== */
.right-sidebar__message--thinking {
	animation: fadeInSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.right-sidebar__thinking-container {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 14px;
	background: linear-gradient(135deg, #F0F7FF 0%, #E6F2FF 100%);
	border-left: 3px solid #4D8F9D;
	border-radius: 8px;
}

.right-sidebar__thinking-header {
	display: flex;
	align-items: center;
	gap: 10px;
}

.right-sidebar__thinking-icon {
	font-size: 20px;
	animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
	0%, 100% { transform: scale(1); opacity: 1; }
	50% { transform: scale(1.1); opacity: 0.8; }
}

.right-sidebar__thinking-text {
	font-size: 14px;
	font-weight: 500;
	color: #2B2F36;
	margin: 0;
}

.right-sidebar__thinking-subtext {
	font-size: 12px;
	color: #666;
	margin: 0;
	opacity: 0.8;
}

/* 思考进度条 */
.right-sidebar__thinking-progress {
	width: 100%;
	height: 3px;
	background: rgba(77, 143, 157, 0.2);
	border-radius: 2px;
	overflow: hidden;
	position: relative;
}

.right-sidebar__thinking-progress-bar {
	height: 100%;
	background: linear-gradient(90deg, #4D8F9D 0%, #6DB4C7 50%, #4D8F9D 100%);
	background-size: 200% 100%;
	animation: progressAnimation 2s linear infinite;
	border-radius: 2px;
}

@keyframes progressAnimation {
	0% { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

/* 流式响应动画 */
.right-sidebar__message--streaming {
	animation: fadeInSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.right-sidebar__streaming-indicator {
	display: inline-block;
	color: #4D8F9D;
	font-size: 16px;
	line-height: 1;
	animation: blink 1.2s step-end infinite;
	margin-left: 4px;
}

@keyframes blink {
	0%, 50% { opacity: 1; }
	51%, 100% { opacity: 0; }
}

@keyframes fadeInSlideUp {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ========== 工具调用可视化 ========== */
.right-sidebar__tool-call-card {
	margin: 8px 0;
	padding: 12px 14px;
	border-radius: 8px;
	border-left: 3px solid #4D8F9D;
	animation: fadeInSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	transition: all 0.2s ease;
}

.right-sidebar__tool-call-card--pending {
	background: linear-gradient(135deg, #FFF7E6 0%, #FFEFD5 100%);
	border-left-color: #F59E0B;
}

.right-sidebar__tool-call-card--running {
	background: linear-gradient(135deg, #E6F2FF 0%, #CCE7FF 100%);
	border-left-color: #3B82F6;
}

.right-sidebar__tool-call-card--success {
	background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
	border-left-color: #10B981;
}

.right-sidebar__tool-call-card--error {
	background: linear-gradient(135deg, #FEE2E2 0%, #FECACA 100%);
	border-left-color: #EF4444;
}

.right-sidebar__tool-call-header {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 8px;
}

.right-sidebar__tool-icon {
	font-size: 20px;
	line-height: 1;
}

.right-sidebar__tool-icon--running {
	animation: pulse 1.5s ease-in-out infinite;
}

.right-sidebar__tool-name {
	font-size: 14px;
	font-weight: 600;
	color: #2B2F36;
	flex: 1;
}

.right-sidebar__tool-status {
	font-size: 12px;
	padding: 2px 8px;
	border-radius: 4px;
	font-weight: 500;
}

.right-sidebar__tool-status--pending {
	background: #FEF3C7;
	color: #92400E;
}

.right-sidebar__tool-status--running {
	background: #DBEAFE;
	color: #1E40AF;
}

.right-sidebar__tool-status--success {
	background: #D1FAE5;
	color: #065F46;
}

.right-sidebar__tool-status--error {
	background: #FEE2E2;
	color: #991B1B;
}

.right-sidebar__tool-args {
	font-size: 12px;
	color: #666;
	margin-bottom: 8px;
	padding: 8px;
	background: rgba(255, 255, 255, 0.5);
	border-radius: 4px;
	max-height: 60px;
	overflow-y: auto;
	word-break: break-all;
}

.right-sidebar__tool-error {
	font-size: 12px;
	color: #DC2626;
	margin-bottom: 8px;
	padding: 8px;
	background: rgba(255, 255, 255, 0.7);
	border-radius: 4px;
	display: flex;
	align-items: flex-start;
	gap: 6px;
}

.right-sidebar__tool-error-icon {
	flex-shrink: 0;
	margin-top: 2px;
}

.right-sidebar__tool-actions {
	display: flex;
	gap: 8px;
	margin-top: 8px;
}

.right-sidebar__tool-retry-btn {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border: none;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s;
	background: #4D8F9D;
	color: white;
}

.right-sidebar__tool-retry-btn:hover {
	background: #3A6B7A;
	transform: translateY(-1px);
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.right-sidebar__tool-retry-btn:active {
	transform: translateY(0);
}

.right-sidebar__tool-retry-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none;
}

.right-sidebar__tool-progress {
	margin-top: 8px;
	height: 2px;
	background: rgba(77, 143, 157, 0.2);
	border-radius: 2px;
	overflow: hidden;
}

.right-sidebar__tool-progress-bar {
	height: 100%;
	background: linear-gradient(90deg, #4D8F9D 0%, #6DB4C7 50%, #4D8F9D 100%);
	background-size: 200% 100%;
	animation: progressAnimation 2s linear infinite;
}

/* ========== 消息列表 ========== */
.right-sidebar__messages {
	flex: 1;
	overflow-y: auto;
	padding: 16px 18px;
	display: flex;
	flex-direction: column;
	gap: 16px;
	/* 阻止滚动事件冒泡到画布 */
	overscroll-behavior: contain;
	/* 确保可以独立滚动 */
	-webkit-overflow-scrolling: touch;
	/* 阻止滚动事件传播到父元素 */
	isolation: isolate;
	/* 强制内容可选择 */
	user-select: text;
	-webkit-user-select: text;
	-moz-user-select: text;
	-ms-user-select: text;
}

/* 流式响应样式 */
.right-sidebar__message--streaming {
	animation: fadeIn 0.2s ease;
}

.right-sidebar__message--thinking {
	animation: fadeIn 0.2s ease;
}

.right-sidebar__thinking-icon {
	display: inline-block;
	margin-right: 8px;
	animation: pulse 1.5s ease-in-out infinite;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(4px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.right-sidebar__streaming-indicator {
	display: inline-block;
	margin-left: 8px;
	color: #4D8F9D;
	animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
	0%, 100% {
		opacity: 1;
	}
	50% {
		opacity: 0.3;
	}
}

.right-sidebar__loading-icon {
	font-size: 18px;
	animation: spin 2s linear infinite;
}

@keyframes spin {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

/* 滚动条样式 */
.right-sidebar__messages::-webkit-scrollbar {
	width: 4px;
}

.right-sidebar__messages::-webkit-scrollbar-track {
	background: transparent;
}

.right-sidebar__messages::-webkit-scrollbar-thumb {
	background: rgba(0, 0, 0, 0.15);
	border-radius: 2px;
}

.right-sidebar__messages::-webkit-scrollbar-thumb:hover {
	background: rgba(0, 0, 0, 0.25);
}

/* ========== 消息样式 ========== */
.right-sidebar__message {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/* 用户消息 */
.right-sidebar__user-input {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 13px 11px 15px 16px;
	background: #F7F7F7;
	border-radius: 12px;
}

.right-sidebar__image-tag {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 0 4px 0 5px;
	height: 24px;
	border: 1px solid #919191;
	border-radius: 8px;
}

.right-sidebar__image-tag-text {
	font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 12px;
	font-weight: 500;
	color: #2F3640;
	line-height: 24px;
}

.right-sidebar__image-tag-preview {
	width: 16px;
	height: 16px;
	background: #DDD;
	border-radius: 4px;
}

.right-sidebar__user-text {
	font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 12px;
	font-weight: 500;
	color: #363636;
	line-height: 24px;
}

/* AI 回复 */
.right-sidebar__assistant-text {
	font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 12px;
	font-weight: 500;
	color: #2F3640;
	line-height: 20px;
	margin: 0;
	white-space: pre-wrap; /* 保留换行 */
	word-wrap: break-word; /* 长单词换行 */
	user-select: text; /* 允许选择 */
	-webkit-user-select: text;
	-moz-user-select: text;
	-ms-user-select: text;
}

/* 用户输入文本也可选择 */
.right-sidebar__user-text {
	font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 12px;
	font-weight: 500;
	color: #363636;
	line-height: 24px;
	user-select: text;
	-webkit-user-select: text;
	-moz-user-select: text;
	-ms-user-select: text;
}

/* 空状态提示也可选择 */
.right-sidebar__empty-state {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	height: 100%;
	user-select: text;
}

.right-sidebar__empty-text {
	font-size: 14px;
	font-weight: 500;
	color: #999;
	margin-bottom: 8px;
}

.right-sidebar__empty-hint {
	font-size: 12px;
	color: #BFBFBF;
	text-align: center;
	padding: 0 20px;
}

/* 图片分析区块 */
.right-sidebar__analysis-block {
	background: rgba(82, 109, 135, 0.1);
	border-radius: 12px;
	overflow: hidden;
}

.right-sidebar__analysis-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px;
}

.right-sidebar__analysis-title {
	display: flex;
	align-items: center;
	gap: 4px;
}

.right-sidebar__analysis-title span {
	font-family: Poppins, Inter, sans-serif;
	font-size: 12px;
	font-weight: 500;
	color: #2F3640;
	line-height: 19px;
}

.right-sidebar__analysis-icon {
	width: 16px;
	height: 16px;
}

.right-sidebar__analysis-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	background: transparent;
	border: none;
	cursor: pointer;
	border-radius: 4px;
	transition: background 0.15s;
}

.right-sidebar__analysis-toggle:hover {
	background: rgba(0, 0, 0, 0.05);
}

.right-sidebar__analysis-toggle img {
	width: 16px;
	height: 16px;
}

/* 模型标签 */
.right-sidebar__model-tag {
	display: flex;
	align-items: center;
	gap: 4px;
}

.right-sidebar__model-tag span {
	font-family: Poppins, Inter, sans-serif;
	font-size: 12px;
	font-weight: 500;
	color: #A4A9B2;
	line-height: 19px;
}

/* 结果标题 */
.right-sidebar__result-title {
	font-family: Poppins, Inter, sans-serif;
	font-size: 12px;
	font-weight: 600;
	color: #2F3640;
	line-height: 18px;
}

/* 结果图片 */
.right-sidebar__result-image {
	width: 100%;
}

.right-sidebar__result-placeholder {
	width: 100%;
	aspect-ratio: 1;
	background: #F0F0F0;
	border-radius: 4px;
	box-shadow: 0px 4px 20px 0px rgba(0, 0, 0, 0.08);
}

/* ========== 底部输入区 ========== */
.right-sidebar__input-area {
	padding: 4px 12px 12px 12px; /* 左右12px、底部12px留白 */
	flex-shrink: 0;
	border-radius: 0 0 12px 12px;
	/* 关键修复4：固定输入框在底部 */
	position: sticky;
	bottom: 0;
	z-index: 10;
}

.right-sidebar__thread-tag {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 0 8px 8px;
}

.right-sidebar__thread-icon {
	width: 15px;
	height: 15px;
}

.right-sidebar__thread-text {
	font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 12px;
	color: #C084FC;
	line-height: 20px;
}

.right-sidebar__input-container {
	position: relative;
	background: #FFFFFF;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 12px;
	overflow: visible;
	pointer-events: all;
	display: flex;
	flex-direction: column;
}

.right-sidebar__input {
	width: 100%;
	min-height: 72px;
	max-height: 120px;
	padding: 12px;
	background: transparent;
	border: none;
	outline: none;
	resize: none;
	font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 12px;
	line-height: 20px;
	color: #333;
	pointer-events: all;
}

.right-sidebar__input::placeholder {
	color: rgba(0, 0, 0, 0.4);
}

.right-sidebar__input-toolbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0 8px 8px 8px;
}

.right-sidebar__input-tools {
	display: flex;
	gap: 8px;
}

.right-sidebar__tool-btn {
	width: 20px;
	height: 20px;
	padding: 0;
	border: none;
	background: transparent;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity 0.2s;
}

.right-sidebar__tool-btn:hover {
	opacity: 0.8;
}

.right-sidebar__tool-btn:hover svg path,
.right-sidebar__tool-btn:hover svg rect,
.right-sidebar__tool-btn:hover svg circle {
	stroke: #4D8F9D;
}

.right-sidebar__tool-btn:disabled {
	opacity: 0.3;
	cursor: not-allowed;
}

.right-sidebar__send-btn {
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #4D8F9D 0%, #3d7f8d 100%);
	border: none;
	border-radius: 50%;
	cursor: pointer;
	transition: all 0.2s;
	pointer-events: all;
}

.right-sidebar__send-btn:hover:not(:disabled) {
	transform: scale(1.05);
	box-shadow: 0 4px 12px rgba(77, 143, 157, 0.4);
}

.right-sidebar__send-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* 图片预览区 */
.right-sidebar__image-preview {
	display: flex;
	gap: 8px;
	padding: 8px 12px;
	flex-wrap: wrap;
}

.right-sidebar__preview-item {
	position: relative;
	width: 80px;
	height: 80px;
	border-radius: 8px;
	overflow: hidden;
	border: 1px solid rgba(164, 169, 178, 0.2);
	background: #f5f5f5;
}

.right-sidebar__preview-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.right-sidebar__preview-remove {
	position: absolute;
	top: 4px;
	right: 4px;
	width: 20px;
	height: 20px;
	background: rgba(0, 0, 0, 0.6);
	border: none;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.2s;
	padding: 0;
}

.right-sidebar__preview-remove svg {
	width: 12px;
	height: 12px;
}

.right-sidebar__preview-remove svg path {
	stroke: white;
}

.right-sidebar__preview-item:hover .right-sidebar__preview-remove {
	opacity: 1;
}

.right-sidebar__preview-remove:hover {
	background: rgba(0, 0, 0, 0.8);
}

/* ========== Lightbox 大图预览 ========== */
.lightbox-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.9);
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: zoom-out;
	animation: lightboxFadeIn 0.2s ease;
}

@keyframes lightboxFadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

.lightbox-content {
	position: relative;
	max-width: 90vw;
	max-height: 90vh;
	cursor: default;
}

.lightbox-content img {
	max-width: 100%;
	max-height: 90vh;
	object-fit: contain;
	border-radius: 8px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
	position: absolute;
	top: -40px;
	right: -40px;
	width: 36px;
	height: 36px;
	border: none;
	background: rgba(255, 255, 255, 0.1);
	color: white;
	font-size: 24px;
	cursor: pointer;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s;
}

.lightbox-close:hover {
	background: rgba(255, 255, 255, 0.2);
}

/* ========== 语音输入按钮样式 ========== */
.right-sidebar__tool-btn--recording {
	animation: pulse-recording 1.5s infinite;
	position: relative;
}

.right-sidebar__recording-pulse {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: rgba(239, 68, 68, 0.3);
	animation: recording-pulse 1.5s infinite;
	pointer-events: none;
}

@keyframes pulse-recording {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.05); }
}

@keyframes recording-pulse {
	0% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
	100% { transform: translate(-50%, -50%) scale(1.8); opacity: 0; }
}

.right-sidebar__tool-btn--active svg path,
.right-sidebar__tool-btn--active svg circle {
	stroke: #4D8F9D;
}

/* ========== 参数设置下拉菜单 ========== */
.right-sidebar__params-wrapper {
	position: static; /* 🔑 修改为 static，让下拉菜单相对于 input-container 定位 */
	display: flex;
	align-items: center;
}

.right-sidebar__params-label {
	font-size: 10px;
	color: #A4A9B2;
	margin-left: 2px;
}

.right-sidebar__params-dropdown {
	position: absolute;
	bottom: calc(100% + 8px); /* 在输入框上方 */
	left: 0;
	right: 0; /* 🔑 跟输入框一样宽 */
	background: #FFFFFF;
	border-radius: 12px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
	padding: 12px;
	z-index: 100;
}

.right-sidebar__params-section {
	margin-bottom: 12px;
}

.right-sidebar__params-section:last-child {
	margin-bottom: 0;
}

.right-sidebar__params-label-title {
	font-size: 11px;
	color: #666;
	margin-bottom: 8px;
	font-weight: 500;
}

.right-sidebar__params-options {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.right-sidebar__params-option {
	padding: 4px 10px;
	border: 1px solid #E5E7EB;
	border-radius: 6px;
	background: #F9FAFB;
	font-size: 12px;
	color: #374151;
	cursor: pointer;
	transition: all 0.15s;
}

.right-sidebar__params-option:hover {
	border-color: #4D8F9D;
	background: #F0F7F8;
}

.right-sidebar__params-option.active {
	border-color: #4D8F9D;
	background: #4D8F9D;
	color: white;
}
/**
 * 左侧垂直导航栏样式
 * 深色主题 - 参考 Midjourney 风格
 */

/* 整体布局 */
.app-layout {
	display: flex;
	min-height: 100vh;
	background: radial-gradient(circle at 20% 0%, rgba(185, 213, 226, 0.35), transparent 55%),
		radial-gradient(circle at 80% 0%, rgba(155, 195, 170, 0.35), transparent 55%),
		linear-gradient(180deg, rgba(8, 14, 22, 0.4), rgba(5, 8, 14, 0.9));
	background-color: #03050c;
}

/* 侧边栏 */
.sidebar {
	width: 240px;
	min-height: 100vh;
	background: rgba(10, 15, 20, 0.95);
	border-right: 1px solid rgba(255, 255, 255, 0.08);
	display: flex;
	flex-direction: column;
	position: fixed;
	left: 0;
	top: 0;
	bottom: 0;
	z-index: 200;
	overflow-y: auto;
	overflow-x: hidden;
}

/* Logo 区域 */
.sidebar-logo {
	padding: 20px 20px 16px;
	cursor: pointer;
	transition: opacity 0.2s;
}

.sidebar-logo:hover {
	opacity: 0.8;
}

.sidebar-logo img {
	height: 24px;
}

/* 导航菜单 */
.sidebar-nav {
	padding: 0 12px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.sidebar-nav .nav-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	border-radius: 12px;
	background: transparent;
	border: none;
	color: rgba(255, 255, 255, 0.65);
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s;
	text-align: left;
	width: 100%;
}

.sidebar-nav .nav-item:hover {
	color: #fff;
	background: rgba(255, 255, 255, 0.08);
}

.sidebar-nav .nav-item.active {
	color: #fff;
	background: rgba(77, 143, 157, 0.25);
	box-shadow: inset 0 0 0 1px rgba(77, 143, 157, 0.3);
}

.sidebar-nav .nav-item svg {
	flex-shrink: 0;
	opacity: 0.8;
}

.sidebar-nav .nav-item.active svg {
	opacity: 1;
}

.sidebar-nav.secondary .nav-item {
	padding: 10px 16px;
	font-size: 13px;
	font-weight: 400;
}

/* 分隔线 */
.sidebar-divider {
	height: 1px;
	background: rgba(255, 255, 255, 0.08);
	margin: 16px 20px;
}

/* 分组标题 */
.sidebar-section {
	padding: 0;
}

.section-title {
	padding: 8px 28px;
	font-size: 11px;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.4);
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

/* 底部区域 */
.sidebar-footer {
	margin-top: auto;
	padding-bottom: 16px;
}

.footer-links {
	padding: 0 12px 8px;
}

.footer-link {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 16px;
	border-radius: 10px;
	background: transparent;
	border: none;
	color: rgba(255, 255, 255, 0.5);
	font-size: 13px;
	cursor: pointer;
	transition: all 0.2s;
	text-align: left;
	width: 100%;
}

.footer-link:hover {
	color: rgba(255, 255, 255, 0.8);
	background: rgba(255, 255, 255, 0.05);
}

/* 用户账户区域 */
.user-menu-container {
	position: relative;
	padding: 0 12px;
}

.user-account-btn {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	padding: 10px 12px;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.08);
	color: #fff;
	cursor: pointer;
	transition: all 0.2s;
	text-align: left;
}

.user-account-btn:hover {
	background: rgba(255, 255, 255, 0.1);
	border-color: rgba(255, 255, 255, 0.15);
}

.user-avatar {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: linear-gradient(135deg, #4d8f9d, #416887);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	font-weight: 600;
	flex-shrink: 0;
}

.user-email {
	flex: 1;
	font-size: 13px;
	color: rgba(255, 255, 255, 0.8);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.menu-arrow {
	flex-shrink: 0;
	opacity: 0.5;
	transition: transform 0.2s;
}

.user-account-btn:hover .menu-arrow {
	opacity: 0.8;
}

/* 下拉菜单 */
.user-dropdown {
	position: absolute;
	bottom: calc(100% + 8px);
	left: 12px;
	right: 12px;
	background: rgba(30, 35, 45, 0.98);
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 16px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
	backdrop-filter: blur(20px);
	overflow: hidden;
	animation: dropdownSlideUp 0.2s ease;
}

@keyframes dropdownSlideUp {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.dropdown-header {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px;
}

.dropdown-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: linear-gradient(135deg, #4d8f9d, #416887);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	font-weight: 600;
	flex-shrink: 0;
}

.dropdown-user-info {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.dropdown-email {
	font-size: 13px;
	font-weight: 500;
	color: #fff;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.dropdown-label {
	font-size: 11px;
	color: rgba(255, 255, 255, 0.5);
}

.dropdown-divider {
	height: 1px;
	background: rgba(255, 255, 255, 0.1);
	margin: 0;
}

.dropdown-item {
	width: 100%;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	border: none;
	background: transparent;
	color: rgba(255, 255, 255, 0.8);
	font-size: 13px;
	cursor: pointer;
	transition: all 0.15s;
	text-align: left;
}

.dropdown-item:hover {
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
}

.dropdown-item svg {
	opacity: 0.7;
	flex-shrink: 0;
}

.dropdown-item:hover svg {
	opacity: 1;
}

.dropdown-item-danger {
	color: rgba(255, 100, 100, 0.9);
}

.dropdown-item-danger:hover {
	background: rgba(255, 100, 100, 0.1);
	color: #ff6b6b;
}

/* 登录按钮 */
.sidebar-footer .login-btn {
	display: flex;
	align-items: center;
	gap: 12px;
	width: calc(100% - 24px);
	margin: 0 12px;
	padding: 12px 16px;
	border-radius: 12px;
	background: rgba(77, 143, 157, 0.2);
	border: 1px solid rgba(77, 143, 157, 0.3);
	color: #fff;
	font-size: 14px;
	cursor: pointer;
	transition: all 0.2s;
}

.sidebar-footer .login-btn:hover {
	background: rgba(77, 143, 157, 0.3);
	border-color: rgba(77, 143, 157, 0.5);
}

/* 主内容区 */
.main-content {
	flex: 1;
	margin-left: 240px;
	height: 100vh;
	overflow-y: auto;
	overflow-x: hidden;
	display: flex;
	flex-direction: column;
}

/* 移动端头部 */
.mobile-header {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: 56px;
	background: rgba(10, 15, 20, 0.95);
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	z-index: 150;
	padding: 0 16px;
	align-items: center;
	gap: 16px;
}

.mobile-menu-btn {
	padding: 8px;
	border: none;
	background: transparent;
	color: rgba(255, 255, 255, 0.8);
	cursor: pointer;
	border-radius: 8px;
	transition: all 0.2s;
}

.mobile-menu-btn:hover {
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
}

.mobile-logo {
	height: 22px;
	cursor: pointer;
}

/* 侧边栏遮罩 */
.sidebar-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	z-index: 199;
}

/* 响应式设计 */
@media (max-width: 1024px) {
	.sidebar {
		width: 220px;
	}
	
	.main-content {
		margin-left: 220px;
	}
}

@media (max-width: 768px) {
	.mobile-header {
		display: flex;
	}
	
	.sidebar {
		transform: translateX(-100%);
		transition: transform 0.3s ease;
		width: 280px;
	}
	
	.sidebar.open {
		transform: translateX(0);
	}
	
	.sidebar-overlay {
		display: block;
	}
	
	.main-content {
		margin-left: 0;
		padding-top: 56px;
	}
}

@media (max-width: 480px) {
	.sidebar {
		width: 100%;
		max-width: 320px;
	}
	
	.user-dropdown {
		left: 8px;
		right: 8px;
	}
}
/**
 * GallerySmartInput 样式
 * 模式标签栏在输入框上方，选项区域在输入框下方
 * 深色主题 + 发光发送按钮
 * 使用统一设计系统变量
 */

/* 引入共享设计变量 */

/**
 * 统一设计系统变量
 * 为 yitu3 和 hualang（画廊）页面提供一致的设计语言
 * 
 * 设计原则：
 * - 画廊页面：深色主题，适合图片展示
 * - yitu3页面：浅色主题，适合长时间编辑
 * - 共享：统一的间距、圆角、字体、动画、组件样式
 */

:root {
  /* ========== 主色调 ========== */
  --primary-color: #f5a623;
  --primary-light: #ffc966;
  --primary-dark: #d48b1a;
  --primary-gradient: linear-gradient(135deg, #f5deb3 0%, #daa520 50%, #b8860b 100%);
  
  /* 强调色 - 青蓝色 */
  --accent-color: #4a90a4;
  --accent-light: #6ab0c4;
  --accent-dark: #357a8c;
  --accent-gradient: linear-gradient(135deg, #4a90a4 0%, #357a8c 100%);
  
  /* 成功/错误/警告 */
  --success-color: #22c55e;
  --error-color: #ef4444;
  --warning-color: #f59e0b;
  
  /* ========== 深色主题（画廊页面）========== */
  --dark-bg-primary: rgba(12, 12, 16, 0.98);
  --dark-bg-secondary: rgba(18, 18, 24, 0.96);
  --dark-bg-elevated: rgba(45, 45, 55, 0.9);
  --dark-bg-hover: rgba(60, 60, 70, 0.8);
  --dark-border: rgba(255, 255, 255, 0.1);
  --dark-border-hover: rgba(255, 255, 255, 0.2);
  --dark-text-primary: rgba(255, 255, 255, 0.95);
  --dark-text-secondary: rgba(255, 255, 255, 0.7);
  --dark-text-muted: rgba(255, 255, 255, 0.45);
  
  /* ========== 浅色主题（yitu3页面）========== */
  --light-bg-primary: #f3f4f6;
  --light-bg-secondary: #e5e7eb;
  --light-bg-elevated: rgba(255, 255, 255, 0.8);
  --light-bg-hover: rgba(255, 255, 255, 0.95);
  --light-border: rgba(0, 0, 0, 0.1);
  --light-border-hover: rgba(0, 0, 0, 0.2);
  --light-text-primary: #1a1a1a;
  --light-text-secondary: #4a5568;
  --light-text-muted: #718096;
  
  /* ========== 间距系统 ========== */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;
  
  /* ========== 圆角系统 ========== */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  --radius-full: 9999px;
  
  /* ========== 字体系统 ========== */
  --font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  
  --font-size-xs: 11px;
  --font-size-sm: 13px;
  --font-size-base: 14px;
  --font-size-md: 15px;
  --font-size-lg: 18px;
  --font-size-xl: 22px;
  --font-size-2xl: 28px;
  --font-size-3xl: 32px;
  
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;
  
  /* ========== 阴影系统 ========== */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.25);
  
  /* 发光效果 */
  --glow-primary: 0 0 20px rgba(245, 166, 35, 0.4), 0 0 40px rgba(245, 166, 35, 0.2);
  --glow-accent: 0 0 20px rgba(74, 144, 164, 0.4), 0 0 40px rgba(74, 144, 164, 0.2);
  --glow-error: 0 0 15px rgba(239, 68, 68, 0.4);
  
  /* ========== 过渡动画 ========== */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.35s ease;
  
  /* ========== 布局变量 ========== */
  --content-max-width: 1400px;
  --input-max-width: 680px;
  --sidebar-width: 280px;
  
  /* 响应式断点 */
  --breakpoint-sm: 480px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;
  
  /* ========== 输入框组件变量 ========== */
  --input-height: 44px;
  --input-padding: 12px 16px;
  --input-border-width: 1px;
  
  /* ========== 按钮组件变量 ========== */
  --btn-height-sm: 36px;
  --btn-height-md: 44px;
  --btn-height-lg: 52px;
  --btn-padding-sm: 8px 16px;
  --btn-padding-md: 12px 24px;
  --btn-padding-lg: 16px 32px;
}

/* ========== 通用工具类 ========== */

/* 渐变背景 */

.gradient-primary {
  background: var(--primary-gradient);
}

.gradient-accent {
  background: var(--accent-gradient);
}

/* 发光效果 */

.glow-primary {
  box-shadow: var(--glow-primary);
}

.glow-accent {
  box-shadow: var(--glow-accent);
}

/* 毛玻璃效果 */

.glass-effect {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* ========== 统一的按钮样式 ========== */

/* 主要按钮 - 渐变金色 */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  height: var(--btn-height-md);
  padding: var(--btn-padding-md);
  background: var(--primary-gradient);
  border: none;
  border-radius: var(--radius-lg);
  color: var(--light-text-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: var(--glow-primary);
}

.btn-primary:hover:not(:disabled) {
  transform: scale(1.02) translateY(-1px);
  box-shadow: 0 0 25px rgba(245, 166, 35, 0.5), 0 0 50px rgba(245, 166, 35, 0.3);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 次要按钮 - 透明 */

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  height: var(--btn-height-md);
  padding: var(--btn-padding-md);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-lg);
  color: var(--dark-text-secondary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: all var(--transition-normal);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--dark-border-hover);
  color: var(--dark-text-primary);
}

.btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 图标按钮 */

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.06);
  border: none;
  border-radius: var(--radius-md);
  color: var(--dark-text-muted);
  cursor: pointer;
  transition: all var(--transition-normal);
}

.btn-icon:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
  color: var(--dark-text-primary);
}

.btn-icon:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ========== 统一的输入框样式 ========== */

.input-field {
  width: 100%;
  height: var(--input-height);
  padding: var(--input-padding);
  background: transparent;
  border: none;
  outline: none;
  color: var(--dark-text-primary);
  font-size: var(--font-size-md);
  font-family: var(--font-family);
}

.input-field::placeholder {
  color: var(--dark-text-muted);
}

.input-container {
  display: flex;
  align-items: center;
  padding: var(--spacing-sm);
  background: var(--dark-bg-elevated);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-lg);
  transition: all var(--transition-normal);
}

.input-container:focus-within {
  border-color: var(--dark-border-hover);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

/* ========== 统一的卡片样式 ========== */

.card {
  background: var(--dark-bg-elevated);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-xl);
  padding: var(--spacing-lg);
  transition: all var(--transition-normal);
}

.card:hover {
  border-color: var(--dark-border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* 浅色主题卡片 */

.card-light {
  background: var(--light-bg-elevated);
  border: 1px solid var(--light-border);
  border-radius: var(--radius-xl);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
}

.card-light:hover {
  box-shadow: var(--shadow-lg);
}

/* ========== 标签/徽章样式 ========== */

.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-full);
  color: var(--dark-text-secondary);
  font-size: var(--font-size-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tag:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--dark-border-hover);
  color: var(--dark-text-primary);
}

.tag.active {
  background: rgba(74, 144, 164, 0.2);
  border-color: rgba(74, 144, 164, 0.4);
  color: var(--accent-color);
}

/* ========== 动画 ========== */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(8px); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes pulseRecording {
  0%, 100% { 
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
  }
  50% { 
    box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
  }
}

.animate-fadeIn {
  animation: fadeIn 0.3s ease forwards;
}

.animate-spin {
  animation: spin 0.8s linear infinite;
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* ========== 响应式工具类 ========== */

/* 隐藏/显示 */

@media (max-width: 768px) {
  .hide-mobile {
    display: none !important;
  }
}

@media (min-width: 769px) {
  .hide-desktop {
    display: none !important;
  }
}

/* 响应式容器 */

.container-responsive {
  width: 100%;
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

@media (max-width: 768px) {
  .container-responsive {
    padding: 0 var(--spacing-md);
  }
}

@media (max-width: 480px) {
  .container-responsive {
    padding: 0 var(--spacing-sm);
  }
}

/* ========== 滚动条样式 ========== */

/* 深色主题滚动条 */

.scrollbar-dark::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.scrollbar-dark::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.scrollbar-dark::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  transition: background 0.2s;
}

.scrollbar-dark::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* 浅色主题滚动条 */

.scrollbar-light::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.scrollbar-light::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 3px;
}

.scrollbar-light::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 3px;
  transition: background 0.2s;
}

.scrollbar-light::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.25);
}

/* 整体包装器 - 临时隐藏 */

.gallery-smart-input-wrapper {
	display: none; /* 用户要求隐藏 */
	width: 100%;
	padding: 80px 24px 80px;
	background: linear-gradient(180deg, 
		rgba(12, 12, 16, 0.98) 0%, 
		rgba(18, 18, 24, 0.96) 100%
	);
	flex-direction: column;
	align-items: center;
	position: relative;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
	box-sizing: border-box;
}

/* 标题区域 */

.gallery-smart-input-header {
	text-align: center;
	margin-bottom: 20px;
}

.gallery-smart-input-title {
	font-size: 48px;
	font-weight: 600;
	color: #ffffff;
	margin: 0 0 8px 0;
	letter-spacing: 1px;
}

.gallery-smart-input-subtitle {
	font-size: 14px;
	color: rgba(255, 255, 255, 0.45);
	margin: 0;
	font-weight: 400;
	letter-spacing: 0.5px;
}

/* 模式内容区域 - 在输入框下方 */

.gallery-mode-content {
	width: 66.67%;
	max-width: 680px;
	margin-top: 20px;
	animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
	from { opacity: 0; transform: translateY(-8px); }
	to { opacity: 1; transform: translateY(0); }
}

/* 上传区域 */

.gallery-upload-area {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 20px 24px;
	background: transparent;
	border-radius: 16px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.gallery-upload-area:hover {
	background: rgba(50, 50, 60, 0.3);
}

.gallery-upload-icon {
	width: 56px;
	height: 56px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(60, 60, 70, 0.8);
	border-radius: 12px;
	color: rgba(255, 255, 255, 0.5);
	flex-shrink: 0;
}

.gallery-upload-text {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.gallery-upload-title {
	font-size: 14px;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.9);
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.gallery-upload-desc {
	font-size: 13px;
	color: rgba(255, 255, 255, 0.45);
}

/* 上传预览 */

.gallery-upload-preview {
	position: relative;
	width: 100%;
	max-width: 200px;
	aspect-ratio: 1;
	border-radius: 16px;
	overflow: hidden;
	margin: 0 auto;
}

.gallery-upload-preview img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.gallery-upload-remove {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 28px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.7);
	border: none;
	border-radius: 50%;
	color: white;
	cursor: pointer;
	transition: all 0.2s;
}

.gallery-upload-remove:hover {
	background: rgba(239, 68, 68, 0.8);
}

/* 多图上传缩略图列表 */

.gallery-upload-thumbnails {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 16px;
	padding: 0;
}

.gallery-thumbnail-item {
	position: relative;
	width: 80px;
	height: 80px;
	border-radius: 10px;
	overflow: hidden;
	background: rgba(40, 40, 50, 0.5);
}

.gallery-thumbnail-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.gallery-thumbnail-remove {
	position: absolute;
	top: 4px;
	right: 4px;
	width: 22px;
	height: 22px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.7);
	border: none;
	border-radius: 50%;
	color: white;
	cursor: pointer;
	transition: all 0.2s;
	padding: 0;
}

.gallery-thumbnail-remove:hover {
	background: rgba(239, 68, 68, 0.9);
}

/* 知识图谱模式 - 2+6行布局 */

.gallery-mode-knowledge {
	text-align: left;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

/* 知识图谱行布局 */

.gallery-knowledge-row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
}

.gallery-knowledge-row-style {
	/* 风格行：2个按钮 */
	justify-content: center;
}

.gallery-knowledge-row-technical {
	/* 技术行：6个按钮 */
	justify-content: center;
}

.gallery-knowledge-dimensions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 16px;
}

.knowledge-dimension {
	position: relative;
	flex: 0 0 auto;
}

.knowledge-dimension-header {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 10px 14px;
	background: transparent;
	border: none;
	border-radius: 20px;
	color: rgba(255, 255, 255, 0.6);
	font-size: 13px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.knowledge-dimension-header:hover {
	color: rgba(255, 255, 255, 0.9);
}

.knowledge-dimension.expanded .knowledge-dimension-header {
	color: #4a90a4;
}

.knowledge-dimension-icon {
	font-size: 16px;
}

.knowledge-dimension-label {
	font-weight: 500;
}

.knowledge-dimension-arrow {
	transition: transform 0.2s ease;
	color: rgba(255, 255, 255, 0.5);
}

.knowledge-dimension-arrow.rotated {
	transform: rotate(180deg);
}

/* 下拉菜单 */

.knowledge-dimension-dropdown {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	z-index: 100;
	min-width: 320px;
	max-width: 420px;
	max-height: 400px;
	overflow-y: auto;
	background: rgba(30, 30, 38, 0.98);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 16px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
	padding: 12px;
	animation: dropdownFadeIn 0.2s ease;
}

@keyframes dropdownFadeIn {
	from { opacity: 0; transform: translateY(-8px); }
	to { opacity: 1; transform: translateY(0); }
}

.knowledge-category {
	margin-bottom: 12px;
}

.knowledge-category:last-child {
	margin-bottom: 0;
}

.knowledge-category-name {
	font-size: 11px;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.45);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 8px;
	padding-left: 4px;
}

.knowledge-category-items {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.knowledge-item {
	padding: 6px 12px;
	background: rgba(60, 60, 70, 0.5);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 14px;
	color: rgba(255, 255, 255, 0.7);
	font-size: 12px;
	cursor: pointer;
	transition: all 0.15s ease;
}

.knowledge-item:hover {
	background: rgba(80, 80, 90, 0.6);
	border-color: rgba(255, 255, 255, 0.15);
	color: rgba(255, 255, 255, 0.9);
}

.knowledge-item.selected {
	background: linear-gradient(135deg, rgba(74, 144, 164, 0.4) 0%, rgba(53, 122, 140, 0.4) 100%);
	border-color: rgba(74, 144, 164, 0.6);
	color: #fff;
}

/* 已选择的标签 */

.gallery-selected-tags {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-bottom: 12px;
	padding: 12px;
	background: rgba(40, 40, 50, 0.5);
	border-radius: 12px;
}

.selected-tags-label {
	font-size: 12px;
	color: rgba(255, 255, 255, 0.5);
}

.selected-tag {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 10px;
	background: linear-gradient(135deg, rgba(74, 144, 164, 0.3) 0%, rgba(53, 122, 140, 0.3) 100%);
	border: 1px solid rgba(74, 144, 164, 0.5);
	border-radius: 16px;
	color: #fff;
	font-size: 12px;
	cursor: pointer;
	transition: all 0.15s ease;
}

.selected-tag:hover {
	background: rgba(239, 68, 68, 0.2);
	border-color: rgba(239, 68, 68, 0.5);
}

.selected-tag svg {
	color: rgba(255, 255, 255, 0.6);
}

.gallery-knowledge-tip {
	font-size: 12px;
	color: rgba(255, 255, 255, 0.35);
	margin: 0;
	text-align: center;
}

/* 灵感描绘模式 - 简洁样式 */

.gallery-mode-inspiration {
	text-align: left;
}

.inspiration-prompts-container {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 8px;
	padding: 0;
}

.inspiration-prompt {
	padding: 8px 12px;
	background: transparent;
	border: none;
	border-radius: 8px;
	color: rgba(255, 255, 255, 0.55);
	font-size: 13px;
	text-align: left;
	cursor: pointer;
	transition: all 0.2s ease;
	line-height: 1.4;
}

.inspiration-prompt:hover {
	background: transparent;
	color: rgba(255, 255, 255, 0.9);
}

.inspiration-prompt.selected {
	background: transparent;
	color: #4a90a4;
}

/* 输入框容器 - 自适应布局,宽度2/3 */

.gallery-smart-input {
	display: flex;
	align-items: center;
	padding: 6px 8px 6px 8px;
	background: rgba(45, 45, 55, 0.9);
	backdrop-filter: blur(16px);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 12px;
	box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
	width: 66.67%;
	max-width: 680px;
	transition: all 0.3s ease;
	z-index: 10000;
}

.gallery-smart-input.focused {
	border-color: rgba(255, 255, 255, 0.2);
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.gallery-smart-input-container {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
}

/* 中间输入区域 */

.gallery-smart-input-main {
	flex: 1;
	min-width: 0;
	position: relative;
}

.gallery-smart-input-field {
	width: 100%;
	height: 44px;
	padding: 0;
	font-size: 15px;
	color: rgba(255, 255, 255, 0.9);
	background: transparent;
	border: none;
	outline: none;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

.gallery-smart-input-field::placeholder {
	color: rgba(255, 255, 255, 0.35);
}

/* 🔍 智能提示下拉框 */

.gallery-suggestions-dropdown {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	max-height: 320px;
	overflow-y: auto;
	background: rgba(28, 28, 35, 0.98);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 12px;
	box-shadow: 
		0 8px 32px rgba(0, 0, 0, 0.5),
		0 4px 16px rgba(0, 0, 0, 0.3);
	z-index: 10002;
	padding: 8px 0;
	animation: suggestionsSlideIn 0.2s ease;
}

@keyframes suggestionsSlideIn {
	from {
		opacity: 0;
		transform: translateY(-8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* 智能提示分组 */

.gallery-suggestions-group {
	padding: 4px 0;
}

.gallery-suggestions-group:not(:last-child) {
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
	padding-bottom: 8px;
	margin-bottom: 4px;
}

.gallery-suggestions-category {
	padding: 4px 16px;
	border-left: 3px solid;
	margin-left: 12px;
}

.gallery-suggestions-category-label {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.gallery-suggestions-items {
	padding: 4px 8px;
}

.gallery-suggestion-item {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 12px;
	background: transparent;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.15s ease;
	text-align: left;
}

.gallery-suggestion-item:hover,
.gallery-suggestion-item.selected {
	background: rgba(255, 255, 255, 0.08);
}

.gallery-suggestion-item.selected {
	background: rgba(218, 165, 32, 0.15);
}

.suggestion-keyword {
	font-size: 14px;
	color: rgba(255, 255, 255, 0.9);
	font-weight: 500;
}

.suggestion-path {
	font-size: 12px;
	color: rgba(255, 255, 255, 0.4);
	white-space: nowrap;
}

/* 智能提示下拉框滚动条 */

.gallery-suggestions-dropdown::-webkit-scrollbar {
	width: 6px;
}

.gallery-suggestions-dropdown::-webkit-scrollbar-track {
	background: transparent;
}

.gallery-suggestions-dropdown::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.15);
	border-radius: 3px;
}

.gallery-suggestions-dropdown::-webkit-scrollbar-thumb:hover {
	background: rgba(255, 255, 255, 0.25);
}

/* 右侧按钮组 */

.gallery-smart-input-right {
	display: flex;
	gap: 6px;
	align-items: center;
	flex-shrink: 0;
	position: relative;
	z-index: 10001; /* 确保参数面板在正确层级 */
}

/* 通用按钮 */

.gallery-smart-input-btn {
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.06);
	border: none;
	border-radius: 10px;
	cursor: pointer;
	color: rgba(255, 255, 255, 0.5);
	transition: all 0.2s ease;
}

.gallery-smart-input-btn:hover:not(:disabled) {
	background: rgba(255, 255, 255, 0.12);
	color: rgba(255, 255, 255, 0.9);
}

.gallery-smart-input-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.gallery-btn-upload.has-image {
	background: rgba(34, 197, 94, 0.2);
	color: #22c55e;
}

/* 发送按钮 - 发光效果 */

.gallery-smart-input-send {
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(80, 80, 90, 0.6);
	border: none;
	border-radius: 12px;
	cursor: pointer;
	color: rgba(255, 255, 255, 0.4);
	transition: all 0.25s ease;
}

.gallery-smart-input-send:disabled {
	cursor: not-allowed;
	opacity: 0.5;
}

.gallery-smart-input-send.active {
	background: linear-gradient(135deg, #f5deb3 0%, #daa520 50%, #b8860b 100%);
	color: #1a1a1a;
	box-shadow: 
		0 0 20px rgba(245, 222, 179, 0.4),
		0 0 40px rgba(218, 165, 32, 0.2);
}

.gallery-smart-input-send.active:hover {
	transform: scale(1.05);
	box-shadow: 
		0 0 25px rgba(245, 222, 179, 0.5),
		0 0 50px rgba(218, 165, 32, 0.3);
}

.gallery-smart-input-send.sending {
	background: rgba(100, 100, 110, 0.6);
	color: rgba(255, 255, 255, 0.6);
	cursor: wait;
	pointer-events: none;
}

/* 加载动画 */

.gallery-smart-input-spinner {
	width: 20px;
	height: 20px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-top-color: #fff;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

@keyframes spin {
	to { transform: rotate(360deg); }
}

/* 语音按钮 - 左侧 */

.gallery-voice-btn-left {
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.06);
	border: none;
	border-radius: 10px;
	cursor: pointer;
	color: rgba(255, 255, 255, 0.5);
	transition: all 0.25s ease;
	flex-shrink: 0;
	margin-right: 8px;
}

.gallery-voice-btn-left:hover:not(:disabled) {
	background: rgba(255, 255, 255, 0.12);
	color: rgba(255, 255, 255, 0.9);
}

.gallery-voice-btn-left:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.gallery-voice-btn-left.recording {
	background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
	color: white;
	box-shadow: 0 2px 15px rgba(239, 68, 68, 0.4);
	animation: pulse-recording 1.5s ease-in-out infinite;
}

/* 语音按钮 - 内联在发送按钮右侧 */

.gallery-voice-btn-inline {
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #4a90a4 0%, #357a8c 100%);
	border: none;
	border-radius: 12px;
	cursor: pointer;
	color: white;
	transition: all 0.25s ease;
	box-shadow: 0 2px 10px rgba(74, 144, 164, 0.3);
}

.gallery-voice-btn-inline:hover:not(:disabled) {
	background: linear-gradient(135deg, #5aa0b4 0%, #458a9c 100%);
	transform: scale(1.05);
	box-shadow: 0 4px 15px rgba(74, 144, 164, 0.4);
}

.gallery-voice-btn-inline:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.gallery-voice-btn-inline.recording {
	background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
	box-shadow: 0 2px 15px rgba(239, 68, 68, 0.4);
	animation: pulse-recording 1.5s ease-in-out infinite;
}

/* 录音状态提示 */

.gallery-recording-indicator {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 12px;
	padding: 8px 16px;
	background: rgba(239, 68, 68, 0.15);
	border: 1px solid rgba(239, 68, 68, 0.3);
	border-radius: 20px;
	color: #fca5a5;
	font-size: 13px;
}

.recording-dot {
	width: 8px;
	height: 8px;
	background: #ef4444;
	border-radius: 50%;
	animation: blink 1s ease-in-out infinite;
}

@keyframes blink {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.3; }
}

/* 错误提示 */

.gallery-smart-input-error {
	margin-top: 14px;
	padding: 10px 16px;
	display: flex;
	align-items: center;
	gap: 10px;
	background: rgba(239, 68, 68, 0.12);
	border: 1px solid rgba(239, 68, 68, 0.25);
	border-radius: 12px;
	font-size: 13px;
	color: #fca5a5;
	max-width: 680px;
	width: 100%;
}

.gallery-smart-input-error svg {
	flex-shrink: 0;
	color: #ef4444;
}

.gallery-smart-input-error span {
	flex: 1;
}

.gallery-smart-input-error button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border: none;
	background: rgba(255, 255, 255, 0.1);
	border-radius: 6px;
	color: rgba(255, 255, 255, 0.6);
	cursor: pointer;
	transition: all 0.2s;
}

.gallery-smart-input-error button:hover {
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
}

/* 模式切换标签栏 - 在输入框上方 */

.gallery-mode-tabs {
	display: flex;
	justify-content: center;
	gap: 4px;
	margin-bottom: 16px;
	padding: 8px;
}

.gallery-mode-tab {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 12px 20px;
	background: transparent;
	border: none;
	border-radius: 12px;
	cursor: pointer;
	color: rgba(255, 255, 255, 0.45);
	transition: all 0.2s ease;
	min-width: 90px;
}

.gallery-mode-tab:hover {
	color: rgba(255, 255, 255, 0.7);
	background: rgba(255, 255, 255, 0.04);
}

.gallery-mode-tab.active {
	color: #ffffff;
	background: rgba(255, 255, 255, 0.08);
}

.gallery-mode-tab.active::after {
	content: '';
	position: absolute;
	bottom: -8px;
	left: 50%;
	transform: translateX(-50%);
	width: 4px;
	height: 4px;
	background: #fff;
	border-radius: 50%;
}

.mode-tab-label {
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.3px;
	white-space: nowrap;
}

/* 响应式设计 */

@media (max-width: 900px) {
	.gallery-smart-input {
		width: 80%;
	}
	
	.gallery-mode-content {
		width: 80%;
	}
	
	.knowledge-dimension-dropdown {
		min-width: 280px;
		max-width: 350px;
	}
	
	.inspiration-prompts-container {
		grid-template-columns: repeat(2, 1fr);
		gap: 10px;
	}
}

@media (max-width: 768px) {
	.gallery-smart-input-wrapper {
		padding: 32px 16px 20px;
	}
	
	.gallery-smart-input-title {
		font-size: 22px;
	}
	
	.gallery-smart-input {
		width: 90%;
		max-width: 100%;
	}
	
	.gallery-mode-content {
		width: 90%;
		max-width: 100%;
	}
	
	.gallery-upload-area {
		padding: 16px;
	}
	
	.gallery-upload-icon {
		width: 48px;
		height: 48px;
	}
	
	.gallery-mode-tabs {
		flex-wrap: wrap;
		gap: 2px;
	}
	
	.gallery-mode-tab {
		padding: 10px 14px;
		min-width: 60px;
	}
	
	.mode-tab-label {
		font-size: 10px;
	}
	
	/* 灵感描绘模式响应式 */
	.inspiration-prompts-container {
		grid-template-columns: 1fr;
		gap: 8px;
	}
	
	.inspiration-prompt {
		padding: 12px 14px;
		font-size: 13px;
	}
	
	/* 知识图谱维度下拉菜单响应式 */
	.knowledge-dimension-dropdown {
		position: fixed;
		top: auto;
		bottom: 0;
		left: 0;
		right: 0;
		min-width: 100%;
		max-width: 100%;
		max-height: 60vh;
		border-radius: 16px 16px 0 0;
	}
	
	.gallery-knowledge-dimensions {
		justify-content: center;
	}
	
	.gallery-voice-btn-left {
		width: 36px;
		height: 36px;
	}
	
	.gallery-voice-btn-left svg {
		width: 18px;
		height: 18px;
	}
	
	/* 缩略图响应式 */
	.gallery-thumbnail-item {
		width: 70px;
		height: 70px;
	}
}

@media (max-width: 480px) {
	.gallery-smart-input-wrapper {
		padding: 24px 12px 16px;
	}
	
	.gallery-smart-input-title {
		font-size: 18px;
	}
	
	.gallery-smart-input-subtitle {
		font-size: 12px;
	}
	
	.gallery-smart-input {
		width: 95%;
		padding: 4px 6px 4px 6px;
	}
	
	.gallery-mode-content {
		width: 95%;
	}
	
	.gallery-smart-input-field {
		height: 40px;
		font-size: 14px;
	}
	
	.gallery-smart-input-send {
		width: 40px;
		height: 40px;
	}
	
	.gallery-voice-btn-left {
		width: 34px;
		height: 34px;
		margin-right: 6px;
	}
	
	.gallery-voice-btn-left svg {
		width: 16px;
		height: 16px;
	}
	
	.gallery-mode-tab {
		padding: 8px 10px;
		min-width: 50px;
	}
	
	.gallery-mode-tab svg {
		width: 18px;
		height: 18px;
	}
	
	.knowledge-dimension-header {
		padding: 8px 12px;
		font-size: 12px;
	}
	
	.knowledge-item {
		padding: 5px 10px;
		font-size: 11px;
	}
	
	/* 灵感描绘模式移动端 */
	.inspiration-prompts-container {
		grid-template-columns: 1fr;
	}
	
	.inspiration-prompt {
		padding: 10px 12px;
		font-size: 12px;
	}
	
	/* 缩略图移动端 */
	.gallery-thumbnail-item {
		width: 60px;
		height: 60px;
	}
	
	.gallery-thumbnail-remove {
		width: 18px;
		height: 18px;
	}
	
	.gallery-thumbnail-remove svg {
		width: 10px;
		height: 10px;
	}
}

/* ========== 🎨 参数设置区域 ========== */

/* 参数设置按钮包装器 */

.gallery-params-wrapper {
	position: relative;
	display: flex;
	align-items: center;
	z-index: 10000; /* 创建堆叠上下文，确保面板显示在最上层 */
}

/* 参数设置按钮 */

.gallery-params-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 10px;
	color: rgba(255, 255, 255, 0.6);
	font-size: 13px;
	cursor: pointer;
	transition: all 0.2s ease;
	margin-right: 8px;
}

/* 🌟 结构化意图表达按钮 */

.gallery-intention-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	background: linear-gradient(135deg, rgba(108, 99, 255, 0.15), rgba(167, 139, 250, 0.1));
	border: 1px solid rgba(108, 99, 255, 0.25);
	border-radius: 10px;
	color: rgba(167, 139, 250, 0.9);
	cursor: pointer;
	transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
	margin-right: 8px;
}

.gallery-intention-btn:hover {
	background: linear-gradient(135deg, rgba(108, 99, 255, 0.25), rgba(167, 139, 250, 0.2));
	color: rgba(255, 255, 255, 1);
	border-color: rgba(108, 99, 255, 0.5);
	box-shadow: 0 0 16px rgba(108, 99, 255, 0.3);
	transform: translateY(-1px);
}

.gallery-intention-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

.gallery-params-btn:hover {
	background: rgba(255, 255, 255, 0.08);
	color: rgba(255, 255, 255, 0.9);
	border-color: rgba(255, 255, 255, 0.15);
}

.gallery-params-btn.active {
	background: rgba(255, 255, 255, 0.1);
	color: rgba(255, 255, 255, 0.95);
	border-color: rgba(255, 255, 255, 0.2);
}

.gallery-params-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.params-label {
	font-weight: 500;
}

/* 参数面板 */

.gallery-params-panel {
	position: absolute;
	top: calc(100% + 12px);
	right: 0;
	width: 360px;
	max-height: 520px;
	overflow-y: auto;
	background: rgba(26, 26, 32, 0.98);
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 16px;
	box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6),
	            0 0 0 1px rgba(255, 255, 255, 0.05) inset;
	backdrop-filter: blur(24px);
	padding: 20px;
	z-index: 10000; /* 确保在最顶层 */
	animation: slideDown 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideDown {
	from {
		opacity: 0;
		transform: translateY(-8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* 面板滚动条 */

.gallery-params-panel::-webkit-scrollbar {
	width: 4px;
}

.gallery-params-panel::-webkit-scrollbar-thumb {
	background-color: rgba(255, 255, 255, 0.2);
	border-radius: 2px;
}

.gallery-params-panel::-webkit-scrollbar-thumb:hover {
	background-color: rgba(255, 255, 255, 0.3);
}

/* 参数区块 */

.gallery-params-section {
	margin-bottom: 20px;
	padding-bottom: 20px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.gallery-params-section:last-child {
	margin-bottom: 0;
	padding-bottom: 0;
	border-bottom: none;
}

/* 参数标签 */

.gallery-params-label {
	font-size: 13px;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.85);
	margin-bottom: 12px;
	letter-spacing: 0.3px;
}

/* 参数选项容器 */

.gallery-params-options {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

/* 参数选项按钮 */

.gallery-params-option {
	padding: 10px 16px;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 10px;
	color: rgba(255, 255, 255, 0.65);
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
	white-space: nowrap;
}

.gallery-params-option:hover {
	background: rgba(255, 255, 255, 0.08);
	color: rgba(255, 255, 255, 0.95);
	border-color: rgba(255, 255, 255, 0.25);
	transform: translateY(-1px);
}

.gallery-params-option.active {
	background: rgba(108, 99, 255, 0.2);
	color: rgba(255, 255, 255, 1);
	border-color: rgba(108, 99, 255, 0.6);
	box-shadow: 0 0 16px rgba(108, 99, 255, 0.4),
	            0 0 0 2px rgba(108, 99, 255, 0.15) inset;
	transform: translateY(-1px);
}

/* 响应式 - 参数面板 */

@media (max-width: 480px) {
	.gallery-params-panel {
		width: 300px;
		padding: 16px;
	}
	
	.gallery-params-btn {
		padding: 0 10px;
	}
	
	.params-label {
		font-size: 12px;
	}
	
	.gallery-params-option {
		padding: 8px 12px;
		font-size: 12px;
	}
}
/**
 * IntentionExpressionOverlay - 暗色主题样式
 * 两栏布局：左侧分类选择，右侧预览与提示词
 */

/* 遮罩层 */
.ieo-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: ieo-fade-in 0.2s ease;
}

@keyframes ieo-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 主容器 */
.ieo-container {
  width: 95vw;
  max-width: 1400px;
  height: 90vh;
  max-height: 900px;
  background: #141417;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

/* 头部 */
.ieo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: #1a1a1e;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ieo-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ieo-title {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.5px;
}

.ieo-reset-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ieo-reset-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
}

.ieo-close-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 20px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ieo-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
}

/* 主体 - 两栏布局 */
.ieo-body {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* 左侧面板 */
.ieo-left-panel {
  width: 55%;
  min-width: 500px;
  overflow-y: auto;
  padding: 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.ieo-left-panel::-webkit-scrollbar {
  width: 6px;
}

.ieo-left-panel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.ieo-left-panel::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* 主分类区块 */
.ieo-main-section {
  margin-bottom: 8px;
}

.ieo-main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.ieo-main-header:hover {
  background: rgba(255, 255, 255, 0.06);
}

.ieo-main-header.static {
  cursor: default;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.2);
}

.ieo-main-title {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

.ieo-arrow {
  width: 16px;
  height: 16px;
  color: rgba(255, 255, 255, 0.4);
  transition: transform 0.2s ease;
}

.ieo-arrow.expanded {
  transform: rotate(180deg);
}

.ieo-main-content {
  padding: 8px 0 8px 8px;
}

/* 分类区块 */
.ieo-section {
  margin-bottom: 12px;
}

.ieo-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  cursor: pointer;
}

.ieo-section-title {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.ieo-section-toggle {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ieo-section-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
}

.ieo-section-content {
  padding: 4px 0;
}

.ieo-subcategory {
  margin-bottom: 8px;
}

/* 关键词网格 */
.ieo-keyword-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  padding: 8px 0;
}

/* 关键词图片卡片按钮 */
.ieo-keyword-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: hidden;
}

.ieo-keyword-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.ieo-keyword-card.selected {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.6);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* 卡片图片区域 */
.ieo-keyword-card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 9px 9px 0 0;
}

.ieo-keyword-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.ieo-keyword-card:hover .ieo-keyword-card-image img {
  transform: scale(1.05);
}

/* 选中勾选标记 */
.ieo-keyword-card-check {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  background: #3b82f6;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.5);
}

.ieo-keyword-card-check svg {
  width: 12px;
  height: 12px;
  color: #fff;
}

/* 卡片文字标签 */
.ieo-keyword-card-label {
  width: 100%;
  padding: 8px 6px;
  text-align: center;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ieo-keyword-card.selected .ieo-keyword-card-label {
  color: #fff;
  background: rgba(59, 130, 246, 0.2);
}

/* 小尺寸卡片（用于绘画语言区域） */
.ieo-keyword-card.small {
  border-radius: 8px;
}

.ieo-keyword-card.small .ieo-keyword-card-image {
  aspect-ratio: 3 / 2;
  border-radius: 7px 7px 0 0;
}

.ieo-keyword-card.small .ieo-keyword-card-label {
  padding: 5px 4px;
  font-size: 10px;
}

.ieo-keyword-card.small .ieo-keyword-card-check {
  width: 16px;
  height: 16px;
  top: 4px;
  right: 4px;
}

.ieo-keyword-card.small .ieo-keyword-card-check svg {
  width: 10px;
  height: 10px;
}

/* 保留旧版关键词按钮样式（兼容） */
.ieo-keyword-btn {
  position: relative;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.ieo-keyword-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.95);
}

.ieo-keyword-btn.selected {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.5);
  color: #fff;
}

.ieo-keyword-btn.small {
  padding: 5px 10px;
  font-size: 11px;
}

.ieo-check-icon {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 14px;
  height: 14px;
  background: #3b82f6;
  border-radius: 50%;
  padding: 2px;
  color: #fff;
}

/* 绘画语言区块 */
.ieo-language-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ieo-language-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  padding: 12px;
}

.ieo-language-category {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 14px;
}

.ieo-language-title {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.ieo-language-keywords {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 8px;
}

/* 右侧面板 */
.ieo-right-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #111113;
}

/* 预览区域 */
.ieo-preview-section {
  height: 45%;
  min-height: 200px;
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ieo-preview-box {
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ieo-preview-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.ieo-preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
}

.ieo-placeholder-text {
  color: rgba(255, 255, 255, 0.3);
  font-size: 13px;
}

.ieo-selected-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 400px;
}

.ieo-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: 20px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
}

.ieo-tag-check {
  color: #7c3aed;
  font-size: 10px;
}

/* 提示词区域 */
.ieo-prompts-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ieo-prompts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ieo-prompts-title {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ieo-add-main-btn {
  padding: 8px 16px;
  background: #7c3aed;
  border: none;
  border-radius: 6px;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ieo-add-main-btn:hover {
  background: #6d28d9;
}

.ieo-add-main-btn:disabled {
  background: rgba(124, 58, 237, 0.3);
  cursor: not-allowed;
}

/* 提示词列表 */
.ieo-prompts-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.ieo-prompts-list::-webkit-scrollbar {
  width: 6px;
}

.ieo-prompts-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

/* 提示词项 */
.ieo-prompt-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.ieo-prompt-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.ieo-prompt-item.selected {
  background: rgba(124, 58, 237, 0.1);
}

.ieo-prompt-item.highlighted {
  background: rgba(124, 58, 237, 0.08);
}

.ieo-prompt-item.highlighted:hover {
  background: rgba(124, 58, 237, 0.12);
}

.ieo-prompt-item.custom {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 4px;
}

.ieo-prompt-dot {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: transparent;
}

.ieo-prompt-dot.filled {
  background: #7c3aed;
  border-color: #7c3aed;
}

.ieo-prompt-dot.empty {
  border-style: dashed;
}

.ieo-prompt-text {
  flex: 1;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.8);
}

.ieo-prompt-item.highlighted .ieo-prompt-text {
  color: rgba(255, 255, 255, 0.95);
}

.ieo-prompt-add {
  flex-shrink: 0;
  padding: 4px 12px;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: #7c3aed;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ieo-prompt-add:hover {
  background: rgba(124, 58, 237, 0.15);
}

/* 响应式 */
@media (max-width: 1200px) {
  .ieo-container {
    width: 98vw;
  }
  
  .ieo-left-panel {
    width: 50%;
    min-width: 400px;
  }
  
  .ieo-language-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

@media (max-width: 900px) {
  .ieo-body {
    flex-direction: column;
  }
  
  .ieo-left-panel {
    width: 100%;
    min-width: unset;
    max-height: 50%;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
  
  .ieo-right-panel {
    flex: 1;
  }
  
  .ieo-preview-section {
    height: auto;
    min-height: 150px;
  }
}
/**
 * 画廊页面样式
 * 深色主题 + 瀑布流图片展示
 * 使用统一设计系统变量
 */

/* 引入共享设计变量 */

/**
 * 统一设计系统变量
 * 为 yitu3 和 hualang（画廊）页面提供一致的设计语言
 * 
 * 设计原则：
 * - 画廊页面：深色主题，适合图片展示
 * - yitu3页面：浅色主题，适合长时间编辑
 * - 共享：统一的间距、圆角、字体、动画、组件样式
 */

:root {
  /* ========== 主色调 ========== */
  --primary-color: #f5a623;
  --primary-light: #ffc966;
  --primary-dark: #d48b1a;
  --primary-gradient: linear-gradient(135deg, #f5deb3 0%, #daa520 50%, #b8860b 100%);
  
  /* 强调色 - 青蓝色 */
  --accent-color: #4a90a4;
  --accent-light: #6ab0c4;
  --accent-dark: #357a8c;
  --accent-gradient: linear-gradient(135deg, #4a90a4 0%, #357a8c 100%);
  
  /* 成功/错误/警告 */
  --success-color: #22c55e;
  --error-color: #ef4444;
  --warning-color: #f59e0b;
  
  /* ========== 深色主题（画廊页面）========== */
  --dark-bg-primary: rgba(12, 12, 16, 0.98);
  --dark-bg-secondary: rgba(18, 18, 24, 0.96);
  --dark-bg-elevated: rgba(45, 45, 55, 0.9);
  --dark-bg-hover: rgba(60, 60, 70, 0.8);
  --dark-border: rgba(255, 255, 255, 0.1);
  --dark-border-hover: rgba(255, 255, 255, 0.2);
  --dark-text-primary: rgba(255, 255, 255, 0.95);
  --dark-text-secondary: rgba(255, 255, 255, 0.7);
  --dark-text-muted: rgba(255, 255, 255, 0.45);
  
  /* ========== 浅色主题（yitu3页面）========== */
  --light-bg-primary: #f3f4f6;
  --light-bg-secondary: #e5e7eb;
  --light-bg-elevated: rgba(255, 255, 255, 0.8);
  --light-bg-hover: rgba(255, 255, 255, 0.95);
  --light-border: rgba(0, 0, 0, 0.1);
  --light-border-hover: rgba(0, 0, 0, 0.2);
  --light-text-primary: #1a1a1a;
  --light-text-secondary: #4a5568;
  --light-text-muted: #718096;
  
  /* ========== 间距系统 ========== */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;
  
  /* ========== 圆角系统 ========== */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  --radius-full: 9999px;
  
  /* ========== 字体系统 ========== */
  --font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  
  --font-size-xs: 11px;
  --font-size-sm: 13px;
  --font-size-base: 14px;
  --font-size-md: 15px;
  --font-size-lg: 18px;
  --font-size-xl: 22px;
  --font-size-2xl: 28px;
  --font-size-3xl: 32px;
  
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;
  
  /* ========== 阴影系统 ========== */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.25);
  
  /* 发光效果 */
  --glow-primary: 0 0 20px rgba(245, 166, 35, 0.4), 0 0 40px rgba(245, 166, 35, 0.2);
  --glow-accent: 0 0 20px rgba(74, 144, 164, 0.4), 0 0 40px rgba(74, 144, 164, 0.2);
  --glow-error: 0 0 15px rgba(239, 68, 68, 0.4);
  
  /* ========== 过渡动画 ========== */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.35s ease;
  
  /* ========== 布局变量 ========== */
  --content-max-width: 1400px;
  --input-max-width: 680px;
  --sidebar-width: 280px;
  
  /* 响应式断点 */
  --breakpoint-sm: 480px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;
  
  /* ========== 输入框组件变量 ========== */
  --input-height: 44px;
  --input-padding: 12px 16px;
  --input-border-width: 1px;
  
  /* ========== 按钮组件变量 ========== */
  --btn-height-sm: 36px;
  --btn-height-md: 44px;
  --btn-height-lg: 52px;
  --btn-padding-sm: 8px 16px;
  --btn-padding-md: 12px 24px;
  --btn-padding-lg: 16px 32px;
}

/* ========== 通用工具类 ========== */

/* 渐变背景 */

.gradient-primary {
  background: var(--primary-gradient);
}

.gradient-accent {
  background: var(--accent-gradient);
}

/* 发光效果 */

.glow-primary {
  box-shadow: var(--glow-primary);
}

.glow-accent {
  box-shadow: var(--glow-accent);
}

/* 毛玻璃效果 */

.glass-effect {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* ========== 统一的按钮样式 ========== */

/* 主要按钮 - 渐变金色 */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  height: var(--btn-height-md);
  padding: var(--btn-padding-md);
  background: var(--primary-gradient);
  border: none;
  border-radius: var(--radius-lg);
  color: var(--light-text-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: var(--glow-primary);
}

.btn-primary:hover:not(:disabled) {
  transform: scale(1.02) translateY(-1px);
  box-shadow: 0 0 25px rgba(245, 166, 35, 0.5), 0 0 50px rgba(245, 166, 35, 0.3);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 次要按钮 - 透明 */

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  height: var(--btn-height-md);
  padding: var(--btn-padding-md);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-lg);
  color: var(--dark-text-secondary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: all var(--transition-normal);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--dark-border-hover);
  color: var(--dark-text-primary);
}

.btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 图标按钮 */

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.06);
  border: none;
  border-radius: var(--radius-md);
  color: var(--dark-text-muted);
  cursor: pointer;
  transition: all var(--transition-normal);
}

.btn-icon:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
  color: var(--dark-text-primary);
}

.btn-icon:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ========== 统一的输入框样式 ========== */

.input-field {
  width: 100%;
  height: var(--input-height);
  padding: var(--input-padding);
  background: transparent;
  border: none;
  outline: none;
  color: var(--dark-text-primary);
  font-size: var(--font-size-md);
  font-family: var(--font-family);
}

.input-field::placeholder {
  color: var(--dark-text-muted);
}

.input-container {
  display: flex;
  align-items: center;
  padding: var(--spacing-sm);
  background: var(--dark-bg-elevated);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-lg);
  transition: all var(--transition-normal);
}

.input-container:focus-within {
  border-color: var(--dark-border-hover);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

/* ========== 统一的卡片样式 ========== */

.card {
  background: var(--dark-bg-elevated);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-xl);
  padding: var(--spacing-lg);
  transition: all var(--transition-normal);
}

.card:hover {
  border-color: var(--dark-border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* 浅色主题卡片 */

.card-light {
  background: var(--light-bg-elevated);
  border: 1px solid var(--light-border);
  border-radius: var(--radius-xl);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
}

.card-light:hover {
  box-shadow: var(--shadow-lg);
}

/* ========== 标签/徽章样式 ========== */

.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-full);
  color: var(--dark-text-secondary);
  font-size: var(--font-size-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tag:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--dark-border-hover);
  color: var(--dark-text-primary);
}

.tag.active {
  background: rgba(74, 144, 164, 0.2);
  border-color: rgba(74, 144, 164, 0.4);
  color: var(--accent-color);
}

/* ========== 动画 ========== */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(8px); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes pulseRecording {
  0%, 100% { 
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
  }
  50% { 
    box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
  }
}

.animate-fadeIn {
  animation: fadeIn 0.3s ease forwards;
}

.animate-spin {
  animation: spin 0.8s linear infinite;
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* ========== 响应式工具类 ========== */

/* 隐藏/显示 */

@media (max-width: 768px) {
  .hide-mobile {
    display: none !important;
  }
}

@media (min-width: 769px) {
  .hide-desktop {
    display: none !important;
  }
}

/* 响应式容器 */

.container-responsive {
  width: 100%;
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

@media (max-width: 768px) {
  .container-responsive {
    padding: 0 var(--spacing-md);
  }
}

@media (max-width: 480px) {
  .container-responsive {
    padding: 0 var(--spacing-sm);
  }
}

/* ========== 滚动条样式 ========== */

/* 深色主题滚动条 */

.scrollbar-dark::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.scrollbar-dark::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.scrollbar-dark::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  transition: background 0.2s;
}

.scrollbar-dark::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* 浅色主题滚动条 */

.scrollbar-light::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.scrollbar-light::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 3px;
}

.scrollbar-light::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 3px;
  transition: background 0.2s;
}

.scrollbar-light::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.25);
}

.gallery-container {
	display: flex;
	flex-direction: column;
	min-height: 100%;
	color: var(--dark-text-primary, #fff);
	font-family: var(--font-family, 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif);
	background: linear-gradient(180deg, var(--dark-bg-primary) 0%, var(--dark-bg-secondary) 100%);
	padding-bottom: 40px;
}

/* 顶部控制栏 */

.top-control-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px 48px;
	max-width: 1500px;
	margin: 0 auto;
	width: 100%;
	box-sizing: border-box;
}

.tab-buttons {
	display: flex;
	gap: 8px;
}

.tab-btn {
	padding: 10px 24px;
	border-radius: 24px;
	border: 1px solid rgba(255, 255, 255, 0.2);
	background: transparent;
	color: rgba(255, 255, 255, 0.7);
	font-size: 14px;
	cursor: pointer;
	transition: all 0.2s;
}

.tab-btn:hover {
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
}

.tab-btn.active {
	background: rgba(255, 255, 255, 0.15);
	border-color: rgba(255, 255, 255, 0.4);
	color: #fff;
	font-weight: 500;
}

.search-box {
	position: relative;
	width: 280px;
}

.search-box input {
	width: 100%;
	padding: 10px 16px 10px 40px;
	border-radius: 24px;
	border: 1px solid rgba(255, 255, 255, 0.2);
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
	font-size: 14px;
	outline: none;
	transition: all 0.2s;
	box-sizing: border-box;
}

.search-box input::placeholder {
	color: rgba(255, 255, 255, 0.5);
}

.search-box input:focus {
	background: rgba(255, 255, 255, 0.15);
	border-color: rgba(255, 255, 255, 0.4);
}

.search-icon {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	color: rgba(255, 255, 255, 0.5);
	pointer-events: none;
}

/* 瀑布流区域 */

.waterfall-section {
	flex: 1;
	padding: 0 48px 48px;
	background: transparent;
}

/* Flex 4列瀑布流布局 */

.waterfall-grid {
	display: flex;
	gap: 16px;
	max-width: 1400px;
	margin: 0 auto;
}

/* 每一列 */

.waterfall-column {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.waterfall-item {
	position: relative;
	border-radius: 6px;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.1);
	cursor: pointer;
	transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.waterfall-item:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
	border-color: rgba(255, 255, 255, 0.2);
}

.waterfall-item img {
	width: 100%;
	height: auto;
	display: block;
}

.waterfall-item-overlay {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 40px 16px 16px;
	background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
	opacity: 0;
	transition: opacity 0.3s;
}

.waterfall-item:hover .waterfall-item-overlay {
	opacity: 1;
}

.waterfall-item-prompt {
	font-size: 13px;
	color: #fff;
	margin: 0 0 8px 0;
	line-height: 1.4;
}

/* AI标签样式 */

.waterfall-item-tags {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	margin-bottom: 8px;
}

.tag-badge {
	font-size: 11px;
	padding: 3px 8px;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.2);
	color: #fff;
	backdrop-filter: blur(8px);
	font-weight: 500;
}

/* 美学评分徽章 */

.aesthetic-badge {
	font-size: 12px;
	padding: 4px 10px;
	border-radius: 14px;
	background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 105, 180, 0.3));
	color: #fff;
	backdrop-filter: blur(8px);
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

/* 操作按钮组 - 默认隐藏，hover时显示 */

.action-buttons {
	position: absolute;
	bottom: 12px;
	right: 12px;
	display: flex;
	gap: 8px;
	align-items: center;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.waterfall-item:hover .action-buttons {
	opacity: 1;
}

/* 点赞按钮 */

.like-btn {
	padding: 6px 12px;
	border-radius: 20px;
	border: none;
	background: rgba(0, 0, 0, 0.6);
	color: rgba(255, 255, 255, 0.9);
	font-size: 13px;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 4px;
	transition: all 0.2s;
	backdrop-filter: blur(8px);
}

.like-btn:hover {
	transform: scale(1.05);
	background: rgba(0, 0, 0, 0.8);
}

.like-btn.liked {
	color: #ff4757;
}

.like-btn.liked svg {
	animation: heartBeat 0.3s ease-in-out;
}

/* 点踩按钮 */

.dislike-btn {
	padding: 6px 10px;
	border-radius: 20px;
	border: none;
	background: rgba(0, 0, 0, 0.6);
	color: rgba(255, 255, 255, 0.9);
	font-size: 13px;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 4px;
	backdrop-filter: blur(8px);
	transition: all 0.3s;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.dislike-btn:hover {
	background: rgba(0, 0, 0, 0.8);
	transform: scale(1.05);
}

.dislike-btn.disliked {
	background: rgba(255, 71, 87, 0.9);
	color: #fff;
}

.dislike-btn.disliked:hover {
	background: rgba(255, 71, 87, 1);
}

.dislike-btn svg {
	display: block;
}

.dislike-btn.disliked svg {
	animation: heartBeat 0.3s ease-in-out;
}

@keyframes heartBeat {
	0% {
		transform: scale(1);
	}
	50% {
		transform: scale(1.3);
	}
	100% {
		transform: scale(1);
	}
}

/* 响应式设计 - 完整的断点支持 */

/* 大屏桌面 (>1280px) */

@media (min-width: 1281px) {
	.waterfall-grid {
		max-width: 1400px;
		gap: 20px;
	}
	
	.top-control-bar {
		max-width: 1500px;
		padding: 24px 48px;
	}
}

/* 标准桌面 (1024px-1280px) */

@media (min-width: 1024px) and (max-width: 1280px) {
	.waterfall-grid {
		max-width: 1200px;
		gap: 16px;
	}
	
	.top-control-bar {
		padding: 20px 32px;
	}
}

/* 平板 (768px-1024px) */

@media (min-width: 768px) and (max-width: 1023px) {
	.waterfall-grid {
		gap: 14px;
	}
	
	.top-control-bar {
		padding: 16px 24px;
	}
	
	.waterfall-section {
		padding: 0 24px 32px;
	}
	
	.tab-btn {
		padding: 8px 18px;
		font-size: 13px;
	}
	
	.search-box {
		width: 240px;
	}
}

/* 小平板/大手机横屏 (600px-767px) */

@media (min-width: 600px) and (max-width: 767px) {
	.waterfall-grid {
		gap: 12px;
	}
	
	.top-control-bar {
		padding: 14px 20px;
	}
	
	.waterfall-section {
		padding: 0 20px 24px;
	}
	
	.tab-btn {
		padding: 8px 16px;
		font-size: 13px;
	}
	
	.search-box {
		width: 200px;
	}
	
	.search-box input {
		font-size: 13px;
		padding: 8px 14px 8px 36px;
	}
}

/* 手机端 (<600px) */

@media (max-width: 599px) {
	.top-control-bar {
		padding: 12px 16px;
		flex-direction: column;
		gap: 12px;
		align-items: stretch;
	}
	
	.tab-buttons {
		justify-content: center;
	}
	
	.tab-btn {
		padding: 8px 14px;
		font-size: 13px;
		flex: 1;
		text-align: center;
	}
	
	.search-box {
		width: 100%;
	}
	
	.search-box input {
		font-size: 14px;
		padding: 10px 14px 10px 38px;
	}
	
	.waterfall-section {
		padding: 0 12px 16px;
	}
	
	.waterfall-grid {
		gap: 10px;
	}
	
	.waterfall-item {
		border-radius: 12px;
	}
	
	/* 操作按钮优化 */
	.action-buttons {
		bottom: 8px;
		right: 8px;
		gap: 6px;
	}
	
	.like-btn,
	.dislike-btn {
		padding: 5px 10px;
		font-size: 12px;
	}
	
	.like-btn svg,
	.dislike-btn svg {
		width: 16px;
		height: 16px;
	}
}

/* 超小屏幕 (<400px) */

@media (max-width: 399px) {
	.top-control-bar {
		padding: 10px 12px;
		gap: 10px;
	}
	
	.tab-btn {
		padding: 6px 10px;
		font-size: 12px;
		border-radius: 18px;
	}
	
	.waterfall-section {
		padding: 0 8px 12px;
	}
	
	.waterfall-grid {
		gap: 8px;
	}
	
	.waterfall-item {
		border-radius: 10px;
	}
	
	.waterfall-item-prompt {
		font-size: 11px;
	}
	
	.tag-badge {
		font-size: 10px;
		padding: 2px 6px;
	}
}

/* 横屏优化 */

@media (max-height: 500px) and (orientation: landscape) {
	.gallery-smart-input-wrapper {
		padding: 16px 20px;
	}
	
	.gallery-smart-input-title {
		font-size: 20px;
	}
	
	.top-control-bar {
		padding: 10px 20px;
	}
}

/* 触摸设备优化 */

@media (hover: none) and (pointer: coarse) {
	.waterfall-item-overlay {
		opacity: 1;
		background: linear-gradient(transparent 50%, rgba(0, 0, 0, 0.7));
	}
	
	.like-btn,
	.dislike-btn {
		min-height: 44px;
		min-width: 44px;
	}
}

/* 安全区域适配 */

@supports (padding: env(safe-area-inset-bottom)) {
	.gallery-container {
		padding-bottom: env(safe-area-inset-bottom);
	}
}
/**
 * 画框组件样式
 * 使用九宫格（9-slice scaling）技术实现画框效果
 * 
 * 核心原理：
 * 1. 图片作为内容层居中显示
 * 2. 画框PNG覆盖在图片上方，透明区域露出图片
 * 3. 通过 --frame-width 和 --inner-padding 精确控制图片位置
 * 4. 白色填充层确保图片与画框内边缘的视觉一致性
 */

/* ===============================================
   主容器 - 包含图片和画框
   使用 CSS 变量控制尺寸
   =============================================== */
.framed-image-container {
	position: relative;
	display: inline-block;
	max-height: var(--max-height, calc(90vh - 120px));
	box-sizing: border-box;
	/* 确保容器包含所有子元素 */
	overflow: visible;
	/* 容器本身的白色背景，作为填充 */
	background: #f5f5f5;
}

/* ===============================================
   画框覆盖层 - PNG画框图片
   使用绝对定位覆盖整个容器
   通过负margin扩展画框边界以包裹图片
   =============================================== */
.framed-image-frame {
	position: absolute;
	/* 画框向外扩展，包裹住图片+填充层 */
	top: calc(-1 * var(--frame-width, 80px));
	left: calc(-1 * var(--frame-width, 80px));
	right: calc(-1 * var(--frame-width, 80px));
	bottom: calc(-1 * var(--frame-width, 80px));
	z-index: 2;
	/* 画框图片完全覆盖 */
	background-size: 100% 100%;
	background-repeat: no-repeat;
	background-position: center;
	/* 确保画框不阻挡内容交互 */
	pointer-events: none;
}

/* ===============================================
   白色填充层 - 图片与画框内边缘的过渡区域
   =============================================== */
.framed-image-padding {
	position: relative;
	z-index: 1;
	background: #f8f8f8;
	/* 内边距用于图片与画框内边缘的白色填充 */
	padding: var(--inner-padding, 8px);
	/* 添加轻微的内阴影增加深度感 */
	box-shadow: 
		inset 0 2px 8px rgba(0, 0, 0, 0.1),
		inset 0 -2px 8px rgba(0, 0, 0, 0.08);
	display: flex;
	align-items: center;
	justify-content: center;
	/* 确保填充层完全覆盖画框内部 */
	min-width: 100%;
	min-height: 100%;
}

/* ===============================================
   图片内容层 - 实际显示的图片
   =============================================== */
.framed-image-content {
	display: block;
	max-width: 100%;
	/* 计算最大高度：容器最大高度 - 画框边框*2 - 填充*2 */
	max-height: calc(
		var(--max-height, calc(90vh - 120px)) - 
		var(--frame-width, 60px) * 2 - 
		var(--inner-padding, 8px) * 2
	);
	height: auto;
	width: auto;
	object-fit: contain;
	/* 图片背景色，防止透明图片显示黑色 */
	background: #f8f8f8;
	/* 初始透明，加载完成后渐显 */
	opacity: 0;
	transition: opacity 0.3s ease;
}

.framed-image-container.loaded .framed-image-content {
	opacity: 1;
}

/* ===============================================
   画框阴影效果 - 增强立体感
   =============================================== */
.framed-image-container::after {
	content: '';
	position: absolute;
	/* 阴影扩展到画框外围 */
	top: calc(-1 * var(--frame-width, 80px) + 10px);
	left: calc(-1 * var(--frame-width, 80px) + 10px);
	right: calc(-1 * var(--frame-width, 80px) + 10px);
	bottom: calc(-1 * var(--frame-width, 80px) + 10px);
	z-index: 0;
	box-shadow: 
		0 25px 80px rgba(0, 0, 0, 0.5),
		0 15px 40px rgba(0, 0, 0, 0.4);
	border-radius: 4px;
	pointer-events: none;
}

/* ===============================================
   加载状态
   =============================================== */
.framed-image-container:not(.loaded) .framed-image-padding {
	min-width: 300px;
	min-height: 200px;
	background: linear-gradient(
		90deg,
		#f0f0f0 25%,
		#e0e0e0 50%,
		#f0f0f0 75%
	);
	background-size: 200% 100%;
	animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
	0% { background-position: -200% 0; }
	100% { background-position: 200% 0; }
}

/* ===============================================
   画框选择器样式
   =============================================== */
.frame-selector {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 0;
}

.frame-selector-label {
	font-size: 13px;
	color: rgba(255, 255, 255, 0.6);
	white-space: nowrap;
}

.frame-selector-options {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	padding: 4px 0;
	-webkit-overflow-scrolling: touch;
}

.frame-option {
	width: 48px;
	height: 48px;
	padding: 4px;
	border: 2px solid rgba(255, 255, 255, 0.2);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.05);
	cursor: pointer;
	transition: all 0.2s ease;
	flex-shrink: 0;
}

.frame-option:hover {
	border-color: rgba(255, 255, 255, 0.4);
	background: rgba(255, 255, 255, 0.1);
}

.frame-option.active {
	border-color: #4d8f9d;
	background: rgba(77, 143, 157, 0.2);
}

.frame-option img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 4px;
}

/* ===============================================
   响应式适配
   =============================================== */
@media (max-width: 900px) {
	.frame-option {
		width: 40px;
		height: 40px;
	}
}

@media (max-width: 600px) {
	.frame-selector {
		flex-direction: column;
		align-items: flex-start;
	}
}
/**
 * FramedImagePreview 样式
 * 支持常规和极简两种模式
 */

.framed-image-preview {
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

/* 图片预览区域 */
.preview-image-area {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	min-height: 300px;
	background: rgba(255, 255, 255, 0.02);
	border-radius: 16px;
	padding: 20px;
}

/* 极简模式 - 去除背景装饰 */
.framed-image-preview.minimal .preview-image-area {
	background: transparent;
	padding: 0;
}

/* 图片包装器 */
.preview-image-wrapper {
	max-width: 100%;
	max-height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.framed-image-preview.minimal .preview-image-wrapper {
	padding: 0;
}

.preview-image-wrapper img {
	max-width: 100%;
	max-height: calc(70vh - 120px);
	object-fit: contain;
	border-radius: 12px;
}

/* 导航箭头 */
.preview-nav-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: none;
	background: rgba(255, 255, 255, 0.1);
	color: rgba(255, 255, 255, 0.7);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s;
	z-index: 5;
}

.preview-nav-arrow:hover {
	background: rgba(255, 255, 255, 0.2);
	color: #fff;
}

.preview-nav-arrow.prev {
	left: 10px;
}

.preview-nav-arrow.next {
	right: 10px;
}

/* 画框选择器 */
.preview-frame-selector {
	background: rgba(255, 255, 255, 0.03);
	border-radius: 12px;
	padding: 16px;
	display: flex;
	justify-content: center;
	align-items: center;
}

.framed-image-preview.minimal .preview-frame-selector {
	background: transparent;
	padding: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
	.preview-image-area {
		padding: 10px;
	}

	.preview-image-wrapper {
		padding: 10px;
	}

	.preview-nav-arrow {
		width: 32px;
		height: 32px;
	}

	.preview-nav-arrow svg {
		width: 18px;
		height: 18px;
	}
}
/**
 * 图片详情页样式
 * 深色主题 + 左右布局
 */

.detail-container {
	position: fixed;
	inset: 0;
	background: #03050c;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

.detail-not-found {
	text-align: center;
	color: #fff;
}

.detail-not-found h2 {
	font-size: 24px;
	margin-bottom: 20px;
}

.detail-not-found button {
	padding: 12px 24px;
	border-radius: 24px;
	border: 1px solid rgba(255, 255, 255, 0.2);
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
	font-size: 14px;
	cursor: pointer;
	transition: all 0.2s;
}

.detail-not-found button:hover {
	background: rgba(255, 255, 255, 0.2);
}

/* 关闭按钮 */
.detail-close {
	position: absolute;
	top: 24px;
	left: 24px;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: none;
	background: rgba(255, 255, 255, 0.1);
	color: rgba(255, 255, 255, 0.8);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s;
	z-index: 10;
}

.detail-close:hover {
	background: rgba(255, 255, 255, 0.2);
	color: #fff;
}

/* 主内容区 */
.detail-content {
	display: flex;
	width: 100%;
	max-width: 1600px;
	height: 100%;
	max-height: 95vh;
	gap: 24px;
	padding: 60px 32px;
	box-sizing: border-box;
}

/* 左右对半布局 */
.detail-split-layout {
	display: flex;
	gap: 32px;
}

/* 左半部分 */
.detail-left-section {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 16px;
	min-width: 0;
}

/* 右半部分 - 垂直居中 */
.detail-right-section {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 20px;
	min-width: 0;
	overflow-y: auto;
}

/* 画框选择器区域 */
.detail-frame-selector {
	background: rgba(255, 255, 255, 0.03);
	border-radius: 12px;
	padding: 12px 16px;
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}

/* 画框选择器区域 - 底部 */
.detail-frame-selector-bottom {
	background: rgba(255, 255, 255, 0.03);
	border-radius: 12px;
	padding: 16px;
	margin: 20px 0;
	display: flex;
	justify-content: center;
	align-items: center;
}

/* 图片预览区域 */
.detail-image-preview {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	min-height: 300px;
}

.detail-image-wrapper {
	max-width: 100%;
	max-height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px;
}

.detail-image-wrapper img {
	max-width: 100%;
	max-height: calc(70vh - 120px);
	object-fit: contain;
	border-radius: 12px;
	box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

/* 导航箭头 */
.nav-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: none;
	background: rgba(255, 255, 255, 0.1);
	color: rgba(255, 255, 255, 0.7);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s;
	z-index: 5;
}

.nav-arrow:hover {
	background: rgba(255, 255, 255, 0.2);
	color: #fff;
}

.nav-arrow.prev {
	left: 0;
}

.nav-arrow.next {
	right: 0;
}

/* 右侧信息区 */
.detail-info-section {
	width: 360px;
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	gap: 20px;
	color: #fff;
	overflow-y: auto;
}

/* 底部信息栏 */
.detail-info-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px;
	background: rgba(255, 255, 255, 0.03);
	border-radius: 12px;
	gap: 16px;
}

.detail-info-bar .like-button {
	padding: 8px 16px;
	font-size: 14px;
}

.detail-stats {
	display: flex;
	gap: 20px;
	flex-wrap: wrap;
}

.stat-item {
	display: flex;
	align-items: center;
	gap: 6px;
}

.stat-label {
	font-size: 12px;
	color: rgba(255, 255, 255, 0.5);
}

.stat-value {
	font-size: 13px;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.9);
}

/* 作者信息 */
.detail-author {
	display: flex;
	align-items: center;
	gap: 12px;
}

.author-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: linear-gradient(135deg, #4d8f9d, #416887);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
}

.author-name {
	flex: 1;
	font-size: 15px;
	font-weight: 500;
}

.follow-btn {
	padding: 6px 16px;
	border-radius: 16px;
	border: none;
	background: #4d8f9d;
	color: #fff;
	font-size: 13px;
	cursor: pointer;
	transition: all 0.2s;
}

.follow-btn:hover {
	background: #5ca0ae;
}

/* 分类信息 */
.detail-category {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.category-tag {
	padding: 4px 12px;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.1);
	font-size: 13px;
	color: rgba(255, 255, 255, 0.9);
}

.detail-date,
.detail-source {
	font-size: 13px;
	color: rgba(255, 255, 255, 0.5);
}

.detail-source::before {
	content: '|';
	margin-right: 12px;
	color: rgba(255, 255, 255, 0.2);
}

/* 图片描述 */
.detail-description {
	background: rgba(255, 255, 255, 0.05);
	border-radius: 12px;
	padding: 16px;
}

.detail-description h3 {
	font-size: 14px;
	font-weight: 500;
	margin: 0 0 8px 0;
	color: rgba(255, 255, 255, 0.7);
}

.detail-description p {
	font-size: 15px;
	line-height: 1.6;
	margin: 0;
	color: #fff;
}

/* 图片参数 */
.detail-params {
	display: flex;
	gap: 24px;
	padding: 16px 0;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.param-item {
	display: flex;
	align-items: center;
	gap: 6px;
}

.param-label {
	font-size: 13px;
	color: rgba(255, 255, 255, 0.5);
}

.param-value {
	font-size: 13px;
	color: #fff;
}

/* 操作按钮 */
.detail-actions {
	display: flex;
	gap: 12px;
}

.action-btn {
	flex: 1;
	padding: 12px 16px;
	border-radius: 12px;
	border: 1px solid rgba(255, 255, 255, 0.2);
	background: transparent;
	color: #fff;
	font-size: 14px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	transition: all 0.2s;
}

.action-btn:hover {
	background: rgba(255, 255, 255, 0.1);
	border-color: rgba(255, 255, 255, 0.3);
}

.action-btn.primary {
	background: rgba(77, 143, 157, 0.3);
	border-color: rgba(77, 143, 157, 0.5);
}

.action-btn.primary:hover {
	background: rgba(77, 143, 157, 0.5);
}

.action-btn.primary:disabled {
	cursor: not-allowed;
}

.action-btn.primary.loading {
	pointer-events: none;
}

/* 加载动画 */
@keyframes spin {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

.action-btn .spin {
	animation: spin 1s linear infinite;
}

/* 点赞区域 */
.detail-likes {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: auto;
}

.like-button {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 20px;
	border-radius: 24px;
	border: 1px solid rgba(255, 255, 255, 0.2);
	background: transparent;
	color: rgba(255, 255, 255, 0.8);
	font-size: 15px;
	cursor: pointer;
	transition: all 0.2s;
}

.like-button:hover {
	background: rgba(255, 255, 255, 0.1);
}

.like-button.liked {
	color: #ff4757;
	border-color: rgba(255, 71, 87, 0.3);
	background: rgba(255, 71, 87, 0.1);
}

.like-button.liked:hover {
	background: rgba(255, 71, 87, 0.2);
}

.like-button svg {
	transition: transform 0.2s;
}

.like-button.liked svg {
	animation: heartBeat 0.3s ease-in-out;
}

@keyframes heartBeat {
	0% {
		transform: scale(1);
	}
	50% {
		transform: scale(1.3);
	}
	100% {
		transform: scale(1);
	}
}

.more-button {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.2);
	background: transparent;
	color: rgba(255, 255, 255, 0.6);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s;
}

.more-button:hover {
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
}

/* 画框选择区域 */
.detail-frame-section {
	padding: 16px 0;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.frame-toggle {
	margin-bottom: 12px;
}

.toggle-label {
	display: flex;
	align-items: center;
	gap: 12px;
	cursor: pointer;
}

.toggle-input {
	display: none;
}

.toggle-slider {
	width: 44px;
	height: 24px;
	background: rgba(255, 255, 255, 0.2);
	border-radius: 12px;
	position: relative;
	transition: all 0.3s ease;
}

.toggle-slider::before {
	content: '';
	position: absolute;
	top: 2px;
	left: 2px;
	width: 20px;
	height: 20px;
	background: #fff;
	border-radius: 50%;
	transition: all 0.3s ease;
}

.toggle-input:checked + .toggle-slider {
	background: #4d8f9d;
}

.toggle-input:checked + .toggle-slider::before {
	transform: translateX(20px);
}

.toggle-text {
	font-size: 14px;
	color: rgba(255, 255, 255, 0.8);
}

/* ===== 提示词编辑器样式 ===== */
.detail-prompt-editor {
	background: rgba(255, 255, 255, 0.03);
	border-radius: 16px;
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 16px;
	border: 1px solid rgba(255, 255, 255, 0.08);
}

.prompt-editor-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.prompt-editor-toolbar h3 {
	font-size: 15px;
	font-weight: 600;
	margin: 0;
	color: rgba(255, 255, 255, 0.9);
}

.prompt-mode-switch {
	display: flex;
	gap: 4px;
	background: rgba(255, 255, 255, 0.06);
	border-radius: 8px;
	padding: 3px;
}

.mode-btn {
	padding: 6px 12px;
	border-radius: 6px;
	border: none;
	background: transparent;
	color: rgba(255, 255, 255, 0.6);
	font-size: 12px;
	cursor: pointer;
	transition: all 0.2s;
	display: flex;
	align-items: center;
	gap: 4px;
}

.mode-btn:hover {
	color: rgba(255, 255, 255, 0.8);
}

.mode-btn.active {
	background: rgba(77, 143, 157, 0.5);
	color: #fff;
}

.prompt-editor-content {
	flex: 1;
	min-height: 200px;
}

.prompt-textarea {
	width: 100%;
	height: 200px;
	background: rgba(0, 0, 0, 0.3);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 12px;
	padding: 16px;
	color: #fff;
	font-size: 14px;
	line-height: 1.6;
	resize: none;
	outline: none;
	font-family: inherit;
	box-sizing: border-box;
	transition: border-color 0.2s;
}

.prompt-textarea:focus {
	border-color: rgba(77, 143, 157, 0.5);
}

.prompt-textarea::placeholder {
	color: rgba(255, 255, 255, 0.3);
}

.prompt-preview {
	background: rgba(0, 0, 0, 0.2);
	border-radius: 12px;
	padding: 16px;
	color: rgba(255, 255, 255, 0.85);
	font-size: 14px;
	line-height: 1.8;
	min-height: 200px;
	max-height: 300px;
	overflow-y: auto;
	white-space: pre-wrap;
	word-break: break-word;
}

.prompt-editor-actions {
	display: flex;
	justify-content: flex-end;
}

.update-btn {
	padding: 10px 24px;
	border-radius: 10px;
	border: none;
	background: linear-gradient(135deg, #4d8f9d 0%, #416887 100%);
	color: #fff;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s;
	display: flex;
	align-items: center;
	gap: 8px;
}

.update-btn:hover:not(:disabled) {
	transform: translateY(-1px);
	box-shadow: 0 4px 16px rgba(77, 143, 157, 0.4);
}

.update-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.update-btn.loading {
	pointer-events: none;
}

.update-btn .spin {
	animation: spin 1s linear infinite;
}

/* ===== 知识图谱标签样式 ===== */
.detail-knowledge-tags {
	background: rgba(255, 255, 255, 0.03);
	border-radius: 16px;
	padding: 20px;
	border: 1px solid rgba(255, 255, 255, 0.08);
}

.detail-knowledge-tags h4 {
	font-size: 14px;
	font-weight: 600;
	margin: 0 0 16px 0;
	color: rgba(255, 255, 255, 0.9);
}

.knowledge-tags-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.knowledge-tag {
	padding: 6px 14px;
	border-radius: 16px;
	background: rgba(77, 143, 157, 0.2);
	border: 1px solid rgba(77, 143, 157, 0.3);
	color: rgba(255, 255, 255, 0.85);
	font-size: 12px;
	transition: all 0.2s;
}

.knowledge-tag:hover {
	background: rgba(77, 143, 157, 0.35);
	border-color: rgba(77, 143, 157, 0.5);
}

.knowledge-tag-empty {
	color: rgba(255, 255, 255, 0.4);
	font-size: 13px;
	font-style: italic;
}

/* ===== 创作按钮组样式 ===== */
.detail-creation-actions {
	display: flex;
	gap: 12px;
	margin-left: auto;
}

.creation-btn {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	border-radius: 20px;
	border: 1px solid rgba(255, 255, 255, 0.2);
	background: rgba(255, 255, 255, 0.05);
	color: rgba(255, 255, 255, 0.85);
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
}

.creation-btn:hover {
	background: rgba(255, 255, 255, 0.12);
	border-color: rgba(255, 255, 255, 0.35);
	color: #fff;
	transform: translateY(-1px);
}

.creation-btn svg {
	flex-shrink: 0;
	transition: transform 0.2s;
}

.creation-btn:hover svg {
	transform: scale(1.1);
}

/* 做同款按钮特殊样式 */
.clone-btn:hover {
	background: rgba(77, 143, 157, 0.2);
	border-color: rgba(77, 143, 157, 0.4);
}

/* 参考创作按钮特殊样式 */
.reference-btn:hover {
	background: rgba(255, 165, 0, 0.2);
	border-color: rgba(255, 165, 0, 0.4);
}

/* 底部创作按钮组 */
.detail-creation-actions-bottom {
	display: flex;
	gap: 12px;
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.detail-creation-actions-bottom .creation-btn {
	flex: 1;
	justify-content: center;
}

/* ===== 响应式设计 ===== */
@media (max-width: 900px) {
	.detail-split-layout {
		flex-direction: column;
	}

	.detail-left-section,
	.detail-right-section {
		flex: none;
		width: 100%;
	}
	.detail-content {
		flex-direction: column;
		padding: 80px 24px 24px;
		gap: 24px;
	}

	.detail-info-section {
		width: 100%;
		max-height: 40vh;
	}

	.detail-image-wrapper img {
		max-height: 50vh;
	}
}

@media (max-width: 600px) {
	.detail-close {
		top: 16px;
		left: 16px;
	}

	.detail-content {
		padding: 60px 16px 16px;
	}

	.detail-actions {
		flex-direction: column;
	}

	.action-btn {
		width: 100%;
	}
}
/**
 * 意图表达页面样式
 * 与项目整体设计规范保持一致
 */

/* ========== 变量定义 ========== */
.intention-page {
  /* 主色调 - 与 LandingPage 保持一致 */
  --primary-start: #4d8f9d;
  --primary-end: #416887;
  --primary-color: #4d8f9d;
  
  /* 背景色 */
  --bg-dark: #03050c;
  --bg-light: #f0eee9;
  --bg-white: #ffffff;
  
  /* 文字色 */
  --text-primary: #1c1c1c;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --text-light: rgba(255, 255, 255, 0.9);
  
  /* 边框和阴影 */
  --border-light: rgba(255, 255, 255, 0.12);
  --border-dark: rgba(0, 0, 0, 0.1);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
  
  /* 强调色 */
  --accent-color: #4d8f9d;
  --accent-light: rgba(77, 143, 157, 0.15);
  
  /* 过渡 */
  --transition-base: all 0.3s ease;
  
  /* 圆角 */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
}

/* ========== 基础布局 ========== */
.intention-page {
  min-height: 100vh;
  font-family: 'Inter', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-dark);
  position: relative;
  overflow: hidden;
}

/* 动态背景 - 与首页一致 */
.intention-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.intention-bg-layer {
  position: absolute;
  top: -5%;
  left: -5%;
  width: 110%;
  height: 110%;
  background-image: url('/login-bg.png');
  background-size: cover;
  background-position: center;
  opacity: 0.6;
}

.intention-bg-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 0%, rgba(185, 213, 226, 0.35), transparent 55%),
    radial-gradient(circle at 80% 0%, rgba(155, 195, 170, 0.35), transparent 55%),
    linear-gradient(180deg, rgba(8, 14, 22, 0.4), rgba(5, 8, 14, 0.9));
}

/* ========== 输入模式页面 ========== */
.intention-input-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  z-index: 10;
}

.intention-input-container {
  width: 100%;
  max-width: 640px;
  text-align: center;
}

/* 返回按钮 */
.intention-back-btn {
  position: fixed;
  top: 24px;
  left: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-light);
  color: var(--text-light);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-base);
  z-index: 100;
}

.intention-back-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateX(-4px);
}

.intention-back-btn svg {
  width: 18px;
  height: 18px;
}

/* 品牌标识 */
.intention-brand {
  margin-bottom: 48px;
}

.intention-title {
  font-size: 48px;
  font-weight: 600;
  color: var(--text-light);
  margin: 0 0 16px 0;
  letter-spacing: -0.02em;
}

.intention-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  font-weight: 300;
  margin: 0;
}

/* 输入卡片 */
.intention-input-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  padding: 16px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-lg);
}

.intention-upload-btn {
  width: 100%;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition-base);
  font-size: 14px;
  margin-bottom: 12px;
}

.intention-upload-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.intention-upload-btn svg {
  width: 20px;
  height: 20px;
}

.intention-textarea {
  width: 100%;
  min-height: 80px;
  padding: 16px;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  color: var(--text-light);
  font-size: 16px;
  line-height: 1.6;
}

.intention-textarea::placeholder {
  color: var(--text-muted);
}

.intention-input-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.intention-submit-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary-start), var(--primary-end));
  border: none;
  color: white;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-base);
  box-shadow: 0 6px 24px rgba(77, 143, 157, 0.3);
}

.intention-submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(77, 143, 157, 0.4);
}

.intention-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.intention-submit-btn svg {
  width: 18px;
  height: 18px;
}

/* 错误提示 */
.intention-error {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  margin-top: 16px;
}

/* 功能标签 */
.intention-features {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 32px;
}

.intention-feature {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.intention-feature::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary-color);
}

/* ========== 画廊模式（分屏布局） ========== */
.intention-gallery-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: var(--bg-light);
}

/* 头部导航 */
.intention-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-dark);
  z-index: 50;
  flex-shrink: 0;
}

.intention-header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.intention-header-back {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: transparent;
  border: 1px solid var(--border-dark);
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition-base);
}

.intention-header-back:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-primary);
}

.intention-header-back svg {
  width: 16px;
  height: 16px;
}

.intention-header-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  cursor: pointer;
  transition: var(--transition-base);
}

.intention-header-title:hover {
  opacity: 0.7;
}

.intention-new-btn {
  padding: 10px 20px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary-start), var(--primary-end));
  border: none;
  color: white;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-base);
}

.intention-new-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(77, 143, 157, 0.3);
}

/* 主内容区 */
.intention-main {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
}

/* 背景纹理 */
.intention-texture {
  position: absolute;
  inset: 0;
  opacity: 0.3;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239C92AC' fill-opacity='0.08'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* 左侧面板 - 配置编辑器 */
.intention-left-panel {
  width: 42%;
  height: 100%;
  overflow-y: auto;
  border-right: 1px solid var(--border-dark);
  position: relative;
  z-index: 10;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
}

.intention-left-content {
  padding: 32px;
  min-height: 100%;
}

/* 右侧面板 - 画布展示 */
.intention-right-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px;
  overflow-y: auto;
  position: relative;
  z-index: 10;
}

/* 聚光灯效果 */
.intention-spotlight {
  position: absolute;
  top: 0;
  left: 30%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(77, 143, 157, 0.15) 0%, transparent 70%);
  filter: blur(60px);
  pointer-events: none;
}

/* 画布容器 */
.intention-canvas-container {
  width: 100%;
  max-width: 700px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 48px;
}

/* 生成中状态 */
.intention-generating {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(145deg, #f8f8f8, #ffffff);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-dark);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
}

.intention-generating.pulse {
  animation: intention-pulse 2s ease-in-out infinite;
}

@keyframes intention-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.intention-generating-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 24px;
  color: var(--primary-color);
}

.intention-generating-icon.spin {
  animation: intention-spin 1.5s linear infinite;
}

@keyframes intention-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.intention-generating-title {
  font-size: 24px;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0 0 8px 0;
}

.intention-generating-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

/* 最终图片展示 */
.intention-artwork-wrapper {
  animation: intention-fade-up 0.6s ease-out forwards;
}

@keyframes intention-fade-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 油画画框样式 */
.intention-artwork-frame {
  position: relative;
  background: linear-gradient(145deg, #8B7355, #6B5344);
  padding: 20px;
  border-radius: 4px;
  box-shadow: 
    /* 外层深色阴影 */
    0 12px 40px rgba(0, 0, 0, 0.4),
    0 6px 20px rgba(0, 0, 0, 0.3),
    /* 内层高光 */
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
  /* 木纹纹理 */
  background-image: 
    linear-gradient(145deg, #8B7355, #6B5344),
    url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23noise)' opacity='0.08'/%3E%3C/svg%3E");
}

/* 画框内层金色装饰边 */
.intention-artwork-frame::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 2px solid rgba(212, 175, 55, 0.6);
  border-radius: 2px;
  pointer-events: none;
  box-shadow: 
    inset 0 0 0 1px rgba(212, 175, 55, 0.3),
    0 0 0 1px rgba(0, 0, 0, 0.2);
}

.intention-artwork-inner {
  background: #1a1a1a;
  padding: 3px;
  box-shadow: 
    inset 0 2px 8px rgba(0, 0, 0, 0.5),
    inset 0 0 0 1px rgba(0, 0, 0, 0.3);
}

.intention-artwork-img {
  width: 100%;
  height: auto;
  max-height: 65vh;
  object-fit: contain;
  display: block;
}

/* 画作铭牌 */
.intention-plaque {
  margin-top: 24px;
  background: linear-gradient(145deg, #f5f3f0, #e8e6e3);
  padding: 16px 32px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0, 0, 0, 0.08);
  text-align: center;
}

.intention-plaque-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 4px 0;
}

.intention-plaque-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin: 0;
}

/* 提示词详情 */
.intention-prompt-section {
  width: 100%;
  max-width: 700px;
  margin-bottom: 48px;
  animation: intention-fade-up 0.6s ease-out 0.2s forwards;
  opacity: 0;
}

.intention-prompt-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-md);
  padding: 24px;
  border: 1px solid var(--border-dark);
  transition: var(--transition-base);
}

.intention-prompt-card:hover {
  background: rgba(255, 255, 255, 0.9);
}

.intention-prompt-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.intention-prompt-header svg {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
}

.intention-prompt-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0;
}

.intention-prompt-content {
  font-size: 13px;
  color: var(--text-secondary);
  font-family: 'Monaco', 'Menlo', monospace;
  line-height: 1.7;
  white-space: pre-wrap;
  padding-left: 16px;
  border-left: 2px solid var(--primary-color);
}

/* 历史记录 */
.intention-history-section {
  width: 100%;
  max-width: 700px;
  animation: intention-fade-up 0.6s ease-out 0.4s forwards;
  opacity: 0;
}

.intention-history-header {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-dark);
  margin-bottom: 20px;
}

.intention-history-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.intention-history-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #e5e5e5;
  cursor: pointer;
  transition: var(--transition-base);
  border: 2px solid transparent;
}

.intention-history-item:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
}

.intention-history-item.active {
  border-color: var(--primary-color);
}

.intention-history-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.intention-history-item:hover img {
  transform: scale(1.05);
}

.intention-history-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 50%);
  opacity: 0;
  transition: var(--transition-base);
  display: flex;
  align-items: flex-end;
  padding: 12px;
}

.intention-history-item:hover .intention-history-overlay {
  opacity: 1;
}

.intention-history-label {
  font-size: 11px;
  color: white;
  font-weight: 500;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
  text-align: center;
}

/* ========== MindMap 编辑器样式 ========== */
.mindmap-editor {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding-bottom: 48px;
}

/* 编辑器头部 - 已移除，保留样式以防其他地方引用 */
.mindmap-header {
  display: none;
}

/* 底部按钮区域 */
.mindmap-footer {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  justify-content: center;
}

.mindmap-regen-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-base);
  border: none;
  flex-shrink: 0;
}

.mindmap-regen-btn.active {
  background: linear-gradient(135deg, var(--primary-start), var(--primary-end));
  color: white;
  box-shadow: 0 4px 12px rgba(77, 143, 157, 0.3);
}

.mindmap-regen-btn.active:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(77, 143, 157, 0.4);
}

.mindmap-regen-btn.disabled {
  background: #e5e5e5;
  color: var(--text-muted);
  cursor: not-allowed;
}

.mindmap-regen-btn svg {
  width: 16px;
  height: 16px;
}

.mindmap-regen-btn svg.spin {
  animation: intention-spin 1s linear infinite;
}

/* 加载状态 */
.mindmap-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  padding: 48px 24px;
}

.mindmap-loading-content {
  text-align: center;
}

.mindmap-loading-spinner {
  width: 64px;
  height: 64px;
  margin: 0 auto 24px;
}

.mindmap-loading-spinner svg {
  width: 100%;
  height: 100%;
  color: var(--primary-color);
}

.mindmap-loading-spinner svg.spin {
  animation: intention-spin 1s linear infinite;
}

.mindmap-loading-text {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 8px 0;
}

.mindmap-loading-hint {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

/* 空状态 */
.mindmap-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  padding: 48px 24px;
}

.mindmap-empty-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 24px;
  color: var(--text-muted);
  opacity: 0.5;
}

.mindmap-empty-icon svg {
  width: 100%;
  height: 100%;
}

.mindmap-empty-text {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0 0 8px 0;
}

.mindmap-empty-hint {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
  text-align: center;
}

/* 文本块 */
.mindmap-text-block {
  margin-bottom: 28px;
  transition: all 0.5s ease;
  position: relative;
}

.mindmap-text-block.thinking {
  opacity: 0.5;
  filter: blur(1px);
}

.mindmap-block-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.mindmap-step-number {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-start), var(--primary-end));
  color: white;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(77, 143, 157, 0.25);
  flex-shrink: 0;
}

.mindmap-block-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  flex: 1;
}

/* AI思考展开/收起按钮 - 与标题同行 */
.mindmap-reasoning-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 0;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: var(--transition-base);
  margin-left: auto;
}

.mindmap-reasoning-toggle:hover {
  opacity: 0.7;
}

.mindmap-reasoning-arrow {
  width: 12px;
  height: 12px;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.mindmap-reasoning-toggle.expanded .mindmap-reasoning-arrow {
  transform: rotate(180deg);
}

.mindmap-reasoning-label {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
}

.mindmap-reasoning-time {
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0.7;
  margin-left: 2px;
}

.mindmap-reasoning-content {
  margin: 8px 0 12px 32px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 6px;
  border-left: 2px solid var(--primary-color);
}

.mindmap-reasoning-text {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
}

/* 内容文本 */
.mindmap-content {
  font-size: 14px;
  line-height: 1.9;
  color: var(--text-primary);
  padding-left: 32px;
}

/* 分隔线 */
.mindmap-divider {
  width: calc(100% - 32px);
  margin-left: 32px;
  height: 1px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.03), transparent);
  margin-top: 8px;
  margin-bottom: 20px;
}

/* 内联下拉菜单 */
.inline-dropdown {
  position: relative;
  display: inline-block;
  margin: 0 2px;
  vertical-align: baseline;
}

.inline-dropdown.dropdown-open {
  z-index: 1000;
}

.inline-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  border-bottom: 1.5px solid var(--primary-color);
  background: transparent;
  border-top: none;
  border-left: none;
  border-right: none;
  color: var(--primary-color);
  font-weight: 500;
  font-size: inherit;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition-base);
  border-radius: 2px;
  white-space: nowrap;
}

.inline-dropdown-trigger:hover {
  background: rgba(77, 143, 157, 0.1);
}

.inline-dropdown-trigger svg {
  width: 10px;
  height: 10px;
  opacity: 0.6;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.inline-dropdown-trigger.open svg {
  transform: rotate(180deg);
}

.inline-dropdown-menu {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: calc(100% + 8px);
  width: 240px;
  max-height: 280px;
  overflow-y: auto;
  background: white;
  border-radius: var(--radius-md);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2), 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-dark);
  z-index: 1001;
  animation: intention-fade-up 0.15s ease-out forwards;
}

.inline-dropdown-menu-inner {
  padding: 8px;
}

.inline-dropdown-option {
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  font-size: 13px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.inline-dropdown-option:hover {
  background: #f5f5f5;
}

.inline-dropdown-option.selected {
  background: rgba(77, 143, 157, 0.1);
  color: var(--primary-color);
  font-weight: 500;
}

.inline-dropdown-option svg {
  width: 16px;
  height: 16px;
  color: var(--primary-color);
}

.inline-dropdown-empty {
  padding: 12px 14px;
  font-size: 14px;
  color: var(--text-muted);
  font-style: italic;
}

/* 固定文本样式 */
.mindmap-fixed-text {
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 2px;
}

/* ========== 自定义滚动条 ========== */
.intention-scroll::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.intention-scroll::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.03);
  border-radius: 4px;
}

.intention-scroll::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  transition: background 0.2s;
}

.intention-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.25);
}

/* ========== 响应式设计 ========== */
@media (max-width: 1024px) {
  .intention-main {
    flex-direction: column;
  }
  
  .intention-left-panel {
    width: 100%;
    height: auto;
    max-height: 50vh;
    border-right: none;
    border-bottom: 1px solid var(--border-dark);
  }
  
  .intention-right-panel {
    padding: 24px;
  }
  
  .intention-history-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .intention-input-page {
    padding: 16px;
  }
  
  .intention-back-btn {
    top: 16px;
    left: 16px;
    padding: 10px 16px;
  }
  
  .intention-title {
    font-size: 36px;
  }
  
  .intention-subtitle {
    font-size: 16px;
  }
  
  .intention-features {
    flex-direction: column;
    gap: 16px;
  }
  
  .intention-header {
    padding: 12px 16px;
  }
  
  .intention-left-content {
    padding: 20px;
  }
  
  .intention-right-panel {
    padding: 20px;
  }
  
  .intention-history-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .mindmap-content {
    font-size: 13px;
    padding-left: 28px;
  }
  
  .inline-dropdown-menu {
    width: 200px;
  }
}

@media (max-width: 480px) {
  .intention-title {
    font-size: 28px;
  }
  
  .intention-submit-btn {
    padding: 12px 24px;
    font-size: 14px;
  }
  
  .intention-history-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
/**
 * 意图表达页面2 - 样式
 */

/* ============== 变量定义 ============== */
.intention2-page {
  --primary-color: #4d8f9d;
  --primary-light: rgba(77, 143, 157, 0.15);
  --primary-dark: #3a7080;
  
  --bg-dark: #0a0f14;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.5);
  
  --border-color: rgba(255, 255, 255, 0.1);
  --border-light: rgba(255, 255, 255, 0.06);
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  --transition: all 0.3s ease;
  
  /* 关键词高亮颜色 */
  --highlight-style: rgba(255, 107, 107, 0.2);
  --highlight-style-border: #ff6b6b;
  --highlight-language: rgba(78, 205, 196, 0.2);
  --highlight-language-border: #4ecdc4;
  --highlight-voiceover: rgba(168, 130, 255, 0.2);
  --highlight-voiceover-border: #a882ff;
}

/* ============== 基础布局 ============== */
.intention2-page {
  min-height: 100vh;
  background: var(--bg-dark);
  color: var(--text-primary);
  font-family: 'Inter', 'PingFang SC', sans-serif;
  position: relative;
  overflow-x: hidden;
}

/* 背景渐变 */
.intention2-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.intention2-bg-gradient {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(77, 143, 157, 0.15), transparent),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(107, 77, 157, 0.1), transparent),
    radial-gradient(ellipse 40% 30% at 20% 70%, rgba(77, 157, 107, 0.08), transparent);
}

/* ============== 头部 ============== */
.intention2-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  position: relative;
  z-index: 10;
  border-bottom: 1px solid var(--border-light);
  backdrop-filter: blur(12px);
  background: rgba(10, 15, 20, 0.8);
}

.intention2-header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.intention2-back-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
}

.intention2-back-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.intention2-back-btn svg {
  width: 18px;
  height: 18px;
}

.intention2-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.intention2-new-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.intention2-new-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(77, 143, 157, 0.4);
}

.intention2-new-btn svg {
  width: 16px;
  height: 16px;
}

/* ============== 主内容 ============== */
.intention2-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 32px;
  position: relative;
  z-index: 1;
}

/* ============== 输入区域 ============== */
.intention2-input-section {
  margin-bottom: 24px;
}

.intention2-input-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 16px;
  backdrop-filter: blur(20px);
}

.intention2-image-preview {
  position: relative;
  margin-bottom: 12px;
  border-radius: var(--radius-md);
  overflow: hidden;
  max-width: 200px;
}

.intention2-image-preview img {
  width: 100%;
  height: auto;
  display: block;
}

.remove-image-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  background: rgba(0, 0, 0, 0.6);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.remove-image-btn:hover {
  background: rgba(239, 68, 68, 0.8);
}

.remove-image-btn svg {
  width: 14px;
  height: 14px;
}

.intention2-input-wrapper {
  margin-bottom: 12px;
}

.intention2-textarea {
  width: 100%;
  min-height: 60px;
  max-height: 200px;
  padding: 12px 16px;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.6;
  font-family: inherit;
}

.intention2-textarea::placeholder {
  color: var(--text-muted);
}

.intention2-input-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

.intention2-input-tools {
  display: flex;
  gap: 8px;
}

.intention2-tool-btn {
  width: 40px;
  height: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.intention2-tool-btn:hover:not(:disabled) {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--primary-color);
}

.intention2-tool-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.intention2-tool-btn.recording {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ef4444;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.intention2-tool-btn svg {
  width: 20px;
  height: 20px;
}

.intention2-submit-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  border: none;
  border-radius: var(--radius-lg);
  color: white;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.intention2-submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(77, 143, 157, 0.4);
}

.intention2-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.intention2-submit-btn svg {
  width: 18px;
  height: 18px;
}

/* ============== 单行输入框样式 ============== */
.intention2-input-wrapper-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  transition: var(--transition);
}

.intention2-input-wrapper-inline:focus-within {
  border-color: var(--primary-color);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 0 0 3px rgba(77, 143, 157, 0.1);
}

.intention2-input-tools-left {
  display: flex;
  gap: 4px;
}

.intention2-tool-btn-inline {
  width: 36px;
  height: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.intention2-tool-btn-inline:hover:not(:disabled) {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--primary-color);
}

.intention2-tool-btn-inline:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.intention2-tool-btn-inline.recording {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ef4444;
  animation: pulse 1.5s infinite;
}

.intention2-tool-btn-inline svg {
  width: 18px;
  height: 18px;
}

.intention2-input-single {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 12px;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 15px;
  font-family: inherit;
  line-height: 36px;
}

.intention2-input-single::placeholder {
  color: var(--text-muted);
}

.intention2-submit-btn-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
  white-space: nowrap;
}

.intention2-submit-btn-inline:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(77, 143, 157, 0.4);
}

.intention2-submit-btn-inline:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.intention2-submit-btn-inline svg {
  width: 16px;
  height: 16px;
}

.intention2-submit-btn-inline svg.spin {
  animation: spin 1s linear infinite;
}

.intention2-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.intention2-submit-btn svg {
  width: 18px;
  height: 18px;
}

.intention2-submit-btn svg.spin {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* 错误提示 */
.intention2-error {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 12px 16px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-md);
  color: #f87171;
  font-size: 14px;
}

.intention2-error svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ============== 结果区域 ============== */
.intention2-result-section {
  display: grid;
  grid-template-columns: 2fr 1fr;  /* 左栏2/3, 右栏1/3 */
  gap: 24px;
  min-height: 500px;
}

/* 左栏：关键词面板 */
.intention2-keywords-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 右栏：图片面板 */
.intention2-image-panel {
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
}

.intention2-left-panel,
.intention2-right-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 24px;
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
}

.panel-header {
  margin-bottom: 20px;
}

.panel-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 4px 0;
}

.panel-subtitle {
  font-size: 13px;
  color: var(--text-muted);
}

.panel-loading {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--text-secondary);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loading-spinner.large {
  width: 60px;
  height: 60px;
}

.panel-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* 图片容器 */
.image-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.image-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  color: var(--text-secondary);
}

.loading-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.image-wrapper {
  position: relative;
  width: 100%;
  max-width: 100%;
}

.image-wrapper img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: transform 0.3s ease;
}

.image-wrapper img:hover {
  transform: scale(1.02);
}

.image-actions {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
}

.image-action-btn {
  width: 36px;
  height: 36px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  border: none;
  border-radius: var(--radius-sm);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.image-action-btn:hover {
  background: var(--primary-color);
}

.image-action-btn svg {
  width: 18px;
  height: 18px;
}

.image-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  color: var(--text-muted);
  padding: 48px;
}

.image-placeholder svg {
  width: 64px;
  height: 64px;
  opacity: 0.5;
}

/* ============== 提示词高亮组件 ============== */
.highlighted-prompt-container {
  position: relative;
}

.prompt-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

.prompt-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.prompt-actions {
  display: flex;
  gap: 8px;
}

.prompt-action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
}

.prompt-action-btn:hover:not(:disabled) {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.prompt-action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.prompt-action-btn.primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  border: none;
  color: white;
}

.prompt-action-btn.primary:hover:not(:disabled) {
  box-shadow: 0 2px 8px rgba(77, 143, 157, 0.4);
}

.prompt-action-btn svg {
  width: 14px;
  height: 14px;
}

/* 提示词内容 */
.prompt-content {
  line-height: 2;
  font-size: 15px;
  color: var(--text-primary);
}

.prompt-text {
  color: var(--text-secondary);
}

.keyword-highlight {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  margin: 2px 0;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
}

.keyword-highlight.style {
  background: var(--highlight-style);
  border: 1px solid var(--highlight-style-border);
  color: #ff6b6b;
}

.keyword-highlight.language {
  background: var(--highlight-language);
  border: 1px solid var(--highlight-language-border);
  color: #4ecdc4;
}

.keyword-highlight.voiceover {
  background: var(--highlight-voiceover);
  border: 1px solid var(--highlight-voiceover-border);
  color: #a882ff;
}

.keyword-highlight:hover {
  filter: brightness(1.1);
}

.keyword-delete-btn {
  display: none;
  margin-left: 4px;
  padding: 0;
  width: 14px;
  height: 14px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  color: inherit;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.keyword-highlight:hover .keyword-delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.keyword-delete-btn:hover {
  background: rgba(239, 68, 68, 0.5);
}

/* 关键词统计 */
.keyword-stats {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

.stat-item {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 4px;
}

.stat-item.style {
  background: var(--highlight-style);
  color: #ff6b6b;
}

.stat-item.language {
  background: var(--highlight-language);
  color: #4ecdc4;
}

.stat-item.voiceover {
  background: var(--highlight-voiceover);
  color: #a882ff;
}

/* 编辑模式 */
.prompt-edit-textarea {
  width: 100%;
  min-height: 150px;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--primary-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.8;
  font-family: inherit;
  resize: vertical;
  outline: none;
}

/* 替换选择器 */
.replacement-selector {
  position: absolute;
  z-index: 1000;
  min-width: 200px;
  max-width: 400px;
  max-height: 300px;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.selector-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
}

.selector-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.selector-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

.selector-close {
  margin-left: auto;
  width: 24px;
  height: 24px;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
}

.selector-close:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.selector-options {
  padding: 8px;
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.selector-option {
  padding: 6px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
}

.selector-option:hover {
  background: var(--primary-light);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.selector-more {
  display: block;
  width: 100%;
  padding: 8px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

/* ============== 历史记录 ============== */
.intention2-history-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
}

.history-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 16px 0;
}

.history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

.history-item {
  position: relative;
  aspect-ratio: 1;
  background: var(--bg-card);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
}

.history-item:hover {
  transform: translateY(-2px);
  border-color: var(--primary-color);
}

.history-item.active {
  border-color: var(--primary-color);
}

.history-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.history-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

.history-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent 50%);
  display: flex;
  align-items: flex-end;
  padding: 8px;
  opacity: 0;
  transition: var(--transition);
}

.history-item:hover .history-overlay {
  opacity: 1;
}

.history-overlay span {
  font-size: 11px;
  color: white;
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ============== 响应式 ============== */
@media (max-width: 1024px) {
  .intention2-result-section {
    grid-template-columns: 1fr;
  }
  
  .intention2-header {
    padding: 12px 16px;
  }
  
  .intention2-main {
    padding: 16px;
  }
}

@media (max-width: 640px) {
  .intention2-title {
    font-size: 16px;
  }
  
  .intention2-back-btn span {
    display: none;
  }
  
  .intention2-textarea {
    font-size: 14px;
  }
  
  .intention2-submit-btn {
    padding: 10px 16px;
    font-size: 14px;
  }
  
  .history-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ========== PromptEngine样式 ========== */

.prompt-engine {
  width: 100%;
}

.prompt-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-card);
  border-radius: 12px 12px 0 0;
  border-bottom: 1px solid var(--border-color);
}

.prompt-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--text-primary);
}

.variable-count {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 2px 8px;
  background: rgba(77, 143, 157, 0.2);
  border-radius: 4px;
}

.prompt-actions {
  display: flex;
  gap: 8px;
}

.toggle-form-btn,
.edit-template-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.toggle-form-btn:hover,
.edit-template-btn:hover {
  color: var(--primary-color);
  border-color: var(--primary-color);
  background: var(--primary-light);
}

.toggle-form-btn svg,
.edit-template-btn svg {
  width: 16px;
  height: 16px;
}

/* 变量表单 */
.variable-form {
  padding: 20px;
  background: var(--bg-card);
  border-radius: 0 0 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.field-index {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--border-color);
  padding: 2px 6px;
  border-radius: 4px;
}

.field-select {
  padding: 10px 12px;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  outline: none;
}

.field-select:hover {
  border-color: var(--primary-color);
}

.field-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.field-select option {
  padding: 8px;
  background: var(--bg-dark);
  color: var(--text-primary);
}

/* 模板预览 */
.template-preview {
  padding: 20px;
  background: var(--bg-card);
  border-radius: 0 0 12px 12px;
}

.preview-content {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-primary);
}

.variable-placeholder {
  display: inline-block;
  padding: 2px 8px;
  margin: 0 2px;
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-color);
  background: var(--primary-light);
  border: 1px solid rgba(77, 143, 157, 0.3);
  border-radius: 4px;
}

/* 模板编辑器 */
.template-editor {
  padding: 20px;
  background: var(--bg-card);
  border-radius: 0 0 12px 12px;
}

.template-textarea {
  width: 100%;
  min-height: 200px;
  padding: 16px;
  font-size: 14px;
  font-family: 'Monaco', 'Menlo', monospace;
  line-height: 1.6;
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.3);
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  resize: vertical;
  outline: none;
  transition: var(--transition);
}

.template-textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.template-help {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 12px;
  padding: 12px;
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--primary-light);
  border-left: 3px solid var(--primary-color);
  border-radius: 4px;
}

.template-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.template-actions button {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.template-actions button:hover {
  background: var(--bg-card-hover);
}

.template-actions button.primary {
  color: white;
  background: var(--primary-color);
  border-color: var(--primary-color);
}

.template-actions button.primary:hover {
  background: var(--primary-dark);
}

/* 最终Prompt预览 */
.final-prompt-preview {
  margin-top: 16px;
  padding: 16px;
  background: var(--primary-light);
  border: 1px solid rgba(77, 143, 157, 0.3);
  border-radius: 12px;
}

.preview-header {
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.preview-text {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.keyword-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.keyword-badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
}

.keyword-badge.绘画风格 {
  color: #a882ff;
  background: rgba(168, 130, 255, 0.15);
  border-color: rgba(168, 130, 255, 0.3);
}

.keyword-badge.绘画语言 {
  color: #4ecdc4;
  background: rgba(78, 205, 196, 0.15);
  border-color: rgba(78, 205, 196, 0.3);
}

.keyword-badge.画外音 {
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.15);
  border-color: rgba(255, 107, 107, 0.3);
}

/* 普通文本模式 */
.prompt-content.plain-text {
  padding: 20px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-primary);
  background: var(--bg-card);
  border-radius: 12px;
}

/* ============== 关键词展示组件 ============== */
.keywords-display {
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--border-light);
}

.keywords-display-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.keywords-display-header svg {
  width: 16px;
  height: 16px;
  color: var(--primary-color);
}

.keywords-display-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.keywords-display-count {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(77, 143, 157, 0.1);
  padding: 2px 8px;
  border-radius: 12px;
}

.keywords-display-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.keyword-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid;
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
}

.keyword-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.keyword-pill-icon {
  font-size: 16px;
  line-height: 1;
}

.keyword-pill-text {
  white-space: nowrap;
}

/* 不同分类的关键词样式 */
.keyword-pill-绘画风格 {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.15), rgba(255, 107, 107, 0.25));
  border-color: rgba(255, 107, 107, 0.5);
  color: #ff6b6b;
}

.keyword-pill-绘画风格:hover {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.25), rgba(255, 107, 107, 0.35));
  border-color: #ff6b6b;
}

.keyword-pill-绘画语言 {
  background: linear-gradient(135deg, rgba(78, 205, 196, 0.15), rgba(78, 205, 196, 0.25));
  border-color: rgba(78, 205, 196, 0.5);
  color: #4ecdc4;
}

.keyword-pill-绘画语言:hover {
  background: linear-gradient(135deg, rgba(78, 205, 196, 0.25), rgba(78, 205, 196, 0.35));
  border-color: #4ecdc4;
}

.keyword-pill-画外音 {
  background: linear-gradient(135deg, rgba(168, 130, 255, 0.15), rgba(168, 130, 255, 0.25));
  border-color: rgba(168, 130, 255, 0.5);
  color: #a882ff;
}

.keyword-pill-画外音:hover {
  background: linear-gradient(135deg, rgba(168, 130, 255, 0.25), rgba(168, 130, 255, 0.35));
  border-color: #a882ff;
}

/* 提示词编辑器区域 */
.prompt-editor-section {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ============== Lightbox 灯箱组件 ============== */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.lightbox-container {
  position: relative;
  width: 90vw;
  height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.lightbox-title {
  position: absolute;
  top: 32px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 18px;
  font-weight: 600;
  z-index: 10;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.lightbox-image-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 20px 100px;
}

.lightbox-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  color: white;
}

.lightbox-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.lightbox-image.loaded {
  opacity: 1;
  animation: zoomIn 0.5s ease;
}

@keyframes zoomIn {
  from {
    transform: scale(0.9);
  }
  to {
    transform: scale(1);
  }
}

.lightbox-download {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--primary-color);
  border: none;
  border-radius: var(--radius-lg);
  color: white;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(77, 143, 157, 0.4);
}

.lightbox-download:hover {
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 6px 24px rgba(77, 143, 157, 0.5);
}

.lightbox-download svg {
  width: 20px;
  height: 20px;
}

/* ============== 知识图谱增强样式 ============== */

/* 关键词卡片增强 */
.keywords-display {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.keywords-display-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.keywords-display-header svg {
  width: 20px;
  height: 20px;
  color: var(--primary-color);
  opacity: 0.9;
}

.keywords-display-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

.keywords-display-count {
  margin-left: auto;
  font-size: 13px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: 500;
}

.keywords-display-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* 关键词药丸增强样式 */
.keyword-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 18px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.keyword-pill::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.6s;
}

.keyword-pill:hover::before {
  left: 100%;
}

.keyword-pill:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.keyword-pill:active {
  transform: translateY(-1px) scale(0.98);
}

.keyword-pill-icon {
  font-size: 16px;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.keyword-pill-text {
  line-height: 1;
  letter-spacing: 0.3px;
}

/* 绘画风格 - 红色渐变增强 */
.keyword-pill-绘画风格 {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.18), rgba(255, 107, 107, 0.28));
  border: 1.5px solid rgba(255, 107, 107, 0.6);
  color: #ff8787;
}

.keyword-pill-绘画风格:hover {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.25), rgba(255, 107, 107, 0.35));
  border-color: rgba(255, 107, 107, 0.8);
  color: #ffa0a0;
}

/* 绘画语言 - 青色渐变增强 */
.keyword-pill-绘画语言 {
  background: linear-gradient(135deg, rgba(78, 205, 196, 0.18), rgba(78, 205, 196, 0.28));
  border: 1.5px solid rgba(78, 205, 196, 0.6);
  color: #5fd8cf;
}

.keyword-pill-绘画语言:hover {
  background: linear-gradient(135deg, rgba(78, 205, 196, 0.25), rgba(78, 205, 196, 0.35));
  border-color: rgba(78, 205, 196, 0.8);
  color: #7ee3db;
}

/* 画外音 - 紫色渐变增强 */
.keyword-pill-画外音 {
  background: linear-gradient(135deg, rgba(168, 130, 255, 0.18), rgba(168, 130, 255, 0.28));
  border: 1.5px solid rgba(168, 130, 255, 0.6);
  color: #b399ff;
}

.keyword-pill-画外音:hover {
  background: linear-gradient(135deg, rgba(168, 130, 255, 0.25), rgba(168, 130, 255, 0.35));
  border-color: rgba(168, 130, 255, 0.8);
  color: #c5b0ff;
}

/* 知识节点状态指示 */
.keyword-pill[data-from-knowledge="true"]::after {
  content: '';
  position: absolute;
  top: 4px;
  right: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary-color);
  box-shadow: 0 0 6px var(--primary-color), 0 0 12px var(--primary-color);
  animation: pulse-knowledge 2s infinite;
}

@keyframes pulse-knowledge {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.2);
  }
}

/* 提示词区域增强 */
.intention2-keywords-panel {
  position: relative;
}

.intention2-keywords-panel::before {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: calc(var(--radius-lg) + 4px);
  background: linear-gradient(135deg, 
    rgba(77, 143, 157, 0.15), 
    rgba(107, 77, 157, 0.1),
    rgba(77, 157, 107, 0.08)
  );
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
  z-index: -1;
}

.intention2-keywords-panel:hover::before {
  opacity: 1;
}

/* 知识图谱元数据显示 */
.knowledge-metadata {
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(77, 143, 157, 0.08);
  border-left: 3px solid var(--primary-color);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.knowledge-metadata-title {
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.knowledge-metadata-title svg {
  width: 16px;
  height: 16px;
}

.knowledge-metadata-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.knowledge-metadata-item:last-child {
  border-bottom: none;
}

.knowledge-metadata-label {
  color: var(--text-muted);
}

.knowledge-metadata-value {
  color: var(--text-primary);
  font-weight: 500;
}

/* 知识图谱可视化提示 */
.knowledge-graph-hint {
  margin-top: 12px;
  padding: 10px 14px;
  background: linear-gradient(90deg, rgba(77, 143, 157, 0.12), rgba(77, 143, 157, 0.06));
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.knowledge-graph-hint svg {
  width: 14px;
  height: 14px;
  color: var(--primary-color);
}

/* 响应式调整 */
@media (max-width: 1200px) {
  .keywords-display-grid {
    gap: 8px;
  }
  
  .keyword-pill {
    padding: 8px 14px;
    font-size: 12px;
  }
}

@media (max-width: 768px) {
  .keywords-display {
    padding: 16px;
  }
  
  .keywords-display-grid {
    gap: 6px;
  }
  
  .keyword-pill {
    padding: 7px 12px;
    font-size: 11px;
    gap: 5px;
  }
  
  .keyword-pill-icon {
    font-size: 14px;
  }
}

/* 加载动画 */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.keywords-loading {
  height: 120px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.03) 0%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.03) 100%
  );
  background-size: 1000px 100%;
  animation: shimmer 2s infinite;
  border-radius: var(--radius-lg);
}
/**
 * 统一设计系统变量
 * 为 yitu3 和 hualang（画廊）页面提供一致的设计语言
 * 
 * 设计原则：
 * - 画廊页面：深色主题，适合图片展示
 * - yitu3页面：浅色主题，适合长时间编辑
 * - 共享：统一的间距、圆角、字体、动画、组件样式
 */

:root {
  /* ========== 主色调 ========== */
  --primary-color: #f5a623;
  --primary-light: #ffc966;
  --primary-dark: #d48b1a;
  --primary-gradient: linear-gradient(135deg, #f5deb3 0%, #daa520 50%, #b8860b 100%);
  
  /* 强调色 - 青蓝色 */
  --accent-color: #4a90a4;
  --accent-light: #6ab0c4;
  --accent-dark: #357a8c;
  --accent-gradient: linear-gradient(135deg, #4a90a4 0%, #357a8c 100%);
  
  /* 成功/错误/警告 */
  --success-color: #22c55e;
  --error-color: #ef4444;
  --warning-color: #f59e0b;
  
  /* ========== 深色主题（画廊页面）========== */
  --dark-bg-primary: rgba(12, 12, 16, 0.98);
  --dark-bg-secondary: rgba(18, 18, 24, 0.96);
  --dark-bg-elevated: rgba(45, 45, 55, 0.9);
  --dark-bg-hover: rgba(60, 60, 70, 0.8);
  --dark-border: rgba(255, 255, 255, 0.1);
  --dark-border-hover: rgba(255, 255, 255, 0.2);
  --dark-text-primary: rgba(255, 255, 255, 0.95);
  --dark-text-secondary: rgba(255, 255, 255, 0.7);
  --dark-text-muted: rgba(255, 255, 255, 0.45);
  
  /* ========== 浅色主题（yitu3页面）========== */
  --light-bg-primary: #f3f4f6;
  --light-bg-secondary: #e5e7eb;
  --light-bg-elevated: rgba(255, 255, 255, 0.8);
  --light-bg-hover: rgba(255, 255, 255, 0.95);
  --light-border: rgba(0, 0, 0, 0.1);
  --light-border-hover: rgba(0, 0, 0, 0.2);
  --light-text-primary: #1a1a1a;
  --light-text-secondary: #4a5568;
  --light-text-muted: #718096;
  
  /* ========== 间距系统 ========== */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;
  
  /* ========== 圆角系统 ========== */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  --radius-full: 9999px;
  
  /* ========== 字体系统 ========== */
  --font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  
  --font-size-xs: 11px;
  --font-size-sm: 13px;
  --font-size-base: 14px;
  --font-size-md: 15px;
  --font-size-lg: 18px;
  --font-size-xl: 22px;
  --font-size-2xl: 28px;
  --font-size-3xl: 32px;
  
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;
  
  /* ========== 阴影系统 ========== */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.25);
  
  /* 发光效果 */
  --glow-primary: 0 0 20px rgba(245, 166, 35, 0.4), 0 0 40px rgba(245, 166, 35, 0.2);
  --glow-accent: 0 0 20px rgba(74, 144, 164, 0.4), 0 0 40px rgba(74, 144, 164, 0.2);
  --glow-error: 0 0 15px rgba(239, 68, 68, 0.4);
  
  /* ========== 过渡动画 ========== */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.35s ease;
  
  /* ========== 布局变量 ========== */
  --content-max-width: 1400px;
  --input-max-width: 680px;
  --sidebar-width: 280px;
  
  /* 响应式断点 */
  --breakpoint-sm: 480px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;
  
  /* ========== 输入框组件变量 ========== */
  --input-height: 44px;
  --input-padding: 12px 16px;
  --input-border-width: 1px;
  
  /* ========== 按钮组件变量 ========== */
  --btn-height-sm: 36px;
  --btn-height-md: 44px;
  --btn-height-lg: 52px;
  --btn-padding-sm: 8px 16px;
  --btn-padding-md: 12px 24px;
  --btn-padding-lg: 16px 32px;
}

/* ========== 通用工具类 ========== */

/* 渐变背景 */
.gradient-primary {
  background: var(--primary-gradient);
}

.gradient-accent {
  background: var(--accent-gradient);
}

/* 发光效果 */
.glow-primary {
  box-shadow: var(--glow-primary);
}

.glow-accent {
  box-shadow: var(--glow-accent);
}

/* 毛玻璃效果 */
.glass-effect {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* ========== 统一的按钮样式 ========== */

/* 主要按钮 - 渐变金色 */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  height: var(--btn-height-md);
  padding: var(--btn-padding-md);
  background: var(--primary-gradient);
  border: none;
  border-radius: var(--radius-lg);
  color: var(--light-text-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: var(--glow-primary);
}

.btn-primary:hover:not(:disabled) {
  transform: scale(1.02) translateY(-1px);
  box-shadow: 0 0 25px rgba(245, 166, 35, 0.5), 0 0 50px rgba(245, 166, 35, 0.3);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 次要按钮 - 透明 */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  height: var(--btn-height-md);
  padding: var(--btn-padding-md);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-lg);
  color: var(--dark-text-secondary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: all var(--transition-normal);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--dark-border-hover);
  color: var(--dark-text-primary);
}

.btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 图标按钮 */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.06);
  border: none;
  border-radius: var(--radius-md);
  color: var(--dark-text-muted);
  cursor: pointer;
  transition: all var(--transition-normal);
}

.btn-icon:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
  color: var(--dark-text-primary);
}

.btn-icon:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ========== 统一的输入框样式 ========== */

.input-field {
  width: 100%;
  height: var(--input-height);
  padding: var(--input-padding);
  background: transparent;
  border: none;
  outline: none;
  color: var(--dark-text-primary);
  font-size: var(--font-size-md);
  font-family: var(--font-family);
}

.input-field::placeholder {
  color: var(--dark-text-muted);
}

.input-container {
  display: flex;
  align-items: center;
  padding: var(--spacing-sm);
  background: var(--dark-bg-elevated);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-lg);
  transition: all var(--transition-normal);
}

.input-container:focus-within {
  border-color: var(--dark-border-hover);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

/* ========== 统一的卡片样式 ========== */

.card {
  background: var(--dark-bg-elevated);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-xl);
  padding: var(--spacing-lg);
  transition: all var(--transition-normal);
}

.card:hover {
  border-color: var(--dark-border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* 浅色主题卡片 */
.card-light {
  background: var(--light-bg-elevated);
  border: 1px solid var(--light-border);
  border-radius: var(--radius-xl);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
}

.card-light:hover {
  box-shadow: var(--shadow-lg);
}

/* ========== 标签/徽章样式 ========== */

.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-full);
  color: var(--dark-text-secondary);
  font-size: var(--font-size-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tag:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--dark-border-hover);
  color: var(--dark-text-primary);
}

.tag.active {
  background: rgba(74, 144, 164, 0.2);
  border-color: rgba(74, 144, 164, 0.4);
  color: var(--accent-color);
}

/* ========== 动画 ========== */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(8px); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes pulseRecording {
  0%, 100% { 
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
  }
  50% { 
    box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
  }
}

.animate-fadeIn {
  animation: fadeIn 0.3s ease forwards;
}

.animate-spin {
  animation: spin 0.8s linear infinite;
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* ========== 响应式工具类 ========== */

/* 隐藏/显示 */
@media (max-width: 768px) {
  .hide-mobile {
    display: none !important;
  }
}

@media (min-width: 769px) {
  .hide-desktop {
    display: none !important;
  }
}

/* 响应式容器 */
.container-responsive {
  width: 100%;
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

@media (max-width: 768px) {
  .container-responsive {
    padding: 0 var(--spacing-md);
  }
}

@media (max-width: 480px) {
  .container-responsive {
    padding: 0 var(--spacing-sm);
  }
}

/* ========== 滚动条样式 ========== */

/* 深色主题滚动条 */
.scrollbar-dark::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.scrollbar-dark::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.scrollbar-dark::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  transition: background 0.2s;
}

.scrollbar-dark::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* 浅色主题滚动条 */
.scrollbar-light::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.scrollbar-light::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 3px;
}

.scrollbar-light::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 3px;
  transition: background 0.2s;
}

.scrollbar-light::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.25);
}
/**
 * App.responsive.css - Yitu3 响应式布局样式
 * 
 * 新布局设计：
 * - 左右两列布局，各占1/2
 * - 左侧：提示词编辑器/预览（含词库管理）
 * - 右侧：图片+画框预览
 * - 参考 ImageDetailPage 布局风格
 */

/* ========== 页面容器 ========== */
.yitu3-page-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  background: linear-gradient(180deg, 
    rgba(12, 12, 16, 0.98) 0%, 
    rgba(18, 18, 24, 0.96) 100%
  );
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif);
  overflow: hidden;
}

/* ========== 主内容区域 - 左右两列 ========== */
.yitu3-main-content {
  display: flex;
  flex: 1;
  overflow: hidden;
  padding: 24px;
  gap: 24px;
}

/* ========== 左侧提示词区域 ========== */
.yitu3-prompt-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: rgba(30, 30, 38, 0.6);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

/* ========== 右侧图片区域 ========== */
.yitu3-image-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  padding: 24px;
}

/* ========== 工具栏 ========== */
.yitu3-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(20, 20, 26, 0.8);
}

/* 模式切换按钮组 */
.yitu3-mode-switch {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 2px;
}

.yitu3-mode-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.yitu3-mode-btn:hover {
  color: rgba(255, 255, 255, 0.8);
}

.yitu3-mode-btn.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* 操作按钮区域 */
.yitu3-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ========== 核心内容区 ========== */
.yitu3-content-area {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, 
    rgba(25, 25, 32, 0.6) 0%, 
    rgba(20, 20, 26, 0.6) 100%
  );
}

/* ========== 词库侧边栏 ========== */
.yitu3-banks-sidebar {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  max-height: 280px;
  overflow-y: auto;
  background: rgba(20, 20, 26, 0.9);
}

/* ========== 桌面端布局 (>1024px) ========== */
@media (min-width: 1025px) {
  .yitu3-main-content {
    padding: 32px;
    gap: 32px;
  }
  
  .yitu3-image-section,
  .yitu3-prompt-section {
    flex: 1;
    min-width: 0;
  }
}

/* ========== 平板布局 (768px-1024px) ========== */
@media (min-width: 768px) and (max-width: 1024px) {
  .yitu3-main-content {
    padding: 20px;
    gap: 20px;
  }
  
  .yitu3-image-section,
  .yitu3-prompt-section {
    flex: 1;
    min-width: 0;
  }
  
  .yitu3-banks-sidebar {
    max-height: 240px;
  }
}

/* ========== 手机布局 (<768px) ========== */
@media (max-width: 767px) {
  .yitu3-main-content {
    flex-direction: column;
    padding: 12px;
    gap: 12px;
  }
  
  .yitu3-image-section {
    flex: none;
    height: 45vh;
    padding: 16px;
  }
  
  .yitu3-prompt-section {
    flex: 1;
    min-height: 40vh;
  }
  
  .yitu3-toolbar {
    padding: 8px 12px;
  }
  
  .yitu3-mode-btn span {
    display: none;
  }
  
  .yitu3-banks-sidebar {
    max-height: 200px;
  }
}

/* ========== 工具栏响应式 ========== */
@media (max-width: 480px) {
  .yitu3-toolbar {
    padding: 6px 10px;
  }
  
  .yitu3-mode-switch {
    padding: 1px;
  }
  
  .yitu3-mode-btn {
    padding: 4px 8px;
  }
}

/* ========== 滚动条优化 ========== */
.yitu3-content-area::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.yitu3-content-area::-webkit-scrollbar-track {
  background: transparent;
}

.yitu3-content-area::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.yitu3-content-area::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ========== 触摸优化 ========== */
@media (hover: none) and (pointer: coarse) {
  .yitu3-mode-btn {
    min-height: 40px;
  }
}

/* ========== 安全区域适配 ========== */
@supports (padding: env(safe-area-inset-bottom)) {
  .yitu3-page-container {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* ========== 横屏优化 ========== */
@media (max-height: 500px) and (orientation: landscape) {
  .yitu3-main-content {
    padding: 12px;
    gap: 12px;
  }
  
  .yitu3-toolbar {
    padding: 4px 12px;
  }
}

/* ========== 打印样式 ========== */
@media print {
  .yitu3-page-container {
    height: auto;
  }
  
  .yitu3-image-section,
  .yitu3-prompt-section {
    width: 100%;
    box-shadow: none;
    border: none;
  }
}
@tailwind base;
@tailwind components;
@tailwind utilities;

/* Tailwind CSS 覆盖 - 修改 leading-relaxed 的 line-height */
.leading-relaxed {
  line-height: 2.5 !important;
}

/* Custom Scrollbar Styles */
.custom-scrollbar::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  margin: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(251, 146, 60, 0.4);
  border-color: rgba(251, 146, 60, 0.3);
  box-shadow: 0 0 10px rgba(251, 146, 60, 0.3);
}

.custom-scrollbar::-webkit-scrollbar-thumb:active {
  background: rgba(251, 146, 60, 0.6);
  border-color: rgba(251, 146, 60, 0.5);
}

/* Firefox Scrollbar */
.custom-scrollbar {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) rgba(255, 255, 255, 0.1);
}

/* Poster Mode Scrollbar - Extra Elegant */
.poster-scrollbar::-webkit-scrollbar {
  width: 6px;
}

.poster-scrollbar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  margin: 8px 0;
}

.poster-scrollbar::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg, 
    rgba(255, 255, 255, 0.25) 0%, 
    rgba(251, 146, 60, 0.25) 100%
  );
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.poster-scrollbar::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    180deg, 
    rgba(251, 146, 60, 0.4) 0%, 
    rgba(251, 146, 60, 0.6) 100%
  );
  border-color: rgba(251, 146, 60, 0.3);
  box-shadow: 0 0 12px rgba(251, 146, 60, 0.4);
  transform: scaleX(1.2);
}

.poster-scrollbar::-webkit-scrollbar-thumb:active {
  background: linear-gradient(
    180deg, 
    rgba(251, 146, 60, 0.6) 0%, 
    rgba(251, 146, 60, 0.8) 100%
  );
}

/* Firefox */
.poster-scrollbar {
  scrollbar-width: thin;
  scrollbar-color: rgba(251, 146, 60, 0.3) rgba(255, 255, 255, 0.05);
}

/* Animated Slogan Keyframes */
@keyframes fadeInSlideUp {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fadeOutSlideDown {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-8px) scale(0.95);
  }
}

.animate-in {
  animation: fadeInSlideUp 0.5s ease-out forwards;
}

.animate-out {
  animation: fadeOutSlideDown 0.3s ease-in forwards;
}

/* Pulse glow effect for the orange pill */
@keyframes pulseGlow {
  0%, 100% {
    box-shadow: inset 0px 2px 4px 0px rgba(255, 255, 255, 0.2), 0 4px 12px rgba(251, 146, 60, 0.4);
  }
  50% {
    box-shadow: inset 0px 2px 4px 0px rgba(255, 255, 255, 0.3), 0 6px 20px rgba(251, 146, 60, 0.6);
  }
}

/* Pulse glow effect for the blue pill */
@keyframes pulseGlowBlue {
  0%, 100% {
    box-shadow: inset 0px 2px 4px 0px rgba(255, 255, 255, 0.2), 0 4px 12px rgba(96, 165, 250, 0.4);
  }
  50% {
    box-shadow: inset 0px 2px 4px 0px rgba(255, 255, 255, 0.3), 0 6px 20px rgba(96, 165, 250, 0.6);
  }
}


/* White Theme Scrollbar for Dark Backgrounds */
.custom-scrollbar-white::-webkit-scrollbar {
  width: 4px;
}

.custom-scrollbar-white::-webkit-scrollbar-track {
  background: transparent;
}

.custom-scrollbar-white::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
}

.custom-scrollbar-white::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Mobile Safe Area Padding */
.pb-safe {
  padding-bottom: env(safe-area-inset-bottom, 20px);
}

/* iOS smooth scrolling for content area */
.content-scroll-area {
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

/* Performance Utilities */
.will-change-scroll {
  will-change: scroll-position;
}

.will-change-transform {
  will-change: transform;
}

/* 高级网格渐变背景 - 性能更优，无撕裂 */
.mesh-gradient-bg {
  background-color: #f8fafc;
  background-image: 
    radial-gradient(at 0% 0%, rgba(251, 146, 60, 0.08) 0px, transparent 50%),
    radial-gradient(at 50% 0%, rgba(59, 130, 246, 0.05) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(251, 146, 60, 0.05) 0px, transparent 50%),
    radial-gradient(at 95% 50%, rgba(251, 146, 60, 0.08) 0px, transparent 50%),
    radial-gradient(at 5% 50%, rgba(59, 130, 246, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(59, 130, 246, 0.05) 0px, transparent 50%),
    radial-gradient(at 0% 100%, rgba(251, 146, 60, 0.05) 0px, transparent 50%);
  background-attachment: fixed;
}

/* 优化 Slogan 药丸动画，减少频繁重绘产生的撕裂感 */
@keyframes pillFadeIn {
  from { opacity: 0.6; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.pill-animate {
  animation: pillFadeIn 0.4s ease-out forwards;
}

/* Custom Tailwind Color Overrides */
.text-gray-700 {
  color: rgb(198, 198, 198) !important;
}

.text-gray-800 {
  color: rgb(198, 198, 198) !important;
}
/* Agent聊天面板样式 - 专业油画创作助手风格 */

.agent-chat-panel {
	flex: 1;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: linear-gradient(180deg, #faf9f7 0%, #f5f3f0 100%);
}

.chat-messages {
	flex: 1;
	overflow-y: auto;
	padding: 20px;
	scroll-behavior: smooth;
}

/* 欢迎界面 */
.chat-welcome {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 40px 20px;
	text-align: center;
	min-height: 300px;
}

.welcome-title {
	font-size: 24px;
	font-weight: 600;
	color: #2d2a26;
	margin-bottom: 16px;
	letter-spacing: -0.02em;
}

.welcome-desc {
	font-size: 14px;
	color: #6b6560;
	line-height: 1.7;
	max-width: 400px;
	margin-bottom: 32px;
}

.welcome-tips {
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: 100%;
	max-width: 320px;
}

.tip-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	background: white;
	border-radius: 8px;
	border: 1px solid #e8e5e1;
	font-size: 13px;
	color: #4a4640;
	text-align: left;
}

.tip-icon {
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #8b7355;
	color: white;
	border-radius: 50%;
	font-size: 12px;
	font-weight: 600;
	flex-shrink: 0;
}

/* 消息项 */
.message-item {
	margin-bottom: 24px;
	animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.message-label {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: 8px;
	padding-left: 2px;
}

.message-item.user .message-label {
	color: #8b7355;
}

.message-item.assistant .message-label {
	color: #5a7c5a;
}

.message-body {
	background: white;
	border-radius: 12px;
	padding: 16px 20px;
	border: 1px solid #e8e5e1;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.message-item.user .message-body {
	border-left: 3px solid #8b7355;
}

.message-item.assistant .message-body {
	border-left: 3px solid #5a7c5a;
}

.message-text {
	font-size: 14px;
	line-height: 1.7;
	color: #2d2a26;
}

.message-time {
	font-size: 11px;
	color: #9b9590;
	margin-top: 8px;
	padding-left: 2px;
}

.message-image {
	margin-top: 16px;
	border-radius: 8px;
	overflow: hidden;
	border: 1px solid #e8e5e1;
}

.message-image img {
	width: 100%;
	max-width: 300px;
	display: block;
}

/* 结构化提示词 */
.structured-prompt {
	font-size: 14px;
	line-height: 1.8;
	color: #2d2a26;
}

.prompt-section {
	margin-bottom: 16px;
}

.prompt-section:last-child {
	margin-bottom: 0;
}

.section-title {
	font-weight: 600;
	color: #5a7c5a;
	margin-bottom: 6px;
	font-size: 13px;
}

.section-content {
	color: #4a4640;
}

.prompt-paragraph {
	margin-bottom: 12px;
}

.prompt-paragraph:last-child {
	margin-bottom: 0;
}

.prompt-variable {
	display: inline;
	padding: 2px 8px;
	background: linear-gradient(135deg, #f0ebe3 0%, #e8e3db 100%);
	border-radius: 4px;
	color: #8b7355;
	font-weight: 500;
	font-size: 13px;
	border: 1px solid #d9d4cc;
}

/* AI思考过程指示器 */
.thinking-indicator {
	margin-top: 16px;
	padding: 16px 20px;
	background: white;
	border-radius: 12px;
	border: 1px solid #e8e5e1;
	border-left: 3px solid #c9a86c;
	animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
	0%, 100% {
		opacity: 1;
	}
	50% {
		opacity: 0.85;
	}
}

.thinking-indicator.analyzing {
	border-left-color: #7c9eb2;
}

.thinking-indicator.planning {
	border-left-color: #a089c2;
}

.thinking-indicator.generating {
	border-left-color: #8bb28b;
}

.thinking-header {
	display: flex;
	align-items: center;
	gap: 10px;
}

.thinking-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	background: #f5f3f0;
	border-radius: 6px;
	color: #6b6560;
}

.thinking-status {
	font-size: 14px;
	font-weight: 500;
	color: #4a4640;
}

.thinking-dots {
	display: flex;
	gap: 2px;
}

.thinking-dots span {
	animation: dotBlink 1.4s ease-in-out infinite;
	color: #9b9590;
	font-weight: bold;
}

.thinking-dots span:nth-child(2) {
	animation-delay: 0.2s;
}

.thinking-dots span:nth-child(3) {
	animation-delay: 0.4s;
}

@keyframes dotBlink {
	0%, 60%, 100% {
		opacity: 0.3;
	}
	30% {
		opacity: 1;
	}
}

.thinking-stream {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid #e8e5e1;
}

.stream-content {
	font-size: 13px;
	line-height: 1.7;
	color: #6b6560;
	max-height: 200px;
	overflow-y: auto;
	white-space: pre-wrap;
	font-family: 'SF Mono', 'Monaco', 'Menlo', monospace;
	background: #faf9f7;
	padding: 12px;
	border-radius: 6px;
}

/* 滚动条样式 */
.chat-messages::-webkit-scrollbar,
.stream-content::-webkit-scrollbar {
	width: 6px;
}

.chat-messages::-webkit-scrollbar-track,
.stream-content::-webkit-scrollbar-track {
	background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb,
.stream-content::-webkit-scrollbar-thumb {
	background: #d9d4cc;
	border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover,
.stream-content::-webkit-scrollbar-thumb:hover {
	background: #c9c4bc;
}
/* 图片展示面板样式 - 专业油画作品展示 */

.image-display-panel {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: linear-gradient(135deg, #f0ebe3 0%, #e8e3db 100%);
}

/* 空状态 */
.image-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	color: #9b9590;
}

.image-empty svg {
	margin-bottom: 16px;
	color: #c9c4bc;
}

.empty-title {
	font-size: 18px;
	font-weight: 500;
	color: #6b6560;
	margin: 0 0 8px 0;
}

.empty-hint {
	font-size: 13px;
	color: #9b9590;
	max-width: 240px;
	line-height: 1.5;
}

/* 加载状态 */
.image-loading {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.loading-spinner {
	width: 48px;
	height: 48px;
	border: 3px solid #e8e5e1;
	border-top-color: #8b7355;
	border-radius: 50%;
	animation: spin 1s linear infinite;
	margin-bottom: 16px;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

.loading-text {
	font-size: 16px;
	font-weight: 500;
	color: #4a4640;
	margin: 0 0 8px 0;
}

.loading-hint {
	font-size: 13px;
	color: #9b9590;
}

/* 图片内容 */
.image-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	max-width: 100%;
}

.image-wrapper {
	position: relative;
	max-width: 100%;
	max-height: calc(100vh - 200px);
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
	background: white;
	padding: 8px;
}

.image-wrapper img {
	display: block;
	max-width: 100%;
	max-height: calc(100vh - 220px);
	border-radius: 8px;
	object-fit: contain;
}

/* 操作按钮 */
.image-actions {
	display: flex;
	gap: 12px;
	margin-top: 20px;
}

.action-btn {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 10px 16px;
	border: 1px solid #e8e5e1;
	background: white;
	border-radius: 8px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 500;
	color: #6b6560;
	transition: all 0.2s ease;
}

.action-btn:hover {
	border-color: #8b7355;
	color: #8b7355;
	background: #faf9f7;
}

.action-btn svg {
	color: currentColor;
}

/* 响应式 */
@media (max-width: 768px) {
	.image-display-panel {
		padding: 16px;
	}
	
	.image-wrapper {
		padding: 4px;
	}
	
	.image-actions {
		flex-wrap: wrap;
		justify-content: center;
	}
}
/* 历史记录面板样式 - 专业风格 */

.history-panel {
	padding: 0 20px 16px;
	max-height: 240px;
	overflow-y: auto;
}

.history-empty {
	text-align: center;
	padding: 24px;
	color: #9b9590;
	font-size: 13px;
}

.history-list {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.history-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 12px 16px;
	background: #faf9f7;
	border: 1px solid #e8e5e1;
	border-radius: 8px;
	flex: 1;
	min-width: 280px;
	max-width: 400px;
	transition: all 0.2s ease;
}

.history-item:hover {
	border-color: #d9d4cc;
	background: #f5f3f0;
}

.history-content {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.history-text {
	font-size: 13px;
	color: #2d2a26;
	font-weight: 500;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.history-time {
	font-size: 11px;
	color: #9b9590;
}

.history-actions {
	display: flex;
	gap: 6px;
	flex-shrink: 0;
}

.history-actions .action-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border: 1px solid #e8e5e1;
	background: white;
	border-radius: 6px;
	cursor: pointer;
	color: #9b9590;
	transition: all 0.2s ease;
}

.history-actions .action-btn:hover {
	border-color: #8b7355;
	color: #8b7355;
	background: #faf9f7;
}

.history-edit {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

.history-edit select {
	padding: 6px 10px;
	border: 1px solid #e8e5e1;
	border-radius: 6px;
	font-size: 12px;
	color: #4a4640;
	background: white;
	cursor: pointer;
}

.history-edit select:focus {
	outline: none;
	border-color: #8b7355;
}

.btn-primary {
	padding: 6px 12px;
	background: #8b7355;
	border: none;
	border-radius: 6px;
	color: white;
	font-size: 12px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
}

.btn-primary:hover {
	background: #7a6348;
}

.btn-secondary {
	padding: 6px 12px;
	background: white;
	border: 1px solid #e8e5e1;
	border-radius: 6px;
	color: #6b6560;
	font-size: 12px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
}

.btn-secondary:hover {
	background: #faf9f7;
	border-color: #d9d4cc;
}

/* 滚动条 */
.history-panel::-webkit-scrollbar {
	width: 6px;
}

.history-panel::-webkit-scrollbar-track {
	background: transparent;
}

.history-panel::-webkit-scrollbar-thumb {
	background: #d9d4cc;
	border-radius: 3px;
}

/* 响应式 */
@media (max-width: 768px) {
	.history-item {
		min-width: 100%;
		max-width: 100%;
	}
}
/* Agent输入组件样式 - 专业油画创作助手风格 */

.agent-input-container {
	background: white;
	border-top: 1px solid #e8e5e1;
	padding: 16px 20px;
}

/* 模式切换标签 */
.input-mode-tabs {
	display: flex;
	gap: 8px;
	margin-bottom: 12px;
}

.mode-tab {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	border: 1px solid #e8e5e1;
	background: #faf9f7;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.2s ease;
	font-size: 13px;
	color: #6b6560;
}

.mode-tab:hover {
	background: #f5f3f0;
	border-color: #d9d4cc;
}

.mode-tab.active {
	background: #8b7355;
	border-color: #8b7355;
	color: white;
}

.mode-tab.active .mode-icon {
	color: white;
}

.mode-icon {
	display: flex;
	align-items: center;
	color: #9b9590;
}

.mode-label {
	font-weight: 500;
}

/* 图片预览 */
.input-images {
	display: flex;
	gap: 8px;
	margin-bottom: 12px;
	flex-wrap: wrap;
}

.input-image-item {
	position: relative;
	width: 64px;
	height: 64px;
	border-radius: 8px;
	overflow: hidden;
	border: 1px solid #e8e5e1;
}

.input-image-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.input-image-item .remove-image {
	position: absolute;
	top: 4px;
	right: 4px;
	width: 20px;
	height: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.6);
	border: none;
	border-radius: 50%;
	cursor: pointer;
	color: white;
	padding: 0;
}

.input-image-item .remove-image:hover {
	background: rgba(0, 0, 0, 0.8);
}

/* 主输入区域 */
.input-main {
	display: flex;
	align-items: center;
	gap: 8px;
	background: #faf9f7;
	border: 1px solid #e8e5e1;
	border-radius: 10px;
	padding: 8px 12px;
	transition: border-color 0.2s ease;
}

.input-main:focus-within {
	border-color: #8b7355;
	box-shadow: 0 0 0 3px rgba(139, 115, 85, 0.1);
}

.input-action-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: none;
	background: transparent;
	border-radius: 6px;
	cursor: pointer;
	color: #9b9590;
	transition: all 0.2s ease;
	flex-shrink: 0;
}

.input-action-btn:hover {
	background: #f0ebe3;
	color: #6b6560;
}

.input-action-btn.active {
	background: #8b7355;
	color: white;
}

.input-field {
	flex: 1;
	border: none;
	background: transparent;
	font-size: 14px;
	color: #2d2a26;
	outline: none;
	padding: 8px 4px;
}

.input-field::placeholder {
	color: #9b9590;
}

.input-field:disabled {
	opacity: 0.6;
}

.input-send-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: none;
	background: #8b7355;
	border-radius: 8px;
	cursor: pointer;
	color: white;
	transition: all 0.2s ease;
	flex-shrink: 0;
}

.input-send-btn:hover:not(:disabled) {
	background: #7a6348;
}

.input-send-btn:disabled {
	background: #d9d4cc;
	cursor: not-allowed;
}

/* 参数面板 */
.input-params-panel {
	margin-top: 12px;
	padding: 16px;
	background: #faf9f7;
	border: 1px solid #e8e5e1;
	border-radius: 10px;
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
}

.param-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.param-group label {
	font-size: 12px;
	font-weight: 600;
	color: #6b6560;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.param-options {
	display: flex;
	gap: 6px;
}

.param-options button {
	padding: 6px 12px;
	border: 1px solid #e8e5e1;
	background: white;
	border-radius: 6px;
	cursor: pointer;
	font-size: 12px;
	font-weight: 500;
	color: #6b6560;
	transition: all 0.2s ease;
}

.param-options button:hover {
	border-color: #8b7355;
	color: #8b7355;
}

.param-options button.active {
	background: #8b7355;
	border-color: #8b7355;
	color: white;
}

/* 快速提示词 */
.quick-prompts {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-top: 12px;
}

.quick-label {
	font-size: 12px;
	color: #9b9590;
	font-weight: 500;
}

.quick-prompts button {
	padding: 6px 12px;
	border: 1px solid #e8e5e1;
	background: white;
	border-radius: 16px;
	cursor: pointer;
	font-size: 12px;
	color: #6b6560;
	transition: all 0.2s ease;
}

.quick-prompts button:hover {
	border-color: #8b7355;
	background: #faf9f7;
	color: #8b7355;
}
/* Yitu4 主页面样式 - 专业油画创作助手风格 */

/* 主容器 */
.yitu4-container {
	display: flex;
	flex-direction: column;
	height: 100vh;
	background: #f5f3f0;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* 主内容区 */
.yitu4-main {
	display: flex;
	flex: 1;
	overflow: hidden;
}

/* 左侧聊天区 */
.yitu4-chat-area {
	flex: 1;
	display: flex;
	flex-direction: column;
	background: linear-gradient(180deg, #faf9f7 0%, #f5f3f0 100%);
	border-right: 1px solid #e8e5e1;
	min-width: 0;
}

/* 聊天头部 */
.yitu4-chat-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	background: white;
	border-bottom: 1px solid #e8e5e1;
}

.header-title {
	display: flex;
	align-items: center;
	gap: 10px;
}

.header-title svg {
	color: #8b7355;
}

.header-title h2 {
	font-size: 16px;
	font-weight: 600;
	color: #2d2a26;
	margin: 0;
	letter-spacing: -0.01em;
}

.header-status {
	display: flex;
	align-items: center;
	gap: 8px;
}

.status-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #c9c4bc;
	transition: all 0.3s ease;
}

.status-dot.active {
	background: #8bb28b;
	animation: statusPulse 1.5s ease-in-out infinite;
}

@keyframes statusPulse {
	0%, 100% {
		box-shadow: 0 0 0 0 rgba(139, 178, 139, 0.4);
	}
	50% {
		box-shadow: 0 0 0 6px rgba(139, 178, 139, 0);
	}
}

.status-text {
	font-size: 12px;
	font-weight: 500;
	color: #9b9590;
}

/* 右侧图片区 */
.yitu4-image-area {
	flex: 1;
	display: flex;
	flex-direction: column;
	background: #f0ebe3;
	min-width: 0;
}

/* 底部历史区 */
.yitu4-history {
	background: white;
	border-top: 1px solid #e8e5e1;
	transition: all 0.3s ease;
}

.yitu4-history-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 12px 20px;
	border: none;
	background: transparent;
	cursor: pointer;
	font-size: 13px;
	font-weight: 500;
	color: #6b6560;
	transition: all 0.2s ease;
}

.yitu4-history-toggle:hover {
	background: #faf9f7;
	color: #4a4640;
}

.yitu4-history-toggle svg {
	color: #9b9590;
}

.yitu4-history.expanded {
	max-height: 300px;
	overflow: hidden;
}

/* 响应式布局 */
@media (max-width: 1024px) {
	.yitu4-main {
		flex-direction: column;
	}
	
	.yitu4-chat-area {
		border-right: none;
		border-bottom: 1px solid #e8e5e1;
	}
	
	.yitu4-image-area {
		min-height: 300px;
	}
}

@media (max-width: 768px) {
	.yitu4-chat-header {
		padding: 12px 16px;
	}
	
	.header-title h2 {
		font-size: 14px;
	}
}
/**
 * Yitu4 全局样式
 */

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

#root {
	width: 100%;
	height: 100vh;
	overflow: hidden;
}
/**
 * Landing Page 样式
 * 从 yishujia.art 移植
 */

/* 变量定义 */
.artist-main-container {
  --head-bar-height: 100px;
  --enter-button-start: #4d8f9d;
  --enter-button-end: #416887;
}

/* 主容器 */
.artist-main-container {
  position: relative;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  background: radial-gradient(circle at 20% 0%, rgba(185, 213, 226, 0.35), transparent 55%),
    radial-gradient(circle at 80% 0%, rgba(155, 195, 170, 0.35), transparent 55%),
    linear-gradient(180deg, rgba(8, 14, 22, 0.4), rgba(5, 8, 14, 0.9));
  font-family: 'Inter', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  color: #fff;
  background-color: #03050c;
}

/* 动态背景 - 双层图片叠加动画 */
.animated-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  overflow: hidden;
}

/* 第一层背景图片 */
.bg-layer-1 {
  position: absolute;
  top: -5%;
  left: -5%;
  width: 110%;
  height: 110%;
  background-image: url('/login-bg.png');
  background-size: cover;
  background-position: center;
  animation: panLayer1 12s ease-in-out infinite alternate;
  opacity: 1;
}

/* 第二层背景图片 - 叠加融合 */
.bg-layer-2 {
  position: absolute;
  top: -8%;
  left: -8%;
  width: 116%;
  height: 116%;
  background-image: url('/login-bg2.png');
  background-size: cover;
  background-position: center;
  animation: panLayer2 10s ease-in-out infinite alternate-reverse;
  opacity: 0.6;
  mix-blend-mode: overlay;
}

/* 颜色覆盖层 */
.bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(77, 143, 157, 0.08) 0%,
    rgba(65, 104, 135, 0.12) 50%,
    rgba(47, 79, 95, 0.08) 100%
  );
  animation: colorPulse 5s ease-in-out infinite alternate;
}

@keyframes panLayer1 {
  0% {
    transform: scale(1) translate(0, 0);
  }
  50% {
    transform: scale(1.06) translate(-2%, 1.5%);
  }
  100% {
    transform: scale(1.03) translate(1.5%, -1%);
  }
}

@keyframes panLayer2 {
  0% {
    transform: scale(1.02) translate(0, 0);
  }
  50% {
    transform: scale(1.08) translate(2%, -1.5%);
  }
  100% {
    transform: scale(1.05) translate(-1.5%, 1%);
  }
}

@keyframes colorPulse {
  0% {
    opacity: 0.2;
  }
  100% {
    opacity: 0.5;
  }
}

/* 浮动光晕效果 */
.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.35;
  animation: floatOrb 8s infinite ease-in-out;
  pointer-events: none;
}

.orb-1 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(77, 143, 157, 0.5) 0%, transparent 70%);
  top: -12%;
  left: -8%;
  animation-delay: 0s;
}

.orb-2 {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(107, 179, 199, 0.4) 0%, transparent 70%);
  top: 55%;
  right: -5%;
  animation-delay: -2s;
  animation-duration: 10s;
}

.orb-3 {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(65, 104, 135, 0.4) 0%, transparent 70%);
  bottom: -8%;
  left: 35%;
  animation-delay: -4s;
  animation-duration: 9s;
}

.orb-4 {
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(47, 79, 95, 0.35) 0%, transparent 70%);
  top: 25%;
  right: 20%;
  animation-delay: -6s;
  animation-duration: 11s;
}

@keyframes floatOrb {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(40px, -25px) scale(1.12);
  }
  50% {
    transform: translate(-25px, 40px) scale(0.92);
  }
  75% {
    transform: translate(-40px, -20px) scale(1.08);
  }
}

/* 头部导航栏 */
.head-bar {
  position: relative;
  z-index: 100;
  padding: 30px 48px 0;
}

.head-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1600px;
  margin: 0 auto;
}

.head-bar-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  margin-top: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo img {
  height: 45px;
}

.login-button {
  padding: 12px 28px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.login-button:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
}

/* 内容区域 */
.content-container {
  position: relative;
  z-index: 10;
  height: calc(100vh - var(--head-bar-height));
  padding: 0 48px 32px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.content-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 100%;
  flex: 1;
}

/* 标语区域 */
.slogan-section {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 32px;
  padding-top: 20px;
  flex: 1;
  justify-content: center;
}

.slogan-section > img {
  max-width: 80%;
  height: auto;
  max-height: 280px;
}

/* 按钮组 */
.button-group {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.enter-button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 24px;
  height: 52px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.enter-button:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* 主按钮特殊样式 */
.enter-button-primary {
  background: linear-gradient(135deg, var(--enter-button-start), var(--enter-button-end));
  border: none;
  box-shadow: 0 6px 24px rgba(77, 143, 157, 0.3);
}

.enter-button-primary:hover {
  box-shadow: 0 10px 32px rgba(77, 143, 157, 0.4);
}

.enter-button svg:first-child {
  width: 20px;
  height: 20px;
}

.enter-button svg:last-child {
  width: 32px;
  height: 32px;
  margin-left: 6px;
}

/* 快速操作区域 */
.quick-actions {
  display: flex;
  gap: 20px;
  height: 180px;
  flex-shrink: 0;
}

.quick-action {
  flex: 1;
  position: relative;
  padding: 24px 28px;
  border-radius: 16px;
  /* 默认灰色磨砂玻璃效果 */
  background: rgba(128, 128, 128, 0.2);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.quick-action-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-image: url('/landing/assets/quick-actions/ButtonBackground.svg');
  background-size: cover;
  background-position: center;
  z-index: 0;
  opacity: 0.35;
  /* 默认灰色滤镜 */
  filter: grayscale(100%);
  transition: all 0.3s ease;
}

.quick-action:hover {
  /* hover 时显示绿色 */
  background: rgba(77, 143, 157, 0.25);
  border-color: rgba(77, 143, 157, 0.35);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(77, 143, 157, 0.2);
}

.quick-action:hover .quick-action-bg {
  /* hover 时取消灰色滤镜，显示原色 */
  filter: grayscale(0%);
  opacity: 0.5;
}

.quick-action-arrow {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
  z-index: 10;
}

.quick-action-arrow svg {
  width: 16px;
  height: 16px;
}

.quick-action:hover .quick-action-arrow {
  background: rgba(255, 255, 255, 0.15);
}

/* 卡片图标作为背景，占满卡片 */
.quick-action-icon {
  position: absolute;
  pointer-events: none;
  z-index: 1;
  opacity: 0.9;
  right: 0;
  top: 0;
  bottom: 0;
  width: 65%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
}

.quick-action-icon-svg {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quick-action-icon-svg svg {
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
}

/* 文字区域占卡片宽度的2/5 */
.quick-action-text {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 45%;
  min-width: 45%;
}

.quick-action-title,
.quick-action-subtitle {
  display: block;
  max-width: 100%;
  line-height: 1.2;
}

.quick-action-title svg,
.quick-action-subtitle svg {
  display: block;
  width: auto;
  height: 100%;
  max-width: 100%;
}

.quick-action-title {
  height: 42px;
  display: flex;
  align-items: center;
}

.quick-action-subtitle {
  height: 18px;
  display: flex;
  align-items: center;
  opacity: 0.6;
}

/* 响应式设计 */
@media (max-width: 1100px) {
  .quick-actions {
    flex-direction: column;
    height: auto;
    gap: 16px;
  }

  .quick-action {
    height: 140px;
  }

  .quick-action-icon {
    opacity: 0.7;
    width: 55%;
  }

  .quick-action-text {
    width: 50%;
  }
}

@media (max-width: 768px) {
  .head-bar {
    padding: 16px 20px 0;
  }

  .content-container {
    padding: 0 20px 20px;
  }

  .slogan-section {
    padding-top: 16px;
    align-items: center;
  }

  .slogan-section > img {
    max-width: 100%;
    max-height: 180px;
  }

  .enter-button {
    height: 48px;
    font-size: 16px;
    padding: 0 20px;
  }

  .button-group {
    flex-direction: column;
    width: 100%;
    justify-content: center;
  }

  .enter-button {
    width: 100%;
    justify-content: center;
  }

  .quick-action {
    height: 120px;
    padding: 20px;
  }

  .quick-action-title {
    height: 32px;
  }

  .quick-action-subtitle {
    height: 14px;
  }
}
/* LoginPage.css - 艺术家AI登录页面样式 */

/* 登录页面容器 */
.artist-login-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  
  /* CSS 变量配置 */
  --login-form-radius: 25px;
  --login-primary-color: #4D8F9D;
  --login-checkbox-bg-checked: #fff;
  --login-checkbox-check-color: #000;
  --login-checkbox-border: 1px solid rgba(0,0,0,0.5);
  --login-checkbox-radius: 6px;
  --login-title-gradient: linear-gradient(100deg, #6BB3C7 0%, #4D8F9D 40%, #416887 80%, #2F4F5F 100%);
  --login-text-color: #000;
  --login-input-text: #000;
}

/* 动态背景 - 双层图片叠加动画 */
.animated-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  overflow: hidden;
}

/* 第一层背景图片 */
.bg-layer-1 {
  position: absolute;
  top: -5%;
  left: -5%;
  width: 110%;
  height: 110%;
  background-image: url('/login-bg.png');
  background-size: cover;
  background-position: center;
  animation: panLayer1 12s ease-in-out infinite alternate;
  opacity: 1;
}

/* 第二层背景图片 - 叠加融合 */
.bg-layer-2 {
  position: absolute;
  top: -8%;
  left: -8%;
  width: 116%;
  height: 116%;
  background-image: url('/login-bg2.png');
  background-size: cover;
  background-position: center;
  animation: panLayer2 10s ease-in-out infinite alternate-reverse;
  opacity: 0.6;
  mix-blend-mode: overlay;
}

/* 颜色覆盖层 */
.bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(77, 143, 157, 0.08) 0%,
    rgba(65, 104, 135, 0.12) 50%,
    rgba(47, 79, 95, 0.08) 100%
  );
  animation: colorPulse 5s ease-in-out infinite alternate;
}

@keyframes panLayer1 {
  0% {
    transform: scale(1) translate(0, 0);
  }
  50% {
    transform: scale(1.06) translate(-2%, 1.5%);
  }
  100% {
    transform: scale(1.03) translate(1.5%, -1%);
  }
}

@keyframes panLayer2 {
  0% {
    transform: scale(1.02) translate(0, 0);
  }
  50% {
    transform: scale(1.08) translate(2%, -1.5%);
  }
  100% {
    transform: scale(1.05) translate(-1.5%, 1%);
  }
}

@keyframes colorPulse {
  0% {
    opacity: 0.2;
  }
  100% {
    opacity: 0.5;
  }
}

/* 浮动光晕效果 */
.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.35;
  animation: floatOrb 8s infinite ease-in-out;
  pointer-events: none;
}

.orb-1 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(77, 143, 157, 0.5) 0%, transparent 70%);
  top: -12%;
  left: -8%;
  animation-delay: 0s;
}

.orb-2 {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(107, 179, 199, 0.4) 0%, transparent 70%);
  top: 55%;
  right: -5%;
  animation-delay: -2s;
  animation-duration: 10s;
}

.orb-3 {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(65, 104, 135, 0.4) 0%, transparent 70%);
  bottom: -8%;
  left: 35%;
  animation-delay: -4s;
  animation-duration: 9s;
}

.orb-4 {
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(47, 79, 95, 0.35) 0%, transparent 70%);
  top: 25%;
  right: 20%;
  animation-delay: -6s;
  animation-duration: 11s;
}

@keyframes floatOrb {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(40px, -25px) scale(1.12);
  }
  50% {
    transform: translate(-25px, 40px) scale(0.92);
  }
  75% {
    transform: translate(-40px, -20px) scale(1.08);
  }
}

/* Logo 区域 */
.artist-logo {
  position: fixed;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 10;
}

.artist-logo.logo-location-bottom {
  bottom: 40px;
  left: 40px;
}

.artist-logo .logo-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.artist-logo .logo-title {
  height: 28px;
  object-fit: contain;
}

/* 登录表单容器 */
.login-form-container {
  position: relative;
  z-index: 10;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--login-form-radius);
  padding: 40px;
  width: 420px;
  max-width: 90vw;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* 返回首页按钮 */
.back-to-home {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--login-text-color);
  font-size: 14px;
  cursor: pointer;
  margin-bottom: 24px;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.back-to-home:hover {
  opacity: 1;
}

.back-to-home .back-icon {
  width: 16px;
  height: 17px;
}

/* 表单标题 */
.form-title {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 32px 0;
  background: var(--login-title-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 切换标签 */
.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.tab-button {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border: none;
  background: transparent;
  color: var(--login-text-color);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 12px;
  transition: all 0.2s;
  opacity: 0.6;
}

.tab-button:hover {
  opacity: 0.8;
  background: rgba(0, 0, 0, 0.05);
}

.tab-button.active {
  opacity: 1;
  background: rgba(77, 143, 157, 0.15);
  color: var(--login-primary-color);
}

.tab-button .tab-icon {
  width: 18px;
  height: 18px;
}

/* 登录表单 */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 表单字段 */
.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field label {
  font-size: 14px;
  font-weight: 500;
  color: var(--login-text-color);
}

/* 输入框 */
.form-input {
  width: 100%;
  height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  background: #fff;
  color: var(--login-input-text);
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
  box-sizing: border-box;
}

.form-input:focus {
  border-color: var(--login-primary-color);
  box-shadow: 0 0 0 3px rgba(77, 143, 157, 0.15);
}

.form-input::placeholder {
  color: rgba(0, 0, 0, 0.4);
}

/* 验证码输入区域 */
.verification-code-field {
  display: flex;
  gap: 12px;
}

.verification-code-field .form-input {
  flex: 1;
}

.send-code-btn {
  padding: 0 20px;
  height: 44px;
  border: none;
  border-radius: 12px;
  background: var(--login-primary-color);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.send-code-btn:hover {
  opacity: 0.9;
}

.send-code-btn:disabled {
  background: rgba(0, 0, 0, 0.2);
  cursor: not-allowed;
}

/* 表单选项 */
.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0;
}

.remember-section {
  display: flex;
  align-items: center;
}

.remember-password {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 复选框 */
.login-checkbox {
  width: 16px;
  height: 16px;
  border: var(--login-checkbox-border);
  border-radius: var(--login-checkbox-radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  transition: all 0.2s;
}

.login-checkbox.checked {
  background: var(--login-checkbox-bg-checked);
}

.login-checkbox.checked::after {
  content: '✓';
  color: var(--login-checkbox-check-color);
  font-size: 12px;
}

.remember-password label {
  font-size: 14px;
  color: var(--login-text-color);
  cursor: pointer;
}

.forgot-password {
  font-size: 14px;
  color: var(--login-primary-color);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.forgot-password:hover {
  text-decoration: underline;
}

/* 提交按钮 */
.submit-button {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 12px;
  background: var(--login-primary-color);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 8px;
}

.submit-button:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.submit-button:active {
  transform: translateY(0);
}

.submit-button:disabled {
  background: rgba(0, 0, 0, 0.2);
  cursor: not-allowed;
  transform: none;
}

/* 加载状态 */
.submit-button.loading {
  position: relative;
  color: transparent;
}

.submit-button.loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 错误信息 */
.error-message {
  color: #e53935;
  font-size: 12px;
  margin-top: 4px;
}

.form-error {
  background: rgba(229, 57, 53, 0.1);
  color: #e53935;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 16px;
}

/* 分隔线 */
.divider {
  display: flex;
  align-items: center;
  margin: 24px 0;
  color: rgba(0, 0, 0, 0.4);
  font-size: 14px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(0, 0, 0, 0.1);
}

.divider span {
  padding: 0 16px;
}

/* 社交登录 */
.social-login {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.social-btn {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.social-btn:hover {
  border-color: var(--login-primary-color);
  transform: translateY(-2px);
}

.social-btn img {
  width: 24px;
  height: 24px;
}

/* 响应式适配 */
@media (max-width: 768px) {
  .login-form-container {
    width: 100%;
    max-width: 100%;
    height: 100vh;
    border-radius: 0;
    padding: 60px 24px 24px;
  }
  
  .artist-logo.logo-location-bottom {
    bottom: auto;
    top: 20px;
    left: 24px;
  }
  
  .form-title {
    font-size: 28px;
  }
}

/* 暗黑模式支持 */
@media (prefers-color-scheme: dark) {
  .artist-login-container {
    --login-text-color: #fff;
    --login-input-text: #fff;
  }
  
  .login-form-container {
    background: rgba(30, 30, 30, 0.95);
  }
  
  .form-input {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
  }
  
  .form-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
  }
  
  .tab-button:hover {
    background: rgba(255, 255, 255, 0.1);
  }
  
  .tab-button.active {
    background: rgba(77, 143, 157, 0.3);
  }
}
/* 分享对话框样式 - 参考知识图谱浮层 */

/* 遮罩层 */
.share-dialog-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10000;
	animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

/* 对话框主体 */
.share-dialog {
	width: 480px;
	max-width: 90vw;
	background: var(--tl-color-panel, #ffffff);
	border: 1px solid var(--tl-color-panel-contrast, #e0e0e0);
	border-radius: 12px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
	display: flex;
	flex-direction: column;
	font-family: var(--tl-font-sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
	color: var(--tl-color-text, #1a1a1a);
	animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
	from {
		transform: translateY(20px);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

/* 标题栏 */
.share-dialog-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	border-bottom: 1px solid var(--tl-color-panel-contrast, #e0e0e0);
}

.share-dialog-title {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	color: var(--tl-color-text, #1a1a1a);
}

.share-dialog-close {
	background: none;
	border: none;
	padding: 6px;
	cursor: pointer;
	color: var(--tl-color-text-3, #999999);
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 6px;
	transition: all 0.15s;
}

.share-dialog-close:hover {
	background: var(--tl-color-muted-1, #f5f5f5);
	color: var(--tl-color-text, #1a1a1a);
}

/* 项目名称 */
.share-dialog-project {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 16px 20px;
	background: var(--tl-color-muted-0, #f9f9f9);
	color: var(--tl-color-text, #1a1a1a);
	font-size: 14px;
	font-weight: 500;
}

.share-dialog-project svg {
	flex-shrink: 0;
	opacity: 0.6;
}

/* 权限选择 */
.share-dialog-permissions {
	padding: 20px;
	border-bottom: 1px solid var(--tl-color-panel-contrast, #e0e0e0);
}

.share-dialog-label {
	font-size: 12px;
	font-weight: 500;
	color: var(--tl-color-text-1, #666666);
	margin-bottom: 12px;
}

.share-dialog-permission-options {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.share-dialog-permission-btn {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 12px;
	background: transparent;
	border: 1px solid var(--tl-color-panel-contrast, #e0e0e0);
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.15s;
	text-align: left;
	width: 100%;
}

.share-dialog-permission-btn svg {
	flex-shrink: 0;
	margin-top: 2px;
	opacity: 0.6;
}

.share-dialog-permission-btn:hover {
	background: var(--tl-color-muted-1, #f5f5f5);
	border-color: var(--tl-color-text-3, #999999);
}

.share-dialog-permission-btn.active {
	background: var(--tl-color-selected, #488396);
	border-color: var(--tl-color-selected, #488396);
	color: var(--tl-color-selected-contrast, #ffffff);
}

.share-dialog-permission-btn.active svg {
	opacity: 1;
}

.permission-title {
	font-size: 14px;
	font-weight: 500;
	margin-bottom: 4px;
	color: inherit;
}

.permission-desc {
	font-size: 12px;
	opacity: 0.7;
	color: inherit;
}

/* 生成按钮 */
.share-dialog-generate-btn {
	margin: 20px;
	padding: 12px 20px;
	background: var(--tl-color-primary, #488396);
	color: white;
	border: none;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.15s;
	width: calc(100% - 40px);
}

.share-dialog-generate-btn:hover {
	opacity: 0.9;
}

.share-dialog-generate-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* 链接区域 */
.share-dialog-link-section {
	padding: 20px;
}

.share-dialog-link-box {
	display: flex;
	gap: 8px;
	margin-bottom: 12px;
}

.share-dialog-link-input {
	flex: 1;
	padding: 10px 12px;
	background: var(--tl-color-muted-0, #f9f9f9);
	border: 1px solid var(--tl-color-panel-contrast, #e0e0e0);
	border-radius: 6px;
	font-size: 13px;
	color: var(--tl-color-text, #1a1a1a);
	font-family: monospace;
}

.share-dialog-link-input:focus {
	outline: none;
	border-color: var(--tl-color-selected, #488396);
}

.share-dialog-copy-btn {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 10px 16px;
	background: var(--tl-color-primary, #488396);
	color: white;
	border: none;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.15s;
	white-space: nowrap;
}

.share-dialog-copy-btn:hover {
	opacity: 0.9;
}

.share-dialog-hint {
	font-size: 12px;
	color: var(--tl-color-text-3, #999999);
	line-height: 1.5;
}
/* 项目管理页面样式 - 深色主题 */

.projects-page {
	width: 100%;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	color: #fff;
	font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* 按钮样式 */
.btn-primary {
	background: linear-gradient(135deg, #4d8f9d, #416887);
	color: white;
	border: none;
	padding: 10px 20px;
	border-radius: 24px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s;
	box-shadow: 0 4px 12px rgba(77, 143, 157, 0.3);
}

.btn-primary:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(77, 143, 157, 0.4);
}

.btn-primary.btn-large {
	padding: 14px 28px;
	font-size: 16px;
}

.btn-secondary {
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.2);
	padding: 10px 20px;
	border-radius: 24px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s;
}

.btn-secondary:hover {
	background: rgba(255, 255, 255, 0.2);
	border-color: rgba(255, 255, 255, 0.3);
}

.btn-text {
	background: none;
	border: none;
	color: rgba(255, 255, 255, 0.6);
	font-size: 13px;
	cursor: pointer;
	padding: 4px 8px;
	transition: color 0.2s;
}

.btn-text:hover {
	color: #fff;
}

.btn-icon {
	background: none;
	border: none;
	color: rgba(255, 255, 255, 0.6);
	cursor: pointer;
	padding: 6px;
	border-radius: 6px;
	transition: all 0.2s;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.btn-icon:hover {
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
}

.btn-icon-danger:hover {
	background: rgba(231, 76, 60, 0.2);
	color: #ff6b6b;
}

/* 内容区域 */
.projects-content {
	flex: 1;
	padding: 40px 48px;
	max-width: 1400px;
	width: 100%;
	margin: 0 auto;
	box-sizing: border-box;
}

/* 欢迎标题 */
.projects-welcome {
	text-align: center;
	margin-bottom: 40px;
}

.projects-welcome h2 {
	font-size: 36px;
	font-weight: 600;
	color: #fff;
	margin: 0;
}

/* 工具栏 */
.projects-toolbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 32px;
}

/* 加载状态 */
.projects-loading {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 80px 20px;
	color: rgba(255, 255, 255, 0.6);
}

.spinner {
	width: 36px;
	height: 36px;
	border: 3px solid rgba(255, 255, 255, 0.1);
	border-top-color: #4d8f9d;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
	margin-bottom: 16px;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

/* 空状态 */
.projects-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 80px 20px;
	text-align: center;
}

.empty-icon {
	margin-bottom: 20px;
	opacity: 0.4;
	color: rgba(255, 255, 255, 0.5);
}

.projects-empty h2 {
	font-size: 24px;
	font-weight: 600;
	color: #fff;
	margin: 0 0 12px 0;
}

.projects-empty p {
	font-size: 15px;
	color: rgba(255, 255, 255, 0.6);
	margin: 0 0 28px 0;
}

/* 项目网格 */
.projects-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 24px;
}

/* 项目卡片 */
.project-card {
	/* 移除白色背景,改为透明+边框相框效果 */
	background: transparent;
	border-radius: 12px;
	overflow: hidden;
	/* 相框效果:双层边框 */
	border: 3px solid rgba(255, 255, 255, 0.15);
	box-shadow: 
		0 4px 12px rgba(0, 0, 0, 0.3),
		inset 0 0 0 1px rgba(255, 255, 255, 0.05);
	transition: all 0.3s;
	display: flex;
	flex-direction: column;
	cursor: pointer;
	position: relative;
}

.project-card::before {
	/* 内边框装饰效果 */
	content: '';
	position: absolute;
	top: 8px;
	left: 8px;
	right: 8px;
	bottom: 8px;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 6px;
	pointer-events: none;
	z-index: 1;
}

.project-card:hover {
	border-color: rgba(77, 143, 157, 0.6);
	box-shadow: 
		0 8px 24px rgba(77, 143, 157, 0.25),
		0 0 40px rgba(77, 143, 157, 0.15),
		inset 0 0 0 1px rgba(77, 143, 157, 0.2);
	transform: translateY(-4px);
}

.project-card:hover::before {
	border-color: rgba(77, 143, 157, 0.15);
}

.project-thumbnail {
	width: 100%;
	height: 180px;
	/* 深色背景以衬托缩略图 */
	background: rgba(0, 0, 0, 0.3);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	position: relative;
	/* 添加圆角 */
	border-radius: 8px;
	margin: 8px;
}

.project-thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	background: rgba(255, 255, 255, 0.02);
	/* 缩略图圆角 */
	border-radius: 6px;
}

.project-thumbnail-empty {
	/* 调整空缩略图颜色以适配深色背景 */
	color: rgba(255, 255, 255, 0.2);
	opacity: 0.6;
}

.project-info {
	padding: 12px 16px 16px 16px;
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 8px;
	/* 移除白色背景,使用透明背景 */
	background: transparent;
}

.project-name {
	font-size: 15px;
	font-weight: 600;
	/* 调整为白色文字以适配深色背景 */
	color: rgba(255, 255, 255, 0.95);
	margin: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	user-select: none;
}

.project-name:hover {
	color: #7ec8d9;
}

.project-rename-input {
	width: 100%;
	font-size: 15px;
	font-weight: 600;
	/* 调整输入框颜色 */
	color: #fff;
	margin: 0;
	padding: 4px 8px;
	border: 2px solid #7ec8d9;
	border-radius: 6px;
	outline: none;
	/* 深色背景 */
	background: rgba(0, 0, 0, 0.3);
	box-sizing: border-box;
}

.project-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.project-date {
	font-size: 13px;
	/* 调整日期颜色以适配深色背景 */
	color: rgba(255, 255, 255, 0.5);
	margin: 0;
}

.project-actions {
	display: flex;
	gap: 4px;
}

.project-actions .btn-icon {
	/* 调整图标颜色以适配深色背景 */
	color: rgba(255, 255, 255, 0.5);
}

.project-actions .btn-icon:hover {
	background: rgba(255, 255, 255, 0.1);
	color: #7ec8d9;
}

.project-actions .btn-icon-danger:hover {
	background: rgba(231, 76, 60, 0.2);
	color: #ff6b6b;
}

/* 响应式 */
@media (max-width: 900px) {
	.projects-header {
		padding: 0 24px;
	}

	.projects-content {
		padding: 32px 24px;
	}

	.projects-welcome h2 {
		font-size: 28px;
	}

	.projects-grid {
		grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	}
}

@media (max-width: 600px) {
	.projects-header {
		padding: 0 16px;
		height: auto;
		min-height: 70px;
	}

	.projects-header-content {
		flex-direction: column;
		gap: 12px;
		padding: 16px 0;
	}

	.projects-header-left {
		width: 100%;
	}

	.projects-header-right {
		width: 100%;
		justify-content: space-between;
		flex-wrap: wrap;
		gap: 8px;
	}

	.user-info {
		padding-left: 0;
		border-left: none;
	}

	.projects-content {
		padding: 24px 16px;
	}

	.projects-welcome h2 {
		font-size: 24px;
	}

	.projects-toolbar {
		flex-direction: column;
		gap: 16px;
		align-items: stretch;
	}

	.projects-grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}
}
/* 分享页面样式 */

.share-page {
	width: 100vw;
	height: 100vh;
	display: flex;
	flex-direction: column;
	background: #f5f5f5;
}

/* 画布区域 - 占满全屏 */
.share-page-canvas {
	width: 100%;
	height: 100%;
	position: relative;
	overflow: hidden;
}

/* 加载状态 */
.share-page-loading {
	width: 100vw;
	height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	background: #f5f5f5;
	gap: 16px;
}

.share-page-loading .spinner {
	width: 40px;
	height: 40px;
	border: 3px solid #e0e0e0;
	border-top-color: #488396;
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

.share-page-loading p {
	font-size: 14px;
	color: #666;
}

/* 错误状态 */
.share-page-error {
	width: 100vw;
	height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	background: #f5f5f5;
	gap: 24px;
	padding: 20px;
}

.error-icon {
	color: #f44336;
}

.share-page-error h2 {
	margin: 0;
	font-size: 20px;
	color: #333;
}

/* 按钮样式 */
.btn-primary,
.btn-secondary {
	padding: 10px 20px;
	font-size: 14px;
	font-weight: 500;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.2s;
}

.btn-primary {
	background: #488396;
	color: white;
}

.btn-primary:hover {
	background: #3a6e7e;
}

.btn-secondary {
	background: white;
	color: #488396;
	border: 1px solid #488396;
}

.btn-secondary:hover {
	background: #e8f3f5;
}
