@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)));
	}
}

/* 知识图谱 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;
	}
}
/**
 * 画布顶部栏样式
 */

/* ========== 顶部栏 ========== */
.canvas-topbar {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 12px;
	z-index: 500;
	pointer-events: none;
}

.canvas-topbar-left,
.canvas-topbar-right {
	display: flex;
	align-items: center;
	gap: 8px;
	pointer-events: all;
}

/* 左侧区域向右移动35px */
.canvas-topbar-left {
	margin-left: 35px;
}

/* 汉堡菜单按钮 - 打开侧边栏 */
.canvas-topbar-menu-btn {
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--tl-color-panel, rgba(20, 25, 30, 0.85));
	backdrop-filter: blur(8px);
	border: 1px solid var(--tl-color-panel-contrast, rgba(255, 255, 255, 0.1));
	border-radius: 10px;
	cursor: pointer;
	transition: all 0.2s ease;
	color: rgba(255, 255, 255, 0.8);
}

.canvas-topbar-menu-btn:hover {
	background: var(--tl-color-muted-1, rgba(30, 35, 40, 0.95));
	color: rgba(255, 255, 255, 1);
}

.canvas-topbar-menu-btn:active {
	transform: scale(0.95);
}

/* 艺术家品牌按钮 - 点击打开侧边栏 */
.canvas-topbar-brand-btn {
	padding: 6px 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--tl-color-panel, rgba(20, 25, 30, 0.85));
	backdrop-filter: blur(8px);
	border: 1px solid var(--tl-color-panel-contrast, rgba(255, 255, 255, 0.1));
	border-radius: 10px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.canvas-topbar-brand-btn:hover {
	background: var(--tl-color-muted-1, rgba(30, 35, 40, 0.95));
	transform: scale(1.02);
}

.canvas-topbar-brand-btn:active {
	transform: scale(0.95);
}

.canvas-topbar-brand-img {
	height: 24px;
	width: auto;
	object-fit: contain;
}

/* 右侧按钮样式 */
.canvas-topbar-share-btn,
.canvas-topbar-gallery-btn {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	font-size: 13px;
	font-weight: 500;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.canvas-topbar-share-btn {
	background: var(--tl-color-panel, rgba(20, 25, 30, 0.85));
	backdrop-filter: blur(8px);
	border: 1px solid var(--tl-color-panel-contrast, rgba(255, 255, 255, 0.1));
	color: var(--tl-color-text, rgba(255, 255, 255, 0.9));
}

.canvas-topbar-share-btn:hover {
	background: var(--tl-color-muted-1, rgba(30, 35, 40, 0.95));
}

.canvas-topbar-gallery-btn {
	background: linear-gradient(135deg, #488396, #3a6e7e);
	border: none;
	color: white;
}

.canvas-topbar-gallery-btn:hover {
	background: linear-gradient(135deg, #5999ab, #4a7d8f);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(72, 131, 150, 0.4);
}

.canvas-topbar-gallery-btn:active {
	transform: translateY(0);
}

/* ========== 侧边栏（从 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);
}
/**
 * 图片编辑器 Lightbox 样式
 */

/* 全屏遮罩层 */
.image-editor-lightbox {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(30, 41, 46, 0.95);
	z-index: 10000;
	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-right: 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-loading {
	color: rgba(255, 255, 255, 0.6);
	font-size: 16px;
}

/* 文字输入框 */
.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;
	right: 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-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 svg {
	width: 24px;
	height: 24px;
}

/* 画笔颜色指示器 */
.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 {
	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-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%;
}
/**
 * 保存状态指示器样式
 */

.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;
}
/**
 * 左侧垂直导航栏样式
 * 深色主题 - 参考 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;
	min-height: 100vh;
	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;
	}
}
/**
 * 画廊页面样式
 * 深色主题 + 瀑布流图片展示
 */

.gallery-container {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	color: #fff;
	font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* 顶部控制栏 */
.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;
	overflow-y: auto;
}

.waterfall-grid {
	column-count: 4;
	column-gap: 16px;
	max-width: 1400px;
	margin: 0 auto;
}

.waterfall-item {
	break-inside: avoid;
	margin-bottom: 16px;
	position: relative;
	border-radius: 16px;
	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;
}

/* 点赞按钮 */
.like-btn {
	position: absolute;
	bottom: 12px;
	right: 12px;
	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;
}

@keyframes heartBeat {
	0% {
		transform: scale(1);
	}
	50% {
		transform: scale(1.3);
	}
	100% {
		transform: scale(1);
	}
}

/* 响应式设计 */
@media (max-width: 1200px) {
	.waterfall-grid {
		column-count: 3;
	}
}

@media (max-width: 900px) {
	.waterfall-grid {
		column-count: 2;
	}

	.control-left {
		flex-wrap: wrap;
	}
}

@media (max-width: 600px) {
	.gallery-header {
		padding: 0 20px;
	}

	.gallery-nav {
		display: none;
	}

	.top-control-bar {
		padding: 16px 20px;
		flex-direction: column;
		gap: 16px;
	}

	.search-box {
		width: 100%;
	}

	.waterfall-section {
		padding: 0 20px 20px;
	}

	.waterfall-grid {
		column-count: 2;
		gap: 12px;
	}
}
/**
 * 图片详情页样式
 * 深色主题 + 左右布局
 */

.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: 1400px;
	height: 100%;
	max-height: 90vh;
	gap: 24px;
	padding: 60px 48px;
	box-sizing: border-box;
}

/* 左侧图片区 */
.detail-image-section {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	min-width: 0;
}

.detail-image-wrapper {
	max-width: 100%;
	max-height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.detail-image-wrapper img {
	max-width: 100%;
	max-height: calc(90vh - 120px);
	object-fit: contain;
	border-radius: 16px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* 导航箭头 */
.nav-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	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: 320px;
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	gap: 24px;
	color: #fff;
	overflow-y: auto;
}

/* 作者信息 */
.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);
}

/* 点赞区域 */
.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;
}

/* 响应式设计 */
@media (max-width: 900px) {
	.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%;
	}
}
/**
 * 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;
}
