/* #board is the scroll container — keep it positioned so overlays scroll with ink. */
#board {
	position: relative;
}

#postit-layer {
	position: absolute;
	left: 0;
	top: 0;
	width: 0;
	height: 0;
	overflow: visible;
	pointer-events: none;
	z-index: 40;
}

.wb-postit {
	--postit-scale: 1;
	position: absolute;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	background: #26262c;
	color: #f3f3f6;
	border: 1px solid #3a3a48;
	border-radius: calc(8px * var(--postit-scale));
	box-shadow: 0 calc(4px * var(--postit-scale)) calc(18px * var(--postit-scale)) rgba(0, 0, 0, 0.35);
	pointer-events: auto;
	/* Size comes from JS (board units × zoom); no fixed px min so zoom-out shrinks. */
	font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	font-size: 14px; /* overridden by JS with scale */
	line-height: 1.45;
	transition: box-shadow 0.12s ease, border-color 0.12s ease;
	overflow: hidden;
}

.wb-postit.is-active {
	border-color: #4f8cff;
	border-width: 2px;
	box-shadow:
		0 0 0 3px rgba(79, 140, 255, 0.45),
		0 6px 22px rgba(0, 0, 0, 0.4);
}

.wb-postit.is-active .wb-postit-bar {
	background: #1e3a66;
}

.wb-postit-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.3em;
	padding: 0.3em 0.45em;
	background: #32323a;
	border-radius: calc(8px * var(--postit-scale)) calc(8px * var(--postit-scale)) 0 0;
	cursor: grab;
	flex: 0 0 auto;
	user-select: none;
	min-height: 2em;
}

.wb-postit-bar:active {
	cursor: grabbing;
}

.wb-postit-selected-label {
	display: none;
	font-size: 0.8em;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: #9ec1ff;
	padding-left: 0.3em;
	pointer-events: none;
}

.wb-postit.is-active .wb-postit-selected-label {
	display: inline;
}

.wb-postit-close {
	border: none;
	background: transparent;
	color: #c8c8d0;
	width: 1.6em;
	height: 1.6em;
	line-height: 1.4em;
	border-radius: 0.3em;
	cursor: pointer;
	font-size: 1.15em;
	padding: 0;
	margin-left: auto;
}

.wb-postit-close:hover {
	background: #484852;
	color: #fff;
}

.wb-postit.is-active .wb-postit-close:hover {
	background: #2a4d80;
}

.wb-postit-body {
	flex: 1 1 auto;
	overflow: auto;
	padding: 0.7em 0.85em 1em;
	-webkit-overflow-scrolling: touch;
	cursor: default;
}

.wb-postit-body .agent-answer {
	color: #f3f3f6;
}

.wb-postit-body .agent-answer p {
	margin: 0 0 0.65em;
}

.wb-postit-body .agent-answer p:last-child {
	margin-bottom: 0;
}

.wb-postit-empty {
	opacity: 0.45;
	font-style: italic;
}

.wb-postit-handle {
	position: absolute;
	width: 0.85em;
	height: 0.85em;
	right: 0.15em;
	bottom: 0.15em;
	cursor: nwse-resize;
	background: linear-gradient(135deg, transparent 50%, #5b8def 50%);
	border-radius: 0.15em;
	opacity: 0.85;
}
