:root {
	--accent-bg-soft: rgba(217, 70, 239, 0.1);
	--accent-bg: rgba(217, 70, 239, 0.15);
	--accent-bg-hover: rgba(217, 70, 239, 0.2);
	--accent-badge-bg: rgba(217, 70, 239, 0.2);
	--accent-strong: rgba(217, 70, 239, 0.6);
	--accent-strong-hover: rgba(217, 70, 239, 0.7);
	--accent-strong-active: rgba(217, 70, 239, 0.8);
	--accent-border: rgba(217, 70, 239, 0.3);
	--accent-border-strong: rgba(217, 70, 239, 0.4);
	--accent-text: rgba(253, 242, 255, 0.98);
	--accent-text-soft: rgba(244, 114, 182, 0.95);
	--accent-ring: rgba(217, 70, 239, 0.25);
	--accent-ring-strong: rgba(217, 70, 239, 0.4);
	--blockquote-border: rgba(217, 70, 239, 0.45);
	--blockquote-text: rgba(226, 232, 240, 0.9);
	--calendar-event-bg: rgba(15, 23, 42, 0.55);
	--comment-item-bg: rgba(30, 41, 59, 0.6);
	--calendar-tooltip-bg: rgba(2, 6, 23, 0.92);
	--calendar-tooltip-border: rgba(255, 255, 255, 0.12);
	--calendar-tooltip-text: rgba(226, 232, 240, 0.95);
	--calendar-tooltip-shadow: 0 8px 24px rgba(15, 23, 42, 0.45),
		inset 0 0 0 1px rgba(255, 255, 255, 0.05);
	--selection-menu-bg: rgba(2, 6, 23, 0.85);
	--selection-menu-border: rgba(255, 255, 255, 0.1);
	--sel-text: rgba(226, 232, 240, 0.9);
	--sel-text-muted: rgba(226, 232, 240, 0.5);
	--sel-text-hover: #fff;
	--sel-hover-bg: rgba(255, 255, 255, 0.08);
	--sel-sep: rgba(255, 255, 255, 0.08);
	--sel-divider: rgba(255, 255, 255, 0.06);
	--sel-dot-ring: rgba(255, 255, 255, 0.45);
	--dropdown-accent: var(--accent-strong);
	--dropdown-accent-bg: rgba(255, 255, 255, 0.05);
	--dropdown-text: rgba(203, 213, 225, 0.9);
	--dropdown-text-hover: rgba(241, 245, 249, 0.95);
	--dropdown-hover-bg: rgba(255, 255, 255, 0.07);
	--dropdown-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
	--scrollbar-thumb: rgba(103, 232, 249, 0.1);
	--scrollbar-thumb-hover: rgba(103, 232, 249, 0.1);
	--scrollbar-border: rgba(2, 6, 23, 0.1);
}

* {
	scrollbar-width: thin;
	scrollbar-color: var(--scrollbar-thumb) transparent;
}
*::-webkit-scrollbar {
	width: 10px;
	height: 10px;
}
*::-webkit-scrollbar-track {
	background: transparent;
}
*::-webkit-scrollbar-thumb {
	background-color: var(--scrollbar-thumb);
	border-radius: 999px;
	border: 2px solid var(--scrollbar-border);
}
*::-webkit-scrollbar-thumb:hover {
	background-color: var(--scrollbar-thumb-hover);
}

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

body {
	min-height: 100vh;
	min-height: 100dvh;
	padding: 16px;
	box-sizing: border-box;
	overflow: hidden;
}

/* ── Status Dot Glow ── */
#statusDot {
	transition: box-shadow 0.3s ease;
}
#statusDot.bg-emerald-400 {
	box-shadow: 0 0 10px rgba(52, 211, 153, 0.8), 0 0 20px rgba(52, 211, 153, 0.5), 0 0 30px rgba(52, 211, 153, 0.25);
}
#statusDot.bg-amber-400 {
	box-shadow: 0 0 10px rgba(251, 191, 36, 0.8), 0 0 20px rgba(251, 191, 36, 0.5), 0 0 30px rgba(251, 191, 36, 0.25);
}
#statusDot.bg-slate-500 {
	box-shadow: 0 0 8px rgba(100, 116, 139, 0.5), 0 0 14px rgba(100, 116, 139, 0.3);
}

/* ── Selection Menu – modern 2-row layout (theme-adaptive) ── */
.sel-menu {
	background-color: var(--selection-menu-bg);
	border-color: var(--selection-menu-border);
	min-width: 0;
	width: max-content;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), 0 0 0 1px var(--selection-menu-border);
}
.sel-row {
	display: flex;
	align-items: center;
	gap: 2px;
	padding: 5px 6px;
}
.sel-row-format {
	border-bottom: 1px solid var(--sel-divider);
}
.sel-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 30px;
	min-width: 30px;
	padding: 0 7px;
	border-radius: 7px;
	border: none;
	background: transparent;
	color: var(--sel-text);
	font-size: 12.5px;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
	line-height: 1;
	white-space: nowrap;
}
.sel-btn:hover {
	background: var(--sel-hover-bg);
	color: var(--sel-text-hover);
}
.sel-btn:active {
	transform: scale(0.92);
}
.sel-btn-muted {
	color: var(--sel-text-muted);
	font-size: 11.5px;
}
.sel-btn-muted:hover {
	color: var(--sel-text);
}
.sel-btn-highlight {
	font-size: 15px;
	padding: 0 5px;
}
.sel-btn-remove {
	color: rgba(239, 68, 68, 0.55);
	font-size: 13px;
	font-weight: 700;
	min-width: 28px;
}
.sel-btn-remove:hover {
	color: #ef4444;
	background: rgba(239, 68, 68, 0.1);
}
.sel-sep {
	display: block;
	width: 1px;
	height: 18px;
	margin: 0 3px;
	background: var(--sel-sep);
	flex-shrink: 0;
}
.sel-colors {
	display: flex;
	align-items: center;
	gap: 4px;
}
.sel-dot {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	border: 2px solid transparent;
	background: transparent;
	cursor: pointer;
	padding: 0;
	transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
	flex-shrink: 0;
}
.sel-dot-fill {
	display: block;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	transition: width 0.12s ease, height 0.12s ease;
}
.sel-dot:hover {
	transform: scale(1.18);
	border-color: var(--sel-dot-ring);
	box-shadow: 0 0 8px rgba(0, 0, 0, 0.08);
}
.sel-dot:hover .sel-dot-fill {
	width: 15px;
	height: 15px;
}
.sel-dot:active {
	transform: scale(1.02);
}

/* ── Grab handle for dragging the selection menu ── */
.sel-grab {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 14px;
	cursor: grab;
	user-select: none;
	-webkit-user-select: none;
	background: transparent;
	border-bottom: 1px solid var(--sel-divider);
	transition: background 0.15s ease;
}
.sel-grab:hover {
	background: var(--sel-hover-bg);
}
.sel-grab:active {
	cursor: grabbing;
}
.sel-grab-dots {
	font-size: 10px;
	letter-spacing: 2px;
	color: var(--sel-text-muted);
	line-height: 1;
	pointer-events: none;
}
.sel-menu.sel-dragging {
	opacity: 0.92;
	transition: opacity 0.1s ease;
}

#calendarTitle {
	color: var(--accent-text-soft) !important;
}

#slashMenu,
#wikiMenu {
	background-color: var(--selection-menu-bg) !important;
	border-color: var(--selection-menu-border) !important;
}

#psMetaYaml,
#psMetaYamlInline {
	background-color: var(--selection-menu-bg) !important;
	border-color: var(--selection-menu-border) !important;
	color: var(--calendar-tooltip-text);
	box-shadow: var(--calendar-tooltip-shadow);
}

.run-output-icon {
	display: inline-flex;
	width: 12px;
	height: 12px;
	border-radius: 999px;
	border: 2px solid rgba(148, 163, 184, 0.55);
	border-top-color: rgba(251, 191, 36, 0.9);
	box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.6) inset;
	opacity: 0.85;
}

.run-output-icon.is-processing {
	animation: run-output-spin 0.9s linear infinite;
	border-top-color: rgba(244, 114, 182, 0.95);
}

@keyframes run-output-spin {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

/* Run output default sizing - JS dynamically adjusts max-height */
#runOutput {
	max-height: 160px;
	overflow: auto;
	-webkit-overflow-scrolling: touch;
}

main.relative {
	margin: 0;
	width: 100%;
	height: 100%;
}

@media (min-width: 640px) {
	main.relative {
		margin: 0;
		width: 100%;
		height: 100%;
	}
}

@media (min-width: 1024px) {
	main.relative {
		width: 100%;
		max-width: 100%;
	}
}

#mainGrid,
#editorPanel,
#psPanel {
	min-width: 0;
}

.bg-glow {
	position: fixed;
	inset: 0;
	overflow: hidden;
	pointer-events: none;
	z-index: 0;
}

body.glow-disabled .bg-glow {
	display: none;
}

.bg-blob {
	position: absolute;
	width: 60vmax;
	height: 60vmax;
	border-radius: 999px;
	filter: blur(140px);
	opacity: 0.81;
	left: 50%;
	transform: translateX(-50%);
}

.bg-blob-top {
	top: -22vmax;
}

.bg-blob-bottom {
	bottom: -26vmax;
}

/* ── Emerald theme: override dark-navy body with dark-green base ── */
body[data-theme="emerald"] {
	background-color: #020d06 !important;
}

body[data-theme="emerald"] .bg-blob {
	opacity: 0.95;
}

.theme-swatch {
	width: 1.1rem;
	height: 1.1rem;
	border-radius: 999px;
	background: linear-gradient(180deg, var(--swatch-top), var(--swatch-bottom));
	box-shadow:
		inset 0 0 0 1px rgba(255, 255, 255, 0.18),
		0 8px 16px rgba(0, 0, 0, 0.35);
}

.ps-note-link-badge {
	position: absolute;
	right: 0.5rem;
	bottom: 0.5rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.35rem;
	height: 1.35rem;
	border-radius: 999px;
	border: 0;
	background: transparent;
	color: var(--accent-text-soft);
	backdrop-filter: blur(10px) saturate(140%);
	-webkit-backdrop-filter: blur(10px) saturate(140%);
}

#psTagsPanel {
	max-height: 62.5vh;
	overflow-y: auto;
	padding-right: 0.25rem;
}

#toggleComments,
#psEditorTagsBar,
#psEditorTagsBar > div {
	background: var(--panel-solid-bg, rgba(2, 6, 23, 0.75)) !important;
	border-color: var(--accent-border, rgba(255, 255, 255, 0.12)) !important;
	border-radius: 12px;
	backdrop-filter: blur(18px) saturate(160%);
	-webkit-backdrop-filter: blur(18px) saturate(160%);
	box-shadow: 0 5px 14px rgba(2, 6, 23, 0.22);
}

#psEditorTagsBar input,
#psEditorTagsBar select {
	background: transparent !important;
	border-color: transparent !important;
}

#copyMirror,
#psMetaToggle,
#clearMirror,
#toggleBlockArrange,
#togglePermanentLink,
#toggleExcalidraw,
#toggleExcel,
#toggleLinear {
	background: var(--selection-menu-bg) !important;
	border-color: var(--selection-menu-border) !important;
	border-radius: 0.75rem;
	box-shadow: none !important;
	backdrop-filter: blur(18px) saturate(160%) !important;
	-webkit-backdrop-filter: blur(18px) saturate(160%) !important;
	transition: all 0.15s ease;
}

#copyMirror:hover,
#psMetaToggle:hover,
#clearMirror:hover,
#toggleBlockArrange:hover,
#togglePermanentLink:hover,
#toggleExcalidraw:hover,
#toggleExcel:hover,
#toggleLinear:hover {
	border-color: var(--accent-strong) !important;
	transform: translateY(-1px);
}

#toggleExcalidraw[aria-pressed="true"],
#toggleExcel[aria-pressed="true"],
#toggleLinear[aria-pressed="true"],
#togglePermanentLink[aria-pressed="true"],
#toggleBlockArrange[aria-pressed="true"],
#calendarCommonFreeToggle[aria-pressed="true"] {
	border-color: var(--accent-border-strong) !important;
}

#togglePermanentLink[aria-pressed="true"] {
	color: var(--accent-text) !important;
}

#calendarCommonFreeToggle[aria-pressed="true"] {
	background-color: rgba(16, 185, 129, 0.2) !important;
	color: #10b981 !important;
	border-color: #10b981 !important;
}

#calendarCommonFreeToggle[aria-pressed="false"] {
	color: #ef4444;
	border-color: rgba(239, 68, 68, 0.4);
}

#copyMirror,
#toggleBlockArrange,
#togglePermanentLink,
#toggleExcalidraw,
#toggleExcel,
#toggleLinear {
	bottom: 0.5rem;
}

#copyMirror {
	right: 0.5rem;
}

#togglePermanentLink {
	right: 3.25rem;
}

#toggleExcel {
	right: 6rem;
}

#toggleExcalidraw {
	right: 8.75rem;
}

#toggleLinear {
	right: 11.5rem;
}

#toggleHeader:hover,
#toggleHeader:focus-visible,
#toggleHeader:active {
	background-color: transparent;
}

#togglePersonalSpace {
	border: none !important;
	background: transparent !important;
	padding: 0;
	opacity: 1;
}
#togglePersonalSpace:hover,
#togglePersonalSpace:focus-visible {
	background: transparent !important;
}

/* PS Show Button – visible when PS is collapsed */
#psShowBtn {
	border: none;
	background: transparent !important;
	padding: 0;
}
#psShowBtn:not(.hidden) {
	display: inline-flex;
}

#psEditorTagsBar > div {
	flex-wrap: nowrap;
	overflow-x: auto;
	white-space: nowrap;
}

#psList {
	overflow-x: hidden;
	width: 100%;
	box-sizing: border-box;
}

/* ── Clean note dividers ───────────────── */
#psList .ps-note-item {
	background-color: transparent !important;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
	transition: background-color 0.15s ease, max-height 0.2s ease;
	border-radius: 0;
	min-height: 5rem;
	max-height: 5rem;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding-top: 0.5rem;
	padding-bottom: 0.5rem;
	position: relative;
}

#psList .ps-note-item:hover {
	max-height: 5rem;
	background-color: transparent !important;
}
#psList .ps-note-item:last-child {
	border-bottom: none;
}
#psList .ps-note-item.ps-note-active {
	background-color: rgba(255, 255, 255, 0.05) !important;
	border-radius: 8px;
	border: none;
	box-shadow: none;
}
#psList .ps-note-item:has(+ .ps-note-active) {
	border-bottom: none;
}

/* Mobile: subtle dividers for default themes */
@media (max-width: 1023px) {
	#psList .ps-note-item {
		border-bottom-color: rgba(255, 255, 255, 0.015);
	}
	/* Ensure note meta is visible on mobile */
	#psList .ps-note-meta {
		visibility: visible !important;
		opacity: 1 !important;
		display: flex !important;
	}
	.ps-note-tags-inline {
		display: inline !important;
		visibility: visible !important;
		opacity: 1 !important;
	}
}

/* ── Search Help Button ───────────────────── */

.ps-search-help-btn {
	position: absolute;
	right: 26px;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: none;
	background: transparent;
	color: var(--calendar-tooltip-text, rgba(148, 163, 184, 0.5));
	cursor: pointer;
	opacity: 0;
	transition: opacity 0.2s ease, color 0.15s ease, background 0.15s ease;
	z-index: 2;
	padding: 0;
}

/* ── Sort Button (inline inside search) ──── */

.ps-sort-inline-btn {
	position: absolute;
	right: 4px;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 6px;
	border: none;
	background: transparent;
	color: rgba(148, 163, 184, 0.5);
	cursor: pointer;
	transition: color 0.15s ease, background 0.15s ease;
	z-index: 2;
	padding: 0;
}

.ps-sort-inline-btn:hover {
	color: var(--accent-text, rgba(226, 232, 240, 0.9));
	background: var(--accent-bg-soft, rgba(255, 255, 255, 0.06));
}

.ps-sort-inline-btn:active {
	color: #fff;
}

/* show on parent hover or input focus */
.ps-search-help-btn:hover,
.ps-search-help-btn:focus-visible {
	opacity: 1;
	color: var(--accent-text, rgba(226, 232, 240, 0.8));
	background: var(--accent-bg-soft, rgba(255, 255, 255, 0.06));
}

*:hover > .ps-search-help-btn,
*:focus-within > .ps-search-help-btn {
	opacity: 0.5;
}

*:hover > .ps-search-help-btn:hover,
*:focus-within > .ps-search-help-btn:hover {
	opacity: 1;
}

/* ── Save Query Button ───────────────────── */

.ps-save-query-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 0.5rem;
	border: 1px solid rgba(255, 255, 255, 0.1);
	background: transparent;
	color: var(--accent-text-soft, rgba(148, 163, 184, 0.6));
	cursor: pointer;
	transition: color 0.15s ease, background 0.15s ease;
	flex-shrink: 0;
}
.ps-save-query-btn:hover {
	color: var(--accent-text, rgba(226, 232, 240, 0.9));
	background: rgba(255, 255, 255, 0.05);
}
.ps-save-query-btn:active {
	background: rgba(255, 255, 255, 0.1);
}

/* ── Saved Query Chips ───────────────────── */

.ps-saved-query-chip {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 8px;
	border-radius: 9999px;
	border: 1px solid rgba(255, 255, 255, 0.08);
	background: var(--accent-bg-soft, rgba(255, 255, 255, 0.05));
	color: var(--accent-text-soft, rgba(148, 163, 184, 0.8));
	font-size: 11px;
	line-height: 1.3;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
	max-width: 180px;
	white-space: nowrap;
	overflow: hidden;
}
.ps-saved-query-chip:hover {
	background: var(--accent-bg-soft, rgba(255, 255, 255, 0.08));
	color: var(--accent-text, rgba(226, 232, 240, 0.95));
}
.ps-saved-query-chip > span:first-child {
	overflow: hidden;
	text-overflow: ellipsis;
}
.ps-saved-query-del {
	opacity: 0.4;
	font-size: 13px;
	line-height: 1;
	cursor: pointer;
	transition: opacity 0.15s ease;
	flex-shrink: 0;
}
.ps-saved-query-del:hover {
	opacity: 1;
}

/* ── Search Help Tooltip (right-positioned, solid bg) ── */

.ps-search-help-layer {
	position: fixed;
	z-index: 9999;
	pointer-events: none;
	opacity: 0;
	transform: translateX(-4px);
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.ps-search-help-layer.is-visible {
	opacity: 1;
	transform: translateX(0);
	pointer-events: auto;
}

.ps-search-help-box {
	max-width: 320px;
	min-width: 240px;
	padding: 10px 14px;
	border-radius: 10px;
	border: 1px solid var(--modal-border, rgba(255, 255, 255, 0.08));
	background: var(--panel-solid-bg, #0f0a1a);
	color: var(--accent-text-soft, rgba(226, 232, 240, 0.95));
	font-size: 11px;
	line-height: 1.55;
	white-space: pre-line;
	text-align: left;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.ps-search-help-arrow {
	position: absolute;
	left: -5px;
	width: 8px;
	height: 8px;
	background: var(--panel-solid-bg, #0f0a1a);
	border-left: 1px solid var(--modal-border, rgba(255, 255, 255, 0.08));
	border-bottom: 1px solid var(--modal-border, rgba(255, 255, 255, 0.08));
	transform: translateY(-50%) rotate(45deg);
}

/* ── Query Results Panel ──────────────────── */

#psQueryResults {
	max-height: 220px;
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: var(--scrollbar-thumb, rgba(148, 163, 184, 0.15)) transparent;
	background: var(--panel-solid-bg, #0f0a1a);
}

.ps-query-header {
	padding: 8px 12px;
	border-bottom: 1px solid var(--accent-border, rgba(255, 255, 255, 0.08));
}

.ps-query-header-row {
	display: flex;
	align-items: center;
	gap: 6px;
}

.ps-query-icon {
	width: 14px;
	height: 14px;
	flex-shrink: 0;
	color: var(--accent-strong, rgba(217, 70, 239, 0.55));
}

.ps-query-summary {
	font-size: 11px;
	font-weight: 600;
	color: var(--accent-text, rgba(253, 242, 255, 0.85));
	letter-spacing: 0.01em;
}

.ps-query-tag {
	display: inline-block;
	padding: 1px 6px;
	border-radius: 6px;
	background: var(--accent-bg-soft, rgba(217, 70, 239, 0.12));
	color: var(--accent-text-soft, rgba(244, 114, 182, 0.9));
	font-size: 10px;
	font-weight: 500;
	margin-left: 2px;
}

.ps-query-from {
	color: rgba(148, 163, 184, 0.7);
	font-size: 10px;
	font-weight: 400;
	margin-left: 4px;
}

.ps-query-list {
	list-style: none;
	margin: 0;
	padding: 4px 6px 6px;
}

.ps-query-item {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	padding: 5px 6px;
	border-radius: 8px;
	cursor: pointer;
	transition: background 120ms ease;
	font-size: 12px;
	line-height: 1.35;
}

.ps-query-item:hover {
	background: var(--accent-bg-soft, rgba(255, 255, 255, 0.04));
}

.ps-query-check {
	width: 15px;
	height: 15px;
	flex-shrink: 0;
	margin-top: 1px;
	color: var(--accent-strong, rgba(217, 70, 239, 0.5));
}

.ps-query-check.done {
	color: rgba(74, 222, 128, 0.6);
}

.ps-query-label {
	flex: 1;
	min-width: 0;
	color: var(--accent-text, rgba(226, 232, 240, 0.92));
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ps-query-item.done .ps-query-label {
	text-decoration: line-through;
	color: var(--accent-text-soft, rgba(148, 163, 184, 0.5));
	opacity: 0.5;
}

.ps-query-note-ref {
	flex-shrink: 0;
	max-width: 90px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 10px;
	color: rgba(148, 163, 184, 0.45);
	padding-top: 1px;
}

#psList,
#mirror,
#mdPreview {
	scrollbar-width: thin;
	scrollbar-color: transparent transparent;
	scrollbar-gutter: stable;
}

#mirror {
	white-space: pre !important;
	overflow-wrap: normal !important;
	word-break: normal !important;
	overflow-x: auto;
}

#mdPreview {
	background-color: inherit;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

#psList::-webkit-scrollbar,
#mirror::-webkit-scrollbar,
#mdPreview::-webkit-scrollbar {
	width: 10px;
	height: 10px;
}

#psList::-webkit-scrollbar-thumb,
#mirror::-webkit-scrollbar-thumb,
#mdPreview::-webkit-scrollbar-thumb {
	background-color: transparent;
	border-color: transparent;
	transition: background-color 90ms ease, border-color 90ms ease;
}
#psList.scrollbar-active,
#mirror.scrollbar-active,
#mdPreview.scrollbar-active {
	scrollbar-color: var(--scrollbar-thumb) transparent;
}

#psList.scrollbar-active::-webkit-scrollbar-thumb,
#mirror.scrollbar-active::-webkit-scrollbar-thumb,
#mdPreview.scrollbar-active::-webkit-scrollbar-thumb {
	background-color: var(--scrollbar-thumb);
	border-color: var(--scrollbar-border);
}

#psList.scrollbar-active::-webkit-scrollbar-thumb:hover,
#mirror.scrollbar-active::-webkit-scrollbar-thumb:hover,
#mdPreview.scrollbar-active::-webkit-scrollbar-thumb:hover {
	background-color: var(--scrollbar-thumb-hover);
}

.ps-tag-section {
	--ps-tag-border: rgba(217, 70, 239, 0.25);
	--ps-tag-border-strong: rgba(217, 70, 239, 0.45);
	--ps-tag-text: rgba(226, 232, 240, 0.95);
	--ps-tag-text-strong: rgba(253, 242, 255, 0.98);
	--ps-tag-icon: rgba(217, 70, 239, 0.8);
}
.ps-tag-section-year {
	--ps-tag-bg: rgba(56, 189, 248, 0.1);
	--ps-tag-bg-strong: rgba(56, 189, 248, 0.2);
	--ps-tag-border: rgba(56, 189, 248, 0.3);
	--ps-tag-border-strong: rgba(56, 189, 248, 0.55);
	--ps-tag-text: rgba(224, 242, 254, 0.95);
	--ps-tag-text-strong: rgba(240, 249, 255, 0.98);
	--ps-tag-icon: rgba(56, 189, 248, 0.9);
}
.ps-tag-section-month {
	--ps-tag-bg: rgba(14, 165, 233, 0.1);
	--ps-tag-bg-strong: rgba(14, 165, 233, 0.22);
	--ps-tag-border: rgba(14, 165, 233, 0.32);
	--ps-tag-border-strong: rgba(14, 165, 233, 0.6);
	--ps-tag-text: rgba(224, 242, 254, 0.95);
	--ps-tag-text-strong: rgba(240, 249, 255, 0.98);
	--ps-tag-icon: rgba(14, 165, 233, 0.9);
}
.ps-tag-section-category {
	--ps-tag-bg: rgba(52, 211, 153, 0.1);
	--ps-tag-bg-strong: rgba(52, 211, 153, 0.22);
	--ps-tag-border: rgba(52, 211, 153, 0.32);
	--ps-tag-border-strong: rgba(52, 211, 153, 0.6);
	--ps-tag-text: rgba(209, 250, 229, 0.95);
	--ps-tag-text-strong: rgba(236, 253, 245, 0.98);
	--ps-tag-icon: rgba(52, 211, 153, 0.9);
}
.ps-tag-section-subcategory {
	--ps-tag-bg: rgba(163, 230, 53, 0.1);
	--ps-tag-bg-strong: rgba(163, 230, 53, 0.2);
	--ps-tag-border: rgba(163, 230, 53, 0.32);
	--ps-tag-border-strong: rgba(163, 230, 53, 0.6);
	--ps-tag-text: rgba(236, 252, 203, 0.95);
	--ps-tag-text-strong: rgba(247, 254, 231, 0.98);
	--ps-tag-icon: rgba(163, 230, 53, 0.9);
}
.ps-tag-section-kind {
	--ps-tag-bg: rgba(251, 191, 36, 0.1);
	--ps-tag-bg-strong: rgba(251, 191, 36, 0.22);
	--ps-tag-border: rgba(251, 191, 36, 0.35);
	--ps-tag-border-strong: rgba(251, 191, 36, 0.65);
	--ps-tag-text: rgba(254, 249, 195, 0.95);
	--ps-tag-text-strong: rgba(254, 252, 232, 0.98);
	--ps-tag-icon: rgba(251, 191, 36, 0.95);
}
.ps-tag-section-language {
	--ps-tag-bg: rgba(129, 140, 248, 0.1);
	--ps-tag-bg-strong: rgba(129, 140, 248, 0.22);
	--ps-tag-border: rgba(129, 140, 248, 0.35);
	--ps-tag-border-strong: rgba(129, 140, 248, 0.65);
	--ps-tag-text: rgba(224, 231, 255, 0.95);
	--ps-tag-text-strong: rgba(238, 242, 255, 0.98);
	--ps-tag-icon: rgba(129, 140, 248, 0.9);
}
.ps-tag-section-other {
	--ps-tag-bg: rgba(148, 163, 184, 0.1);
	--ps-tag-bg-strong: rgba(148, 163, 184, 0.22);
	--ps-tag-border: rgba(148, 163, 184, 0.35);
	--ps-tag-border-strong: rgba(148, 163, 184, 0.65);
	--ps-tag-text: rgba(226, 232, 240, 0.95);
	--ps-tag-text-strong: rgba(241, 245, 249, 0.98);
	--ps-tag-icon: rgba(148, 163, 184, 0.9);
}
.ps-tag-button.ps-tag-button-group {
	border-color: var(--ps-tag-border) !important;
	background-color: var(--ps-tag-bg) !important;
	color: var(--ps-tag-text) !important;
}
.ps-tag-button.ps-tag-button-group.ps-tag-active {
	border-color: var(--ps-tag-border-strong) !important;
	background-color: var(--ps-tag-bg-strong) !important;
	color: var(--ps-tag-text-strong) !important;
	box-shadow: 0 0 0 1px var(--ps-tag-border-strong) inset;
}
.ps-tag-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--ps-tag-icon);
}
.ps-tag-icon svg {
	width: 0.95rem;
	height: 0.95rem;
}

/* ── Tag-based Tags Bar ───────────────── */
.ps-tags-bar-inner {
	display: flex;
	align-items: center;
	gap: 6px;
	min-height: 36px;
	padding: 4px 8px;
	border-radius: 10px;
	border: 1px solid var(--accent-border, rgba(255, 255, 255, 0.08));
	background: var(--panel-solid-bg, rgba(2, 6, 23, 0.65));
	backdrop-filter: blur(18px) saturate(150%);
	-webkit-backdrop-filter: blur(18px) saturate(150%);
	overflow-x: auto;
	scrollbar-width: none;
}
.ps-tags-bar-inner::-webkit-scrollbar {
	display: none;
}
.ps-tags-pills {
	display: flex;
	align-items: center;
	gap: 5px;
	flex-wrap: nowrap;
}
.ps-tag-pill {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	height: 24px;
	padding: 0 8px;
	border-radius: 8px;
	font-size: 11px;
	font-weight: 500;
	line-height: 1;
	white-space: nowrap;
	cursor: default;
	transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
	border: 1px solid;
}
.ps-tag-pill-hash {
	opacity: 0.6;
	font-weight: 400;
	margin-right: -2px;
}
/* Tag pills with distinct category colors */
.ps-tag-pill-year {
	background: rgba(56, 189, 248, 0.12);
	border-color: rgba(56, 189, 248, 0.25);
	color: rgba(186, 230, 253, 0.95);
}
.ps-tag-pill-month {
	background: rgba(14, 165, 233, 0.12);
	border-color: rgba(14, 165, 233, 0.25);
	color: rgba(224, 242, 254, 0.95);
}
.ps-tag-pill-category {
	background: rgba(52, 211, 153, 0.12);
	border-color: rgba(52, 211, 153, 0.25);
	color: rgba(209, 250, 229, 0.95);
}
.ps-tag-pill-subcategory {
	background: rgba(163, 230, 53, 0.12);
	border-color: rgba(163, 230, 53, 0.25);
	color: rgba(217, 249, 157, 0.95);
}
.ps-tag-pill-tag {
	background: var(--accent-bg-soft);
	border-color: var(--accent-border);
	color: var(--accent-text-soft);
}
.ps-tag-pill-remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	margin-left: 2px;
	margin-right: -4px;
	cursor: pointer;
	opacity: 0;
	transition: opacity 0.15s ease, background 0.15s ease;
}
.ps-tag-pill:hover .ps-tag-pill-remove {
	opacity: 0.5;
}
.ps-tag-pill-remove:hover {
	opacity: 1;
	background: rgba(255, 255, 255, 0.1);
}
.ps-tag-pill-remove svg {
	width: 10px;
	height: 10px;
}
.ps-tags-input {
	flex: 1 1 auto;
	min-width: 60px;
	max-width: 120px;
	height: 24px;
	padding: 0 6px;
	border: none;
	background: transparent;
	font-size: 11px;
	color: var(--accent-text, rgba(226, 232, 240, 0.95));
	outline: none;
}
.ps-tags-input::placeholder {
	color: var(--accent-text-soft, rgba(148, 163, 184, 0.5));
}

/* Theme-specific tags bar adjustments */
/* Light themes: darker text for readability */
body[data-theme="coffeeLight"] .ps-tags-bar-inner {
	background: rgba(255, 250, 244, 0.85);
	border-color: rgba(217, 199, 188, 0.5);
}
body[data-theme="coffeeLight"] .ps-tag-pill-year {
	color: #0e7490;
}
body[data-theme="coffeeLight"] .ps-tag-pill-month {
	color: #0369a1;
}
body[data-theme="coffeeLight"] .ps-tag-pill-category {
	color: #047857;
}
body[data-theme="coffeeLight"] .ps-tag-pill-subcategory {
	color: #4d7c0f;
}
body[data-theme="coffeeLight"] .ps-tags-input {
	color: #3b2a21;
}
body[data-theme="coffeeLight"] .ps-tags-input::placeholder {
	color: rgba(139, 107, 85, 0.5);
}

body[data-theme="bitterLight"] .ps-tags-bar-inner {
	background: rgba(247, 246, 244, 0.9);
	border-color: rgba(216, 210, 203, 0.5);
}
body[data-theme="bitterLight"] .ps-tag-pill-year {
	color: #0e7490;
}
body[data-theme="bitterLight"] .ps-tag-pill-month {
	color: #0369a1;
}
body[data-theme="bitterLight"] .ps-tag-pill-category {
	color: #047857;
}
body[data-theme="bitterLight"] .ps-tag-pill-subcategory {
	color: #4d7c0f;
}
body[data-theme="bitterLight"] .ps-tags-input {
	color: #0d0c10;
}
body[data-theme="bitterLight"] .ps-tags-input::placeholder {
	color: rgba(91, 90, 100, 0.45);
}

body[data-theme="monoLight"] .ps-tags-bar-inner {
	background: rgba(255, 255, 255, 0.9);
	border-color: rgba(208, 215, 222, 0.6);
}
body[data-theme="monoLight"] .ps-tag-pill-year {
	color: #0e7490;
}
body[data-theme="monoLight"] .ps-tag-pill-month {
	color: #0369a1;
}
body[data-theme="monoLight"] .ps-tag-pill-category {
	color: #047857;
}
body[data-theme="monoLight"] .ps-tag-pill-subcategory {
	color: #4d7c0f;
}
body[data-theme="monoLight"] .ps-tags-input {
	color: #24292f;
}
body[data-theme="monoLight"] .ps-tags-input::placeholder {
	color: rgba(140, 149, 159, 0.6);
}

body[data-theme="coffeeDark"] .ps-tags-bar-inner {
	background: rgba(28, 22, 20, 0.85);
	border-color: rgba(59, 40, 32, 0.5);
}
body[data-theme="coffeeDark"] .ps-tags-input {
	color: #e8d9cc;
}
body[data-theme="coffeeDark"] .ps-tags-input::placeholder {
	color: rgba(180, 152, 133, 0.5);
}

body[data-theme="bitterDark"] .ps-tags-bar-inner {
	background: rgba(13, 12, 16, 0.9);
	border-color: rgba(42, 42, 48, 0.5);
}
body[data-theme="bitterDark"] .ps-tags-input {
	color: #f0e8df;
}
body[data-theme="bitterDark"] .ps-tags-input::placeholder {
	color: rgba(138, 123, 112, 0.5);
}

body[data-theme="monoDark"] .ps-tags-bar-inner {
	background: rgba(13, 17, 23, 0.9);
	border-color: rgba(48, 54, 61, 0.5);
}
body[data-theme="monoDark"] .ps-tags-input {
	color: #c9d1d9;
}
body[data-theme="monoDark"] .ps-tags-input::placeholder {
	color: rgba(110, 118, 129, 0.5);
}

/* Mobile adjustments for tags bar */
@media (max-width: 1023px) {
	.ps-tags-bar-inner {
		min-height: 32px;
		padding: 3px 6px;
		gap: 4px;
	}
	.ps-tag-pill {
		height: 22px;
		padding: 0 6px;
		font-size: 10px;
	}
	.ps-tags-input {
		font-size: 10px;
		min-width: 50px;
	}
}

body.code-lang-active #psEditorTagsBar,
body.code-lang-active #clearMirror {
	display: none !important;
}

.ps-note-item.ps-note-active .ps-note-actions,
.ps-note-item:hover .ps-note-actions {
	opacity: 1 !important;
	pointer-events: auto !important;
	transform: none !important;
}
.ps-note-excerpt {
	display: none;
}
.ps-note-actions {
	opacity: 0;
	pointer-events: none;
	transform: translateY(-2px);
	transition: opacity 0.2s ease, transform 0.2s ease;
}
.ps-note-item:hover .ps-note-actions,
.ps-note-item.ps-note-active .ps-note-actions {
	opacity: 1;
	pointer-events: auto;
	transform: none;
}
#psList .ps-note-meta {
	visibility: visible;
	opacity: 1;
}
#psList .ps-note-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 4px 0 2px;
	visibility: hidden;
	opacity: 0;
	max-height: 0;
	transition: opacity 0.15s ease, max-height 0.2s ease;
	overflow: hidden;
}
#psList .ps-note-item:hover .ps-note-tags {
	visibility: hidden;
	opacity: 0;
	max-height: 0;
}
.md-content a {
	color: rgb(96 165 250);
	text-decoration: underline;
	text-underline-offset: 3px;
}
.md-content code,
.md-content pre {
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
		"Liberation Mono", "Courier New", monospace;
}
#attributionOverlay {
	z-index: 5;
}
#attributionOverlayContent {
	white-space: pre-wrap;
	word-break: break-word;
}
#attributionOverlay.is-underline #attributionOverlayContent {
	color: transparent;
}
#attributionOverlay.is-underline .author-span {
	background: transparent;
	box-shadow: none;
	padding: 0;
	margin: 0;
	border-radius: 0;
}
#attributionOverlay.is-underline .author-underline {
	text-decoration-line: underline;
	text-decoration-style: solid;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.18em;
}
#commentOverlay {
	z-index: 4;
}
#commentOverlayContent {
	white-space: pre-wrap;
	word-break: break-word;
	color: transparent;
}
#searchHighlightOverlay {
	z-index: 3;
}
#searchHighlightContent {
	white-space: pre;
	word-break: normal;
	color: transparent;
	overflow-wrap: normal;
}
.search-hl {
	background: rgba(250, 204, 21, 0.32);
	border-radius: 2px;
}
.search-hl-current {
	background: rgba(250, 204, 21, 0.72);
	border-radius: 2px;
}
#cursorOverlay {
	z-index: 6;
}
#cursorOverlayContent {
	position: relative;
	white-space: pre-wrap;
	word-break: break-word;
}
.remote-caret {
	position: absolute;
	width: 2px;
	border-left: 2px solid;
	border-radius: 999px;
	transform: translateX(-1px);
}
.remote-caret-label {
	position: absolute;
	left: 6px;
	top: -6px;
	transform: translateY(-100%);
	padding: 2px 6px;
	border-radius: 999px;
	border: 1px solid transparent;
	font-size: 10px;
	line-height: 1.1;
	color: rgba(15, 23, 42, 0.95);
	white-space: nowrap;
	box-shadow: 0 4px 10px rgba(15, 23, 42, 0.2);
}
.comment-span {
	background: rgba(217, 70, 239, 0.25);
	box-shadow: inset 0 0 0 1px rgba(217, 70, 239, 0.45);
	border-radius: 0.35rem;
	padding: 0 0.04em;
	margin: 0 -0.02em;
	box-decoration-break: clone;
	-webkit-box-decoration-break: clone;
}
.comment-badge {
	background: var(--accent-strong);
	border-color: var(--accent-border-strong);
	color: var(--accent-text);
}
#commentInput {
	padding-right: 3rem;
	padding-bottom: 2.5rem;
}
.comment-input-wrap {
	position: relative;
}
.comment-input-toolbar {
	position: absolute;
	left: 8px;
	bottom: 8px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 0;
	border: none;
}
.comment-md-btn {
	border: none;
	background: transparent;
	color: rgba(148, 163, 184, 0.9);
	padding: 4px;
	border-radius: 6px;
	line-height: 1;
	transition: color 0.15s ease, background-color 0.15s ease;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.comment-md-btn:hover {
	color: rgba(226, 232, 240, 0.95);
	background: rgba(255, 255, 255, 0.06);
}
.comment-add-btn {
	position: absolute;
	right: 10px;
	bottom: 10px;
}
.comment-body p {
	margin: 0;
}
.comment-body p + p {
	margin-top: 0.4rem;
}
.comment-body ul,
.comment-body ol {
	margin: 0.3rem 0 0.3rem 1.1rem;
}
.comment-body code {
	background: rgba(255, 255, 255, 0.08);
	padding: 0.1em 0.3em;
	border-radius: 0.35rem;
}
.comment-body pre {
	margin: 0.35rem 0 0;
	border-radius: 0.6rem;
	border: 1px solid rgba(255, 255, 255, 0.08);
	background: rgba(2, 6, 23, 0.55);
	padding: 0.5rem 0.6rem;
	overflow: auto;
}
.comment-item .comment-actions {
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.15s ease;
}
.comment-item:hover .comment-actions,
.comment-item.is-selected .comment-actions,
.comment-item:focus-within .comment-actions {
	opacity: 1;
	pointer-events: auto;
}
.comment-action-btn {
	border: none;
	background: transparent;
	color: rgba(148, 163, 184, 0.9);
	transition: color 0.15s ease, background-color 0.15s ease;
}
.comment-action-btn:hover {
	color: rgba(226, 232, 240, 0.95);
	background: rgba(255, 255, 255, 0.06);
}
.comment-reply-badge {
	background: var(--accent-bg);
	border: 1px solid var(--accent-border);
	color: var(--accent-text);
}
#commentList > div {
	background-color: var(--comment-item-bg) !important;
}
@media (min-width: 1024px) {
	#editorPreviewGrid.comment-panel-open #mirror,
	#editorPreviewGrid.comment-panel-open #attributionOverlay,
	#editorPreviewGrid.comment-panel-open #commentOverlay {
		padding-right: 0;
	}
}
#editorPreviewGrid.comment-panel-open #copyMirror {
	display: none;
}
#editorPreviewGrid.comment-panel-open #toggleExcalidraw {
	display: none;
}
#editorPreviewGrid.comment-panel-open #toggleExcel {
	display: none;
}
#editorPreviewGrid.comment-panel-open #toggleLinear {
	display: none;
}
#mirror.excalidraw-active {
	opacity: 1;
	pointer-events: auto;
}

#excalidrawEmbed.excalidraw-embed {
	position: absolute;
	top: 6rem;
	left: 0.75rem;
	width: min(960px, calc(100% - 1.5rem));
	height: min(640px, calc(100% - 6rem));
	max-width: calc(100% - 1.5rem);
	max-height: calc(100% - 6rem);
	min-width: min(480px, calc(100% - 1.5rem));
	min-height: 320px;
	resize: both;
	z-index: 20;
	border-radius: 0.75rem;
	overflow: hidden;
	background: rgba(2, 6, 23, 0.65);
	backdrop-filter: blur(14px) saturate(140%);
	-webkit-backdrop-filter: blur(14px) saturate(140%);
	transform: translate3d(0, 0, 0);
	transition: transform 80ms ease;
}
.excalidraw-iframe {
	width: 100%;
	height: 100%;
	border: none;
	background: transparent;
}

#excelEmbed.excel-embed {
	position: absolute;
	top: 6rem;
	left: 0.75rem;
	width: min(1024px, calc(100% - 1.5rem));
	height: min(720px, calc(100% - 6rem));
	max-width: calc(100% - 1.5rem);
	max-height: calc(100% - 6rem);
	min-width: min(520px, calc(100% - 1.5rem));
	min-height: 360px;
	resize: both;
	z-index: 21;
	border-radius: 0.75rem;
	border: 1px solid var(--selection-menu-border);
	overflow: hidden;
	background: var(--selection-menu-bg);
	backdrop-filter: blur(14px) saturate(140%);
	-webkit-backdrop-filter: blur(14px) saturate(140%);
	transform: translate3d(0, 0, 0);
	transition: transform 80ms ease;
}
.excel-iframe {
	width: 100%;
	height: 100%;
	border: none;
	background: transparent;
	filter: none;
}

body[data-theme="fuchsia"] .excel-iframe,
body[data-theme="cyan"] .excel-iframe,
body[data-theme="emerald"] .excel-iframe,
body[data-theme="violet"] .excel-iframe,
body[data-theme="coffeeDark"] .excel-iframe,
body[data-theme="bitterDark"] .excel-iframe,
body[data-theme="monoDark"] .excel-iframe {
	filter: invert(1) hue-rotate(180deg);
}

#linearEmbed.linear-embed {
	position: absolute;
	top: 6rem;
	left: 0.75rem;
	width: min(820px, calc(100% - 1.5rem));
	height: min(620px, calc(100% - 6rem));
	max-width: calc(100% - 1.5rem);
	max-height: calc(100% - 6rem);
	min-width: min(420px, calc(100% - 1.5rem));
	min-height: 280px;
	resize: both;
	z-index: 22;
	border-radius: 0.75rem;
	border: 1px solid var(--selection-menu-border);
	overflow: hidden;
	background: var(--selection-menu-bg);
	backdrop-filter: blur(14px) saturate(140%);
	-webkit-backdrop-filter: blur(14px) saturate(140%);
	transform: translate3d(0, 0, 0);
	transition: transform 80ms ease;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
	display: flex;
	flex-direction: column;
}

#linearEmbed.linear-embed.hidden {
	display: none;
}

.linear-embed-toolbar {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.6rem 0.75rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	background: var(--selection-menu-bg);
}

.linear-embed-title {
	font-size: 0.8rem;
	font-weight: 600;
	color: rgba(226, 232, 240, 0.95);
}

.linear-project-header {
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.01em;
	color: var(--accent, #a78bfa);
	background: rgba(167, 139, 250, 0.12);
	border: 1px solid rgba(167, 139, 250, 0.22);
	border-radius: 999px;
	padding: 0.18rem 0.7rem 0.18rem 0.5rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 240px;
	display: inline-flex;
	align-items: center;
	gap: 0.32rem;
	line-height: 1.35;
	box-shadow: 0 0 6px rgba(167, 139, 250, 0.08);
	transition: background 0.15s, color 0.15s;
}
.linear-project-header::before {
	content: "";
	display: inline-block;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--accent, #a78bfa);
	flex-shrink: 0;
}
.linear-project-header.hidden {
	display: none;
}

.linear-project-select {
	min-width: 180px;
	max-width: 240px;
	border-radius: 0.5rem;
	border: 1px solid rgba(255, 255, 255, 0.12);
	background: rgba(2, 6, 23, 0.6);
	color: rgba(226, 232, 240, 0.95);
	font-size: 0.75rem;
	padding: 0.3rem 0.5rem;
}

.linear-embed-btn {
	border-radius: 0.5rem;
	border: 1px solid rgba(255, 255, 255, 0.12);
	background: rgba(255, 255, 255, 0.06);
	color: rgba(226, 232, 240, 0.95);
	font-size: 0.7rem;
	padding: 0.3rem 0.55rem;
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	transition: background-color 0.15s ease;
}
.linear-embed-icon {
	width: 0.75rem;
	height: 0.75rem;
	flex: 0 0 auto;
}
.linear-embed-btn:hover {
	background: rgba(255, 255, 255, 0.12);
}

.linear-status {
	padding: 0.4rem 0.75rem 0;
	font-size: 0.7rem;
	color: rgba(148, 163, 184, 0.9);
}

.linear-empty {
	padding: 0.6rem 0.75rem;
	font-size: 0.75rem;
	color: rgba(148, 163, 184, 0.9);
}

.linear-task-list {
	flex: 1;
	overflow: auto;
	padding: 0.5rem 0.75rem 0.75rem;
}

.linear-embed-tabs {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.4rem 0.75rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	background: var(--selection-menu-bg);
}

.linear-embed-tab {
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	background: rgba(255, 255, 255, 0.04);
	color: rgba(226, 232, 240, 0.9);
	font-size: 0.7rem;
	padding: 0.2rem 0.65rem;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.linear-embed-tab:hover {
	background: rgba(255, 255, 255, 0.12);
}

.linear-embed-tab[aria-pressed="true"] {
	background: rgba(56, 189, 248, 0.2);
	border-color: rgba(56, 189, 248, 0.45);
	color: rgba(226, 232, 240, 0.98);
}

.linear-stats {
	flex: 1;
	overflow: auto;
	padding: 0.6rem 0.75rem 0.9rem;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.linear-stats-empty {
	font-size: 0.75rem;
	color: rgba(148, 163, 184, 0.9);
}

.linear-stats-header {
	display: flex;
	justify-content: space-between;
	gap: 0.75rem;
	align-items: flex-start;
}

.linear-stats-title {
	font-size: 0.85rem;
	font-weight: 600;
	color: rgba(226, 232, 240, 0.98);
}

.linear-stats-sub {
	font-size: 0.7rem;
	color: rgba(148, 163, 184, 0.9);
	margin-top: 0.15rem;
}

.linear-stats-badge {
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	padding: 0.2rem 0.6rem;
	font-size: 0.7rem;
	color: rgba(148, 163, 184, 0.95);
	background: rgba(15, 23, 42, 0.35);
}

.linear-stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 0.6rem;
}

.linear-stat-card {
	border-radius: 0.7rem;
	border: 1px solid rgba(255, 255, 255, 0.08);
	background: rgba(255, 255, 255, 0.03);
	padding: 0.55rem 0.6rem;
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
}

.linear-stat-label {
	font-size: 0.65rem;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: rgba(148, 163, 184, 0.85);
}

.linear-stat-value {
	font-size: 1.05rem;
	font-weight: 600;
	color: rgba(226, 232, 240, 0.98);
}

.linear-stat-sub {
	font-size: 0.65rem;
	color: rgba(148, 163, 184, 0.9);
}

.linear-stats-section {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.linear-stats-section-title {
	font-size: 0.7rem;
	font-weight: 600;
	color: rgba(226, 232, 240, 0.9);
}

.linear-stats-list {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.linear-stats-row {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.7rem;
	color: rgba(226, 232, 240, 0.9);
}

.linear-stats-row-label {
	min-width: 110px;
	color: rgba(148, 163, 184, 0.95);
}

.linear-stats-row-bar {
	flex: 1;
	position: relative;
	height: 6px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.08);
	overflow: hidden;
}

.linear-stats-row-fill {
	height: 100%;
	border-radius: inherit;
	background: rgba(56, 189, 248, 0.7);
}

.linear-stats-row-value {
	min-width: 32px;
	text-align: right;
	color: rgba(226, 232, 240, 0.9);
}

.linear-kanban {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(220px, 1fr);
	gap: 0.75rem;
	min-height: 100%;
}

.linear-kanban-column {
	border-radius: 0.75rem;
	border: 1px solid rgba(255, 255, 255, 0.08);
	background: rgba(255, 255, 255, 0.02);
	padding: 0.5rem;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.linear-kanban-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	font-size: 0.7rem;
	font-weight: 600;
	color: rgba(226, 232, 240, 0.9);
}

.linear-kanban-title {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
}

.linear-kanban-icon {
	width: 1rem;
	height: 1rem;
	flex: 0 0 auto;
	color: rgba(226, 232, 240, 0.9);
}

.linear-kanban-count {
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	padding: 0.1rem 0.45rem;
	font-size: 0.65rem;
	color: rgba(148, 163, 184, 0.95);
}

.linear-kanban-list {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.linear-task-item {
	border-radius: 0.65rem;
	border: 1px solid rgba(255, 255, 255, 0.08);
	background: transparent;
	padding: 0.55rem 0.6rem;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.linear-task-title {
	font-size: 0.8rem;
	font-weight: 600;
	color: rgba(226, 232, 240, 0.95);
}

.linear-task-meta {
	font-size: 0.7rem;
	color: rgba(148, 163, 184, 0.9);
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.linear-task-link {
	font-size: 0.7rem;
	color: rgba(96, 165, 250, 0.9);
	text-decoration: underline;
}


.excel-drag-handle {
	position: absolute;
	bottom: 0.6rem;
	right: 0.6rem;
	z-index: 25;
	cursor: grab;
	user-select: none;
}
#excelDragHandle.help-icon {
	background: transparent !important;
	border-color: transparent !important;
	box-shadow: none !important;
	backdrop-filter: none !important;
	-webkit-backdrop-filter: none !important;
}
#excelDragHandle.help-icon:hover,
#excelDragHandle.help-icon:active {
	background: transparent !important;
	border-color: transparent !important;
	box-shadow: none !important;
}
.excel-drag-handle:active {
	cursor: grabbing;
}

.linear-drag-handle {
	position: absolute;
	bottom: 0.6rem;
	right: 0.6rem;
	z-index: 25;
	cursor: grab;
	user-select: none;
}
#linearDragHandle.help-icon {
	background: transparent !important;
	border-color: transparent !important;
	box-shadow: none !important;
	backdrop-filter: none !important;
	-webkit-backdrop-filter: none !important;
}
#linearDragHandle.help-icon:hover,
#linearDragHandle.help-icon:active {
	background: transparent !important;
	border-color: transparent !important;
	box-shadow: none !important;
}
.linear-drag-handle:active {
	cursor: grabbing;
}

.excalidraw-drag-handle {
	position: absolute;
	bottom: 1.1rem;
	right: 5.25rem;
	z-index: 25;
	cursor: grab;
	user-select: none;
}
.excalidraw-drag-handle:active {
	cursor: grabbing;
}

.help-icon {
	inline-size: 2.1rem;
	block-size: 2.1rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 0.5rem;
	border: 1px solid #cbd5e1;
	background: #e5e7eb;
	color: #374151;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
}
.help-icon:hover {
	background: #f1f5f9;
	border-color: #cbd5e1;
	color: #1f2937;
}
.help-icon:active {
	background: #e2e8f0;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}
#excalidrawEmbed.excalidraw-dragging {
	transition: none;
}
#excelEmbed.excel-dragging {
	transition: none;
}
#linearEmbed.linear-dragging {
	transition: none;
}
#mirror.attribution-active {
	color: transparent;
	caret-color: rgb(226 232 240);
	background-color: transparent !important;
}
#mirror.attribution-active::selection {
	background: rgba(217, 70, 239, 0.25);
}
#mirror.attribution-active::-moz-selection {
	background: rgba(217, 70, 239, 0.25);
}
#mirror.attribution-underline {
	background-color: transparent !important;
}
.author-span {
	border-radius: 0.35rem;
	box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.45);
	padding: 0 0.04em;
	margin: 0 -0.02em;
	box-decoration-break: clone;
	-webkit-box-decoration-break: clone;
}
.md-content .pw-field {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.1rem 0.45rem;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	background: rgba(15, 23, 42, 0.6);
	font-size: 0.85em;
	line-height: 1.2;
	position: relative;
}
.md-content .pw-mask {
	position: absolute;
	left: 0.45rem;
	pointer-events: none;
	letter-spacing: 0.18em;
	font-weight: 600;
	color: rgba(226, 232, 240, 0.9);
	white-space: nowrap;
}
.md-content .pw-value {
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
		"Liberation Mono", "Courier New", monospace;
	color: transparent;
	-webkit-user-select: text;
	user-select: text;
	cursor: text;
}
.md-content .pw-field.pw-revealed .pw-mask {
	display: none;
}
.md-content .pw-field.pw-revealed .pw-value {
	color: rgba(226, 232, 240, 0.95);
}
.md-content .pw-toggle,
.md-content .pw-copy {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 1.4rem;
	min-width: 1.4rem;
	padding: 0 0.25rem;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	background: rgba(255, 255, 255, 0.06);
	color: rgba(226, 232, 240, 0.9);
	font-size: 0.75rem;
	line-height: 1;
	cursor: pointer;
	opacity: 0;
	transition: opacity 0.16s ease;
}
.md-content .pw-field:hover .pw-toggle,
.md-content .pw-field:hover .pw-copy,
.md-content .pw-field.pw-revealed .pw-toggle,
.md-content .pw-field.pw-revealed .pw-copy {
	opacity: 1;
}
.md-content .pw-toggle svg,
.md-content .pw-copy svg {
	width: 0.85rem;
	height: 0.85rem;
	display: block;
}
.md-content .pw-toggle:hover,
.md-content .pw-copy:hover {
	background: rgba(255, 255, 255, 0.12);
}
.md-content pre {
	overflow: auto;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 12px;
	padding: 10px;
	background: rgba(2, 6, 23, 0.6);
}
.md-content code {
	background: rgba(255, 255, 255, 0.06);
	padding: 0.1em 0.3em;
	border-radius: 0.35em;
}
.md-content pre code {
	background: transparent;
	padding: 0;
}
.md-content table {
	border-collapse: collapse;
	width: 100%;
}
.md-content th,
.md-content td {
	border: 1px solid rgba(255, 255, 255, 0.12);
	padding: 6px 8px;
}
.md-content blockquote {
	border-left: 3px solid var(--blockquote-border);
	margin: 0;
	padding: 0 12px;
	color: var(--blockquote-text);
}
.md-content ul.task-list,
.md-content ol.task-list {
	list-style: none;
	padding-left: 0;
}
.md-content ul.task-list li,
.md-content ol.task-list li,
.md-content li.task-list-item {
	font-weight: 400;
	display: flex;
	gap: 0.55rem;
	align-items: flex-start;
	flex-wrap: nowrap;
	white-space: nowrap;
	position: relative;
	padding-bottom: 1rem;
	min-width: 0;
	color: inherit;
	font-size: 1.1rem;
}
.md-content ul.task-list li label,
.md-content ol.task-list li label,
.md-content li.task-list-item label {
	font-weight: 400;
	flex: 1 1 auto;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	min-width: 0;
}
.md-content ul.task-list li *,
.md-content ol.task-list li *,
.md-content li.task-list-item * {
	font-weight: 400 !important;
}
.md-content ul.task-list li strong,
.md-content ol.task-list li strong,
.md-content li.task-list-item strong,
.md-content ul.task-list li b,
.md-content ol.task-list li b,
.md-content li.task-list-item b {
	font-weight: 400;
}
/* Keep completed todos visibly marked */
.md-content ul.task-list li.task-list-item.checked,
.md-content ol.task-list li.task-list-item.checked,
.md-content li.task-list-item.checked {
	opacity: 1;
	color: inherit;
	padding-bottom: 3.25rem;
}
.md-content ul.task-list li.task-list-item.checked *,
.md-content ol.task-list li.task-list-item.checked *,
.md-content li.task-list-item.checked * {
	text-decoration: none;
}
.md-content ul.task-list li.task-list-item.checked label,
.md-content ol.task-list li.task-list-item.checked label,
.md-content li.task-list-item.checked label {
	text-decoration: line-through;
	text-decoration-thickness: 1.5px;
	text-decoration-color: var(--accent-strong);
}
.md-content ul.task-list li.task-list-item.checked label *,
.md-content ol.task-list li.task-list-item.checked label *,
.md-content li.task-list-item.checked label * {
	text-decoration: line-through;
	text-decoration-thickness: 1.5px;
	text-decoration-color: var(--accent-strong);
}
.md-content ul.task-list li > .task-closed-at,
.md-content ol.task-list li > .task-closed-at,
.md-content li.task-list-item > .task-closed-at {
	position: absolute;
	left: 2.2rem;
	top: 1.5rem;
	margin-left: 0;
	white-space: nowrap;
}
.md-content .task-closed-at {
	margin-top: 0;
	text-decoration: none !important;
}
.md-content
	ul.task-list
	li.task-list-item.checked
	input[type="checkbox"] {
	opacity: 1;
}
.md-content ul.task-list input[type="checkbox"],
.md-content ol.task-list input[type="checkbox"],
.md-content input.task-list-item-checkbox {
	appearance: none;
	-webkit-appearance: none;
	margin-top: 0.25rem;
	width: 1.2rem;
	height: 1.2rem;
	flex: 0 0 auto;
	border-radius: 0.4rem;
	border: 2px solid var(--accent-strong);
	background: transparent;
	display: inline-grid;
	place-content: center;
}
.md-content ul.task-list input[type="checkbox"]::before,
.md-content ol.task-list input[type="checkbox"]::before,
.md-content input.task-list-item-checkbox::before {
	content: "";
	width: 0.5rem;
	height: 0.2rem;
	border-left: 2px solid transparent;
	border-bottom: 2px solid transparent;
	transform: rotate(-45deg);
}
.md-content ul.task-list input[type="checkbox"]:checked,
.md-content ol.task-list input[type="checkbox"]:checked,
.md-content input.task-list-item-checkbox:checked {
	background: var(--accent-strong);
}
.md-content ul.task-list input[type="checkbox"]:checked::before,
.md-content ol.task-list input[type="checkbox"]:checked::before,
.md-content input.task-list-item-checkbox:checked::before {
	border-color: var(--accent-text);
}
.md-content ul li::marker,
.md-content ol li::marker {
	color: var(--accent-text-soft);
}
.mobile-only {
	display: none !important;
}
body.preview-only #editorPreviewGrid {
	grid-template-columns: 1fr !important;
}
body.preview-only #editorPreviewGrid > div:first-child {
	display: none !important;
}

/* ── AI Conversation collapsible (all viewports) ── */
#aiConversationHeader {
	cursor: pointer;
	user-select: none;
}
#aiConversationBody.ai-collapsed {
	display: none !important;
}
#aiConversationChevron.ai-collapsed {
	transform: rotate(-90deg);
}

/* Calendar Clear Availability Dropdown */
.cal-clear-select {
	position: relative;
	display: flex;
	align-items: center;
	gap: 0.375rem;
	padding: 0.375rem 0.5rem;
	font-size: 11px;
	border-radius: 0.375rem;
	border: 1px solid rgba(239, 68, 68, 0.3);
	background: rgba(239, 68, 68, 0.08);
	color: #f87171;
	cursor: pointer;
}
.cal-clear-select .cal-room-select__menu {
	min-width: 200px;
	right: 0;
	left: auto;
}
.cal-clear-select .cal-room-select__chevron {
	margin-left: auto;
	transition: transform 0.15s ease;
}
.cal-clear-select[aria-expanded="true"] .cal-room-select__chevron {
	transform: rotate(180deg);
}
.cal-clear-item {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 0.625rem !important;
	font-size: 11px !important;
}
.cal-clear-item svg {
	flex-shrink: 0;
}
.cal-clear-item--danger {
	color: #f87171;
}
.cal-clear-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	flex-shrink: 0;
}
.cal-room-select__separator {
	height: 1px;
	margin: 0.375rem 0;
	background: rgba(255, 255, 255, 0.08);
}
.cal-clear-item--empty {
	padding: 0.5rem 0.625rem;
	text-align: center;
	pointer-events: none;
}

/* ── Calendar Cell Weekday (visible under lg only) ── */
.calendar-cell-weekday {
	display: none;
}
@media (min-width: 640px) and (max-width: 1023px) {
	/* Hide weekday header row when grid is not 7 cols */
	.calendar-month-weekdays {
		display: none !important;
	}
	/* Show weekday abbreviation inside each cell */
	.calendar-cell-weekday {
		display: inline;
	}
	/* Tablet portrait: 50/50 vertical split for calendar grid and sidebar */
	#calendarLayout {
		display: flex;
		flex-direction: column;
		gap: 0.5rem;
	}
	#calendarGrid {
		flex: 1 1 50%;
		min-height: 0;
		overflow: auto;
	}
	#calendarSidebar {
		flex: 1 1 50%;
		max-height: none;
		min-height: 0;
		overflow-y: auto;
	}
}

/* ── Laptop Calendar Layout Fixes (lg+) ── */
@media (min-width: 1024px) {
	/* Fix: SidebarToggle z-index so it's clickable above day cells */
	#calendarSidebarToggle {
		z-index: 20;
	}
	/* Fix: Weekday labels sticky & more visible in month view */
	.calendar-month-weekdays {
		position: sticky;
		top: 0;
		z-index: 10;
		background: rgba(2, 6, 23, 0.95);
		backdrop-filter: blur(8px);
		-webkit-backdrop-filter: blur(8px);
		padding-block: 0.5rem;
		margin-bottom: 0.25rem;
		border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	}
	.calendar-weekday-label {
		font-size: 12px;
		color: rgba(148, 163, 184, 0.85);
	}
	/* Fix: Calendar sidebar gets more space */
	#calendarLayout {
		grid-template-columns: minmax(0, 1fr) 360px;
	}
	#calendarSidebar {
		min-width: 360px;
	}
	/* Fix: Ensure hidden class works for toggle */
	#calendarSidebar.hidden {
		display: none !important;
	}
	/* Fix: calendarGrid uses full width when sidebar is hidden */
	#calendarLayout:has(#calendarSidebar.hidden) {
		grid-template-columns: 1fr;
	}
	/* Hide inline weekday when header is visible */
	.calendar-cell-weekday {
		display: none;
	}
}

@media (max-width: 1023px) {
	.mobile-only {
		display: inline-flex !important;
	}
	#togglePersonalSpace {
		display: none !important;
	}
	#calendarPanel {
		overflow: visible;
		min-height: 0;
	}
	#calendarLayout {
		min-height: 0;
		max-height: 100%;
		height: 100%;
		overflow: hidden;
	}
	#calendarGrid {
		height: 100%;
		max-height: 100%;
		overflow: auto;
		overscroll-behavior: contain;
	}
	/* Calendar header: ensure dropdown is not clipped */
	.cal-header {
		overflow: visible;
		position: relative;
		z-index: 40;
	}
	.cal-header * {
		-webkit-tap-highlight-color: transparent;
	}
	#calendarTitle {
		color: var(--accent-text-soft) !important;
	}
	.cal-header button,
	.cal-header input {
		touch-action: manipulation;
		cursor: pointer;
		pointer-events: auto;
	}
	.cal-header input {
		cursor: text;
	}
	#calendarViewDropdownWrap {
		overflow: visible;
		z-index: 50;
	}
	/* Calendar view dropdown: ensure usability on touch */
	#calendarViewDropdownBtn {
		min-height: 36px;
		min-width: 36px;
		-webkit-tap-highlight-color: transparent;
		touch-action: manipulation;
		cursor: pointer;
		position: relative;
		z-index: 51;
	}
	#calendarViewDropdownMenu {
		z-index: 60;
		min-width: 120px;
		position: absolute;
		right: 0;
		top: 100%;
		pointer-events: auto;
	}
	#calendarViewDropdownMenu button {
		min-height: 40px;
		padding: 0.5rem 0.75rem;
		font-size: 13px;
		cursor: pointer;
		touch-action: manipulation;
	}
	/* Calendar View Buttons (Desktop/Tablet) */
	.cal-view-buttons {
		-webkit-tap-highlight-color: transparent;
	}
	.cal-view-btn {
		font-weight: 500;
		transition: all 0.15s ease;
		white-space: nowrap;
	}
	.cal-view-btn:hover:not(.cal-view-btn-active) {
		background: rgba(255, 255, 255, 0.05);
	}
	.cal-view-btn-active {
		background: rgba(255, 255, 255, 0.1);
		color: var(--calendar-text-primary, #f1f5f9);
		font-weight: 600;
	}
	/* Calendar sidebar mobile: better sizing */
	.calendar-sidebar {
		max-height: 200px;
		overflow-y: auto;
	}
	body.mobile-preview-open main,
	body.mobile-editor-open main,
	body.mobile-ps-open main,
	body.mobile-note-open main,
	body.mobile-calendar-open main {
		width: 100vw;
		width: 100dvw;
		height: 100vh;
		height: 100dvh;
		margin: 0;
	}
	body.mobile-preview-open #psPanel,
	body.mobile-note-open #psPanel,
	body.mobile-ps-open #editorPanel,
	body.mobile-ps-open #previewPanel,
	body.mobile-note-open #previewPanel,
	body.mobile-editor-open #psPanel,
	body.mobile-calendar-open #psPanel {
		display: none;
	}
	body.mobile-preview-open #previewPanel {
		position: fixed;
		inset: 0;
		width: 100vw;
		height: 100vh;
		z-index: 70;
		display: flex;
		flex-direction: column;
		pointer-events: auto;
		border-radius: 0;
		border: none;
	}
	body.mobile-preview-open #editorPanel > header {
		display: none;
	}
	body.mobile-preview-open #editorPreviewGrid > div:first-child {
		display: none;
	}
	body.mobile-ps-open #psPanel {
		position: fixed;
		inset: 0;
		width: 100vw;
		height: 100vh;
		z-index: 70;
		display: flex;
		flex-direction: column;
		pointer-events: auto;
		border-radius: 0;
		border: none;
		overflow: hidden;
	}
	body.mobile-ps-open #psList {
		overflow-y: auto;
		overflow-x: hidden;
		-webkit-overflow-scrolling: touch;
		max-height: none;
	}
	body.mobile-note-open #editorPanel,
	body.mobile-editor-open #editorPanel {
		position: fixed;
		inset: 0;
		bottom: auto;
		width: 100vw;
		height: 100vh;
		height: 100dvh;
		z-index: 70;
		pointer-events: auto;
		border-radius: 0;
		border: none;
	}
	/* Calendar on mobile: fullscreen editor panel, hide editor header */
	body.mobile-calendar-open #editorPanel {
		position: fixed;
		inset: 0;
		width: 100vw;
		height: 100vh;
		z-index: 70;
		pointer-events: auto;
		border-radius: 0;
		border: none;
		overflow: visible;
		padding: 0;
	}
	body.mobile-calendar-open #editorPanel > header {
		display: none;
	}
	body.mobile-calendar-open #calendarPanel {
		height: 100%;
		max-height: 100vh;
		max-height: 100dvh;
		overflow: visible;
		padding: 0.25rem;
	}
	/* ── :has() CSS-only fallback: works even when old JS is cached ── */
	#editorPanel:has(#calendarPanel:not(.hidden)) {
		overflow: visible !important;
		padding: 0 !important;
	}
	#editorPanel:has(#calendarPanel:not(.hidden)) > header {
		display: none !important;
	}
	#editorPanel:has(#calendarPanel:not(.hidden)) > div {
		margin-top: 0 !important;
	}
	#calendarPanel:not(.hidden) {
		height: 100% !important;
		max-height: 100dvh !important;
		overflow: visible !important;
		padding: 0.25rem;
	}
	body.mobile-note-open #editorPanel > header,
	body.mobile-editor-open #editorPanel > header {
		flex: 0 0 auto;
	}
	body.mobile-note-open #editorPanel,
	body.mobile-editor-open #editorPanel {
		overflow: hidden;
	}
	body:not(.mobile-preview-open) #previewCloseMobile {
		display: none;
	}
	body:not(.mobile-ps-open) #psCloseMobile {
		display: none;
	}
	body:not(.mobile-note-open) #noteCloseMobile {
		display: none;
	}
	body:not(.mobile-calendar-open) #calendarCloseMobile {
		display: none;
	}
	#settingsRoot {
		padding: 0;
		align-items: stretch;
		justify-content: stretch;
		z-index: 201;
	}
	#settingsPanel {
		width: 100vw;
		height: 100vh;
		max-height: none;
		border-radius: 0;
		border: none;
		z-index: 202;
	}
	#settingsNav {
		position: sticky;
		top: 0;
		z-index: 1;
		backdrop-filter: blur(8px);
	}
	#settingsPanel > header {
		position: sticky;
		top: 0;
		z-index: 2;
		backdrop-filter: blur(8px);
	}

	/* ── AI Conversation: mobile layout ── */
	#aiConversationSection {
		position: relative;
	}

	/* ── Preview panel centered on mobile ── */
	body.mobile-preview-open #previewPanel {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		justify-content: center;
		padding: 0;
	}
	body.mobile-preview-open #previewPanel > .flex.h-full {
		max-height: 100%;
		height: 100%;
	}

	/* ── Mobile phone: general improvements ── */
	body {
		padding: 0;
	}
	main.relative {
		margin: 0;
		width: 100%;
		height: 100%;
	}
	#mainGrid {
		gap: 0;
	}
	
	/* Remove borders on mobile panels for cleaner look */
	#psPanel,
	#editorPanel,
	#previewPanel {
		border-radius: 0;
		border: none;
	}

	/* Ensure preview iframe fills space */
	body.mobile-preview-open #mdPreview {
		flex: 1 1 0;
		min-height: 0;
		width: 100%;
	}

	/* AI section on mobile: more compact */
	#aiConversationSection {
		padding: 6px 8px;
		border-top: 1px solid rgba(255, 255, 255, 0.05);
	}
	#aiPromptWrap textarea {
		min-height: 64px;
		font-size: 14px;
		border: 1px solid rgba(255, 255, 255, 0.05);
	}
	#aiModeWrap {
		min-width: 0 !important;
		width: 100%;
	}
	#aiModeWrap select {
		width: 100%;
		border: 1px solid rgba(255, 255, 255, 0.05);
	}

	/* Ensure run output doesn't overflow on mobile */
	#runOutput {
		max-height: 120px;
		font-size: 11px;
		overflow: auto;
		-webkit-overflow-scrolling: touch;
	}
	/* AI outputs (text + image) get expanded sizing for long responses */
	#runOutput.is-ai-output,
	#runOutput:has(img) {
		max-height: 70vh;
		overflow: auto;
	}

	/* Editor panel full-width on mobile */
	body.mobile-editor-open #editorPanel,
	body.mobile-note-open #editorPanel {
		overflow: hidden;
	}
	
	/* Reduce border visibility on mobile inputs */
	#mirror {
		border: 1px solid rgba(255, 255, 255, 0.05);
	}

	/* ── Fix: Tags bar & meta overlapping textarea on mobile ── */
	#mirror {
		padding-top: 48px !important;
	}
	#attributionOverlay,
	#commentOverlay {
		padding-top: 48px !important;
	}

	/* Tags bar: compact pill layout on mobile */
	#psEditorTagsBar {
		left: 44px !important;
		right: 44px !important;
		top: 2px !important;
	}
	.ps-tags-bar-inner {
		height: 36px;
		padding: 4px 6px;
		gap: 4px;
	}
	.ps-tags-pills {
		gap: 3px;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
	.ps-tag-pill {
		padding: 2px 6px;
		font-size: 9px;
		gap: 3px;
	}
	.ps-tag-pill-remove {
		width: 12px;
		height: 12px;
	}
	.ps-tags-input {
		height: 20px;
		font-size: 10px;
		min-width: 40px;
		max-width: 80px;
	}

	/* Meta toggle & clear button: smaller on mobile */
	#psMetaToggle,
	#clearMirror {
		height: 36px !important;
		width: 36px !important;
	}

	/* Meta YAML overlay: don't exceed content area */
	#psMetaYaml {
		top: 40px !important;
		max-height: 30vh;
		overflow-y: auto;
	}
	#psMetaYamlInline {
		max-height: 32px;
		overflow: hidden;
	}

	/* Code language selector: compact */
	#codeLangWrap {
		top: 2px !important;
	}
	#codeLangWrap select {
		height: 36px;
		width: 120px;
		font-size: 12px;
	}

	/* Better spacing on mobile for preview controls */
	body.mobile-preview-open .flex.flex-wrap.items-center.gap-2.pr-12 {
		padding-right: 0;
		flex-direction: column;
		align-items: stretch;
	}
}

/* ── Tablet orientation change: re-adapt layout ── */
@media (min-width: 768px) and (max-width: 1023px) {
	body {
		padding: 8px;
	}
	main.relative {
		margin: 0;
		width: 100%;
		height: 100%;
	}
	#mainGrid {
		gap: 6px;
	}

	/* ── Fix: Restore desktop-like padding so content is not hidden behind toolbar ── */
	#mirror {
		padding-top: 80px !important;
	}
	#attributionOverlay,
	#commentOverlay {
		padding-top: 80px !important;
	}

	/* Tags bar: restore desktop positioning on tablet */
	#psEditorTagsBar {
		left: 48px !important;
		right: 48px !important;
		top: 2px !important;
	}
	.ps-tags-bar-inner {
		height: 36px;
		padding: 4px 8px;
	}
	.ps-tags-pills {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	/* Meta toggle & clear button: restore desktop size on tablet */
	#psMetaToggle,
	#clearMirror {
		height: 36px !important;
		width: 36px !important;
	}

	/* Meta YAML overlay: proper top offset on tablet */
	#psMetaYaml {
		top: 44px !important;
	}
}

@media (min-width: 768px) and (max-width: 1023px) and (orientation: portrait) {
	#mainGrid {
		grid-template-columns: 1fr !important;
		grid-template-rows: auto 1fr;
	}
	#psPanel {
		max-height: 35vh;
		overflow-y: auto;
	}
	#editorPreviewGrid {
		grid-template-columns: 1fr !important;
	}
}

@media (min-width: 768px) and (max-width: 1023px) and (orientation: landscape) {
	#mainGrid {
		grid-template-columns: 300px 1fr !important;
	}
	#editorPreviewGrid {
		grid-template-columns: 1fr !important;
	}
}

.bg-fuchsia-500\/15 {
	background-color: var(--accent-bg) !important;
}
.bg-fuchsia-600\/20 {
	background-color: var(--accent-bg) !important;
}
.bg-fuchsia-500\/10 {
	background-color: var(--accent-bg-soft) !important;
}
.bg-fuchsia-500\/20 {
	background-color: var(--accent-bg-hover) !important;
}
.bg-fuchsia-600\/60 {
	background-color: var(--accent-strong) !important;
}
.hover\:bg-fuchsia-600\/70:hover {
	background-color: var(--accent-strong-hover) !important;
}
.active\:bg-fuchsia-600\/80:active {
	background-color: var(--accent-strong-active) !important;
}
.hover\:bg-fuchsia-500\/20:hover {
	background-color: var(--accent-bg-hover) !important;
}
#aiUsePreviewBtn {
	background-color: transparent !important;
	color: inherit !important;
	--ai-preview-dot-off: rgba(203, 213, 225, 0.9);
	--ai-preview-dot-on: var(--accent-strong-active, #ff2301);
}
#aiUsePreviewBtn:hover {
	background-color: transparent !important;
}
#aiUsePreviewBtn[aria-pressed="true"] {
	background-color: transparent !important;
	color: inherit !important;
}
#aiUsePreviewBtn[aria-pressed="true"] span:first-child {
	background-color: var(--ai-preview-dot-on) !important;
}
#aiUsePreviewBtn[aria-pressed="true"] span:last-child {
	color: inherit !important;
}
#aiUsePreviewBtn[aria-pressed="false"] {
	background-color: transparent !important;
	color: inherit !important;
}
#aiUsePreviewBtn[aria-pressed="false"] span:first-child {
	background-color: var(--ai-preview-dot-off) !important;
}
.border-fuchsia-400\/30 {
	border-color: var(--accent-border) !important;
}
.border-fuchsia-500\/30 {
	border-color: var(--accent-border) !important;
}
.border-fuchsia-400\/40 {
	border-color: var(--accent-border-strong) !important;
}
.text-fuchsia-100 {
	color: var(--accent-text) !important;
}
.text-fuchsia-200 {
	color: var(--accent-text-soft) !important;
}
.text-fuchsia-300 {
	color: var(--accent-text-soft) !important;
}
.ring-fuchsia-400\/30 {
	--tw-ring-color: var(--accent-ring) !important;
}
.focus\:ring-fuchsia-400\/30:focus,
.focus\:ring-fuchsia-400\/25:focus {
	--tw-ring-color: var(--accent-ring) !important;
}
.focus\:ring-fuchsia-400\/40:focus,
.ring-fuchsia-400\/40 {
	--tw-ring-color: var(--accent-ring-strong) !important;
}

.calendar-event {
	position: relative;
	cursor: pointer;
	overflow: visible;
	border: none !important;
	background-color: transparent !important;
	box-shadow: none !important;
}
/* Events inside day-tiles (week/month) have no separate background */
[data-calendar-day] .calendar-event {
	background-color: transparent !important;
	border: none !important;
	border-radius: 0;
}

/* #calendarGrid.calendar-grid-month {
	overflow: visible;
} */

@media (max-width: 640px) {
	#calendarGrid.calendar-grid-month {
		overflow: auto;
	}
	#calendarPanel {
		gap: 0.4rem;
	}
	#calendarLayout {
		display: flex;
		flex-direction: column;
		gap: 0.4rem;
		overflow: hidden;
	}
	#calendarGrid {
		order: 1;
		padding: 0.375rem;
	}
	#calendarSidebar {
		order: 2;
		max-height: 34vh;
		padding: 0.5rem;
		padding-top: 0.75rem;
		gap: 0.625rem;
	}
	#calendarSidebarCalendarsSection,
	#calendarBundeslandWrap,
	#calendarLegend,
	#calendarStatus,
	#calendarRefresh {
		display: none !important;
	}

	/* ── Calendar header: compact for small phones ── */
	.cal-header {
		padding: 0.3rem 0.4rem;
	}
	.cal-header > div {
		gap: 0.25rem;
	}
	/* Nav buttons: bigger tap targets */
	#calendarPrev,
	#calendarNext {
		min-height: 36px;
		min-width: 36px;
	}
	#calendarToday {
		min-height: 36px;
		padding: 0.25rem 0.75rem;
		font-size: 12px;
	}
	/* View dropdown: full touch-friendly sizing */
	#calendarViewDropdownBtn {
		min-height: 34px;
		min-width: 44px;
		padding: 0.2rem 0.45rem;
		font-size: 11px;
	}
	#calendarViewDropdownMenu {
		right: 0;
		min-width: 130px;
	}
	#calendarViewDropdownMenu button {
		min-height: 44px;
		padding: 0.625rem 0.875rem;
		font-size: 14px;
	}
	/* + Neu button: compact */
	.cal-header-add-btn {
		min-height: 34px;
		padding: 0.2rem 0.45rem;
		font-size: 11px;
	}
	#calendarCloseMobile {
		height: 34px;
		width: 34px;
	}
	/* Calendar search: compact on small phones */
	#calendarSearchInput {
		min-width: 60px;
		font-size: 14px; /* prevent iOS zoom */
	}
	#calendarSearchInput,
	#calendarViewDropdownLabel,
	#calendarWeekLabel,
	#calendarTitle {
		font-size: 11px;
	}
	/* Calendar sidebar: stack below grid */
	.calendar-sidebar {
		max-height: 34vh;
	}
	#calendarMySelections,
	#calendarCommonFreeSlots {
		max-height: 110px !important;
	}


@media (max-width: 390px) {
	#calendarPanel {
		gap: 0.3rem;
	}
	.cal-header {
		padding: 0.22rem 0.28rem;
	}
	#calendarPrev,
	#calendarNext,
	#calendarToday,
	#calendarViewDropdownBtn,
	.cal-header-add-btn,
	#calendarCloseMobile {
		min-height: 30px !important;
		height: 30px !important;
		padding-top: 0.12rem !important;
		padding-bottom: 0.12rem !important;
	}
	#calendarCloseMobile {
		min-width: 30px !important;
		width: 30px !important;
	}
	#calendarViewDropdownBtn {
		min-width: 40px !important;
		padding-left: 0.32rem !important;
		padding-right: 0.32rem !important;
	}
	#calendarSearchInput,
	#calendarViewDropdownLabel,
	#calendarWeekLabel,
	#calendarTitle {
		font-size: 10px !important;
	}
	#calendarGrid {
		padding: 0.25rem;
	}
	#calendarSidebar {
		max-height: 30vh;
		padding: 0.4rem;
		gap: 0.45rem;
	}
	#calendarMySelections,
	#calendarCommonFreeSlots {
		max-height: 86px !important;
	}
	#calendarGrid .calendar-day-cell {
		padding: 0.28rem 0.32rem !important;
	}
}
	/* ── Small phone improvements ── */
	body {
		padding: 0;
	}
	#previewPanel {
		border-radius: 0;
		border: none;
	}
	body.mobile-preview-open #previewPanel {
		border-radius: 0;
		border: none;
		inset: 0;
		width: 100vw;
		width: 100dvw;
		height: 100vh;
		height: 100dvh;
	}

	/* AI section: stack controls vertically on small phones */
	#aiConversationSection .flex.flex-wrap.items-center.gap-2.pr-12 {
		flex-direction: column;
		align-items: stretch;
		padding-right: 0;
		gap: 6px;
	}
	#aiUsePreviewBtn {
		width: 100%;
		justify-content: center;
		background: rgba(217, 70, 239, 0.1);
		border: 1px solid rgba(217, 70, 239, 0.2);
	}
	#aiModeWrap {
		min-width: 0 !important;
		width: 100% !important;
	}

	/* Prompt area: more touch-friendly */
	#aiPromptWrap textarea {
		min-height: 56px;
		font-size: 16px; /* prevent iOS zoom */
		border: 1px solid rgba(255, 255, 255, 0.05);
	}
	#aiAssist {
		min-height: 44px;
		min-width: 44px;
	}

	/* PS panel: prevent overflow */
	body.mobile-ps-open #psPanel {
		padding: 6px;
	}

	/* Modal inputs on phone: prevent zoom */
	#modalInput {
		font-size: 16px;
	}

	/* ── Small phone: even more compact editor toolbar ── */
	#mirror {
		padding-top: 42px !important;
	}
	#attributionOverlay,
	#commentOverlay {
		padding-top: 42px !important;
	}
	#psEditorTagsBar {
		left: 40px !important;
		right: 40px !important;
	}
	#psEditorTagsBar .flex {
		height: 32px;
		padding: 0 4px;
	}
	#psMetaToggle,
	#clearMirror {
		height: 32px !important;
		width: 32px !important;
	}
	#psMetaToggle svg,
	#clearMirror svg {
		height: 14px;
		width: 14px;
	}
}

.calendar-event[data-tooltip]::after,
.calendar-event[data-tooltip]::before {
	opacity: 0;
	transform: translate(-50%, -6px);
	pointer-events: none;
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.calendar-event[data-tooltip]::after {
	content: attr(data-tooltip);
	position: absolute;
	left: 50%;
	bottom: calc(100% + 10px);
	width: 220px;
	max-width: 220px;
	min-width: 120px;
	padding: 6px 10px;
	border-radius: 10px;
	border: 1px solid var(--calendar-tooltip-border);
	background: var(--calendar-tooltip-bg);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	color: var(--calendar-tooltip-text);
	font-size: 11px;
	line-height: 1.4;
	white-space: normal;
	text-align: left;
	box-shadow: var(--calendar-tooltip-shadow);
	z-index: 100;
}

.calendar-event[data-tooltip]::before {
	content: "";
	position: absolute;
	left: 50%;
	bottom: calc(100% + 4px);
	width: 8px;
	height: 8px;
	background: var(--calendar-tooltip-bg);
	border-left: 1px solid var(--calendar-tooltip-border);
	border-bottom: 1px solid var(--calendar-tooltip-border);
	transform: translate(-50%, -6px) rotate(45deg);
	z-index: 99;
}

.calendar-event[data-tooltip]:hover::after,
.calendar-event[data-tooltip]:hover::before {
	opacity: 1;
	transform: translate(-50%, 0);
}

#roomTabs {
	overflow: visible;
}

#roomTabs .text-fuchsia-100 {
	color: #e2e8f0 !important;
}

.room-tab-link-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	border-radius: 999px;
	border: 0;
	background: transparent;
	color: var(--accent-text);
	line-height: 1;
}

.room-tab-link-badge.is-live {
	color: var(--accent-text);
	box-shadow: 0 0 8px var(--accent-strong);
}

.room-tabs-scroll {
	overflow-x: auto;
	overflow-y: visible;
}

[data-tooltip]:not(.calendar-event):not(.toolbox-btn):not(.toolbox-trigger) {
	position: relative;
}

[data-tooltip]:not(.calendar-event):not(.toolbox-btn):not(.toolbox-trigger)::after,
[data-tooltip]:not(.calendar-event):not(.toolbox-btn):not(.toolbox-trigger)::before {
	opacity: 0;
	transform: translate(-50%, -6px);
	pointer-events: none;
	transition: opacity 0.15s ease, transform 0.15s ease;
}

[data-tooltip]:not(.calendar-event):not(.toolbox-btn):not(.toolbox-trigger)::after {
	content: attr(data-tooltip);
	position: absolute;
	left: 50%;
	bottom: calc(100% + 8px);
	width: max-content;
	max-width: 240px;
	min-width: 160px;
	padding: 6px 10px;
	border-radius: 10px;
	border: 1px solid var(--calendar-tooltip-border);
	background: var(--calendar-tooltip-bg);
	color: var(--calendar-tooltip-text);
	font-size: 11px;
	line-height: 1.4;
	white-space: normal;
	text-align: left;
	box-shadow: var(--calendar-tooltip-shadow);
	z-index: 80;
}

[data-tooltip]:not(.calendar-event):not(.toolbox-btn):not(.toolbox-trigger)::before {
	content: "";
	position: absolute;
	left: 50%;
	bottom: calc(100% + 2px);
	width: 8px;
	height: 8px;
	background: var(--calendar-tooltip-bg);
	border-left: 1px solid var(--calendar-tooltip-border);
	border-bottom: 1px solid var(--calendar-tooltip-border);
	transform: translate(-50%, -6px) rotate(45deg);
	z-index: 79;
}

[data-tooltip]:not(.calendar-event):not(.toolbox-btn):not(.toolbox-trigger):hover::after,
[data-tooltip]:not(.calendar-event):not(.toolbox-btn):not(.toolbox-trigger):hover::before {
	opacity: 1;
	transform: translate(-50%, 0);
}

.tab-tooltip::after,
.tab-tooltip::before {
	display: none;
}

.tab-tooltip-layer {
	position: fixed;
	left: 0;
	top: 0;
	transform: translate(-50%, -6px);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.15s ease, transform 0.15s ease;
	z-index: 9999;
}

.tab-tooltip-layer.is-visible {
	opacity: 1;
	transform: translate(-50%, 0);
}

.tab-tooltip-layer__box {
	max-width: 220px;
	min-width: 0;
	width: max-content;
	padding: 5px 9px;
	border-radius: 8px;
	border: 1px solid var(--calendar-tooltip-border);
	background: var(--calendar-tooltip-bg);
	color: var(--calendar-tooltip-text);
	font-size: 11px;
	line-height: 1.4;
	white-space: nowrap;
	text-align: center;
	box-shadow: var(--calendar-tooltip-shadow);
	opacity: 0.9;
}

.tab-tooltip-layer__arrow {
	position: absolute;
	left: 50%;
	bottom: -5px;
	width: 8px;
	height: 8px;
	background: var(--calendar-tooltip-bg);
	border-left: 1px solid var(--calendar-tooltip-border);
	border-bottom: 1px solid var(--calendar-tooltip-border);
	transform: translateX(-50%) rotate(45deg);
}

.tab-tooltip::after {
	bottom: calc(100% + 8px);
	top: auto;
	z-index: 220;
}

.tab-tooltip::before {
	bottom: calc(100% + 2px);
	top: auto;
	border-left: 1px solid var(--calendar-tooltip-border);
	border-bottom: 1px solid var(--calendar-tooltip-border);
	border-top: none;
	transform: translate(-50%, -6px) rotate(45deg);
	z-index: 219;
}

#editorPanel > header {
	position: relative;
	z-index: 5;
}

body[data-theme="coffeeLight"] {
	color-scheme: light;
	background-color: #f8f1e9;
	--panel-solid-bg: rgba(248, 241, 233, 0.92);
	color: #3b2a21;
	--scrollbar-thumb: rgba(176, 112, 73, 0.2);
	--scrollbar-thumb-hover: rgba(176, 112, 73, 0.3);
	--scrollbar-border: rgba(250, 244, 237, 0.9);
	--calendar-event-bg: rgba(255, 250, 244, 0.95);
	--comment-item-bg: #fff8f0;
	--calendar-tooltip-bg: #f8f1e9;
	--calendar-tooltip-border: rgba(176, 112, 73, 0.35);
	--calendar-tooltip-text: #3b2a21;
	--calendar-tooltip-shadow: none;
	--selection-menu-bg: #fffaf4;
	--selection-menu-border: #d9c7bc;
	--sel-text: #3b2a21;
	--sel-text-muted: rgba(59, 42, 33, 0.5);
	--sel-text-hover: #2a1a12;
	--sel-hover-bg: rgba(176, 112, 73, 0.08);
	--sel-sep: rgba(176, 112, 73, 0.15);
	--sel-divider: rgba(176, 112, 73, 0.1);
	--sel-dot-ring: rgba(59, 42, 33, 0.35);
	--dropdown-accent: #8c5a3a;
	--dropdown-accent-bg: rgba(176, 112, 73, 0.08);
	--dropdown-text: #3b2a21;
	--dropdown-text-hover: #3b2a21;
	--dropdown-hover-bg: rgba(176, 112, 73, 0.08);
	--dropdown-shadow: 0 4px 12px rgba(59, 42, 33, 0.1);
	--accent-strong: rgba(176, 112, 73, 0.85);
	--accent-strong-hover: rgba(176, 112, 73, 0.95);
	--accent-strong-active: rgba(176, 112, 73, 1);
	--accent-text: #fff;
}

body[data-theme="coffeeLight"] .bg-glow {
	display: none;
}

body[data-theme="coffeeLight"] .border-white\/10 {
	border-color: #d9c7bc !important;
}

body[data-theme="coffeeLight"] .text-slate-100 {
	color: #3b2a21 !important;
}
body[data-theme="coffeeLight"] .text-slate-200 {
	color: #5b4436 !important;
}
body[data-theme="coffeeLight"] .text-slate-300 {
	color: #745844 !important;
}
body[data-theme="coffeeLight"] .text-slate-400 {
	color: #7c6251 !important;
}
body[data-theme="coffeeLight"] .text-slate-500 {
	color: #866757 !important;
}

body[data-theme="coffeeLight"] .bg-white\/5,
body[data-theme="coffeeLight"] .bg-white\/10,
body[data-theme="coffeeLight"] .bg-white\/15,
body[data-theme="coffeeLight"] .bg-white\/20 {
	background-color: #f8f1e9 !important;
}

body[data-theme="coffeeLight"] .bg-slate-950\/10,
body[data-theme="coffeeLight"] .bg-slate-950\/20,
body[data-theme="coffeeLight"] .bg-slate-950\/25,
body[data-theme="coffeeLight"] .bg-slate-950\/30,
body[data-theme="coffeeLight"] .bg-slate-950\/40,
body[data-theme="coffeeLight"] .bg-slate-950\/60,
body[data-theme="coffeeLight"] .bg-slate-950\/90 {
	background-color: #f2e6dc !important;
}

body[data-theme="coffeeLight"] .bg-slate-950\/70 {
	background-color: rgba(68, 45, 30, 0.35) !important;
}

body[data-theme="coffeeLight"] .bg-slate-950\/80 {
	background-color: rgba(68, 45, 30, 0.45) !important;
}

body[data-theme="coffeeLight"] #settingsBackdrop {
	background-color: rgba(68, 45, 30, 0.2) !important;
}

body[data-theme="coffeeLight"] #settingsPanel {
	background-color: #fffaf4 !important;
	border-color: #d9c7bc !important;
}

body[data-theme="coffeeLight"] #settingsNav {
	background-color: #f8f1e9 !important;
}

body[data-theme="coffeeLight"] #shareModal [data-role="shareModalBackdrop"] {
	background-color: rgba(68, 45, 30, 0.2) !important;
}

body[data-theme="coffeeLight"] #shareModal [role="dialog"] {
	background-color: #fffaf4 !important;
	border-color: #d9c7bc !important;
	box-shadow: none !important;
}

body[data-theme="coffeeLight"] #shareModal .border-white\/10 {
	border-color: rgba(217, 199, 188, 0.7) !important;
}

body[data-theme="coffeeLight"] #shareModal .bg-slate-950\/40,
body[data-theme="coffeeLight"] #shareModal .bg-slate-950\/60,
body[data-theme="coffeeLight"] #shareModal .bg-white\/5 {
	background-color: #f2e7db !important;
}

body[data-theme="coffeeLight"] #shareModal .bg-white\/10,
body[data-theme="coffeeLight"] #shareModal .bg-white\/15,
body[data-theme="coffeeLight"] #shareModal .bg-white\/20 {
	background-color: #fff3e8 !important;
}

body[data-theme="coffeeLight"] #psEditorTagsBar > div {
	background-color: #f2e7db !important;
	border-color: #d9c7bc !important;
}

body[data-theme="coffeeLight"] #psEditorTagsSuggest {
	background-color: #f2e7db !important;
	border-color: #d9c7bc !important;
}

body[data-theme="coffeeLight"] #psEditorTagsInput {
	background-color: #f2e7db !important;
	color: #3b2a21 !important;
}

body[data-theme="coffeeLight"] #previewPanel .bg-fuchsia-600\/20 {
	background-color: rgba(176, 112, 73, 0.12) !important;
}

body[data-theme="coffeeLight"] #previewPanel .text-fuchsia-300 {
	color: #8c5a3a !important;
}

body[data-theme="coffeeLight"] .theme-swatch {
	box-shadow: none;
}

body[data-theme="coffeeLight"] .ps-note-item.ps-note-active .ps-note-actions button {
	box-shadow: none !important;
	background-color: rgba(176, 112, 73, 0.08) !important;
}

body[data-theme="coffeeLight"] .ps-note-item.ps-note-active .ps-note-actions button:hover {
	background-color: rgba(176, 112, 73, 0.14) !important;
}

body[data-theme="coffeeLight"] .ps-note-item.ps-note-active span.rounded-full.border {
	background-color: rgba(176, 112, 73, 0.08) !important;
	border-color: rgba(176, 112, 73, 0.25) !important;
	color: #3b2a21 !important;
}

body[data-theme="coffeeLight"] .ps-note-pin.bg-fuchsia-500\/20 {
	background-color: rgba(176, 112, 73, 0.12) !important;
	border-color: rgba(176, 112, 73, 0.35) !important;
	color: #8c5a3a !important;
}

body[data-theme="coffeeLight"] #psList .ps-note-item.ps-note-active {
	background-color: #f2e6dc !important;
	border-left-color: transparent !important;
	border-right: none !important;
	box-shadow: none;
}
body[data-theme="coffeeLight"] #psList .ps-note-item {
	border-bottom-color: rgba(0, 0, 0, 0.07);
}

@media (max-width: 1023px) {
	body[data-theme="coffeeLight"] #psList .ps-note-item {
		border-bottom-color: rgba(0, 0, 0, 0.02);
	}
}

body[data-theme="coffeeLight"] #psNewNote,
body[data-theme="coffeeLight"] #psSaveMain,
body[data-theme="coffeeLight"] #commentAdd,
body[data-theme="coffeeLight"] #aiAssist {
	background-color: #b07049 !important;
	border-color: #b07049 !important;
	color: #ffffff !important;
}

body[data-theme="coffeeLight"] #aiUsePreviewBtn {
	border-color: rgba(176, 112, 73, 0.35) !important;
	background-color: transparent !important;
	color: inherit !important;
	--ai-preview-dot-on: #b07049;
}

body[data-theme="coffeeLight"] #aiUsePreviewBtn span:first-child {
	background-color: var(--ai-preview-dot-off) !important;
}

body[data-theme="coffeeLight"] #aiUsePreviewBtn[aria-pressed="true"] {
	background-color: transparent !important;
	border-color: rgba(176, 112, 73, 0.55) !important;
	color: inherit !important;
}

body[data-theme="coffeeLight"] #aiUsePreviewBtn[aria-pressed="true"] span:first-child {
	background-color: var(--ai-preview-dot-on) !important;
}

body[data-theme="coffeeLight"] #aiUsePreviewBtn[aria-pressed="true"] span:last-child {
	color: inherit !important;
}

body[data-theme="coffeeLight"] .ai-chat-badge {
	color: #2c1f18 !important;
	background-color: rgba(68, 45, 30, 0.12) !important;
}

body[data-theme="coffeeLight"] .ai-chat-badge-ai {
	color: #8c5a3a !important;
	background-color: rgba(176, 112, 73, 0.14) !important;
}

body[data-theme="coffeeLight"] .comment-md-btn {
	color: #5b4436;
}

body[data-theme="coffeeLight"] .comment-md-btn:hover {
	color: #3b2a21;
	background: rgba(176, 112, 73, 0.08);
}

body[data-theme="coffeeLight"] .comment-body code {
	background: rgba(176, 112, 73, 0.12);
}

body[data-theme="coffeeLight"] .comment-body pre {
	border-color: rgba(68, 45, 30, 0.15);
	background: rgba(176, 112, 73, 0.08);
}

body[data-theme="coffeeLight"] .comment-reply-badge {
	color: #2c1f18;
}

body[data-theme="coffeeLight"] .shadow-soft {
	box-shadow: none;
}

body[data-theme="coffeeLight"] #previewPanel {
	background-color: #f2e6dc !important;
	border-color: #d9c7bc !important;
}

body[data-theme="coffeeLight"] #mdPreview {
	background-color: inherit !important;
	box-shadow: none !important;
}

body[data-theme="coffeeLight"] #toggleComments,
body[data-theme="coffeeLight"] #psMetaToggle,
body[data-theme="coffeeLight"] #clearMirror,
body[data-theme="coffeeLight"] #copyMirror,
body[data-theme="coffeeLight"] #psEditorTagsBar,
body[data-theme="coffeeLight"] #psEditorTagsBar > div {
	background: rgba(255, 250, 244, 0.76) !important;
	border-color: rgba(217, 199, 188, 0.7) !important;
	box-shadow: none !important;
}

body[data-theme="coffeeLight"] #psMetaToggle,
body[data-theme="coffeeLight"] #clearMirror {
	color: #5b4436 !important;
}

body[data-theme="coffeeLight"] #psEditorTagsBar input,
body[data-theme="coffeeLight"] #psEditorTagsBar select {
	background: rgba(255, 250, 244, 0.76) !important;
	border-color: rgba(217, 199, 188, 0.7) !important;
}

body[data-theme="coffeeLight"] #commentPanel {
	background: rgba(255, 250, 244, 0.76) !important;
	border-color: rgba(217, 199, 188, 0.7) !important;
	box-shadow: none !important;
}

body[data-theme="coffeeLight"] #psSortMenu {
	background-color: #fffaf4 !important;
	border-color: #d9c7bc !important;
}

body[data-theme="coffeeLight"] #toggleLinear {
	color: #3b2a21 !important;
}

body[data-theme="coffeeLight"] #togglePermanentLink {
	color: #3b2a21 !important;
}

body[data-theme="coffeeLight"] #togglePermanentLink[aria-pressed="true"] {
	color: #8c5a3a !important;
}

body[data-theme="coffeeLight"] .ps-note-link-badge {
	color: #8c5a3a !important;
}

body[data-theme="coffeeLight"] #linearEmbed {
	background: rgba(255, 250, 244, 0.82) !important;
	border-color: rgba(217, 199, 188, 0.7) !important;
	box-shadow: none !important;
}

body[data-theme="coffeeLight"] .linear-task-item {
	background: transparent;
	border-color: rgba(68, 45, 30, 0.15);
}

body[data-theme="coffeeLight"] .linear-task-title {
	color: #3b2a21;
}

body[data-theme="coffeeLight"] .linear-task-meta {
	color: #5b4436;
}

body[data-theme="coffeeLight"] .linear-task-link {
	color: #8c5a3a;
}

body[data-theme="coffeeLight"] .linear-embed-title,
body[data-theme="coffeeLight"] .linear-status,
body[data-theme="coffeeLight"] .linear-empty,
body[data-theme="coffeeLight"] .linear-stats-empty {
	color: #3b2a21;
}

body[data-theme="coffeeLight"] #linearProjectApply,
body[data-theme="coffeeLight"] #linearRefresh {
	color: #3b2a21;
}

body[data-theme="coffeeLight"] .linear-project-header {
	color: #8c5a3a;
	background: rgba(140, 90, 58, 0.10);
	border-color: rgba(140, 90, 58, 0.22);
	box-shadow: none;
}
body[data-theme="coffeeLight"] .linear-project-header::before {
	background: #8c5a3a;
}

body[data-theme="coffeeLight"] .linear-kanban-column {
	background: rgba(176, 112, 73, 0.05);
	border-color: rgba(217, 199, 188, 0.7);
}

body[data-theme="coffeeLight"] .linear-kanban-header {
	color: #3b2a21;
}

body[data-theme="coffeeLight"] .linear-kanban-icon {
	color: #3b2a21;
}

body[data-theme="coffeeLight"] .linear-kanban-count {
	border-color: rgba(217, 199, 188, 0.7);
	color: #5b4436;
}

body[data-theme="coffeeLight"] .linear-embed-tabs {
	border-color: rgba(217, 199, 188, 0.7);
	background: rgba(255, 250, 244, 0.82);
}

body[data-theme="coffeeLight"] .linear-embed-tab {
	color: #3b2a21;
	border-color: rgba(217, 199, 188, 0.7);
	background: rgba(176, 112, 73, 0.06);
}

body[data-theme="coffeeLight"] .linear-embed-tab[aria-pressed="true"] {
	background: rgba(176, 112, 73, 0.18);
	border-color: rgba(176, 112, 73, 0.45);
	color: #3b2a21;
}

body[data-theme="coffeeLight"] .linear-stats-title,
body[data-theme="coffeeLight"] .linear-stats-section-title,
body[data-theme="coffeeLight"] .linear-stat-value,
body[data-theme="coffeeLight"] .linear-stats-row-value {
	color: #3b2a21;
}

body[data-theme="coffeeLight"] .linear-stats-sub,
body[data-theme="coffeeLight"] .linear-stat-label,
body[data-theme="coffeeLight"] .linear-stat-sub,
body[data-theme="coffeeLight"] .linear-stats-row-label,
body[data-theme="coffeeLight"] .linear-stats-badge {
	color: #5b4436;
}

body[data-theme="coffeeLight"] .linear-stat-card {
	background: rgba(176, 112, 73, 0.06);
	border-color: rgba(217, 199, 188, 0.7);
}

body[data-theme="coffeeLight"] .linear-stats-row-bar {
	background: rgba(176, 112, 73, 0.18);
}

body[data-theme="coffeeLight"] .linear-stats-row-fill {
	background: rgba(176, 112, 73, 0.7);
}

body[data-theme="coffeeLight"] #commentPanel .bg-rose-500\/10 {
	background-color: rgba(176, 112, 73, 0.12) !important;
	border-color: rgba(176, 112, 73, 0.35) !important;
	color: #8c5a3a !important;
}


body[data-theme="coffeeLight"] #roomTabs .text-fuchsia-100 {
	border-color: #b07049 !important;
	color: #3b2a21 !important;
}

body[data-theme="coffeeLight"] .room-tab-link-badge,
body[data-theme="coffeeLight"] .room-tab-link-badge.is-live {
	background: transparent;
	box-shadow: none;
	color: #8c5a3a;
}

body[data-theme="coffeeLight"] [aria-pressed="true"],
body[data-theme="coffeeLight"] .ps-tag-button.ps-tag-active,
body[data-theme="coffeeLight"] .ps-tag-section .ps-tag-active {
	background-color: #b07049 !important;
	color: #ffffff !important;
	border-color: #b07049 !important;
}

body[data-theme="coffeeLight"] .hover\:bg-white\/5:hover {
	background-color: #f3e9df !important;
}
body[data-theme="coffeeLight"] .hover\:bg-white\/10:hover {
	background-color: #f0e3d8 !important;
}
body[data-theme="coffeeLight"] .hover\:bg-white\/15:hover {
	background-color: #ead9cc !important;
}
body[data-theme="coffeeLight"] .active\:bg-white\/10:active {
	background-color: #e4d1c3 !important;
}
body[data-theme="coffeeLight"] .active\:bg-white\/15:active {
	background-color: #dcc8b9 !important;
}
body[data-theme="coffeeLight"] .active\:bg-white\/20:active {
	background-color: #cfb7a9 !important;
}

body[data-theme="coffeeLight"] input,
body[data-theme="coffeeLight"] select,
body[data-theme="coffeeLight"] textarea {
	background-color: #fffaf4 !important;
	color: #3b2a21;
	border-color: #d9c7bc;
}

body[data-theme="coffeeLight"] #calendarSearchInput {
	background: transparent !important;
	border-color: transparent;
}

/* Light theme checkbox: white checkmark */
body[data-theme="coffeeLight"] input[type="checkbox"]:checked,
body[data-theme="bitterLight"] input[type="checkbox"]:checked,
body[data-theme="monoLight"] input[type="checkbox"]:checked {
	background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
}

body[data-theme="coffeeLight"] ::placeholder {
	color: #8c6f5b;
}

body[data-theme="coffeeLight"] .md-content pre {
	background: #f8f1e9;
	border-color: #f8f1e9;
	color: #3b2a21;
}

body[data-theme="coffeeLight"] .md-content pre.hljs {
	background: #f8f1e9;
	border-color: #f8f1e9;
	color: #3b2a21;
}

body[data-theme="coffeeLight"] .md-content pre.hljs code.hljs {
	color: #3b2a21;
}

body[data-theme="coffeeLight"] .md-content code {
	background: #f0e3d8;
	color: #3b2a21;
}

/* Coffee Light syntax highlights */
body[data-theme="coffeeLight"] .md-content code.hljs,
body[data-theme="coffeeLight"] .md-content pre code.hljs {
	color: #3b2a21;
}
body[data-theme="coffeeLight"] .md-content .hljs-keyword,
body[data-theme="coffeeLight"] .md-content .hljs-selector-tag,
body[data-theme="coffeeLight"] .md-content .hljs-title {
	color: #8c5a3a;
}
body[data-theme="coffeeLight"] .md-content .hljs-string,
body[data-theme="coffeeLight"] .md-content .hljs-attr,
body[data-theme="coffeeLight"] .md-content .hljs-number {
	color: #5b3a28;
}
body[data-theme="coffeeLight"] .md-content .hljs-comment,
body[data-theme="coffeeLight"] .md-content .hljs-quote {
	color: rgba(59, 42, 33, 0.6);
}

body[data-theme="coffeeLight"] .md-content th,
body[data-theme="coffeeLight"] .md-content td {
	border-color: #d9c7bc;
}

body[data-theme="coffeeLight"] .md-content .pw-field {
	background: #f3e9df;
	border-color: #d9c7bc;
	color: #3b2a21;
}

body[data-theme="coffeeLight"] .md-content .pw-mask {
	color: #5b4436;
}

body[data-theme="coffeeLight"] #mirror.attribution-active {
	caret-color: #3b2a21;
}

body[data-theme="coffeeDark"] {
	color-scheme: dark;
	background-color: #18120e;
	color: #e8d9cc;
	--coffee-accent: #c99b77;
	--panel-bg: #1d160f;
	--panel-solid-bg: rgba(29, 22, 15, 0.9);
	--selection-menu-bg: #18120e;
	--selection-menu-border: #3b2820;
	--sel-text: #e8d9cc;
	--sel-text-muted: rgba(232, 217, 204, 0.5);
	--sel-text-hover: #f5ece3;
	--sel-hover-bg: rgba(201, 155, 119, 0.1);
	--sel-sep: rgba(201, 155, 119, 0.15);
	--sel-divider: rgba(201, 155, 119, 0.1);
	--sel-dot-ring: rgba(201, 155, 119, 0.45);
	--comment-item-bg: #261b16;
	--calendar-event-bg: rgba(24, 18, 14, 0.82);
	--calendar-tooltip-bg: #1d160f;
	--calendar-tooltip-border: rgba(201, 155, 119, 0.35);
	--calendar-tooltip-text: #e8d9cc;
	--calendar-tooltip-shadow: 0 12px 28px rgba(0, 0, 0, 0.36),
		inset 0 0 0 1px rgba(201, 155, 119, 0.14);
	--scrollbar-thumb: rgba(201, 155, 119, 0.2);
	--scrollbar-thumb-hover: rgba(201, 155, 119, 0.3);
	--scrollbar-border: rgba(16, 12, 10, 0.6);
	--dropdown-accent: var(--coffee-accent);
	--dropdown-accent-bg: rgba(201, 155, 119, 0.1);
	--dropdown-text: #e8d9cc;
	--dropdown-text-hover: #f5ece3;
	--dropdown-hover-bg: rgba(201, 155, 119, 0.1);
	--dropdown-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

body[data-theme="coffeeDark"] .bg-glow {
	display: none;
}

body[data-theme="coffeeDark"] #togglePermanentLink[aria-pressed="true"] {
	color: var(--coffee-accent) !important;
}

body[data-theme="coffeeDark"] .border-white\/10 {
	border-color: #3b2820 !important;
}

body[data-theme="coffeeDark"] .text-slate-100 {
	color: #e8d9cc !important;
}
body[data-theme="coffeeDark"] .text-slate-200 {
	color: #d9c4b5 !important;
}
body[data-theme="coffeeDark"] .text-slate-300 {
	color: #c7ae9d !important;
}
body[data-theme="coffeeDark"] .text-slate-400 {
	color: #b49885 !important;
}
body[data-theme="coffeeDark"] .text-slate-500 {
	color: #9b755f !important;
}

body[data-theme="coffeeDark"] .bg-white\/5,
body[data-theme="coffeeDark"] .bg-white\/10,
body[data-theme="coffeeDark"] .bg-white\/15,
body[data-theme="coffeeDark"] .bg-white\/20 {
	background-color: #221910 !important;
}

body[data-theme="coffeeDark"] #psPanel,
body[data-theme="coffeeDark"] #editorPanel {
	background-color: var(--panel-bg) !important;
}

body[data-theme="coffeeDark"] .bg-slate-950\/10,
body[data-theme="coffeeDark"] .bg-slate-950\/20,
body[data-theme="coffeeDark"] .bg-slate-950\/25,
body[data-theme="coffeeDark"] .bg-slate-950\/30,
body[data-theme="coffeeDark"] .bg-slate-950\/40,
body[data-theme="coffeeDark"] .bg-slate-950\/60,
body[data-theme="coffeeDark"] .bg-slate-950\/90 {
	background-color: #18120e !important;
}

body[data-theme="coffeeDark"] .bg-slate-950\/70 {
	background-color: rgba(201, 155, 119, 0.18) !important;
}

body[data-theme="coffeeDark"] .bg-slate-950\/80 {
	background-color: rgba(201, 155, 119, 0.24) !important;
}

body[data-theme="coffeeDark"] .border-fuchsia-400\/30 {
	border-color: rgba(201, 155, 119, 0.55) !important;
}

body[data-theme="coffeeDark"] .bg-fuchsia-500\/15,
body[data-theme="coffeeDark"] .bg-fuchsia-500\/20,
body[data-theme="coffeeDark"] .bg-fuchsia-500\/25,
body[data-theme="coffeeDark"] .bg-fuchsia-600\/20 {
	background-color: transparent !important;
	color: var(--coffee-accent) !important;
}

body[data-theme="coffeeDark"] .hover\:bg-fuchsia-500\/20:hover,
body[data-theme="coffeeDark"] .hover\:bg-fuchsia-500\/25:hover {
	background-color: transparent !important;
	color: var(--coffee-accent) !important;
}

body[data-theme="coffeeDark"] .text-fuchsia-100,
body[data-theme="coffeeDark"] .text-fuchsia-200,
body[data-theme="coffeeDark"] .text-fuchsia-300 {
	color: var(--coffee-accent) !important;
}

body[data-theme="coffeeDark"] .ps-note-item.ps-note-active {
	background-color: #1c1614 !important;
	border-left-color: transparent !important;
	border-right: none !important;
	box-shadow: none;
	color: var(--coffee-accent) !important;
}
body[data-theme="coffeeDark"] #psList .ps-note-item {
	border-bottom-color: rgba(201, 155, 119, 0.08);
}

@media (max-width: 1023px) {
	body[data-theme="coffeeDark"] #psList .ps-note-item {
		border-bottom-color: rgba(201, 155, 119, 0.02);
	}
}

body[data-theme="coffeeDark"] .ps-note-item.ps-note-active .ps-note-excerpt,
body[data-theme="coffeeDark"] .ps-note-item.ps-note-active .ps-note-title {
	color: var(--coffee-accent) !important;
}

body[data-theme="coffeeDark"] .ps-note-item .ps-note-actions button {
	box-shadow: none !important;
}

body[data-theme="coffeeDark"] .ps-note-pin.bg-fuchsia-500\/20 {
	background: var(--coffee-accent) !important;
	background-image: none !important;
	border-color: rgba(201, 155, 119, 0.6) !important;
	color: #e8d9cc !important;
}

body[data-theme="coffeeDark"] .ps-note-pin.bg-fuchsia-500\/20 svg path {
	fill: currentColor !important;
	stroke: currentColor !important;
}

body[data-theme="coffeeDark"] .ps-note-item .ps-note-actions button:hover {
	background-color: transparent !important;
}

body[data-theme="coffeeDark"] .ps-note-item.ps-note-active span.rounded-full.border {
	background-color: transparent !important;
	border-color: rgba(53, 38, 30, 0.65) !important;
	color: inherit !important;
}

body[data-theme="coffeeDark"] [aria-pressed="true"],
body[data-theme="coffeeDark"] .ps-tag-button.ps-tag-active,
body[data-theme="coffeeDark"] .ps-note-item.ps-note-active,
body[data-theme="coffeeDark"] .ps-tag-section .ps-tag-active {
	color: var(--coffee-accent) !important;
}

body[data-theme="coffeeDark"] #psEditorTagsBar > div {
	background-color: #211712 !important;
	border-color: #35261e !important;
}

#psNewNote {
	transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease,
		border-color 0.15s ease;
	color: inherit !important;
}

#psNewNote:hover {
	background-color: rgba(255, 255, 255, 0.08) !important;
	box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
	transform: translateY(-1px);
	color: var(--accent-text) !important;
}

#psNewNote:active {
	transform: translateY(0);
	box-shadow: 0 5px 14px rgba(0, 0, 0, 0.24);
}

body[data-theme="coffeeDark"] #psEditorTagsBar input,
body[data-theme="coffeeDark"] #psEditorTagsBar select {
	background: rgba(28, 21, 17, 0.78) !important;
	border-color: rgba(53, 38, 32, 0.78) !important;
	color: #e8d9cc !important;
}

body[data-theme="coffeeDark"] #psEditorTagsInput {
	background-color: #211712 !important;
}

body[data-theme="coffeeDark"] #psEditorTagsSuggest {
	background-color: #1c1511 !important;
	border-color: #35261e !important;
}

body[data-theme="coffeeDark"] #aiUsePreviewBtn {
	border-color: rgba(201, 155, 119, 0.45) !important;
	background-color: transparent !important;
	color: inherit !important;
	--ai-preview-dot-on: var(--coffee-accent, #c99b77);
}

body[data-theme="coffeeDark"] #aiUsePreviewBtn[aria-pressed="true"] {
	background-color: transparent !important;
	border-color: rgba(201, 155, 119, 0.65) !important;
	color: inherit !important;
}

body[data-theme="coffeeDark"] #aiUsePreviewBtn[aria-pressed="true"] span:first-child {
	background-color: var(--ai-preview-dot-on) !important;
}

body[data-theme="coffeeDark"] #aiUsePreviewBtn[aria-pressed="true"] span:last-child {
	color: inherit !important;
}

body[data-theme="coffeeDark"] .ps-note-pin.bg-fuchsia-500\/20 {
	background: var(--coffee-accent) !important;
	background-image: none !important;
	border-color: rgba(201, 155, 119, 0.6) !important;
	color: #e8d9cc !important;
}

/* Make pinned state obvious in monochrome themes by filling the pin glyph */
body[data-theme="coffeeDark"] .ps-note-pin.bg-fuchsia-500\/20 svg path,
body[data-theme="coffeeLight"] .ps-note-pin.bg-fuchsia-500\/20 svg path,
body[data-theme="bitterDark"] .ps-note-pin.bg-fuchsia-500\/20 svg path,
body[data-theme="bitterLight"] .ps-note-pin.bg-fuchsia-500\/20 svg path,
body[data-theme="monoDark"] .ps-note-pin.bg-fuchsia-500\/20 svg path,
body[data-theme="monoLight"] .ps-note-pin.bg-fuchsia-500\/20 svg path {
	fill: currentColor !important;
	stroke: currentColor !important;
}

body[data-theme="coffeeDark"] #settingsBackdrop {
	background-color: rgba(16, 12, 10, 0.6) !important;
}

body[data-theme="coffeeDark"] #settingsPanel {
	background-color: #1a130f !important;
	border-color: #3b2820 !important;
}

body[data-theme="coffeeDark"] #settingsNav {
	background-color: #1d160f !important;
}

body[data-theme="coffeeDark"] .shadow-soft {
	box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}

body[data-theme="coffeeDark"] #previewPanel,
body[data-theme="coffeeDark"] #commentPanel {
	background: #18120e !important;
	border-color: rgba(59, 40, 32, 0.78) !important;
}

body[data-theme="coffeeDark"] #toggleComments,
body[data-theme="coffeeDark"] #psMetaToggle,
body[data-theme="coffeeDark"] #clearMirror,
body[data-theme="coffeeDark"] #copyMirror,
body[data-theme="coffeeDark"] #psEditorTagsBar,
body[data-theme="coffeeDark"] #psEditorTagsBar > div {
	background: rgba(24, 18, 14, 0.78) !important;
	border-color: rgba(59, 40, 32, 0.78) !important;
}

body[data-theme="coffeeDark"] .hover\:bg-white\/5:hover {
	background-color: #241913 !important;
}
body[data-theme="coffeeDark"] .hover\:bg-white\/10:hover {
	background-color: #2b1f18 !important;
}
body[data-theme="coffeeDark"] .hover\:bg-white\/15:hover {
	background-color: #32251c !important;
}
body[data-theme="coffeeDark"] .active\:bg-white\/10:active {
	background-color: #2b1f18 !important;
}
body[data-theme="coffeeDark"] .active\:bg-white\/15:active {
	background-color: #33261d !important;
}
body[data-theme="coffeeDark"] .active\:bg-white\/20:active {
	background-color: #3b2c21 !important;
}

body[data-theme="coffeeDark"] input,
body[data-theme="coffeeDark"] select,
body[data-theme="coffeeDark"] textarea {
	background-color: #1c1511;
	color: #e8d9cc;
	border-color: #35261e;
}

body[data-theme="coffeeDark"] ::placeholder {
	color: #b49885;
}

body[data-theme="coffeeDark"] .md-content pre {
	background: #1c1511;
	border-color: #35261e;
}

body[data-theme="coffeeDark"] .md-content pre.hljs {
	background: #1c1511 !important;
	border-color: #35261e;
	color: #e8d9cc;
}

body[data-theme="coffeeDark"] .md-content pre.hljs code.hljs {
	color: #e8d9cc;
}

body[data-theme="coffeeDark"] .md-content code.hljs,
body[data-theme="coffeeDark"] .md-content pre code.hljs {
	color: #e8d9cc;
	background: transparent !important;
}

/* Coffee Dark syntax highlights */
body[data-theme="coffeeDark"] .md-content .hljs-keyword,
body[data-theme="coffeeDark"] .md-content .hljs-selector-tag,
body[data-theme="coffeeDark"] .md-content .hljs-title {
	color: #c9a880;
}
body[data-theme="coffeeDark"] .md-content .hljs-string,
body[data-theme="coffeeDark"] .md-content .hljs-attr,
body[data-theme="coffeeDark"] .md-content .hljs-number {
	color: #b8a38d;
}
body[data-theme="coffeeDark"] .md-content .hljs-comment,
body[data-theme="coffeeDark"] .md-content .hljs-quote {
	color: rgba(232, 217, 204, 0.5);
}

body[data-theme="coffeeDark"] .md-content code {
	background: rgba(234, 208, 187, 0.1);
}

body[data-theme="coffeeDark"] .md-content th,
body[data-theme="coffeeDark"] .md-content td {
	border-color: #35261e;
}

body[data-theme="coffeeDark"] .md-content .pw-field {
	background: #1c1511;
	border-color: #35261e;
	color: #e8d9cc;
}

body[data-theme="coffeeDark"] .md-content .pw-mask {
	color: #c7ae9d;
}

body[data-theme="bitterLight"] {
	color-scheme: light;
	background-color: #f7f6f4;
	--panel-solid-bg: rgba(247, 246, 244, 0.92);
	color: #0d0c10;
	--scrollbar-thumb: rgba(21, 21, 24, 0.25);
	--scrollbar-thumb-hover: rgba(21, 21, 24, 0.35);
	--scrollbar-border: rgba(230, 228, 224, 0.9);
	--calendar-event-bg: rgba(247, 246, 244, 0.95);
	--comment-item-bg: #f7f6f4;
	--calendar-tooltip-bg: #f7f6f4;
	--calendar-tooltip-border: rgba(255, 35, 1, 0.24);
	--calendar-tooltip-text: #0d0c10;
	--calendar-tooltip-shadow: none;
	--selection-menu-bg: #f7f6f4;
	--selection-menu-border: #d8d2cb;
	--sel-text: #0d0c10;
	--sel-text-muted: rgba(13, 12, 16, 0.45);
	--sel-text-hover: #000;
	--sel-hover-bg: rgba(0, 0, 0, 0.05);
	--sel-sep: rgba(0, 0, 0, 0.1);
	--sel-divider: rgba(0, 0, 0, 0.07);
	--sel-dot-ring: rgba(0, 0, 0, 0.35);
	--dropdown-accent: #c42000;
	--dropdown-accent-bg: rgba(196, 32, 0, 0.06);
	--dropdown-text: #0d0c10;
	--dropdown-text-hover: #0d0c10;
	--dropdown-hover-bg: rgba(0, 0, 0, 0.04);
	--dropdown-shadow: 0 4px 12px rgba(13, 12, 16, 0.08);
	--accent-strong: #ff2301;
	--accent-strong-hover: #e51f00;
	--accent-strong-active: #cc1c00;
	--accent-text: #fff;
}

body[data-theme="bitterLight"] .bg-glow {
	display: none;
}

body[data-theme="bitterLight"] .border-white\/10 {
	border-color: #d8d2cb !important;
}

body[data-theme="bitterLight"] .text-slate-100 {
	color: #0d0c10 !important;
}
body[data-theme="bitterLight"] .text-slate-200 {
	color: #2a292f !important;
}
body[data-theme="bitterLight"] .text-slate-300 {
	color: #414048 !important;
}
body[data-theme="bitterLight"] .text-slate-400 {
	color: #5b5a64 !important;
}
body[data-theme="bitterLight"] .text-slate-500 {
	color: #6f6e79 !important;
}
body[data-theme="bitterLight"] .text-fuchsia-100 {
	color: #c42000 !important;
}

body[data-theme="bitterLight"] .bg-fuchsia-500\/15,
body[data-theme="bitterLight"] .bg-fuchsia-500\/20,
body[data-theme="bitterLight"] .bg-fuchsia-500\/25,
body[data-theme="bitterLight"] .bg-fuchsia-600\/20 {
	background-color: rgba(13, 12, 16, 0.08) !important;
	color: #0d0c10 !important;
}

body[data-theme="bitterLight"] .hover\:bg-fuchsia-500\/20:hover,
body[data-theme="bitterLight"] .hover\:bg-fuchsia-500\/25:hover {
	background-color: rgba(13, 12, 16, 0.12) !important;
	color: #0d0c10 !important;
}

body[data-theme="bitterLight"] #psList .ps-note-item.ps-note-active {
	background-color: #f0eeeb !important;
	border-left-color: transparent !important;
	border-right: none !important;
	box-shadow: none;
}
body[data-theme="bitterLight"] #psList .ps-note-item {
	border-bottom-color: rgba(0, 0, 0, 0.07);
}

@media (max-width: 1023px) {
	body[data-theme="bitterLight"] #psList .ps-note-item {
		border-bottom-color: rgba(0, 0, 0, 0.02);
	}
}

body[data-theme="bitterLight"] #psNewNote,
body[data-theme="bitterLight"] #psSaveMain,
body[data-theme="bitterLight"] #commentAdd,
body[data-theme="bitterLight"] #aiAssist {
	background-color: #ff2301 !important;
	border-color: #ff2301 !important;
	color: #ffffff !important;
}

body[data-theme="bitterLight"] #roomTabs .text-fuchsia-100 {
	border-color: #ff2301 !important;
	color: #0d0c10 !important;
}

body[data-theme="bitterLight"] .room-tab-link-badge,
body[data-theme="bitterLight"] .room-tab-link-badge.is-live {
	background: transparent;
	box-shadow: none;
	color: #c42000;
}

body[data-theme="bitterLight"] .bg-white\/5,
body[data-theme="bitterLight"] .bg-white\/10,
body[data-theme="bitterLight"] .bg-white\/15,
body[data-theme="bitterLight"] .bg-white\/20 {
	background-color: #f7f6f4 !important;
}

body[data-theme="bitterLight"] .bg-slate-950\/10,
body[data-theme="bitterLight"] .bg-slate-950\/20,
body[data-theme="bitterLight"] .bg-slate-950\/25,
body[data-theme="bitterLight"] .bg-slate-950\/30,
body[data-theme="bitterLight"] .bg-slate-950\/40,
body[data-theme="bitterLight"] .bg-slate-950\/60,
body[data-theme="bitterLight"] .bg-slate-950\/90 {
	background-color: #f0eeeb !important;
}

body[data-theme="bitterLight"] .bg-slate-950\/70 {
	background-color: rgba(21, 21, 24, 0.35) !important;
}

body[data-theme="bitterLight"] .bg-slate-950\/80 {
	background-color: rgba(21, 21, 24, 0.45) !important;
}

body[data-theme="bitterLight"] #settingsBackdrop {
	background-color: rgba(21, 21, 24, 0.2) !important;
}

body[data-theme="bitterLight"] #settingsPanel {
	background-color: #fff9f4 !important;
	border-color: #d8d2cb !important;
}

body[data-theme="bitterLight"] #settingsNav {
	background-color: #f7f6f4 !important;
}

body[data-theme="bitterLight"] #shareModal [data-role="shareModalBackdrop"] {
	background-color: rgba(21, 21, 24, 0.2) !important;
}

body[data-theme="bitterLight"] #shareModal [role="dialog"] {
	background-color: #fff9f4 !important;
	border-color: #d8d2cb !important;
	box-shadow: none !important;
}

body[data-theme="bitterLight"] #shareModal .border-white\/10 {
	border-color: rgba(216, 210, 203, 0.7) !important;
}

body[data-theme="bitterLight"] #shareModal .bg-slate-950\/40,
body[data-theme="bitterLight"] #shareModal .bg-slate-950\/60,
body[data-theme="bitterLight"] #shareModal .bg-white\/5 {
	background-color: #f0eeeb !important;
}

body[data-theme="bitterLight"] #shareModal .bg-white\/10,
body[data-theme="bitterLight"] #shareModal .bg-white\/15,
body[data-theme="bitterLight"] #shareModal .bg-white\/20 {
	background-color: #f7f6f4 !important;
}

body[data-theme="bitterLight"] #psEditorTagsBar > div {
	background-color: #f0eeeb !important;
	border-color: #d8d2cb !important;
}

body[data-theme="bitterLight"] #psEditorTagsSuggest {
	background-color: #f0eeeb !important;
	border-color: #d8d2cb !important;
}

body[data-theme="bitterLight"] #psEditorTagsInput {
	background-color: #f0eeeb !important;
	color: #0d0c10 !important;
}

body[data-theme="bitterLight"] #previewPanel .bg-fuchsia-600\/20 {
	background-color: rgba(255, 35, 1, 0.12) !important;
}

body[data-theme="bitterLight"] #previewPanel .text-fuchsia-300 {
	color: #c42000 !important;
}

body[data-theme="bitterLight"] .theme-swatch {
	box-shadow: none;
}

body[data-theme="bitterLight"] #aiUsePreviewBtn {
	border-color: rgba(255, 35, 1, 0.35) !important;
	background-color: transparent !important;
	color: inherit !important;
	--ai-preview-dot-off: rgba(203, 213, 225, 0.9);
	--ai-preview-dot-on: #ff2301;
}

body[data-theme="bitterLight"] #aiUsePreviewBtn span:first-child {
	background-color: var(--ai-preview-dot-off) !important;
}

body[data-theme="bitterLight"] #aiUsePreviewBtn[aria-pressed="true"] {
	background-color: transparent !important;
	border-color: rgba(255, 35, 1, 0.6) !important;
	color: inherit !important;
}

body[data-theme="bitterLight"] #aiUsePreviewBtn[aria-pressed="true"] span:first-child {
	background-color: var(--ai-preview-dot-on) !important;
}

body[data-theme="bitterLight"] #aiUsePreviewBtn[aria-pressed="true"] span:last-child {
	color: inherit !important;
}

body[data-theme="bitterLight"] .ai-chat-badge {
	color: #0d0c10 !important;
	background-color: rgba(21, 21, 24, 0.12) !important;
}

body[data-theme="bitterLight"] .ai-chat-badge-ai {
	color: #c42000 !important;
	background-color: rgba(255, 35, 1, 0.12) !important;
}

body[data-theme="bitterLight"] .comment-md-btn {
	color: #2a292f;
}

body[data-theme="bitterLight"] .comment-md-btn:hover {
	color: #0d0c10;
	background: rgba(255, 35, 1, 0.08);
}

body[data-theme="bitterLight"] .comment-body code {
	background: rgba(255, 35, 1, 0.12);
}

body[data-theme="bitterLight"] .comment-body pre {
	border-color: rgba(21, 21, 24, 0.14);
	background: rgba(255, 35, 1, 0.06);
}

body[data-theme="bitterLight"] .comment-reply-badge {
	color: #0d0c10;
}

body[data-theme="bitterLight"] .shadow-soft {
	box-shadow: none;
}

body[data-theme="bitterLight"] #previewPanel {
	background-color: #f0eeeb !important;
	border-color: #d8d2cb !important;
}

body[data-theme="bitterLight"] #mdPreview {
	background-color: inherit !important;
	box-shadow: none !important;
}

body[data-theme="bitterLight"] #toggleComments,
body[data-theme="bitterLight"] #psMetaToggle,
body[data-theme="bitterLight"] #clearMirror,
body[data-theme="bitterLight"] #copyMirror,
body[data-theme="bitterLight"] #psEditorTagsBar,
body[data-theme="bitterLight"] #psEditorTagsBar > div {
	background: rgba(247, 246, 244, 0.8) !important;
	border-color: rgba(216, 210, 203, 0.7) !important;
	box-shadow: none !important;
}

body[data-theme="bitterLight"] #psMetaToggle,
body[data-theme="bitterLight"] #clearMirror {
	color: #2a292f !important;
}

body[data-theme="bitterLight"] #psEditorTagsBar input,
body[data-theme="bitterLight"] #psEditorTagsBar select {
	background: rgba(247, 246, 244, 0.8) !important;
	border-color: rgba(216, 210, 203, 0.7) !important;
}

body[data-theme="bitterLight"] #commentPanel {
	background: rgba(247, 246, 244, 0.8) !important;
	border-color: rgba(216, 210, 203, 0.7) !important;
	box-shadow: none !important;
}

body[data-theme="bitterLight"] #psSortMenu {
	background-color: #fff9f4 !important;
	border-color: #d8d2cb !important;
}

body[data-theme="bitterLight"] #slashMenu,
body[data-theme="bitterLight"] #wikiMenu {
	background-color: var(--selection-menu-bg) !important;
	border-color: var(--selection-menu-border) !important;
}

body[data-theme="bitterLight"] #toggleLinear {
	color: #0d0c10 !important;
}

body[data-theme="bitterLight"] #togglePermanentLink {
	color: #0d0c10 !important;
}

body[data-theme="bitterLight"] #togglePermanentLink[aria-pressed="true"] {
	color: #c42000 !important;
}

body[data-theme="bitterDark"] #togglePermanentLink[aria-pressed="true"] {
	color: var(--bitter-accent) !important;
}

body[data-theme="bitterLight"] .ps-note-link-badge {
	color: #c42000 !important;
}

body[data-theme="bitterLight"] #linearEmbed {
	background: rgba(247, 246, 244, 0.85) !important;
	border-color: rgba(216, 210, 203, 0.7) !important;
	box-shadow: none !important;
}

body[data-theme="bitterLight"] .linear-task-item {
	background: transparent;
	border-color: rgba(21, 21, 24, 0.14);
}

body[data-theme="bitterLight"] .linear-task-title {
	color: #0d0c10;
}

body[data-theme="bitterLight"] .linear-task-meta {
	color: #2a292f;
}

body[data-theme="bitterLight"] .linear-task-link {
	color: #b01b00;
}

body[data-theme="bitterLight"] .linear-embed-title,
body[data-theme="bitterLight"] .linear-status,
body[data-theme="bitterLight"] .linear-empty,
body[data-theme="bitterLight"] .linear-stats-empty {
	color: #0d0c10;
}

body[data-theme="bitterLight"] #linearProjectApply,
body[data-theme="bitterLight"] #linearRefresh {
	color: #0d0c10;
}

body[data-theme="bitterLight"] .linear-project-header {
	color: #5b21b6;
	background: rgba(91, 33, 182, 0.08);
	border-color: rgba(91, 33, 182, 0.18);
	box-shadow: none;
}
body[data-theme="bitterLight"] .linear-project-header::before {
	background: #5b21b6;
}

body[data-theme="bitterLight"] .linear-kanban-column {
	background: rgba(21, 21, 24, 0.04);
	border-color: rgba(216, 210, 203, 0.7);
}

body[data-theme="bitterLight"] .linear-kanban-header {
	color: #0d0c10;
}

body[data-theme="bitterLight"] .linear-kanban-icon {
	color: #0d0c10;
}

body[data-theme="bitterLight"] .linear-kanban-count {
	border-color: rgba(216, 210, 203, 0.7);
	color: #2a292f;
}

body[data-theme="bitterLight"] .linear-embed-tabs {
	border-color: rgba(216, 210, 203, 0.7);
	background: rgba(247, 246, 244, 0.85);
}

body[data-theme="bitterLight"] .linear-embed-tab {
	color: #0d0c10;
	border-color: rgba(216, 210, 203, 0.7);
	background: rgba(255, 35, 1, 0.05);
}

body[data-theme="bitterLight"] .linear-embed-tab[aria-pressed="true"] {
	background: rgba(255, 35, 1, 0.16);
	border-color: rgba(255, 35, 1, 0.45);
	color: #0d0c10;
}

body[data-theme="bitterLight"] .linear-stats-title,
body[data-theme="bitterLight"] .linear-stats-section-title,
body[data-theme="bitterLight"] .linear-stat-value,
body[data-theme="bitterLight"] .linear-stats-row-value {
	color: #0d0c10;
}

body[data-theme="bitterLight"] .linear-stats-sub,
body[data-theme="bitterLight"] .linear-stat-label,
body[data-theme="bitterLight"] .linear-stat-sub,
body[data-theme="bitterLight"] .linear-stats-row-label,
body[data-theme="bitterLight"] .linear-stats-badge {
	color: #2a292f;
}

body[data-theme="bitterLight"] .linear-stat-card {
	background: rgba(21, 21, 24, 0.04);
	border-color: rgba(216, 210, 203, 0.7);
}

body[data-theme="bitterLight"] .linear-stats-row-bar {
	background: rgba(21, 21, 24, 0.12);
}

body[data-theme="bitterLight"] .linear-stats-row-fill {
	background: rgba(255, 35, 1, 0.7);
}

body[data-theme="bitterLight"] #commentPanel .bg-rose-500\/10 {
	background-color: rgba(255, 35, 1, 0.12) !important;
	border-color: rgba(255, 35, 1, 0.3) !important;
	color: #b01b00 !important;
}

body[data-theme="bitterLight"] [aria-pressed="true"],
body[data-theme="bitterLight"] .ps-tag-button.ps-tag-active,
body[data-theme="bitterLight"] .ps-tag-section .ps-tag-active {
	background-color: #ff2301 !important;
	color: #ffffff !important;
	border-color: #ff2301 !important;
}

body[data-theme="bitterLight"] .hover\:bg-white\/5:hover {
	background-color: #f0eeeb !important;
}
body[data-theme="bitterLight"] .hover\:bg-white\/10:hover {
	background-color: #ebe9e6 !important;
}
body[data-theme="bitterLight"] .hover\:bg-white\/15:hover {
	background-color: #e6e3df !important;
}
body[data-theme="bitterLight"] .active\:bg-white\/10:active {
	background-color: #e0dcd7 !important;
}
body[data-theme="bitterLight"] .active\:bg-white\/15:active {
	background-color: #d8d3cd !important;
}
body[data-theme="bitterLight"] .active\:bg-white\/20:active {
	background-color: #cfc9c3 !important;
}

body[data-theme="bitterLight"] input,
body[data-theme="bitterLight"] select,
body[data-theme="bitterLight"] textarea {
	background-color: #fff9f4 !important;
	color: #0d0c10;
	border-color: #d8d2cb;
}

body[data-theme="bitterLight"] #calendarSearchInput {
	background: transparent !important;
	border-color: transparent;
}

body[data-theme="bitterLight"] ::placeholder {
	color: #5b5a64;
}

body[data-theme="bitterLight"] .md-content pre {
	background: #f7f6f4;
	border-color: #f7f6f4;
	color: #0d0c10;
}

body[data-theme="bitterLight"] .md-content pre.hljs {
	background: #f7f6f4;
	border-color: #f7f6f4;
	color: #0d0c10;
}

body[data-theme="bitterLight"] .md-content pre.hljs code.hljs {
	color: #0d0c10;
}

body[data-theme="bitterLight"] .md-content code {
	background: #ebe9e6;
	color: #0d0c10;
}

/* Bitter Light syntax highlights */
body[data-theme="bitterLight"] .md-content code.hljs,
body[data-theme="bitterLight"] .md-content pre code.hljs {
	color: #0d0c10;
}
body[data-theme="bitterLight"] .md-content .hljs-keyword,
body[data-theme="bitterLight"] .md-content .hljs-selector-tag,
body[data-theme="bitterLight"] .md-content .hljs-title {
	color: #c42000;
}
body[data-theme="bitterLight"] .md-content .hljs-string,
body[data-theme="bitterLight"] .md-content .hljs-attr,
body[data-theme="bitterLight"] .md-content .hljs-number {
	color: #7a4c35;
}
body[data-theme="bitterLight"] .md-content .hljs-comment,
body[data-theme="bitterLight"] .md-content .hljs-quote {
	color: rgba(13, 12, 16, 0.55);
}

body[data-theme="bitterLight"] .md-content th,
body[data-theme="bitterLight"] .md-content td {
	border-color: #d8d2cb;
}

body[data-theme="bitterLight"] .md-content .pw-field {
	background: #f0eeeb;
	border-color: #d8d2cb;
	color: #0d0c10;
}

body[data-theme="bitterLight"] .md-content .pw-mask {
	color: #2a292f;
}

body[data-theme="bitterLight"] #mirror.attribution-active {
	caret-color: #0d0c10;
}

body[data-theme="bitterDark"] {
	color-scheme: dark;
	background-color: #0d0c10;
	color: #f0e8df;
	--bitter-accent: #ff3b1f;
	--panel-bg: #101014;
	--panel-solid-bg: rgba(16, 16, 20, 0.9);
	--selection-menu-bg: #0d0c10;
	--selection-menu-border: #2a2a30;
	--sel-text: #f0e8df;
	--sel-text-muted: rgba(240, 232, 223, 0.5);
	--sel-text-hover: #faf5f0;
	--sel-hover-bg: rgba(255, 59, 31, 0.08);
	--sel-sep: rgba(255, 59, 31, 0.12);
	--sel-divider: rgba(255, 59, 31, 0.08);
	--sel-dot-ring: rgba(240, 232, 223, 0.45);
	--comment-item-bg: #151518;
	--calendar-event-bg: rgba(13, 12, 16, 0.9);
	--calendar-tooltip-bg: #151518;
	--calendar-tooltip-border: rgba(255, 35, 1, 0.32);
	--calendar-tooltip-text: #f0e8df;
	--calendar-tooltip-shadow: 0 12px 28px rgba(0, 0, 0, 0.42),
		inset 0 0 0 1px rgba(255, 35, 1, 0.12);
	--scrollbar-thumb: rgba(255, 210, 194, 0.25);
	--scrollbar-thumb-hover: rgba(255, 210, 194, 0.35);
	--scrollbar-border: rgba(13, 12, 16, 0.8);
	--dropdown-accent: var(--bitter-accent);
	--dropdown-accent-bg: rgba(255, 59, 31, 0.08);
	--dropdown-text: #f0e8df;
	--dropdown-text-hover: #faf5f0;
	--dropdown-hover-bg: rgba(255, 59, 31, 0.08);
	--dropdown-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

body[data-theme="bitterDark"] .bg-glow {
	display: none;
}

body[data-theme="bitterDark"] .border-white\/10 {
	border-color: #2a2a30 !important;
}

body[data-theme="bitterDark"] .text-slate-100 {
	color: #f0e8df !important;
}
body[data-theme="bitterDark"] .text-slate-200 {
	color: #d8cdc3 !important;
}
body[data-theme="bitterDark"] .text-slate-300 {
	color: #c0b5ad !important;
}
body[data-theme="bitterDark"] .text-slate-400 {
	color: #a4968c !important;
}
body[data-theme="bitterDark"] .text-slate-500 {
	color: #8a7b70 !important;
}

body[data-theme="bitterDark"] .bg-white\/5,
body[data-theme="bitterDark"] .bg-white\/10,
body[data-theme="bitterDark"] .bg-white\/15,
body[data-theme="bitterDark"] .bg-white\/20 {
	background-color: #151518 !important;
}

body[data-theme="bitterDark"] #psPanel,
body[data-theme="bitterDark"] #editorPanel {
	background-color: var(--panel-bg) !important;
}

body[data-theme="bitterDark"] .bg-slate-950\/10,
body[data-theme="bitterDark"] .bg-slate-950\/20,
body[data-theme="bitterDark"] .bg-slate-950\/25,
body[data-theme="bitterDark"] .bg-slate-950\/30,
body[data-theme="bitterDark"] .bg-slate-950\/40,
body[data-theme="bitterDark"] .bg-slate-950\/60,
body[data-theme="bitterDark"] .bg-slate-950\/90 {
	background-color: #0d0c10 !important;
}

body[data-theme="bitterDark"] .bg-slate-950\/70 {
	background-color: rgba(255, 35, 1, 0.18) !important;
}

body[data-theme="bitterDark"] .bg-slate-950\/80 {
	background-color: rgba(255, 35, 1, 0.24) !important;
}

body[data-theme="bitterDark"] .border-fuchsia-400\/30 {
	border-color: rgba(255, 35, 1, 0.55) !important;
}

body[data-theme="bitterDark"] .bg-fuchsia-500\/15,
body[data-theme="bitterDark"] .bg-fuchsia-500\/20,
body[data-theme="bitterDark"] .bg-fuchsia-500\/25,
body[data-theme="bitterDark"] .bg-fuchsia-600\/20 {
	background-color: transparent !important;
	color: var(--bitter-accent) !important;
}

body[data-theme="bitterDark"] .hover\:bg-fuchsia-500\/20:hover,
body[data-theme="bitterDark"] .hover\:bg-fuchsia-500\/25:hover {
	background-color: transparent !important;
	color: var(--bitter-accent) !important;
}

body[data-theme="bitterDark"] .text-fuchsia-100,
body[data-theme="bitterDark"] .text-fuchsia-200,
body[data-theme="bitterDark"] .text-fuchsia-300 {
	color: var(--bitter-accent) !important;
}

body[data-theme="bitterDark"] .ps-note-pin.bg-fuchsia-500\/20 {
	background: var(--bitter-accent) !important;
	background-image: none !important;
	border-color: rgba(255, 59, 31, 0.65) !important;
	color: #f0e8df !important;
}

body[data-theme="bitterDark"] .ps-note-pin.bg-fuchsia-500\/20 svg path {
	fill: currentColor !important;
	stroke: currentColor !important;
}

body[data-theme="bitterDark"] #settingsBackdrop {
	background-color: rgba(13, 12, 16, 0.6) !important;
}

body[data-theme="bitterDark"] #settingsPanel {
	background-color: #151518 !important;
	border-color: #2a2a30 !important;
}

body[data-theme="bitterDark"] #settingsNav {
	background-color: #0d0c10 !important;
}

body[data-theme="bitterDark"] #shareModal [data-role="shareModalBackdrop"] {
	background-color: rgba(13, 12, 16, 0.6) !important;
}

body[data-theme="bitterDark"] #shareModal [role="dialog"] {
	background-color: #151518 !important;
	border-color: #2a2a30 !important;
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.42) !important;
}

body[data-theme="bitterDark"] .ps-note-item.ps-note-active {
	background-color: #0d0c10 !important;
	border-left-color: transparent !important;
	border-right: none !important;
	box-shadow: none;
}
body[data-theme="bitterDark"] #psList .ps-note-item {
	border-bottom-color: rgba(255, 255, 255, 0.06);
}

@media (max-width: 1023px) {
	body[data-theme="bitterDark"] #psList .ps-note-item {
		border-bottom-color: rgba(255, 255, 255, 0.015);
	}
}

body[data-theme="bitterDark"] .ps-note-item .ps-note-actions button {
	box-shadow: none !important;
}

body[data-theme="bitterDark"] .ps-note-item .ps-note-actions button:hover {
	background-color: transparent !important;
}

body[data-theme="bitterDark"] .ps-note-item.ps-note-active span.rounded-full.border {
	background-color: transparent !important;
	border-color: rgba(42, 42, 48, 0.7) !important;
}

body[data-theme="bitterDark"] #psNewNote,
body[data-theme="bitterDark"] #psSaveMain,
body[data-theme="bitterDark"] #commentAdd,
body[data-theme="bitterDark"] #aiAssist {
	background-color: var(--bitter-accent) !important;
	border-color: var(--bitter-accent) !important;
	color: #ffffff !important;
}

body[data-theme="bitterDark"] #roomTabs .border-fuchsia-400\/40 {
	border-color: var(--bitter-accent) !important;
}

body[data-theme="bitterDark"] #roomTabs .text-fuchsia-100 {
	background-color: transparent !important;
	color: inherit !important;
}

body[data-theme="bitterDark"] #aiUsePreviewBtn {
	border-color: rgba(255, 35, 1, 0.45) !important;
	background-color: transparent !important;
	color: inherit !important;
	--ai-preview-dot-on: var(--bitter-accent);
}

body[data-theme="bitterDark"] #aiUsePreviewBtn[aria-pressed="true"] {
	background-color: transparent !important;
	border-color: rgba(255, 35, 1, 0.6) !important;
	color: inherit !important;
}

body[data-theme="bitterDark"] #aiUsePreviewBtn[aria-pressed="true"] span:first-child {
	background-color: var(--ai-preview-dot-on) !important;
}

body[data-theme="bitterDark"] #aiUsePreviewBtn[aria-pressed="true"] span:last-child {
	color: inherit !important;
}

body[data-theme="bitterDark"] [aria-pressed="true"],
body[data-theme="bitterDark"] .ps-tag-button.ps-tag-active,
body[data-theme="bitterDark"] .ps-tag-section .ps-tag-active {
	background-color: var(--bitter-accent) !important;
	color: #ffffff !important;
	border-color: var(--bitter-accent) !important;
}

body[data-theme="bitterDark"] #psEditorTagsBar > div {
	background-color: #151518 !important;
	border-color: #2a2a30 !important;
}

body[data-theme="bitterDark"] #psEditorTagsBar input,
body[data-theme="bitterDark"] #psEditorTagsBar select {
	background: rgba(21, 21, 24, 0.88) !important;
	border-color: rgba(42, 42, 48, 0.7) !important;
	color: #f0e8df !important;
}

body[data-theme="bitterDark"] #psSortMenu {
	background-color: #151518 !important;
	border-color: #2a2a30 !important;
}

body[data-theme="bitterDark"] #slashMenu,
body[data-theme="bitterDark"] #wikiMenu {
	background-color: var(--selection-menu-bg) !important;
	border-color: var(--selection-menu-border) !important;
}

body[data-theme="bitterDark"] #psSortMenu .ps-sort-option {
	color: #f0e8df !important;
}

body[data-theme="bitterDark"] #psSortMenu .ps-sort-option:hover {
	background-color: rgba(255, 255, 255, 0.06) !important;
}

body[data-theme="bitterDark"] #psSortMenu .ps-sort-check {
	color: var(--bitter-accent) !important;
}

body[data-theme="bitterDark"] #psEditorTagsInput {
	background-color: #151518 !important;
}

body[data-theme="bitterDark"] #psEditorTagsSuggest {
	background-color: #0d0c10 !important;
	border-color: #2a2a30 !important;
}

body[data-theme="bitterDark"] .shadow-soft {
	box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
}

body[data-theme="bitterDark"] #previewPanel,
body[data-theme="bitterDark"] #commentPanel {
	background: rgba(21, 21, 24, 0.88) !important;
	border-color: rgba(42, 42, 48, 0.7) !important;
}

body[data-theme="bitterDark"] #toggleComments,
body[data-theme="bitterDark"] #psMetaToggle,
body[data-theme="bitterDark"] #clearMirror,
body[data-theme="bitterDark"] #copyMirror,
body[data-theme="bitterDark"] #psEditorTagsBar,
body[data-theme="bitterDark"] #psEditorTagsBar > div {
	background: rgba(21, 21, 24, 0.88) !important;
	border-color: rgba(42, 42, 48, 0.7) !important;
}

body[data-theme="bitterDark"] .hover\:bg-white\/5:hover {
	background-color: #1a191f !important;
}
body[data-theme="bitterDark"] .hover\:bg-white\/10:hover {
	background-color: #201f25 !important;
}
body[data-theme="bitterDark"] .hover\:bg-white\/15:hover {
	background-color: #26252c !important;
}
body[data-theme="bitterDark"] .active\:bg-white\/10:active {
	background-color: #201f25 !important;
}
body[data-theme="bitterDark"] .active\:bg-white\/15:active {
	background-color: #27262d !important;
}
body[data-theme="bitterDark"] .active\:bg-white\/20:active {
	background-color: #2f2d35 !important;
}

body[data-theme="bitterDark"] input,
body[data-theme="bitterDark"] select,
body[data-theme="bitterDark"] textarea {
	background-color: #0d0c10;
	color: #f0e8df;
	border-color: #2a2a30;
}

body[data-theme="bitterDark"] ::placeholder {
	color: #a4968c;
}

body[data-theme="bitterDark"] .md-content pre {
	background: #0d0c10;
	border-color: #2a2a30;
	color: #f0e8df;
}

body[data-theme="bitterDark"] .md-content pre.hljs {
	background: #0d0c10;
	border-color: #2a2a30;
	color: #f0e8df;
}

body[data-theme="bitterDark"] .md-content pre.hljs code.hljs {
	color: #f0e8df;
}

body[data-theme="bitterDark"] .md-content code {
	background: rgba(255, 210, 194, 0.1);
	color: #f0e8df;
}

/* Bitter Dark syntax highlights */
body[data-theme="bitterDark"] .md-content code.hljs,
body[data-theme="bitterDark"] .md-content pre code.hljs {
	color: #f0e8df;
}
body[data-theme="bitterDark"] .md-content .hljs-keyword,
body[data-theme="bitterDark"] .md-content .hljs-selector-tag,
body[data-theme="bitterDark"] .md-content .hljs-title {
	color: #ff2301;
}
body[data-theme="bitterDark"] .md-content .hljs-string,
body[data-theme="bitterDark"] .md-content .hljs-attr,
body[data-theme="bitterDark"] .md-content .hljs-number {
	color: #ffb199;
}
body[data-theme="bitterDark"] .md-content .hljs-comment,
body[data-theme="bitterDark"] .md-content .hljs-quote {
	color: rgba(240, 232, 223, 0.55);
}

body[data-theme="bitterDark"] .md-content th,
body[data-theme="bitterDark"] .md-content td {
	border-color: #2a2a30;
}

body[data-theme="bitterDark"] .md-content .pw-field {
	background: #0d0c10;
	border-color: #2a2a30;
	color: #f0e8df;
}

body[data-theme="bitterDark"] .md-content .pw-mask {
	color: #c0b5ad;
}

body[data-theme="coffeeDark"] #mirror.attribution-active {
	color: transparent !important;
	caret-color: #e8d9cc;
}

/* Coffee themes: visually disable glow toggle (glow is off) */
body[data-theme="coffeeLight"] #settingsGlowToggle {
	opacity: 0.35 !important;
	filter: grayscale(1);
	pointer-events: none !important;
	background-color: transparent !important;
	border-color: #d9c7bc !important;
	color: #8a6b55 !important;
}

body[data-theme="coffeeDark"] #settingsGlowToggle {
	opacity: 0.35 !important;
	filter: grayscale(1);
	pointer-events: none !important;
	background-color: transparent !important;
	border-color: #35261e !important;
	color: #b49885 !important;
}

/* Bitter themes: disable glow toggle (glow stays off) */
body[data-theme="bitterLight"] #settingsGlowToggle {
	opacity: 0.35 !important;
	filter: grayscale(1);
	pointer-events: none !important;
	background-color: transparent !important;
	border-color: #d8d2cb !important;
	color: #5b5a64 !important;
}

body[data-theme="bitterDark"] #settingsGlowToggle {
	opacity: 0.35 !important;
	filter: grayscale(1);
	pointer-events: none !important;
	background-color: transparent !important;
	border-color: #2a2a30 !important;
	color: #c0b5ad !important;
}


body[data-theme="monoLight"] {
	color-scheme: light;
	background-color: #f6f8fa;
	--panel-solid-bg: rgba(246, 248, 250, 0.92);
	color: #24292f;
	--mono-accent: #0969da;
	--scrollbar-thumb: rgba(148, 163, 184, 0.3);
	--scrollbar-thumb-hover: rgba(148, 163, 184, 0.45);
	--scrollbar-border: rgba(2, 6, 23, 0.35);
	--calendar-event-bg: rgba(255, 255, 255, 0.95);
	--comment-item-bg: #ffffff;
	--calendar-tooltip-bg: #ffffff;
	--calendar-tooltip-border: rgba(27, 31, 36, 0.18);
	--calendar-tooltip-text: #24292f;
	--calendar-tooltip-shadow: none;
	--selection-menu-bg: #f6f8fa;
	--selection-menu-border: #d0d7de;
	--sel-text: #24292f;
	--sel-text-muted: rgba(36, 41, 47, 0.5);
	--sel-text-hover: #1b1f23;
	--sel-hover-bg: rgba(0, 0, 0, 0.04);
	--sel-sep: rgba(27, 31, 36, 0.12);
	--sel-divider: rgba(27, 31, 36, 0.08);
	--sel-dot-ring: rgba(27, 31, 36, 0.35);
	--dropdown-accent: var(--mono-accent);
	--dropdown-accent-bg: rgba(9, 105, 218, 0.06);
	--dropdown-text: #24292f;
	--dropdown-text-hover: #24292f;
	--dropdown-hover-bg: rgba(0, 0, 0, 0.04);
	--dropdown-shadow: 0 4px 12px rgba(27, 31, 36, 0.12);
	--accent-strong: rgba(9, 105, 218, 0.85);
	--accent-strong-hover: rgba(9, 105, 218, 0.95);
	--accent-strong-active: rgba(9, 105, 218, 1);
	--accent-text: #fff;
}

body[data-theme="monoLight"] .bg-glow {
	display: none;
}

body[data-theme="monoLight"] .border-fuchsia-400\/30 {
	border-color: var(--mono-accent) !important;
}

body[data-theme="monoLight"] .bg-fuchsia-500\/15,
body[data-theme="monoLight"] .bg-fuchsia-500\/20,
body[data-theme="monoLight"] .bg-fuchsia-500\/25,
body[data-theme="monoLight"] .bg-fuchsia-600\/20 {
	background-color: rgba(27, 31, 36, 0.08) !important;
	color: #24292f !important;
}

body[data-theme="monoLight"] #toggleExcalidraw {
	background: transparent !important;
	color: #24292f !important;
	border-color: #d0d7de !important;
	box-shadow: none !important;
	backdrop-filter: none !important;
	-webkit-backdrop-filter: none !important;
}

body[data-theme="monoLight"] .hover\:bg-fuchsia-500\/20:hover,
body[data-theme="monoLight"] .hover\:bg-fuchsia-500\/25:hover {
	background-color: rgba(27, 31, 36, 0.12) !important;
	color: #24292f !important;
}

body[data-theme="monoLight"] .text-fuchsia-100,
body[data-theme="monoLight"] .text-fuchsia-200,
body[data-theme="monoLight"] .text-fuchsia-300 {
	color: var(--mono-accent) !important;
}

body[data-theme="monoLight"] .border-white\/10 {
	border-color: #d0d7de !important;
}

body[data-theme="monoLight"] .text-slate-100 {
	color: #24292f !important;
}
body[data-theme="monoLight"] .text-slate-200 {
	color: #57606a !important;
}
body[data-theme="monoLight"] .text-slate-300 {
	color: #5f6e78 !important;
}
body[data-theme="monoLight"] .text-slate-400 {
	color: #63727f !important;
}
body[data-theme="monoLight"] .text-slate-500 {
	color: #657480 !important;
}

body[data-theme="monoLight"] .bg-white\/5,
body[data-theme="monoLight"] .bg-white\/10,
body[data-theme="monoLight"] .bg-white\/15,
body[data-theme="monoLight"] .bg-white\/20 {
	background-color: #ffffff !important;
}

body[data-theme="monoLight"] .bg-slate-950\/10,
body[data-theme="monoLight"] .bg-slate-950\/20,
body[data-theme="monoLight"] .bg-slate-950\/25,
body[data-theme="monoLight"] .bg-slate-950\/30,
body[data-theme="monoLight"] .bg-slate-950\/40,
body[data-theme="monoLight"] .bg-slate-950\/60,
body[data-theme="monoLight"] .bg-slate-950\/90 {
	background-color: #f6f8fa !important;
}

body[data-theme="monoLight"] .bg-slate-950\/70 {
	background-color: rgba(27, 31, 36, 0.35) !important;
}

body[data-theme="monoLight"] .bg-slate-950\/80 {
	background-color: rgba(27, 31, 36, 0.45) !important;
}

body[data-theme="monoLight"] #settingsBackdrop {
	background-color: rgba(27, 31, 36, 0.25) !important;
}

body[data-theme="monoLight"] #settingsPanel {
	background-color: #ffffff !important;
	border-color: #d0d7de !important;
}

body[data-theme="monoLight"] #settingsNav {
	background-color: #f6f8fa !important;
}

body[data-theme="monoLight"] #shareModal [data-role="shareModalBackdrop"] {
	background-color: rgba(27, 31, 36, 0.22) !important;
}

body[data-theme="monoLight"] #shareModal [role="dialog"] {
	background-color: #ffffff !important;
	border-color: #d0d7de !important;
	box-shadow: none !important;
}

body[data-theme="monoLight"] #shareModal .border-white\/10 {
	border-color: rgba(208, 215, 222, 0.7) !important;
}

body[data-theme="monoLight"] #shareModal .bg-slate-950\/40,
body[data-theme="monoLight"] #shareModal .bg-slate-950\/60,
body[data-theme="monoLight"] #shareModal .bg-white\/5 {
	background-color: #f6f8fa !important;
}

body[data-theme="monoLight"] #shareModal .bg-white\/10,
body[data-theme="monoLight"] #shareModal .bg-white\/15,
body[data-theme="monoLight"] #shareModal .bg-white\/20 {
	background-color: #ffffff !important;
}

body[data-theme="monoLight"] #psEditorTagsBar > div {
	background-color: #f0f3f6 !important;
	border-color: #d0d7de !important;
}

body[data-theme="monoLight"] #psEditorTagsSuggest {
	background-color: #f0f3f6 !important;
	border-color: #d0d7de !important;
}

body[data-theme="monoLight"] #psEditorTagsInput {
	background-color: #f0f3f6 !important;
	color: #24292f !important;
}

body[data-theme="monoLight"] #slashMenu,
body[data-theme="monoLight"] #wikiMenu {
	background-color: var(--selection-menu-bg) !important;
	border-color: var(--selection-menu-border) !important;
}

body[data-theme="monoLight"] #previewPanel .bg-fuchsia-600\/20 {
	background-color: transparent !important;
}

body[data-theme="monoLight"] #previewPanel .text-fuchsia-300 {
	color: #0969da !important;
}

body[data-theme="monoLight"] .theme-swatch {
	box-shadow: none;
}

body[data-theme="monoLight"] .ps-note-item.ps-note-active .ps-note-actions button {
	box-shadow: none !important;
	background-color: transparent !important;
}

body[data-theme="monoLight"] .ps-note-item.ps-note-active .ps-note-actions button:hover {
	background-color: transparent !important;
}

body[data-theme="monoLight"] .ps-note-item.ps-note-active span.rounded-full.border {
	background-color: transparent !important;
	border-color: rgba(9, 105, 218, 0.25) !important;
	color: #24292f !important;
}

body[data-theme="monoLight"] .ps-note-pin.bg-fuchsia-500\/20 {
	background-color: transparent !important;
	border-color: rgba(9, 105, 218, 0.35) !important;
	color: #0969da !important;
}

body[data-theme="monoLight"] #psList .ps-note-item.ps-note-active {
	background-color: #f6f8fa !important;
	border-left-color: transparent !important;
	border-right: none !important;
	box-shadow: none;
}
body[data-theme="monoLight"] #psList .ps-note-item {
	border-bottom-color: rgba(0, 0, 0, 0.07);
}

@media (max-width: 1023px) {
	body[data-theme="monoLight"] #psList .ps-note-item {
		border-bottom-color: rgba(0, 0, 0, 0.02);
	}
}

body[data-theme="monoLight"] #psNewNote,
body[data-theme="monoLight"] #psSaveMain,
body[data-theme="monoLight"] #commentAdd,
body[data-theme="monoLight"] #aiAssist {
	background-color: var(--mono-accent) !important;
	border-color: var(--mono-accent) !important;
	color: #ffffff !important;
}

body[data-theme="monoDark"] .ps-note-item.ps-note-active .ps-note-actions button {
	box-shadow: none !important;
	border-color: rgba(31, 111, 235, 0.45) !important;
	color: #d6e5ff !important;
}

body[data-theme="monoDark"] .ps-note-item.ps-note-active .ps-note-actions button:hover {
	background-color: rgba(31, 111, 235, 0.18) !important;
}

body[data-theme="monoDark"] .ps-note-pin.bg-fuchsia-500\/20 {
	background: var(--mono-accent) !important;
	background-image: none !important;
	border-color: var(--mono-accent) !important;
	color: #c9d1d9 !important;
	box-shadow: 0 0 0 1px rgba(31, 111, 235, 0.35), 0 4px 10px rgba(0, 0, 0, 0.35) !important;
}

body[data-theme="monoDark"] .ps-note-pin.bg-fuchsia-500\/20 svg path {
	fill: currentColor !important;
	stroke: currentColor !important;
}

body[data-theme="monoLight"] #aiUsePreviewBtn {
	border-color: rgba(9, 105, 218, 0.35) !important;
	background-color: transparent !important;
	color: inherit !important;
	--ai-preview-dot-on: var(--mono-accent);
}

body[data-theme="monoLight"] #aiUsePreviewBtn span:first-child {
	background-color: var(--ai-preview-dot-off) !important;
}

body[data-theme="monoLight"] #aiUsePreviewBtn[aria-pressed="true"] {
	background-color: transparent !important;
	border-color: rgba(9, 105, 218, 0.55) !important;
	color: inherit !important;
}

body[data-theme="monoLight"] #aiUsePreviewBtn[aria-pressed="true"] span:first-child {
	background-color: var(--ai-preview-dot-on) !important;
}

body[data-theme="monoLight"] #aiUsePreviewBtn[aria-pressed="true"] span:last-child {
	color: inherit !important;
}

body[data-theme="monoLight"] .ai-chat-badge {
	color: #0b1f33 !important;
	background-color: rgba(15, 23, 42, 0.1) !important;
}

body[data-theme="monoLight"] .ai-chat-badge-ai {
	color: #0969da !important;
	background-color: rgba(9, 105, 218, 0.14) !important;
}

body[data-theme="monoLight"] .comment-md-btn {
	color: #57606a;
}

body[data-theme="monoLight"] .comment-md-btn:hover {
	color: #24292f;
	background: rgba(9, 105, 218, 0.08);
}

body[data-theme="monoLight"] .comment-body code {
	background: rgba(9, 105, 218, 0.12);
}

body[data-theme="monoLight"] .comment-body pre {
	border-color: rgba(27, 31, 36, 0.12);
	background: rgba(9, 105, 218, 0.06);
}

body[data-theme="monoLight"] .comment-reply-badge {
	color: #0b1f33;
}

.ai-chat-message {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
	white-space: pre-wrap;
	word-break: break-word;
	cursor: pointer;
}

.ai-chat-item {
	cursor: pointer;
}

.ai-chat-delete {
	opacity: 0;
	pointer-events: none;
}

.ai-chat-item:hover .ai-chat-delete {
	opacity: 1;
	pointer-events: auto;
}

body[data-theme="monoLight"] .shadow-soft {
	box-shadow: none;
}

body[data-theme="monoLight"] #previewPanel {
	background-color: #f6f8fa !important;
	border-color: #d0d7de !important;
}

body[data-theme="monoLight"] #mdPreview {
	background-color: inherit !important;
	box-shadow: none !important;
}

body[data-theme="monoLight"] #toggleComments,
body[data-theme="monoLight"] #psMetaToggle,
body[data-theme="monoLight"] #clearMirror,
body[data-theme="monoLight"] #copyMirror,
body[data-theme="monoLight"] #psEditorTagsBar,
body[data-theme="monoLight"] #psEditorTagsBar > div {
	background: rgba(255, 255, 255, 0.7) !important;
	border-color: rgba(208, 215, 222, 0.6) !important;
	box-shadow: none !important;
}

body[data-theme="monoLight"] #psMetaToggle,
body[data-theme="monoLight"] #clearMirror {
	color: #57606a !important;
}

body[data-theme="monoLight"] #psEditorTagsBar input,
body[data-theme="monoLight"] #psEditorTagsBar select {
	background: rgba(255, 255, 255, 0.7) !important;
	border-color: rgba(208, 215, 222, 0.6) !important;
}

body[data-theme="monoLight"] #commentPanel {
	background: rgba(255, 255, 255, 0.7) !important;
	border-color: rgba(208, 215, 222, 0.6) !important;
	box-shadow: none !important;
}

body[data-theme="monoLight"] #psSortMenu {
	background-color: #ffffff !important;
	border-color: #d0d7de !important;
}

body[data-theme="monoLight"] #toggleLinear {
	color: #24292f !important;
}

body[data-theme="monoLight"] #togglePermanentLink {
	color: #24292f !important;
}

body[data-theme="monoLight"] #togglePermanentLink[aria-pressed="true"] {
	color: var(--mono-accent) !important;
}

body[data-theme="monoLight"] .ps-note-link-badge {
	color: var(--mono-accent) !important;
}

body[data-theme="monoLight"] #linearEmbed {
	background: rgba(255, 255, 255, 0.8) !important;
	border-color: rgba(208, 215, 222, 0.6) !important;
	box-shadow: none !important;
}

body[data-theme="monoLight"] .linear-task-item {
	background: transparent;
	border-color: rgba(208, 215, 222, 0.7);
}

body[data-theme="monoLight"] .linear-task-title {
	color: #24292f;
}

body[data-theme="monoLight"] .linear-task-meta {
	color: #57606a;
}

body[data-theme="monoLight"] .linear-task-link {
	color: #0969da;
}

body[data-theme="monoLight"] .linear-embed-title,
body[data-theme="monoLight"] .linear-status,
body[data-theme="monoLight"] .linear-empty,
body[data-theme="monoLight"] .linear-stats-empty {
	color: #24292f;
}

body[data-theme="monoLight"] #linearProjectApply,
body[data-theme="monoLight"] #linearRefresh {
	color: #24292f;
}

body[data-theme="monoLight"] .linear-project-header {
	color: #6f42c1;
	background: rgba(111, 66, 193, 0.08);
	border-color: rgba(111, 66, 193, 0.18);
	box-shadow: none;
}
body[data-theme="monoLight"] .linear-project-header::before {
	background: #6f42c1;
}

body[data-theme="monoLight"] .linear-kanban-column {
	background: rgba(15, 23, 42, 0.04);
	border-color: rgba(208, 215, 222, 0.6);
}

body[data-theme="monoLight"] .linear-kanban-header {
	color: #24292f;
}

body[data-theme="monoLight"] .linear-kanban-icon {
	color: #24292f;
}

body[data-theme="monoLight"] .linear-kanban-count {
	border-color: rgba(208, 215, 222, 0.6);
	color: #57606a;
}

body[data-theme="monoLight"] .linear-embed-tabs {
	border-color: rgba(208, 215, 222, 0.6);
	background: rgba(255, 255, 255, 0.8);
}

body[data-theme="monoLight"] .linear-embed-tab {
	color: #24292f;
	border-color: rgba(208, 215, 222, 0.6);
	background: rgba(9, 105, 218, 0.05);
}

body[data-theme="monoLight"] .linear-embed-tab[aria-pressed="true"] {
	background: rgba(9, 105, 218, 0.16);
	border-color: rgba(9, 105, 218, 0.4);
	color: #24292f;
}

body[data-theme="monoLight"] .linear-stats-title,
body[data-theme="monoLight"] .linear-stats-section-title,
body[data-theme="monoLight"] .linear-stat-value,
body[data-theme="monoLight"] .linear-stats-row-value {
	color: #24292f;
}

body[data-theme="monoLight"] .linear-stats-sub,
body[data-theme="monoLight"] .linear-stat-label,
body[data-theme="monoLight"] .linear-stat-sub,
body[data-theme="monoLight"] .linear-stats-row-label,
body[data-theme="monoLight"] .linear-stats-badge {
	color: #57606a;
}

body[data-theme="monoLight"] .linear-stat-card {
	background: rgba(9, 105, 218, 0.05);
	border-color: rgba(208, 215, 222, 0.6);
}

body[data-theme="monoLight"] .linear-stats-row-bar {
	background: rgba(9, 105, 218, 0.15);
}

body[data-theme="monoLight"] .linear-stats-row-fill {
	background: rgba(9, 105, 218, 0.65);
}

body[data-theme="monoLight"] #commentPanel .bg-rose-500\/10 {
	background-color: rgba(207, 34, 46, 0.08) !important;
	border-color: rgba(207, 34, 46, 0.3) !important;
	color: #cf222e !important;
}


body[data-theme="monoLight"] #roomTabs .text-fuchsia-100 {
	border-color: var(--mono-accent) !important;
	color: #24292f !important;
}

body[data-theme="monoLight"] .room-tab-link-badge,
body[data-theme="monoLight"] .room-tab-link-badge.is-live {
	background: transparent;
	box-shadow: none;
	color: var(--mono-accent);
}

body[data-theme="monoLight"] [aria-pressed="true"],
body[data-theme="monoLight"] .ps-tag-button.ps-tag-active,
body[data-theme="monoLight"] .ps-tag-section .ps-tag-active {
	background-color: var(--mono-accent) !important;
	color: #ffffff !important;
	border-color: var(--mono-accent) !important;
}

body[data-theme="monoLight"] .hover\:bg-white\/5:hover {
	background-color: #f6f8fa !important;
}
body[data-theme="monoLight"] .hover\:bg-white\/10:hover {
	background-color: #f0f3f6 !important;
}
body[data-theme="monoLight"] .hover\:bg-white\/15:hover {
	background-color: #eef1f4 !important;
}
body[data-theme="monoLight"] .active\:bg-white\/10:active {
	background-color: #eaeef2 !important;
}
body[data-theme="monoLight"] .active\:bg-white\/15:active {
	background-color: #e1e4e8 !important;
}
body[data-theme="monoLight"] .active\:bg-white\/20:active {
	background-color: #d0d7de !important;
}

body[data-theme="monoLight"] input,
body[data-theme="monoLight"] select,
body[data-theme="monoLight"] textarea {
	background-color: #ffffff !important;
	color: #24292f;
	border-color: #d0d7de;
}

body[data-theme="monoLight"] #calendarSearchInput {
	background: transparent !important;
	border-color: transparent;
}

body[data-theme="monoLight"] ::placeholder {
	color: #8c959f;
}

body[data-theme="monoLight"] .md-content pre {
	background: #f6f8fa;
	border-color: #d0d7de;
}

body[data-theme="monoLight"] .md-content code {
	background: #f0f3f6;
}

body[data-theme="monoLight"] .md-content th,
body[data-theme="monoLight"] .md-content td {
	border-color: #d0d7de;
}

body[data-theme="monoLight"] .md-content .pw-field {
	background: #f6f8fa;
	border-color: #d0d7de;
	color: #24292f;
}

body[data-theme="monoLight"] .md-content .pw-mask {
	color: #57606a;
}

body[data-theme="monoLight"] #mirror.attribution-active {
	color: transparent !important;
	caret-color: #24292f;
}

body[data-theme="monoDark"] {
	color-scheme: dark;
	background-color: #0d1117;
	color: #c9d1d9;
	--mono-accent: #0079d4;
	--panel-bg: #10141a;
	--panel-solid-bg: rgba(16, 20, 26, 0.9);
	--selection-menu-bg: #0d1117;
	--selection-menu-border: #30363d;
	--sel-text: #c9d1d9;
	--sel-text-muted: rgba(201, 209, 217, 0.5);
	--sel-text-hover: #e6edf3;
	--sel-hover-bg: rgba(0, 121, 212, 0.08);
	--sel-sep: rgba(48, 54, 61, 0.6);
	--sel-divider: rgba(48, 54, 61, 0.5);
	--sel-dot-ring: rgba(201, 209, 217, 0.45);
	--comment-item-bg: #1f2937;
	--scrollbar-thumb: rgba(148, 163, 184, 0.3);
	--scrollbar-thumb-hover: rgba(148, 163, 184, 0.45);
	--scrollbar-border: rgba(2, 6, 23, 0.35);
	--dropdown-accent: var(--mono-accent);
	--dropdown-accent-bg: rgba(0, 121, 212, 0.1);
	--dropdown-text: #c9d1d9;
	--dropdown-text-hover: #e6edf3;
	--dropdown-hover-bg: rgba(0, 121, 212, 0.08);
	--dropdown-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

body[data-theme="monoDark"] .bg-glow {
	display: none;
}

body[data-theme="monoDark"] .border-fuchsia-400\/30 {
	border-color: var(--mono-accent) !important;
}

body[data-theme="monoDark"] .bg-fuchsia-500\/15,
body[data-theme="monoDark"] .bg-fuchsia-500\/20,
body[data-theme="monoDark"] .bg-fuchsia-500\/25,
body[data-theme="monoDark"] .bg-fuchsia-600\/20 {
	background-color: rgba(0, 121, 212, 0.2) !important;
	color: var(--mono-accent) !important;
}

body[data-theme="monoDark"] #toggleExcalidraw {
	background: transparent !important;
	color: #c9d1d9 !important;
	border-color: #30363d !important;
	box-shadow: none !important;
	backdrop-filter: none !important;
	-webkit-backdrop-filter: none !important;
}

body[data-theme="monoDark"] #toggleExcalidraw[aria-pressed="true"] {
	border-color: var(--mono-accent) !important;
}

body[data-theme="monoDark"] .hover\:bg-fuchsia-500\/20:hover,
body[data-theme="monoDark"] .hover\:bg-fuchsia-500\/25:hover {
	background-color: transparent !important;
	color: #c9d1d9 !important;
}

body[data-theme="monoDark"] #togglePermanentLink[aria-pressed="true"] {
	color: var(--mono-accent) !important;
}

body[data-theme="monoDark"] .text-fuchsia-100,
body[data-theme="monoDark"] .text-fuchsia-200,
body[data-theme="monoDark"] .text-fuchsia-300 {
	color: var(--mono-accent) !important;
}

body[data-theme="monoDark"] .border-white\/10 {
	border-color: #30363d !important;
}

body[data-theme="monoDark"] .text-slate-100 {
	color: #c9d1d9 !important;
}
body[data-theme="monoDark"] .text-slate-200 {
	color: #b1bac4 !important;
}
body[data-theme="monoDark"] .text-slate-300 {
	color: #8b949e !important;
}
body[data-theme="monoDark"] .text-slate-400 {
	color: #6e7681 !important;
}
body[data-theme="monoDark"] #calendarTitle {
	color: var(--accent-text-soft) !important;
}
body[data-theme="monoDark"] .text-slate-500 {
	color: #6e7681 !important;
}

body[data-theme="monoDark"] .bg-white\/5,
body[data-theme="monoDark"] .bg-white\/10,
body[data-theme="monoDark"] .bg-white\/15,
body[data-theme="monoDark"] .bg-white\/20 {
	background-color: #161b22 !important;
}

body[data-theme="monoDark"] #psPanel,
body[data-theme="monoDark"] #editorPanel {
	background-color: var(--panel-bg) !important;
}

body[data-theme="monoDark"] .bg-slate-950\/10,
body[data-theme="monoDark"] .bg-slate-950\/20,
body[data-theme="monoDark"] .bg-slate-950\/25,
body[data-theme="monoDark"] .bg-slate-950\/30,
body[data-theme="monoDark"] .bg-slate-950\/40,
body[data-theme="monoDark"] .bg-slate-950\/60,
body[data-theme="monoDark"] .bg-slate-950\/90 {
	background-color: #0d1117 !important;
}

body[data-theme="monoDark"] .bg-slate-950\/70 {
	background-color: rgba(1, 4, 9, 0.7) !important;
}

body[data-theme="monoDark"] .bg-slate-950\/80 {
	background-color: rgba(1, 4, 9, 0.8) !important;
}

body[data-theme="monoDark"] .ps-note-item.ps-note-active {
	background-color: #0d1117 !important;
	border-left-color: transparent !important;
	border-right: none !important;
	box-shadow: none;
}
body[data-theme="monoDark"] #psList .ps-note-item {
	border-bottom-color: rgba(255, 255, 255, 0.06);
}

@media (max-width: 1023px) {
	body[data-theme="monoDark"] #psList .ps-note-item {
		border-bottom-color: rgba(255, 255, 255, 0.015);
	}
}

body[data-theme="monoDark"] #psNewNote,
body[data-theme="monoDark"] #psSaveMain,
body[data-theme="monoDark"] #commentAdd,
body[data-theme="monoDark"] #aiAssist {
	background-color: var(--mono-accent) !important;
	border-color: var(--mono-accent) !important;
	color: #ffffff !important;
}

body[data-theme="monoDark"] #identityModalSave,
body[data-theme="monoDark"] .identity-modal-btn-primary {
	background-color: #0079d4 !important;
	border-color: #0079d4 !important;
	color: #ffffff !important;
}

body[data-theme="monoDark"] #identityModalSave:hover,
body[data-theme="monoDark"] .identity-modal-btn-primary:hover {
	background-color: #005a9e !important;
	border-color: #005a9e !important;
}

body[data-theme="monoDark"] #roomTabs .border-fuchsia-400\/40 {
	border-color: var(--mono-accent) !important;
}

body[data-theme="monoDark"] #roomTabs .text-fuchsia-100 {
	border-color: var(--mono-accent) !important;
	color: #c9d1d9 !important;
}

body[data-theme="monoDark"] #aiUsePreviewBtn {
	border-color: rgba(0, 121, 212, 0.4) !important;
	background-color: transparent !important;
	color: inherit !important;
	--ai-preview-dot-on: var(--mono-accent);
}

body[data-theme="monoDark"] #aiUsePreviewBtn[aria-pressed="true"] {
	background-color: transparent !important;
	border-color: rgba(0, 121, 212, 0.6) !important;
	color: inherit !important;
}

body[data-theme="monoDark"] #aiUsePreviewBtn[aria-pressed="true"] span:first-child {
	background-color: var(--ai-preview-dot-on) !important;
}

body[data-theme="monoDark"] #aiUsePreviewBtn[aria-pressed="true"] span:last-child {
	color: inherit !important;
}

body[data-theme="monoDark"] .ps-note-item .ps-note-actions button {
	box-shadow: none !important;
}

body[data-theme="monoDark"] .ps-note-item .ps-note-actions button:hover {
	background-color: transparent !important;
}

body[data-theme="monoDark"] .ps-note-item.ps-note-active span.rounded-full.border {
	background-color: transparent !important;
	border-color: rgba(88, 166, 255, 0.28) !important;
	color: #c9d1d9 !important;
}

body[data-theme="monoDark"] [aria-pressed="true"],
body[data-theme="monoDark"] .ps-tag-button.ps-tag-active,
body[data-theme="monoDark"] .ps-tag-section .ps-tag-active {
	background-color: var(--mono-accent) !important;
	color: #ffffff !important;
	border-color: var(--mono-accent) !important;
}

body[data-theme="monoDark"] .ps-note-pin.bg-fuchsia-500\/20 {
	background: var(--mono-accent) !important;
	background-image: none !important;
	border-color: var(--mono-accent) !important;
	color: #c9d1d9 !important;
	box-shadow: 0 0 0 1px rgba(31, 111, 235, 0.35), 0 4px 10px rgba(0, 0, 0, 0.35) !important;
}

body[data-theme="monoDark"] .ps-note-pin.bg-fuchsia-500\/20 svg path {
	fill: currentColor !important;
	stroke: currentColor !important;
}

body[data-theme="monoDark"] .shadow-soft {
	box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3);
}

body[data-theme="monoDark"] #previewPanel,
body[data-theme="monoDark"] #commentPanel {
	background: rgba(13, 17, 23, 0.65) !important;
	border-color: rgba(48, 54, 61, 0.65) !important;
}

body[data-theme="monoDark"] #toggleComments,
body[data-theme="monoDark"] #psMetaToggle,
body[data-theme="monoDark"] #clearMirror,
body[data-theme="monoDark"] #copyMirror,
body[data-theme="monoDark"] #psEditorTagsBar,
body[data-theme="monoDark"] #psEditorTagsBar > div {
	background: rgba(13, 17, 23, 0.65) !important;
	border-color: rgba(48, 54, 61, 0.65) !important;
}

body[data-theme="monoDark"] #psEditorTagsBar input,
body[data-theme="monoDark"] #psEditorTagsBar select {
	background: rgba(13, 17, 23, 0.65) !important;
	border-color: rgba(48, 54, 61, 0.65) !important;
}

/* ══════════════════════════════════════════
   EMERALD THEME OVERRIDES
   Replaces all fuchsia/blue Tailwind classes with green accent
   ══════════════════════════════════════════ */

body[data-theme="emerald"] {
	--emerald-accent: #22c55e;
	--emerald-accent-soft: rgba(34, 197, 94, 0.62);
	--emerald-border: rgba(34, 197, 94, 0.45);
	--selection-menu-bg: rgba(2, 18, 8, 0.90);
	--selection-menu-border: rgba(34, 197, 94, 0.22);
	--sel-text: rgba(220, 252, 231, 0.92);
	--sel-text-muted: rgba(220, 252, 231, 0.48);
	--sel-text-hover: #dcfce7;
	--sel-hover-bg: rgba(34, 197, 94, 0.1);
	--sel-sep: rgba(34, 197, 94, 0.14);
	--sel-divider: rgba(34, 197, 94, 0.09);
	--sel-dot-ring: rgba(34, 197, 94, 0.45);
	--calendar-tooltip-text: rgba(220, 252, 231, 0.95);
}

/* ── Fuchsia → Green color remapping ── */
body[data-theme="emerald"] .border-fuchsia-400\/30,
body[data-theme="emerald"] .border-fuchsia-400\/40 {
	border-color: var(--emerald-border) !important;
}

body[data-theme="emerald"] .bg-fuchsia-500\/15,
body[data-theme="emerald"] .bg-fuchsia-500\/20,
body[data-theme="emerald"] .bg-fuchsia-500\/25,
body[data-theme="emerald"] .bg-fuchsia-600\/20 {
	background-color: rgba(34, 197, 94, 0.12) !important;
	color: var(--emerald-accent) !important;
}

body[data-theme="emerald"] .hover\:bg-fuchsia-500\/20:hover,
body[data-theme="emerald"] .hover\:bg-fuchsia-500\/25:hover {
	background-color: rgba(34, 197, 94, 0.18) !important;
	color: var(--emerald-accent) !important;
}

body[data-theme="emerald"] .text-fuchsia-100,
body[data-theme="emerald"] .text-fuchsia-200,
body[data-theme="emerald"] .text-fuchsia-300,
body[data-theme="emerald"] .text-fuchsia-400 {
	color: var(--emerald-accent) !important;
}

body[data-theme="emerald"] .focus\:ring-fuchsia-400\/30:focus,
body[data-theme="emerald"] .focus\:ring-fuchsia-400\/40:focus {
	--tw-ring-color: rgba(34, 197, 94, 0.35) !important;
}

/* ── Buttons: Speichern, Neue Notiz, Kommentar, AI-Assist ── */
body[data-theme="emerald"] #psNewNote,
body[data-theme="emerald"] #psSaveMain,
body[data-theme="emerald"] #commentAdd,
body[data-theme="emerald"] #aiAssist {
	background-color: rgba(34, 197, 94, 0.16) !important;
	border-color: var(--emerald-border) !important;
	color: #dcfce7 !important;
}

body[data-theme="emerald"] #psNewNote:hover,
body[data-theme="emerald"] #psSaveMain:hover,
body[data-theme="emerald"] #commentAdd:hover,
body[data-theme="emerald"] #aiAssist:hover {
	background-color: rgba(34, 197, 94, 0.24) !important;
	border-color: rgba(34, 197, 94, 0.6) !important;
}

/* ── Tag area / active states ── */
body[data-theme="emerald"] [aria-pressed="true"],
body[data-theme="emerald"] .ps-tag-button.ps-tag-active,
body[data-theme="emerald"] .ps-tag-section .ps-tag-active {
	color: var(--emerald-accent) !important;
}

body[data-theme="emerald"] .ps-note-item.ps-note-active {
	border-left-color: var(--emerald-accent) !important;
}

body[data-theme="emerald"] .ps-note-item.ps-note-active .ps-note-title,
body[data-theme="emerald"] .ps-note-item.ps-note-active .ps-note-excerpt {
	color: #86efac !important;
}

/* ── Pin badge ── */
body[data-theme="emerald"] .ps-note-pin.bg-fuchsia-500\/20 {
	background: rgba(34, 197, 94, 0.25) !important;
	background-image: none !important;
	border-color: rgba(34, 197, 94, 0.55) !important;
	color: #dcfce7 !important;
}

body[data-theme="emerald"] .ps-note-pin.bg-fuchsia-500\/20 svg path {
	fill: currentColor !important;
	stroke: currentColor !important;
}

/* ── AI Chat panel ── */
body[data-theme="emerald"] #aiUsePreviewBtn {
	border-color: var(--emerald-border) !important;
	background-color: transparent !important;
	color: inherit !important;
	--ai-preview-dot-on: var(--emerald-accent);
}

body[data-theme="emerald"] #aiUsePreviewBtn[aria-pressed="true"] {
	background-color: rgba(34, 197, 94, 0.1) !important;
	border-color: rgba(34, 197, 94, 0.6) !important;
}

body[data-theme="emerald"] #aiUsePreviewBtn[aria-pressed="true"] span:first-child {
	background-color: var(--ai-preview-dot-on) !important;
}

/* ── Dropdown / Tags bar ── (removed emerald-specific overrides, now uses --panel-solid-bg) */

/* ── Room tabs ── */
body[data-theme="emerald"] #roomTabs .border-fuchsia-400\/40 {
	border-color: var(--emerald-border) !important;
}

body[data-theme="emerald"] #roomTabs .text-fuchsia-100 {
	color: #86efac !important;
}

/* ── Toggle permanent link ── */
body[data-theme="emerald"] #togglePermanentLink[aria-pressed="true"] {
	color: var(--emerald-accent) !important;
}

/* ── bg-slate-950/* → dark green equivalent ── */
body[data-theme="emerald"] .bg-slate-950\/10,
body[data-theme="emerald"] .bg-slate-950\/20,
body[data-theme="emerald"] .bg-slate-950\/25,
body[data-theme="emerald"] .bg-slate-950\/30,
body[data-theme="emerald"] .bg-slate-950\/40,
body[data-theme="emerald"] .bg-slate-950\/60,
body[data-theme="emerald"] .bg-slate-950\/70,
body[data-theme="emerald"] .bg-slate-950\/80,
body[data-theme="emerald"] .bg-slate-950\/90 {
	background-color: rgba(2, 18, 8, 0.55) !important;
}

/* ── aiPrompt textarea ── */
body[data-theme="emerald"] #aiPrompt {
	background: rgba(2, 18, 8, 0.55) !important;
	border-color: rgba(34, 197, 94, 0.2) !important;
	color: #dcfce7 !important;
}

body[data-theme="emerald"] #aiPrompt:focus {
	border-color: rgba(34, 197, 94, 0.45) !important;
	box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2) !important;
}

/* ── aiMode select ── */
body[data-theme="emerald"] #aiMode {
	background: rgba(2, 18, 8, 0.55) !important;
	border-color: rgba(34, 197, 94, 0.2) !important;
	color: #dcfce7 !important;
}

body[data-theme="emerald"] #aiMode:focus {
	border-color: rgba(34, 197, 94, 0.45) !important;
	box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2) !important;
}

/* ── Preview + Comment panel ── */
body[data-theme="emerald"] #previewPanel,
body[data-theme="emerald"] #commentPanel {
	background: rgba(2, 14, 6, 0.72) !important;
	border-color: rgba(34, 197, 94, 0.12) !important;
}

/* ── AI conversation section ── */
body[data-theme="emerald"] #aiConversationSection {
	background: rgba(2, 14, 6, 0.5) !important;
	border-color: rgba(34, 197, 94, 0.1) !important;
}

body[data-theme="emerald"] #aiChatHistory {
	background: rgba(2, 18, 8, 0.5) !important;
	border-color: rgba(34, 197, 94, 0.15) !important;
}

/* ── mdPreview iframe container bg ── */
body[data-theme="emerald"] #previewPanel > .flex,
body[data-theme="emerald"] #previewPanel > div {
	background: transparent !important;
}

/* ── Violet theme: selection menu + YAML meta vars ── */
body[data-theme="violet"] {
	--selection-menu-bg: rgba(13, 10, 28, 0.90);
	--selection-menu-border: rgba(124, 58, 237, 0.22);
	--sel-text: rgba(237, 233, 254, 0.92);
	--sel-text-muted: rgba(237, 233, 254, 0.48);
	--sel-text-hover: #ede9fe;
	--sel-hover-bg: rgba(124, 58, 237, 0.1);
	--sel-sep: rgba(124, 58, 237, 0.14);
	--sel-divider: rgba(124, 58, 237, 0.09);
	--sel-dot-ring: rgba(124, 58, 237, 0.45);
	--calendar-tooltip-text: rgba(237, 233, 254, 0.95);
}

#commentPanel {
	backdrop-filter: blur(18px) saturate(160%);
	-webkit-backdrop-filter: blur(18px) saturate(160%);
	box-shadow: 0 6px 20px rgba(2, 6, 23, 0.25);
	z-index: 40;
}

body[data-theme="monoDark"] .hover\:bg-white\/5:hover {
	background-color: #21262d !important;
}
body[data-theme="monoDark"] .hover\:bg-white\/10:hover {
	background-color: #30363d !important;
}
body[data-theme="monoDark"] .hover\:bg-white\/15:hover {
	background-color: #373e47 !important;
}
body[data-theme="monoDark"] .active\:bg-white\/10:active {
	background-color: #30363d !important;
}
body[data-theme="monoDark"] .active\:bg-white\/15:active {
	background-color: #373e47 !important;
}
body[data-theme="monoDark"] .active\:bg-white\/20:active {
	background-color: #3b424b !important;
}

body[data-theme="monoDark"] input,
body[data-theme="monoDark"] select,
body[data-theme="monoDark"] textarea {
	background-color: #0d1117;
	color: #c9d1d9;
	border-color: #30363d;
}

body[data-theme="monoDark"] ::placeholder {
	color: #6e7681;
}

body[data-theme="monoDark"] .md-content pre {
	background: #0d1117;
	border-color: #30363d;
}

body[data-theme="monoDark"] .md-content code {
	background: rgba(240, 246, 252, 0.06);
}

body[data-theme="monoDark"] .md-content th,
body[data-theme="monoDark"] .md-content td {
	border-color: #30363d;
}

body[data-theme="monoDark"] .md-content .pw-field {
	background: #0d1117;
	border-color: #30363d;
	color: #c9d1d9;
}

body[data-theme="monoDark"] .md-content .pw-mask {
	color: #8b949e;
}

body[data-theme="monoDark"] #mirror.attribution-active {
	color: transparent !important;
	caret-color: #c9d1d9;
}

/* Mono themes: hide/grey out glow toggle (glow is forced off) */
body[data-theme="monoLight"] #settingsGlowToggle,
body[data-theme="monoDark"] #settingsGlowToggle {
	opacity: 0.35 !important;
	filter: grayscale(1);
	pointer-events: none !important;
	background-color: transparent !important;
	border-color: #30363d !important;
	color: #6e7681 !important;
}

#toggleHeader {
	background-color: transparent !important;
}

#toggleHeader:hover,
#toggleHeader:focus-visible,
#toggleHeader:active,
#toggleHeader[aria-pressed="true"] {
	background-color: transparent !important;
}

/* ── Modal Theme Sync ── all modal backgrounds match main theme bg ── */
body[data-theme] #tableModal > [data-role="tableModalBackdrop"],
body[data-theme] #settingsBackdrop,
body[data-theme] #modalRoot > [data-role="modalBackdrop"],
body[data-theme] #calendarEventModal > [data-role="calendarEventBackdrop"],
body[data-theme] #uploadModal > [data-role="uploadModalBackdrop"],
body[data-theme] #shareModal > [data-role="shareModalBackdrop"],
body[data-theme] #noteShareModal > [data-role="noteShareModalBackdrop"] {
	background-color: var(--modal-backdrop, rgba(2, 6, 23, 0.7)) !important;
}

body[data-theme] #tableModal [role="dialog"],
body[data-theme] #settingsPanel,
body[data-theme] #modalRoot [role="dialog"],
body[data-theme] #calendarEventModal [role="dialog"],
body[data-theme] #uploadModal [role="dialog"],
body[data-theme] #shareModal [role="dialog"],
body[data-theme] #noteShareModal [role="dialog"] {
	background-color: var(--panel-solid-bg, #0f0a1a) !important;
	border-color: var(--modal-border, rgba(255, 255, 255, 0.1)) !important;
}

/* ══════════════════════════════════════════════════════════════════════════════
   EDITOR SEARCH BAR
   ══════════════════════════════════════════════════════════════════════════════ */

.editor-search-bar {
	position: absolute;
	top: 56px;
	right: 8px;
	z-index: 35;
}

.editor-search-inner {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 4px 8px;
	border-radius: 10px;
	border: 1px solid rgba(255, 255, 255, 0.08);
	background: var(--panel-solid-bg, rgba(2, 6, 23, 0.88));
	backdrop-filter: blur(24px) saturate(1.5);
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.editor-search-icon {
	width: 14px;
	height: 14px;
	flex-shrink: 0;
	color: rgba(148, 163, 184, 0.6);
}

.editor-search-input {
	width: 180px;
	background: transparent !important;
	background-color: transparent !important;
	-webkit-appearance: none;
	appearance: none;
	border: none;
	outline: none;
	font-size: 13px;
	color: rgba(226, 232, 240, 0.95);
	font-family: inherit;
	padding: 2px 0;
}
.editor-search-input::placeholder {
	color: rgba(148, 163, 184, 0.4);
}

.editor-search-count {
	font-size: 11px;
	color: rgba(148, 163, 184, 0.5);
	white-space: nowrap;
	min-width: 40px;
	text-align: center;
	flex-shrink: 0;
}

.editor-search-nav {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 6px;
	border: none;
	background: transparent;
	color: rgba(226, 232, 240, 0.6);
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
	flex-shrink: 0;
	padding: 0;
}
.editor-search-nav:hover {
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
}
.editor-search-nav:active {
	background: rgba(255, 255, 255, 0.15);
}

/* ── Light Theme overrides ── */
body[data-theme="coffeeLight"] .editor-search-inner,
body[data-theme="bitterLight"] .editor-search-inner,
body[data-theme="monoLight"] .editor-search-inner {
	border-color: rgba(0, 0, 0, 0.1);
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
	backdrop-filter: blur(24px) saturate(1.5);
}
body[data-theme="coffeeLight"] .editor-search-input,
body[data-theme="bitterLight"] .editor-search-input,
body[data-theme="monoLight"] .editor-search-input {
	color: rgba(30, 41, 59, 0.9);
	background: var(--panel-solid-bg) !important;
	-webkit-box-shadow: 0 0 0 1000px var(--panel-solid-bg) inset !important;
}
body[data-theme="coffeeLight"] .editor-search-input::placeholder,
body[data-theme="bitterLight"] .editor-search-input::placeholder,
body[data-theme="monoLight"] .editor-search-input::placeholder {
	color: rgba(100, 116, 139, 0.5);
}
body[data-theme="coffeeLight"] .editor-search-count,
body[data-theme="bitterLight"] .editor-search-count,
body[data-theme="monoLight"] .editor-search-count {
	color: rgba(100, 116, 139, 0.6);
}
body[data-theme="coffeeLight"] .editor-search-nav,
body[data-theme="bitterLight"] .editor-search-nav,
body[data-theme="monoLight"] .editor-search-nav {
	color: rgba(30, 41, 59, 0.5);
}
body[data-theme="coffeeLight"] .editor-search-nav:hover,
body[data-theme="bitterLight"] .editor-search-nav:hover,
body[data-theme="monoLight"] .editor-search-nav:hover {
	background: rgba(0, 0, 0, 0.06);
	color: rgba(30, 41, 59, 0.9);
}
body[data-theme="coffeeLight"] .editor-search-icon,
body[data-theme="bitterLight"] .editor-search-icon,
body[data-theme="monoLight"] .editor-search-icon {
	color: rgba(100, 116, 139, 0.5);
}

/* ══════════════════════════════════════════════════════════════════════════════
   EDITOR TOOLBOX
   ══════════════════════════════════════════════════════════════════════════════ */

.editor-toolbox {
	position: absolute;
	bottom: 8px;
	right: 8px;
	z-index: 30;
	display: flex;
	align-items: center;
	gap: 0;
	overflow: visible;
}

/* ── Trigger Button ── */
.toolbox-trigger {
	position: relative;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	background: rgba(255, 255, 255, 0.05);
	color: rgba(226, 232, 240, 0.8);
	backdrop-filter: blur(24px) saturate(1.5);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	cursor: pointer;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
	transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
	flex-shrink: 0;
}
.toolbox-trigger:hover {
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
	border-color: rgba(255, 255, 255, 0.18);
}
.toolbox-trigger:active {
	background: rgba(255, 255, 255, 0.15);
	transform: scale(0.95);
}
.editor-toolbox[aria-expanded="true"] .toolbox-trigger {
	background: var(--accent-bg, rgba(217, 70, 239, 0.15));
	border-color: var(--accent-border, rgba(217, 70, 239, 0.3));
	color: var(--accent-text, #fff);
}

/* ── Panel (expanded toolbar) ── */
.toolbox-panel {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 4px 6px;
	margin-right: 4px;
	border-radius: 12px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	background: var(--panel-solid-bg, rgba(2, 6, 23, 0.82));
	backdrop-filter: blur(24px) saturate(1.5);
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
	flex-shrink: 0;
	transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
		transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
		visibility 0s 0.25s;
	opacity: 0;
	transform: translateX(40px);
	visibility: hidden;
	pointer-events: none;
}
.editor-toolbox[aria-expanded="true"] .toolbox-panel {
	opacity: 1;
	transform: translateX(0);
	visibility: visible;
	pointer-events: auto;
	transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
		transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
		visibility 0s 0s;
}

/* ── Tool Buttons inside panel ── */
#toolboxPanel .toolbox-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 8px;
	border: none !important;
	background: transparent !important;
	box-shadow: none !important;
	backdrop-filter: none !important;
	-webkit-backdrop-filter: none !important;
	color: rgba(226, 232, 240, 0.75);
	cursor: pointer;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
	transition: background 0.15s, color 0.15s, transform 0.15s;
	flex-shrink: 0;
	padding: 0;
}
#toolboxPanel .toolbox-btn:hover {
	background: rgba(255, 255, 255, 0.1) !important;
	color: #fff;
}
#toolboxPanel .toolbox-btn:active {
	background: rgba(255, 255, 255, 0.15) !important;
	transform: scale(0.92);
}
#toolboxPanel .toolbox-btn[aria-pressed="true"] {
	background: var(--accent-bg, rgba(217, 70, 239, 0.15)) !important;
	color: var(--accent-text, #fff);
}

/* ── Separator ── */
.toolbox-sep {
	display: block;
	width: 1px;
	height: 20px;
	margin: 0 2px;
	background: rgba(255, 255, 255, 0.08);
	border-radius: 1px;
	flex-shrink: 0;
}

/* ── Mobile: smaller items ── */
@media (max-width: 639px) {
	.toolbox-panel {
		gap: 2px;
		padding: 3px 4px;
	}
	.toolbox-btn {
		width: 28px;
		height: 28px;
	}
	.toolbox-btn svg {
		width: 14px;
		height: 14px;
	}
	.toolbox-sep {
		height: 16px;
	}
}

/* ── Light Theme overrides ── */
body[data-theme="coffeeLight"] .toolbox-trigger,
body[data-theme="bitterLight"] .toolbox-trigger,
body[data-theme="monoLight"] .toolbox-trigger {
	border-color: rgba(0, 0, 0, 0.14);
	background: rgba(240, 240, 245, 0.85);
	color: rgba(30, 41, 59, 0.7);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
body[data-theme="coffeeLight"] .toolbox-trigger:hover,
body[data-theme="bitterLight"] .toolbox-trigger:hover,
body[data-theme="monoLight"] .toolbox-trigger:hover {
	background: rgba(255, 255, 255, 0.85);
	color: rgba(30, 41, 59, 0.9);
}
body[data-theme="coffeeLight"] .editor-toolbox[aria-expanded="true"] .toolbox-trigger,
body[data-theme="bitterLight"] .editor-toolbox[aria-expanded="true"] .toolbox-trigger,
body[data-theme="monoLight"] .editor-toolbox[aria-expanded="true"] .toolbox-trigger {
	background: var(--accent-bg, rgba(217, 70, 239, 0.12));
	border-color: var(--accent-border, rgba(217, 70, 239, 0.25));
	color: var(--accent-text-soft, rgba(168, 85, 247, 0.9));
}

body[data-theme="coffeeLight"] .toolbox-panel,
body[data-theme="bitterLight"] .toolbox-panel,
body[data-theme="monoLight"] .toolbox-panel {
	border-color: rgba(0, 0, 0, 0.14);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.06);
	backdrop-filter: blur(20px) saturate(1.4);
}
body[data-theme="coffeeLight"] #toolboxPanel .toolbox-btn,
body[data-theme="bitterLight"] #toolboxPanel .toolbox-btn,
body[data-theme="monoLight"] #toolboxPanel .toolbox-btn {
	color: rgba(30, 41, 59, 0.82);
}
body[data-theme="coffeeLight"] #toolboxPanel .toolbox-btn:hover,
body[data-theme="bitterLight"] #toolboxPanel .toolbox-btn:hover,
body[data-theme="monoLight"] #toolboxPanel .toolbox-btn:hover {
	background: rgba(0, 0, 0, 0.07) !important;
	color: rgba(30, 41, 59, 0.95);
}
body[data-theme="coffeeLight"] #toolboxPanel .toolbox-btn[aria-pressed="true"],
body[data-theme="bitterLight"] #toolboxPanel .toolbox-btn[aria-pressed="true"],
body[data-theme="monoLight"] #toolboxPanel .toolbox-btn[aria-pressed="true"] {
	background: var(--accent-bg, rgba(217, 70, 239, 0.1)) !important;
	color: var(--accent-text-soft, rgba(168, 85, 247, 0.9));
}
body[data-theme="coffeeLight"] .toolbox-sep,
body[data-theme="bitterLight"] .toolbox-sep,
body[data-theme="monoLight"] .toolbox-sep {
	background: rgba(0, 0, 0, 0.15);
}

/* ══════════════════════════════════════════════════════════════════════════════
   BLOCK ARRANGE MODE
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── Overlay Container ── */
.block-arrange-overlay {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	flex-direction: column;
	background: var(--modal-backdrop, rgba(2, 6, 23, 0.85));
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	animation: blockArrangeFadeIn 0.2s ease-out;
}

.block-arrange-overlay[aria-hidden="true"] {
	display: none;
}

@keyframes blockArrangeFadeIn {
	from {
		opacity: 0;
		backdrop-filter: blur(0);
	}
	to {
		opacity: 1;
		backdrop-filter: blur(12px);
	}
}

/* ── Header ── */
.block-arrange-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1rem 1.5rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	background: rgba(255, 255, 255, 0.03);
}

.block-arrange-title {
	font-size: 1.125rem;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.95);
	letter-spacing: -0.01em;
}

.block-arrange-toolbar {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

/* ── Buttons ── */
.block-arrange-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	padding: 0.5rem 0.875rem;
	border-radius: 0.5rem;
	font-size: 0.8125rem;
	font-weight: 500;
	background: rgba(255, 255, 255, 0.08);
	color: rgba(255, 255, 255, 0.8);
	border: 1px solid rgba(255, 255, 255, 0.1);
	cursor: pointer;
	transition: all 0.15s ease;
}

.block-arrange-btn:hover {
	background: rgba(255, 255, 255, 0.12);
	color: rgba(255, 255, 255, 0.95);
}

.block-arrange-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.block-arrange-btn-primary {
	background: var(--accent-strong, #d946ef);
	color: var(--accent-text, white);
	border-color: var(--accent-border, transparent);
}

.block-arrange-btn-primary:hover {
	background: var(--accent-strong-hover, #c026d3);
}

/* ── Close Button ── */
.block-arrange-close {
	width: 2rem;
	height: 2rem;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 0.375rem;
	background: transparent;
	color: rgba(255, 255, 255, 0.6);
	border: none;
	cursor: pointer;
	transition: all 0.15s ease;
}

.block-arrange-close:hover {
	background: rgba(255, 255, 255, 0.1);
	color: rgba(255, 255, 255, 0.9);
}

/* ── Outline Toggle ── */
.block-arrange-outline-label {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.8125rem;
	color: rgba(255, 255, 255, 0.7);
	cursor: pointer;
}

.block-arrange-outline-label input[type="checkbox"] {
	width: 1rem;
	height: 1rem;
	border-radius: 0.25rem;
	border: 1px solid rgba(255, 255, 255, 0.3);
	background: rgba(255, 255, 255, 0.05);
	cursor: pointer;
	accent-color: var(--accent-strong, #d946ef);
}

/* ── Hint Bar ── */
.block-arrange-hint {
	padding: 0.5rem 1.5rem;
	font-size: 0.75rem;
	color: rgba(255, 255, 255, 0.5);
	background: rgba(255, 255, 255, 0.02);
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.block-arrange-hint kbd {
	display: inline-block;
	padding: 0.125rem 0.375rem;
	margin: 0 0.125rem;
	border-radius: 0.25rem;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.15);
	font-family: inherit;
	font-size: 0.6875rem;
}

/* ── Block List ── */
.block-arrange-list {
	flex: 1;
	overflow-y: auto;
	padding: 1rem 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

/* ── Block Item ── */
.block-arrange-item {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	padding: 0.75rem 1rem;
	border-radius: 0.5rem;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.08);
	cursor: grab;
	transition: all 0.15s ease, transform 0.2s cubic-bezier(0.2, 0, 0, 1);
	user-select: none;
}

.block-arrange-item:hover {
	background: rgba(255, 255, 255, 0.07);
	border-color: rgba(255, 255, 255, 0.12);
}

.block-arrange-item:focus-visible {
	outline: 2px solid var(--accent-strong, #d946ef);
	outline-offset: 2px;
}

.block-arrange-item.selected {
	background: var(--accent-bg, rgba(217, 70, 239, 0.15));
	border-color: var(--accent-border-strong, #d946ef);
}

/* ── Drag Handle ── */
.block-arrange-handle {
	flex-shrink: 0;
	width: 1.25rem;
	height: 1.25rem;
	display: flex;
	align-items: center;
	justify-content: center;
	color: rgba(255, 255, 255, 0.35);
	cursor: grab;
}

.block-arrange-item:hover .block-arrange-handle {
	color: rgba(255, 255, 255, 0.6);
}

/* ── Type Badge ── */
.block-arrange-badge {
	flex-shrink: 0;
	padding: 0.125rem 0.5rem;
	border-radius: 0.25rem;
	font-size: 0.6875rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

/* Badge Colors by Type */
.block-arrange-badge[data-type="h1"] {
	background: rgba(239, 68, 68, 0.2);
	color: #fca5a5;
}
.block-arrange-badge[data-type="h2"] {
	background: rgba(249, 115, 22, 0.2);
	color: #fdba74;
}
.block-arrange-badge[data-type="h3"] {
	background: rgba(234, 179, 8, 0.2);
	color: #fde047;
}
.block-arrange-badge[data-type="h4"] {
	background: rgba(34, 197, 94, 0.2);
	color: #86efac;
}
.block-arrange-badge[data-type="h5"] {
	background: rgba(6, 182, 212, 0.2);
	color: #67e8f9;
}
.block-arrange-badge[data-type="h6"] {
	background: rgba(99, 102, 241, 0.2);
	color: #a5b4fc;
}
.block-arrange-badge[data-type="code"] {
	background: rgba(168, 85, 247, 0.2);
	color: #c4b5fd;
}
.block-arrange-badge[data-type="list"] {
	background: rgba(236, 72, 153, 0.2);
	color: #f9a8d4;
}
.block-arrange-badge[data-type="table"] {
	background: rgba(20, 184, 166, 0.2);
	color: #5eead4;
}
.block-arrange-badge[data-type="quote"] {
	background: rgba(156, 163, 175, 0.2);
	color: #d1d5db;
}
.block-arrange-badge[data-type="hr"] {
	background: rgba(107, 114, 128, 0.2);
	color: #9ca3af;
}
.block-arrange-badge[data-type="paragraph"] {
	background: rgba(255, 255, 255, 0.08);
	color: rgba(255, 255, 255, 0.6);
}

/* ── Preview Text ── */
.block-arrange-preview {
	flex: 1;
	min-width: 0;
	font-size: 0.8125rem;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.85);
	white-space: pre-wrap;
	word-break: break-word;
	max-height: 12em;
	overflow: hidden;
}

.block-arrange-preview code {
	font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, monospace;
	font-size: 0.75rem;
	padding: 0.125rem 0.375rem;
	border-radius: 0.25rem;
	background: rgba(255, 255, 255, 0.08);
}

/* ── Dragging States ── */
.block-arrange-item.dragging {
	opacity: 0.5;
	transform: scale(0.98);
	cursor: grabbing;
}

.block-arrange-item.drag-over {
	background: var(--accent-bg-soft, rgba(217, 70, 239, 0.1));
	border-color: var(--accent-border, #d946ef);
	border-style: dashed;
}

/* Drop Zone Indicator */
.block-arrange-drop-zone {
	height: 3px;
	margin: -0.375rem 0;
	border-radius: 1.5px;
	background: var(--accent-strong, #d946ef);
	box-shadow: 0 0 8px var(--accent-strong, #d946ef);
	animation: dropZonePulse 0.8s ease-in-out infinite;
}

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

/* ── Empty State ── */
.block-arrange-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	flex: 1;
	gap: 0.75rem;
	color: rgba(255, 255, 255, 0.4);
	font-size: 0.9375rem;
}

.block-arrange-empty svg {
	width: 3rem;
	height: 3rem;
	opacity: 0.3;
}

/* ── Footer ── */
.block-arrange-footer {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 0.75rem;
	padding: 1rem 1.5rem;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	background: rgba(255, 255, 255, 0.03);
}

/* ══════════════════════════════════════════════════════════════════════════════
   BLOCK ARRANGE - THEME ADJUSTMENTS
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── Dark Theme Overlays ── */
body[data-theme="coffeeDark"] .block-arrange-overlay {
	background: rgba(28, 22, 20, 0.92);
}
body[data-theme="bitterDark"] .block-arrange-overlay {
	background: rgba(13, 12, 16, 0.92);
}
body[data-theme="monoDark"] .block-arrange-overlay {
	background: rgba(13, 17, 23, 0.92);
}

/* ── Light Theme Base ── */
body[data-theme="fuchsiaLight"] .block-arrange-overlay,
body[data-theme="cyanLight"] .block-arrange-overlay,
body[data-theme="emeraldLight"] .block-arrange-overlay,
body[data-theme="violetLight"] .block-arrange-overlay {
	background: rgba(248, 250, 252, 0.94);
}
body[data-theme="coffeeLight"] .block-arrange-overlay {
	background: rgba(243, 235, 226, 0.95);
}
body[data-theme="bitterLight"] .block-arrange-overlay {
	background: rgba(239, 236, 234, 0.95);
}
body[data-theme="monoLight"] .block-arrange-overlay {
	background: rgba(238, 241, 245, 0.95);
}

body[data-theme="fuchsiaLight"] .block-arrange-header,
body[data-theme="cyanLight"] .block-arrange-header,
body[data-theme="emeraldLight"] .block-arrange-header,
body[data-theme="violetLight"] .block-arrange-header,
body[data-theme="coffeeLight"] .block-arrange-header,
body[data-theme="bitterLight"] .block-arrange-header,
body[data-theme="monoLight"] .block-arrange-header {
	background: rgba(0, 0, 0, 0.02);
	border-color: rgba(0, 0, 0, 0.08);
}

body[data-theme="fuchsiaLight"] .block-arrange-title,
body[data-theme="cyanLight"] .block-arrange-title,
body[data-theme="emeraldLight"] .block-arrange-title,
body[data-theme="violetLight"] .block-arrange-title,
body[data-theme="coffeeLight"] .block-arrange-title,
body[data-theme="bitterLight"] .block-arrange-title,
body[data-theme="monoLight"] .block-arrange-title {
	color: rgba(0, 0, 0, 0.9);
}

body[data-theme="fuchsiaLight"] .block-arrange-btn,
body[data-theme="cyanLight"] .block-arrange-btn,
body[data-theme="emeraldLight"] .block-arrange-btn,
body[data-theme="violetLight"] .block-arrange-btn,
body[data-theme="coffeeLight"] .block-arrange-btn,
body[data-theme="bitterLight"] .block-arrange-btn,
body[data-theme="monoLight"] .block-arrange-btn {
	background: rgba(0, 0, 0, 0.06);
	color: rgba(0, 0, 0, 0.7);
	border-color: rgba(0, 0, 0, 0.1);
}

body[data-theme="fuchsiaLight"] .block-arrange-btn:hover,
body[data-theme="cyanLight"] .block-arrange-btn:hover,
body[data-theme="emeraldLight"] .block-arrange-btn:hover,
body[data-theme="violetLight"] .block-arrange-btn:hover,
body[data-theme="coffeeLight"] .block-arrange-btn:hover,
body[data-theme="bitterLight"] .block-arrange-btn:hover,
body[data-theme="monoLight"] .block-arrange-btn:hover {
	background: rgba(0, 0, 0, 0.1);
	color: rgba(0, 0, 0, 0.9);
}

body[data-theme="fuchsiaLight"] .block-arrange-close,
body[data-theme="cyanLight"] .block-arrange-close,
body[data-theme="emeraldLight"] .block-arrange-close,
body[data-theme="violetLight"] .block-arrange-close,
body[data-theme="coffeeLight"] .block-arrange-close,
body[data-theme="bitterLight"] .block-arrange-close,
body[data-theme="monoLight"] .block-arrange-close {
	color: rgba(0, 0, 0, 0.5);
}

body[data-theme="fuchsiaLight"] .block-arrange-close:hover,
body[data-theme="cyanLight"] .block-arrange-close:hover,
body[data-theme="emeraldLight"] .block-arrange-close:hover,
body[data-theme="violetLight"] .block-arrange-close:hover,
body[data-theme="coffeeLight"] .block-arrange-close:hover,
body[data-theme="bitterLight"] .block-arrange-close:hover,
body[data-theme="monoLight"] .block-arrange-close:hover {
	background: rgba(0, 0, 0, 0.08);
	color: rgba(0, 0, 0, 0.8);
}

body[data-theme="fuchsiaLight"] .block-arrange-outline-label,
body[data-theme="cyanLight"] .block-arrange-outline-label,
body[data-theme="emeraldLight"] .block-arrange-outline-label,
body[data-theme="violetLight"] .block-arrange-outline-label,
body[data-theme="coffeeLight"] .block-arrange-outline-label,
body[data-theme="bitterLight"] .block-arrange-outline-label,
body[data-theme="monoLight"] .block-arrange-outline-label {
	color: rgba(0, 0, 0, 0.6);
}

body[data-theme="fuchsiaLight"] .block-arrange-outline-label input[type="checkbox"],
body[data-theme="cyanLight"] .block-arrange-outline-label input[type="checkbox"],
body[data-theme="emeraldLight"] .block-arrange-outline-label input[type="checkbox"],
body[data-theme="violetLight"] .block-arrange-outline-label input[type="checkbox"],
body[data-theme="coffeeLight"] .block-arrange-outline-label input[type="checkbox"],
body[data-theme="bitterLight"] .block-arrange-outline-label input[type="checkbox"],
body[data-theme="monoLight"] .block-arrange-outline-label input[type="checkbox"] {
	border-color: rgba(0, 0, 0, 0.25);
	background: rgba(0, 0, 0, 0.03);
}

body[data-theme="fuchsiaLight"] .block-arrange-hint,
body[data-theme="cyanLight"] .block-arrange-hint,
body[data-theme="emeraldLight"] .block-arrange-hint,
body[data-theme="violetLight"] .block-arrange-hint,
body[data-theme="coffeeLight"] .block-arrange-hint,
body[data-theme="bitterLight"] .block-arrange-hint,
body[data-theme="monoLight"] .block-arrange-hint {
	color: rgba(0, 0, 0, 0.45);
	background: rgba(0, 0, 0, 0.02);
	border-color: rgba(0, 0, 0, 0.05);
}

body[data-theme="fuchsiaLight"] .block-arrange-hint kbd,
body[data-theme="cyanLight"] .block-arrange-hint kbd,
body[data-theme="emeraldLight"] .block-arrange-hint kbd,
body[data-theme="violetLight"] .block-arrange-hint kbd,
body[data-theme="coffeeLight"] .block-arrange-hint kbd,
body[data-theme="bitterLight"] .block-arrange-hint kbd,
body[data-theme="monoLight"] .block-arrange-hint kbd {
	background: rgba(0, 0, 0, 0.06);
	border-color: rgba(0, 0, 0, 0.1);
}

body[data-theme="fuchsiaLight"] .block-arrange-item,
body[data-theme="cyanLight"] .block-arrange-item,
body[data-theme="emeraldLight"] .block-arrange-item,
body[data-theme="violetLight"] .block-arrange-item,
body[data-theme="coffeeLight"] .block-arrange-item,
body[data-theme="bitterLight"] .block-arrange-item,
body[data-theme="monoLight"] .block-arrange-item {
	background: rgba(0, 0, 0, 0.03);
	border-color: rgba(0, 0, 0, 0.08);
}

body[data-theme="fuchsiaLight"] .block-arrange-item:hover,
body[data-theme="cyanLight"] .block-arrange-item:hover,
body[data-theme="emeraldLight"] .block-arrange-item:hover,
body[data-theme="violetLight"] .block-arrange-item:hover,
body[data-theme="coffeeLight"] .block-arrange-item:hover,
body[data-theme="bitterLight"] .block-arrange-item:hover,
body[data-theme="monoLight"] .block-arrange-item:hover {
	background: rgba(0, 0, 0, 0.06);
	border-color: rgba(0, 0, 0, 0.12);
}

body[data-theme="fuchsiaLight"] .block-arrange-handle,
body[data-theme="cyanLight"] .block-arrange-handle,
body[data-theme="emeraldLight"] .block-arrange-handle,
body[data-theme="violetLight"] .block-arrange-handle,
body[data-theme="coffeeLight"] .block-arrange-handle,
body[data-theme="bitterLight"] .block-arrange-handle,
body[data-theme="monoLight"] .block-arrange-handle {
	color: rgba(0, 0, 0, 0.3);
}

body[data-theme="fuchsiaLight"] .block-arrange-item:hover .block-arrange-handle,
body[data-theme="cyanLight"] .block-arrange-item:hover .block-arrange-handle,
body[data-theme="emeraldLight"] .block-arrange-item:hover .block-arrange-handle,
body[data-theme="violetLight"] .block-arrange-item:hover .block-arrange-handle,
body[data-theme="coffeeLight"] .block-arrange-item:hover .block-arrange-handle,
body[data-theme="bitterLight"] .block-arrange-item:hover .block-arrange-handle,
body[data-theme="monoLight"] .block-arrange-item:hover .block-arrange-handle {
	color: rgba(0, 0, 0, 0.5);
}

body[data-theme="fuchsiaLight"] .block-arrange-preview,
body[data-theme="cyanLight"] .block-arrange-preview,
body[data-theme="emeraldLight"] .block-arrange-preview,
body[data-theme="violetLight"] .block-arrange-preview,
body[data-theme="coffeeLight"] .block-arrange-preview,
body[data-theme="bitterLight"] .block-arrange-preview,
body[data-theme="monoLight"] .block-arrange-preview {
	color: rgba(0, 0, 0, 0.8);
}

body[data-theme="fuchsiaLight"] .block-arrange-preview code,
body[data-theme="cyanLight"] .block-arrange-preview code,
body[data-theme="emeraldLight"] .block-arrange-preview code,
body[data-theme="violetLight"] .block-arrange-preview code,
body[data-theme="coffeeLight"] .block-arrange-preview code,
body[data-theme="bitterLight"] .block-arrange-preview code,
body[data-theme="monoLight"] .block-arrange-preview code {
	background: rgba(0, 0, 0, 0.06);
}

body[data-theme="fuchsiaLight"] .block-arrange-empty,
body[data-theme="cyanLight"] .block-arrange-empty,
body[data-theme="emeraldLight"] .block-arrange-empty,
body[data-theme="violetLight"] .block-arrange-empty,
body[data-theme="coffeeLight"] .block-arrange-empty,
body[data-theme="bitterLight"] .block-arrange-empty,
body[data-theme="monoLight"] .block-arrange-empty {
	color: rgba(0, 0, 0, 0.4);
}

body[data-theme="fuchsiaLight"] .block-arrange-footer,
body[data-theme="cyanLight"] .block-arrange-footer,
body[data-theme="emeraldLight"] .block-arrange-footer,
body[data-theme="violetLight"] .block-arrange-footer,
body[data-theme="coffeeLight"] .block-arrange-footer,
body[data-theme="bitterLight"] .block-arrange-footer,
body[data-theme="monoLight"] .block-arrange-footer {
	background: rgba(0, 0, 0, 0.02);
	border-color: rgba(0, 0, 0, 0.08);
}

/* ── Light Theme Badge Colors (darker for contrast) ── */
body[data-theme="fuchsiaLight"] .block-arrange-badge[data-type="h1"],
body[data-theme="cyanLight"] .block-arrange-badge[data-type="h1"],
body[data-theme="emeraldLight"] .block-arrange-badge[data-type="h1"],
body[data-theme="violetLight"] .block-arrange-badge[data-type="h1"],
body[data-theme="coffeeLight"] .block-arrange-badge[data-type="h1"],
body[data-theme="bitterLight"] .block-arrange-badge[data-type="h1"],
body[data-theme="monoLight"] .block-arrange-badge[data-type="h1"] {
	background: rgba(239, 68, 68, 0.15);
	color: #dc2626;
}

body[data-theme="fuchsiaLight"] .block-arrange-badge[data-type="h2"],
body[data-theme="cyanLight"] .block-arrange-badge[data-type="h2"],
body[data-theme="emeraldLight"] .block-arrange-badge[data-type="h2"],
body[data-theme="violetLight"] .block-arrange-badge[data-type="h2"],
body[data-theme="coffeeLight"] .block-arrange-badge[data-type="h2"],
body[data-theme="bitterLight"] .block-arrange-badge[data-type="h2"],
body[data-theme="monoLight"] .block-arrange-badge[data-type="h2"] {
	background: rgba(249, 115, 22, 0.15);
	color: #ea580c;
}

body[data-theme="fuchsiaLight"] .block-arrange-badge[data-type="h3"],
body[data-theme="cyanLight"] .block-arrange-badge[data-type="h3"],
body[data-theme="emeraldLight"] .block-arrange-badge[data-type="h3"],
body[data-theme="violetLight"] .block-arrange-badge[data-type="h3"],
body[data-theme="coffeeLight"] .block-arrange-badge[data-type="h3"],
body[data-theme="bitterLight"] .block-arrange-badge[data-type="h3"],
body[data-theme="monoLight"] .block-arrange-badge[data-type="h3"] {
	background: rgba(202, 138, 4, 0.15);
	color: #b45309;
}

body[data-theme="fuchsiaLight"] .block-arrange-badge[data-type="h4"],
body[data-theme="cyanLight"] .block-arrange-badge[data-type="h4"],
body[data-theme="emeraldLight"] .block-arrange-badge[data-type="h4"],
body[data-theme="violetLight"] .block-arrange-badge[data-type="h4"],
body[data-theme="coffeeLight"] .block-arrange-badge[data-type="h4"],
body[data-theme="bitterLight"] .block-arrange-badge[data-type="h4"],
body[data-theme="monoLight"] .block-arrange-badge[data-type="h4"] {
	background: rgba(34, 197, 94, 0.15);
	color: #16a34a;
}

body[data-theme="fuchsiaLight"] .block-arrange-badge[data-type="h5"],
body[data-theme="cyanLight"] .block-arrange-badge[data-type="h5"],
body[data-theme="emeraldLight"] .block-arrange-badge[data-type="h5"],
body[data-theme="violetLight"] .block-arrange-badge[data-type="h5"],
body[data-theme="coffeeLight"] .block-arrange-badge[data-type="h5"],
body[data-theme="bitterLight"] .block-arrange-badge[data-type="h5"],
body[data-theme="monoLight"] .block-arrange-badge[data-type="h5"] {
	background: rgba(6, 182, 212, 0.15);
	color: #0891b2;
}

body[data-theme="fuchsiaLight"] .block-arrange-badge[data-type="h6"],
body[data-theme="cyanLight"] .block-arrange-badge[data-type="h6"],
body[data-theme="emeraldLight"] .block-arrange-badge[data-type="h6"],
body[data-theme="violetLight"] .block-arrange-badge[data-type="h6"],
body[data-theme="coffeeLight"] .block-arrange-badge[data-type="h6"],
body[data-theme="bitterLight"] .block-arrange-badge[data-type="h6"],
body[data-theme="monoLight"] .block-arrange-badge[data-type="h6"] {
	background: rgba(99, 102, 241, 0.15);
	color: #4f46e5;
}

body[data-theme="fuchsiaLight"] .block-arrange-badge[data-type="code"],
body[data-theme="cyanLight"] .block-arrange-badge[data-type="code"],
body[data-theme="emeraldLight"] .block-arrange-badge[data-type="code"],
body[data-theme="violetLight"] .block-arrange-badge[data-type="code"],
body[data-theme="coffeeLight"] .block-arrange-badge[data-type="code"],
body[data-theme="bitterLight"] .block-arrange-badge[data-type="code"],
body[data-theme="monoLight"] .block-arrange-badge[data-type="code"] {
	background: rgba(168, 85, 247, 0.15);
	color: #7c3aed;
}

body[data-theme="fuchsiaLight"] .block-arrange-badge[data-type="list"],
body[data-theme="cyanLight"] .block-arrange-badge[data-type="list"],
body[data-theme="emeraldLight"] .block-arrange-badge[data-type="list"],
body[data-theme="violetLight"] .block-arrange-badge[data-type="list"],
body[data-theme="coffeeLight"] .block-arrange-badge[data-type="list"],
body[data-theme="bitterLight"] .block-arrange-badge[data-type="list"],
body[data-theme="monoLight"] .block-arrange-badge[data-type="list"] {
	background: rgba(236, 72, 153, 0.15);
	color: #db2777;
}

body[data-theme="fuchsiaLight"] .block-arrange-badge[data-type="table"],
body[data-theme="cyanLight"] .block-arrange-badge[data-type="table"],
body[data-theme="emeraldLight"] .block-arrange-badge[data-type="table"],
body[data-theme="violetLight"] .block-arrange-badge[data-type="table"],
body[data-theme="coffeeLight"] .block-arrange-badge[data-type="table"],
body[data-theme="bitterLight"] .block-arrange-badge[data-type="table"],
body[data-theme="monoLight"] .block-arrange-badge[data-type="table"] {
	background: rgba(20, 184, 166, 0.15);
	color: #0d9488;
}

body[data-theme="fuchsiaLight"] .block-arrange-badge[data-type="quote"],
body[data-theme="cyanLight"] .block-arrange-badge[data-type="quote"],
body[data-theme="emeraldLight"] .block-arrange-badge[data-type="quote"],
body[data-theme="violetLight"] .block-arrange-badge[data-type="quote"],
body[data-theme="coffeeLight"] .block-arrange-badge[data-type="quote"],
body[data-theme="bitterLight"] .block-arrange-badge[data-type="quote"],
body[data-theme="monoLight"] .block-arrange-badge[data-type="quote"] {
	background: rgba(107, 114, 128, 0.15);
	color: #4b5563;
}

body[data-theme="fuchsiaLight"] .block-arrange-badge[data-type="hr"],
body[data-theme="cyanLight"] .block-arrange-badge[data-type="hr"],
body[data-theme="emeraldLight"] .block-arrange-badge[data-type="hr"],
body[data-theme="violetLight"] .block-arrange-badge[data-type="hr"],
body[data-theme="coffeeLight"] .block-arrange-badge[data-type="hr"],
body[data-theme="bitterLight"] .block-arrange-badge[data-type="hr"],
body[data-theme="monoLight"] .block-arrange-badge[data-type="hr"] {
	background: rgba(107, 114, 128, 0.12);
	color: #6b7280;
}

body[data-theme="fuchsiaLight"] .block-arrange-badge[data-type="paragraph"],
body[data-theme="cyanLight"] .block-arrange-badge[data-type="paragraph"],
body[data-theme="emeraldLight"] .block-arrange-badge[data-type="paragraph"],
body[data-theme="violetLight"] .block-arrange-badge[data-type="paragraph"],
body[data-theme="coffeeLight"] .block-arrange-badge[data-type="paragraph"],
body[data-theme="bitterLight"] .block-arrange-badge[data-type="paragraph"],
body[data-theme="monoLight"] .block-arrange-badge[data-type="paragraph"] {
	background: rgba(0, 0, 0, 0.06);
	color: rgba(0, 0, 0, 0.55);
}

/* ── Mono Theme Specific ── */
body[data-theme="monoLight"] .block-arrange-btn-primary {
	background: #24292f;
	color: #ffffff;
}

body[data-theme="monoDark"] .block-arrange-btn-primary {
	background: #f0f6fc;
	color: #0d1117;
}

body[data-theme="monoDark"] .block-arrange-overlay {
	background: rgba(13, 17, 23, 0.92);
}

body[data-theme="monoDark"] .block-arrange-item.selected,
body[data-theme="monoLight"] .block-arrange-item.selected {
	background: rgba(110, 118, 129, 0.15);
	border-color: #6e7681;
}

body[data-theme="monoDark"] .block-arrange-item:focus-visible,
body[data-theme="monoLight"] .block-arrange-item:focus-visible {
	outline-color: #6e7681;
}

body[data-theme="monoDark"] .block-arrange-drop-zone,
body[data-theme="monoLight"] .block-arrange-drop-zone {
	background: #6e7681;
	box-shadow: 0 0 8px #6e7681;
}

/* ── Mobile Adjustments ── */
@media (max-width: 640px) {
	.block-arrange-header {
		padding: 0.75rem 1rem;
		flex-wrap: wrap;
		gap: 0.5rem;
	}

	.block-arrange-title {
		font-size: 1rem;
	}

	.block-arrange-toolbar {
		order: 3;
		width: 100%;
		justify-content: space-between;
	}

	.block-arrange-hint {
		display: none;
	}

	.block-arrange-list {
		padding: 0.75rem 1rem;
	}

	.block-arrange-item {
		padding: 0.625rem 0.75rem;
	}

	.block-arrange-badge {
		font-size: 0.625rem;
		padding: 0.125rem 0.375rem;
	}

	.block-arrange-preview {
		font-size: 0.8125rem;
	}

	.block-arrange-footer {
		padding: 0.75rem 1rem;
	}

	.block-arrange-btn {
		padding: 0.5rem 0.75rem;
		font-size: 0.75rem;
	}
}

/* ── Settings: borderless clean look ── */
/* Remove borders from settings nav buttons */
#settingsNav > button[data-settings-nav] {
	border: none;
}

/* Remove borders from content containers inside settings sections */
[data-settings-section] > .rounded-xl {
	border: none;
}

/* Remove borders from inner sub-containers (e.g. linear projects panel) */
[data-settings-section] .rounded-lg[class*="border-white"] {
	border: none;
}

/* Remove borders from action buttons inside settings sections */
[data-settings-section] button.rounded-lg {
	border: none;
}

/* Remove border from glow toggle row in themes section */
[data-settings-section="themes"] .rounded-lg {
	border: none;
}

/* ── Common Free Slots (Availability) ── */
#calendarCommonFreeSlotsWrap .common-slot-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
}
#calendarCommonFreeSlotsWrap .common-slot-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	border-radius: 9999px;
	padding: 0.125rem 0.375rem;
	font-size: 10px;
	line-height: 1.2;
	white-space: nowrap;
}
#calendarCommonFreeSlotsWrap .common-slot-badge--all {
	background: rgba(74, 222, 128, 0.12);
	color: #4ade80;
}
#calendarCommonFreeSlotsWrap .common-slot-badge--partial {
	background: rgba(251, 191, 36, 0.12);
	color: #fbbf24;
}
/* ── Common Slot Card (2-line: date top, time below) ── */
#calendarCommonFreeSlotsWrap .common-slot-card {
	display: flex;
	flex-direction: column;
	gap: 1px;
	padding: 5px 4px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.04);
	font-size: 11px;
}
#calendarCommonFreeSlotsWrap .common-slot-card:last-child {
	border-bottom: none;
}
#calendarCommonFreeSlotsWrap .common-slot-card--nav {
	cursor: pointer;
	border-radius: 4px;
	transition: background 0.15s;
}
#calendarCommonFreeSlotsWrap .common-slot-card--nav:hover {
	background: rgba(255, 255, 255, 0.04);
}
#calendarCommonFreeSlotsWrap .common-slot-card__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
}
#calendarCommonFreeSlotsWrap .common-slot-date {
	color: #94a3b8;
	font-weight: 500;
	white-space: nowrap;
}
#calendarCommonFreeSlotsWrap .common-slot-time {
	color: #64748b;
	font-size: 10px;
}
#calendarCommonFreeSlotsWrap .common-slot-chip {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	border-radius: 9999px;
	padding: 0.125rem 0.5rem;
	font-size: 10px;
	line-height: 1.2;
	border: 1px solid rgba(255, 255, 255, 0.08);
	background: rgba(255, 255, 255, 0.04);
}
#calendarCommonFreeSlotsWrap .common-slot-chip .chip-dot {
	display: inline-block;
	width: 6px;
	height: 6px;
	border-radius: 50%;
}
#calendarCommonFreeToggle[aria-pressed="true"] {
	background: rgba(255, 255, 255, 0.1);
	color: #f1f5f9;
}

/* ── Common days section ── */
.common-days-section {
	padding-bottom: 0.5rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.common-day-chip {
	display: inline-block;
	padding: 0.125rem 0.375rem;
	border-radius: 4px;
	font-size: 10px;
	background: var(--accent-bg);
	color: var(--accent-text-soft);
	border: 1px solid var(--accent-border-strong);
}

/* ── Participants Days Overview Grid ── */
.participants-days-overview {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}
.participant-row {
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.06);
	border-radius: 8px;
	padding: 0.625rem;
}
.participant-header {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0.5rem;
}
.participant-header .chip-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	flex-shrink: 0;
}
.participant-name {
	font-size: 11px;
	font-weight: 500;
	color: #e2e8f0;
}
.participant-self-badge {
	font-size: 9px;
	color: #64748b;
	margin-left: 0.25rem;
}
/* Sync status icons next to self badge */
.sync-icon {
	font-size: 11px;
	margin-left: 0.25rem;
	display: inline-block;
}
.sync-icon--synced {
	color: #10b981; /* green */
}
.sync-icon--pending {
	color: #f59e0b; /* amber */
	animation: spin 1s linear infinite;
}
.sync-icon--offline {
	color: #ef4444; /* red */
}
@keyframes spin {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}
.participant-count {
	font-size: 9px;
	color: #64748b;
	margin-left: auto;
}
.participant-no-days {
	font-size: 10px;
	color: #64748b;
	font-style: italic;
}

/* Light theme overrides for participants overview */
body[data-theme="coffeeLight"] .participant-row,
body[data-theme="bitterLight"] .participant-row,
body[data-theme="monoLight"] .participant-row {
	background: rgba(0, 0, 0, 0.02);
	border-color: rgba(0, 0, 0, 0.08);
}
body[data-theme="coffeeLight"] .participant-name,
body[data-theme="bitterLight"] .participant-name,
body[data-theme="monoLight"] .participant-name {
	color: var(--dropdown-text);
}

/* ── Participant days grid layout ── */
.participant-days-row {
	padding: 0.25rem 0;
}
.participant-days-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
}
.participant-day-chip {
	display: inline-block;
	padding: 0.125rem 0.375rem;
	border-radius: 4px;
	font-size: 10px;
	background: rgba(255, 255, 255, 0.06);
	color: #94a3b8;
	border: 1px solid rgba(255, 255, 255, 0.1);
	white-space: nowrap;
}
.participant-day-chip--clickable {
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.participant-day-chip--clickable:hover {
	background: rgba(59, 130, 246, 0.2);
	border-color: rgba(59, 130, 246, 0.4);
	color: #93c5fd;
}
.participant-day-chip--clickable:active {
	transform: scale(0.96);
}
/* Gemeinsame Tage - Akzentfarben-Hervorhebung */
.participant-day-chip--common {
	background: var(--accent-bg);
	border-color: var(--accent-border-strong);
	color: var(--accent-text-soft);
}
.participant-day-chip--common:hover {
	background: var(--accent-bg-hover);
	border-color: var(--accent-border-strong);
	color: var(--accent-text);
}
.participant-day-chip--more {
	background: rgba(255, 255, 255, 0.03);
	color: #64748b;
	font-style: italic;
}
.participant-day-count {
	font-size: 9px;
	color: #64748b;
	margin-left: auto;
}

/* ── Light theme overrides for participant days ── */
body[data-theme="coffeeLight"] .participant-day-chip,
body[data-theme="bitterLight"] .participant-day-chip,
body[data-theme="monoLight"] .participant-day-chip {
	background: rgba(0, 0, 0, 0.05);
	color: var(--dropdown-text);
	border-color: rgba(0, 0, 0, 0.1);
}
body[data-theme="coffeeLight"] .participant-day-chip--clickable:hover,
body[data-theme="bitterLight"] .participant-day-chip--clickable:hover,
body[data-theme="monoLight"] .participant-day-chip--clickable:hover {
	background: rgba(59, 130, 246, 0.15);
	border-color: rgba(59, 130, 246, 0.35);
	color: #2563eb;
}
body[data-theme="coffeeLight"] .participant-day-chip--common,
body[data-theme="bitterLight"] .participant-day-chip--common,
body[data-theme="monoLight"] .participant-day-chip--common {
	background: var(--accent-bg);
	border-color: var(--accent-border-strong);
	color: var(--accent-text-soft);
}
body[data-theme="coffeeLight"] .participant-day-chip--common:hover,
body[data-theme="bitterLight"] .participant-day-chip--common:hover,
body[data-theme="monoLight"] .participant-day-chip--common:hover {
	background: var(--accent-bg-hover);
	border-color: var(--accent-border-strong);
	color: var(--accent-text);
}

/* ── Light theme overrides for Gemeinsame Planung section ── */
body[data-theme="coffeeLight"] #calendarCommonFreeSlotsWrap,
body[data-theme="bitterLight"] #calendarCommonFreeSlotsWrap,
body[data-theme="monoLight"] #calendarCommonFreeSlotsWrap {
	color: var(--dropdown-text);
}
body[data-theme="coffeeLight"] #calendarCommonFreeSlotsWrap .common-slot-date,
body[data-theme="bitterLight"] #calendarCommonFreeSlotsWrap .common-slot-date,
body[data-theme="monoLight"] #calendarCommonFreeSlotsWrap .common-slot-date {
	color: var(--dropdown-text);
}
body[data-theme="coffeeLight"] #calendarCommonFreeSlotsWrap .common-slot-time,
body[data-theme="bitterLight"] #calendarCommonFreeSlotsWrap .common-slot-time,
body[data-theme="monoLight"] #calendarCommonFreeSlotsWrap .common-slot-time {
	color: var(--dropdown-text);
	opacity: 0.7;
}
body[data-theme="coffeeLight"] #calendarCommonFreeSlotsWrap .common-slot-chip,
body[data-theme="bitterLight"] #calendarCommonFreeSlotsWrap .common-slot-chip,
body[data-theme="monoLight"] #calendarCommonFreeSlotsWrap .common-slot-chip {
	border-color: rgba(0, 0, 0, 0.12);
	background: rgba(0, 0, 0, 0.04);
	color: var(--dropdown-text);
}
body[data-theme="coffeeLight"] #calendarCommonFreeSlotsWrap .common-slot-card,
body[data-theme="bitterLight"] #calendarCommonFreeSlotsWrap .common-slot-card,
body[data-theme="monoLight"] #calendarCommonFreeSlotsWrap .common-slot-card {
	border-bottom-color: rgba(0, 0, 0, 0.06);
}
body[data-theme="coffeeLight"] #calendarCommonFreeSlotsWrap .common-slot-card--nav:hover,
body[data-theme="bitterLight"] #calendarCommonFreeSlotsWrap .common-slot-card--nav:hover,
body[data-theme="monoLight"] #calendarCommonFreeSlotsWrap .common-slot-card--nav:hover {
	background: rgba(0, 0, 0, 0.04);
}
body[data-theme="coffeeLight"] .common-days-section,
body[data-theme="bitterLight"] .common-days-section,
body[data-theme="monoLight"] .common-days-section {
	border-bottom-color: rgba(0, 0, 0, 0.08);
}
body[data-theme="coffeeLight"] .common-day-chip,
body[data-theme="bitterLight"] .common-day-chip,
body[data-theme="monoLight"] .common-day-chip {
	background: rgba(16, 185, 129, 0.12);
	color: #059669;
	border-color: rgba(16, 185, 129, 0.4);
}
body[data-theme="coffeeLight"] #calendarCommonFreeParticipants,
body[data-theme="bitterLight"] #calendarCommonFreeParticipants,
body[data-theme="monoLight"] #calendarCommonFreeParticipants {
	color: var(--dropdown-text);
}
body[data-theme="coffeeLight"] #calendarCommonFreeSlots,
body[data-theme="bitterLight"] #calendarCommonFreeSlots,
body[data-theme="monoLight"] #calendarCommonFreeSlots {
	color: var(--dropdown-text);
}
/* Sidebar header and card head for light themes */
body[data-theme="coffeeLight"] .cal-sidebar-header,
body[data-theme="bitterLight"] .cal-sidebar-header,
body[data-theme="monoLight"] .cal-sidebar-header {
	color: var(--dropdown-text);
}
body[data-theme="coffeeLight"] .cal-card-head,
body[data-theme="bitterLight"] .cal-card-head,
body[data-theme="monoLight"] .cal-card-head {
	color: var(--dropdown-text);
}
body[data-theme="coffeeLight"] .cal-card-hint,
body[data-theme="bitterLight"] .cal-card-hint,
body[data-theme="monoLight"] .cal-card-hint {
	color: var(--dropdown-text);
	opacity: 0.6;
}
body[data-theme="coffeeLight"] .cal-card-subtitle,
body[data-theme="bitterLight"] .cal-card-subtitle,
body[data-theme="monoLight"] .cal-card-subtitle {
	color: var(--dropdown-text);
	opacity: 0.6;
}
body[data-theme="coffeeLight"] .cal-sidebar-divider,
body[data-theme="bitterLight"] .cal-sidebar-divider,
body[data-theme="monoLight"] .cal-sidebar-divider {
	background: linear-gradient(
		90deg,
		transparent 0%,
		rgba(0, 0, 0, 0.1) 20%,
		rgba(0, 0, 0, 0.1) 80%,
		transparent 100%
	);
}
body[data-theme="coffeeLight"] .cal-room-label,
body[data-theme="bitterLight"] .cal-room-label,
body[data-theme="monoLight"] .cal-room-label {
	color: var(--dropdown-text);
}
/* Light theme: Calendar source list text colors */
body[data-theme="coffeeLight"] .cal-source-name,
body[data-theme="bitterLight"] .cal-source-name,
body[data-theme="monoLight"] .cal-source-name {
	color: var(--dropdown-text);
}
body[data-theme="coffeeLight"] .cal-source-row:hover .cal-source-name,
body[data-theme="bitterLight"] .cal-source-row:hover .cal-source-name,
body[data-theme="monoLight"] .cal-source-row:hover .cal-source-name {
	color: var(--dropdown-text-hover);
}
body[data-theme="coffeeLight"] .cal-source-badge,
body[data-theme="bitterLight"] .cal-source-badge,
body[data-theme="monoLight"] .cal-source-badge {
	color: var(--dropdown-text);
	opacity: 0.7;
}
body[data-theme="coffeeLight"] .cal-source-row:hover,
body[data-theme="bitterLight"] .cal-source-row:hover,
body[data-theme="monoLight"] .cal-source-row:hover {
	background: rgba(0, 0, 0, 0.04);
}
body[data-theme="coffeeLight"] .cal-source-row:active,
body[data-theme="bitterLight"] .cal-source-row:active,
body[data-theme="monoLight"] .cal-source-row:active {
	background: rgba(0, 0, 0, 0.06);
}
body[data-theme="coffeeLight"] .cal-source-toggle,
body[data-theme="bitterLight"] .cal-source-toggle,
body[data-theme="monoLight"] .cal-source-toggle {
	border-color: rgba(100, 116, 139, 0.4);
}
body[data-theme="coffeeLight"] .cal-source-toggle--checked,
body[data-theme="bitterLight"] .cal-source-toggle--checked,
body[data-theme="monoLight"] .cal-source-toggle--checked {
	border-color: rgba(100, 116, 139, 0.6);
	background: rgba(0, 0, 0, 0.06);
}
body[data-theme="coffeeLight"] .cal-source-check,
body[data-theme="bitterLight"] .cal-source-check,
body[data-theme="monoLight"] .cal-source-check {
	color: rgba(71, 85, 105, 0.9);
}

/* ── Participant indicators in calendar grid cells ── */
.participant-indicators {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	flex-wrap: nowrap;
	flex-shrink: 0;
}
.participant-dot {
	display: inline-block;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.2);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.participant-dot:hover {
	transform: scale(1.2);
	box-shadow: 0 0 4px rgba(255, 255, 255, 0.3);
}
.participant-badge {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	border-radius: 9999px;
	padding: 1px 5px;
	font-size: 9px;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
}
.participant-badge--all {
	background: var(--accent-bg);
	color: var(--accent-text);
	border: 1px solid var(--accent-border-strong);
}
.participant-badge--partial {
	background: rgba(251, 191, 36, 0.15);
	color: #fbbf24;
	border: 1px solid rgba(251, 191, 36, 0.3);
}
/* Highlight day cells where all participants are available */
.calendar-day-cell:has(.participant-badge--all) {
	background: var(--accent-bg);
}
.calendar-day-cell:has(.participant-badge--partial) {
	background: rgba(251, 191, 36, 0.03);
}
/* Light theme overrides for participant indicators */
body[data-theme="coffeeLight"] .participant-dot,
body[data-theme="bitterLight"] .participant-dot,
body[data-theme="monoLight"] .participant-dot {
	border-color: rgba(0, 0, 0, 0.15);
}
body[data-theme="coffeeLight"] .participant-dot:hover,
body[data-theme="bitterLight"] .participant-dot:hover,
body[data-theme="monoLight"] .participant-dot:hover {
	box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
}
body[data-theme="coffeeLight"] .participant-badge--all,
body[data-theme="bitterLight"] .participant-badge--all,
body[data-theme="monoLight"] .participant-badge--all {
	background: var(--accent-bg);
	color: var(--accent-text);
	border-color: var(--accent-border-strong);
}
body[data-theme="coffeeLight"] .participant-badge--partial,
body[data-theme="bitterLight"] .participant-badge--partial,
body[data-theme="monoLight"] .participant-badge--partial {
	background: rgba(245, 158, 11, 0.12);
	color: #b45309;
	border-color: rgba(245, 158, 11, 0.4);
}

/* ── Calendar Header (compact single-row) ── */
.cal-header {
	container-type: inline-size;
}
@container (max-width: 600px) {
	.cal-header > div {
		flex-wrap: wrap;
		gap: 0.375rem;
	}
	.cal-header #calendarTitle {
		display: none;
	}
	.cal-header #calendarWeekLabel {
		font-size: 11px;
	}
}
@container (max-width: 420px) {
	.cal-header > div {
		flex-wrap: wrap;
		gap: 0.25rem;
	}
	/* Navigation auf eigene Zeile, rechte Controls daneben */
	.cal-header > div > div:first-child {
		flex: 1 1 100%;
	}
	.cal-header > div > div:last-child {
		flex: 1 1 100%;
		justify-content: flex-end;
	}
}
/* Mobile fallback: disable container-type to avoid WebKit containment bugs */
@media (max-width: 1023px) {
	.cal-header {
		container-type: normal;
	}
	/* Replicate container queries via media queries on mobile */
	.cal-header > div {
		flex-wrap: wrap;
		gap: 0.375rem;
	}
	.cal-header #calendarTitle {
		display: none;
	}
}
@media (max-width: 420px) {
	.cal-header > div > div:first-child {
		flex: 1 1 100%;
	}
	.cal-header > div > div:last-child {
		flex: 1 1 100%;
		justify-content: flex-end;
	}
}
#calendarViewDropdownMenu {
	pointer-events: auto;
	background-color: var(--selection-menu-bg);
	border-color: var(--selection-menu-border);
	box-shadow: var(--dropdown-shadow);
	-webkit-tap-highlight-color: transparent;
}
#calendarViewDropdownMenu button {
	color: var(--dropdown-text);
}
#calendarViewDropdownMenu button:hover {
	background-color: var(--dropdown-hover-bg);
	color: var(--dropdown-text-hover);
}
#calendarViewDropdownMenu button[aria-current="true"] {
	background-color: var(--dropdown-accent-bg);
	color: var(--dropdown-text-hover);
}
.cal-header-add-btn {
	background-color: var(--accent-strong);
	color: var(--accent-text);
}
.cal-header-add-btn:hover {
	background-color: var(--accent-strong-hover);
}
.cal-header-add-btn:active {
	background-color: var(--accent-strong-active);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Calendar Mode Tabs - Personal / Planning Mode Toggle
   ═══════════════════════════════════════════════════════════════════════════ */
.cal-mode-tabs {
	display: flex;
	gap: 0.5rem;
	padding: 0;
	background: transparent;
	border-radius: 0;
	border: none;
	margin-bottom: 0.75rem;
}

.cal-mode-tab {
	flex: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.5rem 0.75rem;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 0.5rem;
	background: rgba(2, 6, 23, 0.4);
	color: #e2e8f0;
	font-size: 0.75rem;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.15s ease;
}

.cal-mode-tab:hover:not(.cal-mode-tab--active) {
	background: rgba(255, 255, 255, 0.1);
	color: #f1f5f9;
}

.cal-mode-tab--active {
	border-color: var(--accent-border-strong, rgba(232, 121, 249, 0.4));
	background: var(--accent-bg, rgba(217, 70, 239, 0.15));
	color: #e2e8f0;
	box-shadow: none;
}

.cal-mode-tab--active[data-calendar-mode="planning"] {
	border-color: var(--accent-border-strong, rgba(232, 121, 249, 0.4));
	background: var(--accent-bg, rgba(217, 70, 239, 0.15));
	color: #e2e8f0;
	box-shadow: none;
}

.cal-mode-tab-icon {
	width: 1rem;
	height: 1rem;
	flex-shrink: 0;
	opacity: 0.7;
}

.cal-mode-tab--active .cal-mode-tab-icon {
	opacity: 1;
}

/* Sidebar-specific tabs styling */
.cal-mode-tabs--sidebar {
	flex-direction: row;
	gap: 0.375rem;
	margin-bottom: 0.5rem;
	margin-right: 2.25rem; /* Platz für Toggle-Button */
	padding-bottom: 0.75rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cal-mode-tabs--sidebar .cal-mode-tab {
	flex: 1;
	justify-content: center;
	padding: 0.25rem 0.375rem;
	font-size: 0.625rem;
	min-width: 0;
	overflow: hidden;
}

.cal-mode-tabs--sidebar .cal-mode-tab span {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.cal-mode-tabs--sidebar .cal-mode-tab-icon {
	width: 0.75rem;
	height: 0.75rem;
	flex-shrink: 0;
}

/* Hide personal tab when no PS auth */
body[data-ps-authed="false"] #calendarModeTabPersonal {
	display: none;
}

/* Hide settings button in planning mode */
body[data-calendar-mode="planning"] #calendarOpenSettings {
	display: none;
}

/* Mode-based section visibility */
[data-calendar-section="personal"] {
	display: block;
}

[data-calendar-section="planning"] {
	display: none;
}

body[data-calendar-mode="planning"] [data-calendar-section="personal"] {
	display: none;
}

body[data-calendar-mode="planning"] [data-calendar-section="planning"] {
	display: block;
}

/* Planning mode indicator on grid */
body[data-calendar-mode="planning"] #calendarGrid {
	border-color: var(--accent-border, rgba(16, 185, 129, 0.2));
}

/* ═══ Wizard UI for Planning Mode ═══ */
.cal-wizard {
	flex-direction: column;
	gap: 0;
}

body[data-calendar-mode="planning"] .cal-wizard {
	display: flex;
}

.cal-wizard-step {
	padding: 0.75rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.cal-wizard-step:last-child {
	border-bottom: none;
}

.cal-wizard-step-header {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0.5rem;
}

.cal-wizard-step-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.25rem;
	height: 1.25rem;
	font-size: 0.6875rem;
	font-weight: 600;
	color: var(--accent-text-soft, #10b981);
	background: var(--accent-bg-soft, rgba(16, 185, 129, 0.15));
	border-radius: 50%;
	flex-shrink: 0;
}

.cal-wizard-step-title {
	font-size: 0.6875rem;
	font-weight: 600;
	color: #e2e8f0;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	flex: 1;
}

.cal-wizard-hint {
	font-size: 0.625rem;
	color: #64748b;
	margin: 0 0 0.5rem 1.75rem;
}

.cal-wizard-step-content {
	margin-left: 0;
}

.cal-wizard-selections {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	max-height: 8rem;
	overflow-y: auto;
}

.cal-wizard-empty {
	font-size: 0.6875rem;
	color: #475569;
	font-style: italic;
}

.cal-wizard-participants {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
	margin-bottom: 0.5rem;
}

.cal-wizard-slots {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	font-size: 0.6875rem;
	color: #cbd5e1;
}

.cal-wizard-waiting {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem;
	background: rgba(100, 116, 139, 0.1);
	border-radius: 0.375rem;
	font-size: 0.6875rem;
	color: #64748b;
}

.cal-wizard-waiting-icon {
	width: 1rem;
	height: 1rem;
	opacity: 0.6;
}

.cal-wizard-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.25rem;
	height: 1.25rem;
	padding: 0;
	margin-left: auto;
	background: transparent;
	border: none;
	border-radius: 50%;
	color: #64748b;
	cursor: pointer;
	transition: color 0.15s;
}

.cal-wizard-toggle:hover {
	color: #94a3b8;
}

.cal-wizard-actions {
	margin-top: 0.5rem;
	padding-top: 0.5rem;
	border-top: 1px dashed rgba(255, 255, 255, 0.06);
}

/* Light theme adjustments */
body[data-theme="coffeeLight"] .cal-mode-tab {
	background: rgba(0, 0, 0, 0.04) !important;
	border-color: rgba(176, 112, 73, 0.3) !important;
	color: #5d4037 !important;
}

body[data-theme="coffeeLight"] .cal-mode-tab--active {
	border-color: #b07049 !important;
	background: rgba(176, 112, 73, 0.15) !important;
	color: #5d4037 !important;
}

body[data-theme="bitterLight"] .cal-mode-tab {
	background: rgba(0, 0, 0, 0.04) !important;
	border-color: rgba(255, 35, 1, 0.3) !important;
	color: #7f1d1d !important;
}

body[data-theme="bitterLight"] .cal-mode-tab--active {
	border-color: rgba(255, 35, 1, 0.5) !important;
	background: rgba(255, 35, 1, 0.12) !important;
	color: #7f1d1d !important;
}

body[data-theme="monoLight"] .cal-mode-tab {
	background: rgba(0, 0, 0, 0.04) !important;
	border-color: rgba(0, 121, 212, 0.3) !important;
	color: #1e3a5f !important;
}

body[data-theme="monoLight"] .cal-mode-tab--active {
	border-color: rgba(0, 121, 212, 0.5) !important;
	background: rgba(0, 121, 212, 0.12) !important;
	color: #1e3a5f !important;
}

/* Dark theme adjustments */
body[data-theme="coffeeDark"] .cal-mode-tab {
	background: rgba(24, 18, 14, 0.4) !important;
	border-color: rgba(201, 155, 119, 0.3) !important;
	color: #d4c4b0 !important;
}

body[data-theme="coffeeDark"] .cal-mode-tab--active {
	border-color: var(--coffee-accent) !important;
	background: rgba(201, 155, 119, 0.15) !important;
	color: #d4c4b0 !important;
}

body[data-theme="bitterDark"] .cal-mode-tab {
	background: rgba(20, 14, 14, 0.4) !important;
	border-color: rgba(255, 35, 1, 0.3) !important;
	color: #e5d0d0 !important;
}

body[data-theme="bitterDark"] .cal-mode-tab--active {
	border-color: var(--bitter-accent) !important;
	background: rgba(255, 35, 1, 0.15) !important;
	color: #e5d0d0 !important;
}

body[data-theme="monoDark"] .cal-mode-tab {
	background: rgba(13, 17, 23, 0.4) !important;
	border-color: rgba(0, 121, 212, 0.3) !important;
	color: #c9d1d9 !important;
}

body[data-theme="monoDark"] .cal-mode-tab--active {
	border-color: var(--mono-accent) !important;
	background: rgba(0, 121, 212, 0.15) !important;
	color: #c9d1d9 !important;
}

/* Light theme wizard adjustments */
body[data-theme="coffeeLight"] .cal-wizard-step-title,
body[data-theme="bitterLight"] .cal-wizard-step-title,
body[data-theme="monoLight"] .cal-wizard-step-title {
	color: #1e293b;
}

body[data-theme="coffeeLight"] .cal-wizard-step,
body[data-theme="bitterLight"] .cal-wizard-step,
body[data-theme="monoLight"] .cal-wizard-step {
	border-color: rgba(0, 0, 0, 0.06);
}

/* Mobile: stack tabs vertically on very small screens */
@media (max-width: 360px) {
	.cal-mode-tabs {
		flex-direction: column;
	}
	.cal-mode-tab {
		justify-content: flex-start;
	}
}

/* ── Calendar Sidebar Sections ── */
.calendar-sidebar {
	min-height: 0;
	overflow-x: hidden;
}
.cal-sidebar-section {
	padding: 0;
}
.cal-sidebar-header {
	display: flex;
	align-items: center;
	gap: 0.375rem;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.025em;
	text-transform: uppercase;
	color: #94a3b8;
}
.cal-sidebar-header-icon {
	width: 13px;
	height: 13px;
	flex-shrink: 0;
	opacity: 0.6;
}
.cal-sidebar-divider {
	margin: 0 0;
	height: 1px;
	background: linear-gradient(
		90deg,
		transparent 0%,
		rgba(255, 255, 255, 0.1) 20%,
		rgba(255, 255, 255, 0.1) 80%,
		transparent 100%
	);
}

/* ── Calendar Source Toggle Rows ── */
.cal-source-row {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	width: 100%;
	padding: 0.25rem 0.125rem;
	border: none;
	background: transparent;
	cursor: pointer;
	border-radius: 0.375rem;
	transition: background 0.15s, opacity 0.2s;
	text-align: left;
}
.cal-source-row:hover {
	background: rgba(255, 255, 255, 0.04);
}
.cal-source-row:active {
	background: rgba(255, 255, 255, 0.06);
}
.cal-source-toggle {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 14px;
	height: 14px;
	flex-shrink: 0;
	border-radius: 3px;
	border: 1.5px solid rgba(148, 163, 184, 0.4);
	background: transparent;
	opacity: 0;
	transition: border-color 0.15s, background 0.15s, opacity 0.15s;
}
.cal-source-row:hover .cal-source-toggle {
	opacity: 1;
	border-color: rgba(148, 163, 184, 0.55);
}
.cal-source-toggle--checked {
	opacity: 1;
	border-color: rgba(148, 163, 184, 0.6);
	background: rgba(255, 255, 255, 0.08);
}
.cal-source-row:hover .cal-source-toggle--checked {
	border-color: rgba(148, 163, 184, 0.7);
	background: rgba(255, 255, 255, 0.1);
}
.cal-source-check {
	width: 10px;
	height: 10px;
	color: rgba(148, 163, 184, 0.9);
	opacity: 0;
	transform: scale(0.8);
	transition: opacity 0.15s, transform 0.15s;
}
.cal-source-toggle--checked .cal-source-check {
	opacity: 1;
	transform: scale(1);
}
.cal-source-dot {
	display: inline-flex;
	width: 8px;
	height: 8px;
	flex-shrink: 0;
	border-radius: 999px;
	transition: opacity 0.2s;
}
.cal-source-name {
	flex: 1;
	min-width: 0;
	font-size: 12px;
	color: #cbd5e1;
	transition: color 0.15s;
}
.cal-source-row:hover .cal-source-name {
	color: #e2e8f0;
}
.cal-source-badge {
	font-size: 10px;
	color: #64748b;
	flex-shrink: 0;
}

/* ── Calendar Room Selector ── */
.cal-room-selector {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	padding: 0;
	position: relative;
}
.cal-room-label {
	display: flex;
	align-items: center;
	gap: 0.25rem;
	color: #94a3b8;
}
.cal-room-select {
	width: 100%;
	border-radius: 0.375rem;
	border: none;
	padding: 0.375rem 0.5rem;
	font-size: 13px;
	font-weight: 600;
	outline: none;
	transition: color 0.15s;
	cursor: pointer;
	position: relative;
	background: transparent;
	color: var(--dropdown-accent, var(--accent-strong));
	user-select: none;
	display: flex;
	align-items: center;
	gap: 0.25rem;
}

.cal-room-select__chevron {
	flex-shrink: 0;
	margin-left: auto;
	color: #64748b;
}
/* ── Custom dropdown: trigger label ── */
.cal-room-select__label {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
/* ── Custom dropdown: floating menu (clean, neutral) ── */
.cal-room-select__menu {
	display: none;
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	z-index: 50;
	margin-top: 2px;
	border-radius: 0.375rem;
	padding: 0.25rem 0;
	max-height: 200px;
	overflow-y: auto;
	background: var(--selection-menu-bg);
	border: 1px solid var(--selection-menu-border);
	box-shadow: var(--dropdown-shadow, 0 8px 24px rgba(0, 0, 0, 0.35));
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}
.cal-room-select[aria-expanded="true"] .cal-room-select__menu {
	display: block;
}
/* ── Custom dropdown: option items (clean, neutral) ── */
.cal-room-select__item {
	padding: 0.375rem 0.5rem;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	color: var(--dropdown-text, rgba(203, 213, 225, 0.9));
	background: transparent;
	transition: background 0.12s, color 0.12s;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.cal-room-select__item:hover,
.cal-room-select__item:focus {
	background-color: var(--dropdown-hover-bg, rgba(255, 255, 255, 0.07));
	color: var(--dropdown-text-hover, rgba(241, 245, 249, 0.95));
}
.cal-room-select__item[aria-selected="true"] {
	background-color: var(--dropdown-accent-bg, rgba(255, 255, 255, 0.05));
	color: var(--dropdown-accent, var(--accent-strong));
}
/* Override theme select styles — ID selector beats any class/attribute combo */
#calendarRoomSelect,
body[data-theme] #calendarRoomSelect,
#calendarBundeslandSelect,
body[data-theme] #calendarBundeslandSelect {
	background: transparent !important;
	background-color: transparent !important;
	background-image: none !important;
	color: var(--dropdown-accent, var(--accent-strong)) !important;
	border: none !important;
	border-color: transparent !important;
	box-shadow: none !important;
}
.cal-room-selector::after {
	content: "";
	position: absolute;
	right: 0.375rem;
	bottom: 0.625rem;
	width: 12px;
	height: 12px;
	pointer-events: none;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat center;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat center;
	background-color: var(--dropdown-accent, var(--accent-strong));
}
.cal-room-select:focus {
	outline: none;
}

/* ── Calendar Search ── */
.cal-search-dropdown {
	position: absolute;
	top: 100%;
	left: 0;
	right: auto;
	z-index: 60;
	margin-top: 4px;
	min-width: 100%;
	max-width: min(400px, calc(100vw - 2rem));
	width: max-content;
	max-height: 320px;
	overflow-y: auto;
	border-radius: 0.5rem;
	border: 1px solid var(--selection-menu-border, rgba(255, 255, 255, 0.1));
	background: var(--selection-menu-bg);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	padding: 0.375rem;
}
.cal-search-list {
	max-height: 240px;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.cal-search-item {
	padding: 0.375rem 0.5rem;
	border-radius: 0.375rem;
	cursor: pointer;
	transition: background 0.12s;
}
.cal-search-item:hover {
	background: var(--selection-menu-item-hover, rgba(255, 255, 255, 0.05));
}
.cal-search-hl {
	background: rgba(217, 70, 239, 0.3);
	color: inherit;
	border-radius: 2px;
	padding: 0 1px;
}

/* ── Calendar Sidebar Cards (subtle sub-sections) ── */
.cal-sidebar-card {
	padding: 0;
}
.cal-card-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.5rem;
	font-size: 11px;
	font-weight: 600;
	color: #cbd5e1;
	white-space: nowrap;
}
.cal-card-hint {
	font-size: 9px;
	font-weight: 400;
	color: #64748b;
}
.cal-card-subtitle {
	font-size: 9px;
	color: #64748b;
	line-height: 1.3;
	margin-top: 4px;
}

/* ── Slot Rows (Free Slots unified grid) ── */
.cal-slot-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 80px 32px;
	gap: 0.25rem;
	align-items: center;
	padding: 3px 0;
	font-size: 11px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.cal-slot-row:last-child {
	border-bottom: none;
}
.cal-slot-row--nav {
	cursor: pointer;
	border-radius: 4px;
	transition: background 0.15s;
}
.cal-slot-row--nav:hover {
	background: rgba(255, 255, 255, 0.04);
}
.cal-slot-day {
	color: #94a3b8;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.cal-slot-time {
	color: #64748b;
	text-align: right;
	white-space: nowrap;
}
.cal-slot-count {
	text-align: right;
	font-size: 10px;
	font-weight: 500;
	color: #64748b;
}
.cal-slot-all {
	color: #4ade80;
}
.cal-slot-partial {
	color: #fbbf24;
}

/* ── My Selections — 2-line card layout ── */
.cal-sel-card {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	padding: 6px 4px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.04);
	cursor: pointer;
	transition: background 0.15s;
}
.cal-sel-card:last-child {
	border-bottom: none;
}
.cal-sel-card:hover {
	background: rgba(255, 255, 255, 0.04);
}
.cal-sel-left {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	min-width: 0;
}
.cal-sel-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #4ade80;
	flex-shrink: 0;
	margin-top: 4px;
}
.cal-sel-info {
	display: flex;
	flex-direction: column;
	min-width: 0;
}
.cal-sel-date {
	font-size: 11px;
	font-weight: 500;
	color: #e2e8f0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.cal-sel-time {
	font-size: 12px;
	font-weight: 600;
	color: #94a3b8;
	white-space: nowrap;
}
.cal-sel-badge {
	font-size: 10px;
	padding: 2px 8px;
	border-radius: 9999px;
	background: rgba(74, 222, 128, 0.12);
	color: #4ade80;
	white-space: nowrap;
	flex-shrink: 0;
}
/* Light theme overrides for My Selections */
body[data-theme="coffeeLight"] .cal-sel-card,
body[data-theme="bitterLight"] .cal-sel-card,
body[data-theme="monoLight"] .cal-sel-card {
	border-bottom-color: rgba(0, 0, 0, 0.06);
}
body[data-theme="coffeeLight"] .cal-sel-card:hover,
body[data-theme="bitterLight"] .cal-sel-card:hover,
body[data-theme="monoLight"] .cal-sel-card:hover {
	background: rgba(0, 0, 0, 0.04);
}
body[data-theme="coffeeLight"] .cal-sel-date,
body[data-theme="bitterLight"] .cal-sel-date,
body[data-theme="monoLight"] .cal-sel-date {
	color: var(--dropdown-text);
}
body[data-theme="coffeeLight"] .cal-sel-time,
body[data-theme="bitterLight"] .cal-sel-time,
body[data-theme="monoLight"] .cal-sel-time {
	color: var(--dropdown-text);
	opacity: 0.7;
}
body[data-theme="coffeeLight"] .cal-sel-badge,
body[data-theme="bitterLight"] .cal-sel-badge,
body[data-theme="monoLight"] .cal-sel-badge {
	background: rgba(16, 185, 129, 0.12);
	color: #059669;
}

/* ── Share Toggle Tooltip ── */
.cal-share-tooltip {
	position: absolute;
	right: 0;
	bottom: calc(100% + 8px);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.15s ease, transform 0.15s ease;
	transform: translateY(4px);
	z-index: 50;
}
.cal-share-tooltip.is-visible {
	opacity: 1;
	pointer-events: auto;
	transform: translateY(0);
}
.cal-share-tooltip__box {
	width: 200px;
	padding: 8px 10px;
	border-radius: 10px;
	border: 1px solid var(--calendar-tooltip-border, rgba(255,255,255,0.1));
	background: var(--calendar-tooltip-bg, rgba(15,23,42,0.95));
	color: var(--calendar-tooltip-text, #cbd5e1);
	font-size: 11px;
	line-height: 1.45;
	text-align: left;
	box-shadow: var(--calendar-tooltip-shadow, 0 4px 12px rgba(0,0,0,0.3));
}
.cal-share-tooltip__box strong {
	display: block;
	font-size: 11px;
	font-weight: 600;
	color: #f1f5f9;
	margin-bottom: 4px;
}
.cal-share-tooltip__box p {
	margin: 0;
	font-size: 10px;
	color: #94a3b8;
}
.cal-share-tooltip__arrow {
	position: absolute;
	right: 8px;
	bottom: -5px;
	width: 8px;
	height: 8px;
	background: var(--calendar-tooltip-bg, rgba(15,23,42,0.95));
	border-right: 1px solid var(--calendar-tooltip-border, rgba(255,255,255,0.1));
	border-bottom: 1px solid var(--calendar-tooltip-border, rgba(255,255,255,0.1));
	transform: rotate(45deg);
}

/* ── Free Slot Selectable Items (Day view) ── */
.free-slot-item {
	display: flex;
	align-items: center;
	gap: 0.375rem;
	padding: 3px 6px;
	border-radius: 4px;
	border: none;
	background: transparent;
	cursor: pointer;
	transition: background 0.15s;
	user-select: none;
	font-size: 11px;
	color: #94a3b8;
}
.free-slot-item:hover {
	background: rgba(255, 255, 255, 0.05);
}
.free-slot-item.free-slot-selected {
	background: rgba(74, 222, 128, 0.06);
	color: #86efac;
}
.free-slot-item.free-slot-selected:hover {
	background: rgba(74, 222, 128, 0.1);
}
.free-slot-check {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 13px;
	height: 13px;
	border-radius: 3px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	font-size: 9px;
	line-height: 1;
	flex-shrink: 0;
	color: #4ade80;
}
.free-slot-selected .free-slot-check {
	background: rgba(74, 222, 128, 0.15);
	border-color: rgba(74, 222, 128, 0.35);
}

/* ── Calendar Day Availability ── */
.calendar-week-grid,
.calendar-month-grid {
	position: relative;
	border: none;
	border-radius: 0;
	overflow: hidden;
	background: transparent;
}
.calendar-month-grid {
	grid-auto-rows: 1fr;
}
.calendar-month-weekdays {
	border: none;
	border-radius: 0;
	overflow: hidden;
	background: transparent;
}
.calendar-weekday-label {
	padding: 0.45rem 0.25rem;
	border-right: 1px solid rgba(255, 255, 255, 0.08);
	font-weight: 600;
	letter-spacing: 0.04em;
}
.calendar-weekday-label:last-child {
	border-right: none;
}
.calendar-day-cell {
	border-radius: 0 !important;
	background: transparent !important;
	padding: 0.45rem 0.5rem !important;
	border-color: rgba(255, 255, 255, 0.08) !important;
	border-right-width: 1px;
	border-bottom-width: 1px;
	border-top-width: 0;
	border-left-width: 0;
}
.calendar-day-cell-month {
	height: 150px;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}
.calendar-day-cell-month > .mt-1 {
	flex: 1 1 0;
	min-height: 0;
	overflow-y: auto;
	overflow-x: hidden;
	scrollbar-width: none;          /* Firefox */
	-ms-overflow-style: none;       /* IE/Edge */
}
.calendar-day-cell-month > .mt-1::-webkit-scrollbar {
	display: none;                  /* Chrome/Safari */
}
/* Clip event text, full content shown via hover tooltip */
.calendar-day-cell-month .calendar-event {
	position: relative;
	overflow: hidden;
	max-width: 100%;
}
/* Allow tooltip to escape cell overflow on hover */
.calendar-day-cell-month .calendar-event:hover {
	overflow: visible;
	z-index: 50;
}

.calendar-day-today {
	background: transparent !important;
	box-shadow: none;
}
.calendar-day-today:hover {
	background: var(--accent-bg-soft) !important;
}
/* Today badge on date number - uses same styling as cal-header-add-btn */
.calendar-day-today .calendar-day-number {
	background-color: var(--accent-strong);
	color: #fff;
	padding: 0.1rem 0.4rem;
	border-radius: 6px;
	box-shadow: 0 0 10px var(--accent-ring-strong);
	font-weight: 600;
}
/* Override text-slate-400 for today badge in monochrome themes */
body[data-theme="coffeeLight"] .calendar-day-today .calendar-day-number,
body[data-theme="coffeeDark"] .calendar-day-today .calendar-day-number,
body[data-theme="bitterLight"] .calendar-day-today .calendar-day-number,
body[data-theme="bitterDark"] .calendar-day-today .calendar-day-number,
body[data-theme="monoLight"] .calendar-day-today .calendar-day-number,
body[data-theme="monoDark"] .calendar-day-today .calendar-day-number {
	color: #fff !important;
}

.calendar-day-available {
	background: rgba(74, 222, 128, 0.015) !important;
}
.calendar-day-available:hover {
	background: rgba(74, 222, 128, 0.045) !important;
}
.calendar-day-unavailable {
	background: rgba(255, 255, 255, 0.005) !important;
}
.calendar-day-unavailable:hover {
	background: rgba(255, 255, 255, 0.03) !important;
}
.calendar-day-indicator {
	font-weight: 600;
	opacity: 0.75;
}
.calendar-day-available .calendar-day-indicator {
	color: #4ade80;
}
.calendar-day-unavailable .calendar-day-indicator {
	color: #64748b;
}

/* ── Common Day (all participants agree) ── */
.calendar-day-common {
	border-color: rgba(74, 222, 128, 0.6) !important;
	box-shadow: inset 0 0 0 1px rgba(74, 222, 128, 0.3), 0 0 8px rgba(74, 222, 128, 0.15);
	background: rgba(74, 222, 128, 0.08) !important;
}
.calendar-day-common:hover {
	background: rgba(74, 222, 128, 0.12) !important;
	box-shadow: inset 0 0 0 1px rgba(74, 222, 128, 0.4), 0 0 12px rgba(74, 222, 128, 0.2);
}

/* ── My Selections Panel (uses .cal-sel-card) ── */

/* ── Calendar Day Focus (jump highlight) ── */
.calendar-day-focused {
	border-color: var(--accent-border-strong) !important;
	box-shadow: inset 0 0 0 1px var(--accent-ring-strong);
	animation: calFocusPulse 3s ease-out forwards;
	position: relative;
	z-index: 1;
}
@keyframes calFocusPulse {
	0%   { box-shadow: inset 0 0 0 2px var(--accent-ring-strong); }
	60%  { box-shadow: inset 0 0 0 2px var(--accent-ring); }
	100% { box-shadow: inset 0 0 0 1px transparent; }
}

/* ── Identity Modal ── */
.identity-modal-backdrop {
	background: var(--modal-backdrop, rgba(2, 6, 23, 0.7));
}

.identity-modal-content {
	animation: identityModalIn 0.2s ease-out;
	background: var(--panel-solid-bg, #0f0a1a);
	border: 1px solid var(--modal-border, rgba(255, 255, 255, 0.1));
}

.identity-modal-header {
	border-bottom: 1px solid var(--modal-border, rgba(255, 255, 255, 0.1));
}

.identity-modal-footer {
	border-top: 1px solid var(--modal-border, rgba(255, 255, 255, 0.1));
	background: rgba(0, 0, 0, 0.15);
}

.identity-modal-title {
	color: var(--accent-text, rgba(255, 255, 255, 0.95));
}

.identity-modal-label {
	color: var(--accent-text-soft, rgba(148, 163, 184, 0.9));
}

.identity-modal-input {
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid var(--modal-border, rgba(255, 255, 255, 0.1));
	color: var(--accent-text, rgba(255, 255, 255, 0.95));
}

.identity-modal-input::placeholder {
	color: var(--accent-text-soft, rgba(148, 163, 184, 0.6));
}

.identity-modal-input:focus {
	border-color: var(--accent-border-strong, rgba(255, 255, 255, 0.15));
	box-shadow: 0 0 0 2px var(--accent-ring, rgba(217, 70, 239, 0.25));
}

.identity-modal-btn-secondary {
	background: transparent;
	border: 1px solid var(--modal-border, rgba(255, 255, 255, 0.1));
	color: var(--accent-text-soft, rgba(148, 163, 184, 0.9));
}

.identity-modal-btn-secondary:hover {
	background: rgba(255, 255, 255, 0.08);
}

.identity-modal-btn-secondary:active {
	background: rgba(255, 255, 255, 0.12);
}

.identity-modal-btn-primary {
	background: var(--accent-bg, rgba(217, 70, 239, 0.2));
	border: 1px solid var(--accent-border, rgba(217, 70, 239, 0.3));
	color: var(--accent-text, rgba(255, 255, 255, 0.95));
}

.identity-modal-btn-primary:hover {
	background: var(--accent-bg-hover, rgba(217, 70, 239, 0.3));
}

.identity-modal-btn-primary:active {
	background: var(--accent-strong, rgba(217, 70, 239, 0.4));
}

@keyframes identityModalIn {
	from {
		opacity: 0;
		transform: scale(0.95) translateY(-8px);
	}
	to {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}

.identity-preview-chip {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.75rem 1.25rem;
	border-radius: 999px;
	border: 1px solid var(--modal-border, rgba(255, 255, 255, 0.12));
	background: rgba(255, 255, 255, 0.08);
	color: var(--accent-text, rgba(255, 255, 255, 0.95));
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
	transition: all 0.2s ease;
}

.identity-preview-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #94a3b8;
	box-shadow: 0 0 8px currentColor;
}

.identity-avatar-grid {
	display: grid;
	grid-template-columns: repeat(8, 1fr);
	gap: 0.375rem;
	max-height: 180px;
	overflow-y: auto;
	padding: 0.25rem;
	border-radius: 0.75rem;
	background: rgba(0, 0, 0, 0.15);
}
@media (max-width: 400px) {
	.identity-avatar-grid {
		grid-template-columns: repeat(6, 1fr);
		max-height: 160px;
	}
}

.identity-avatar-item {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	aspect-ratio: 1;
	border-radius: 0.75rem;
	border: 2px solid transparent;
	background: rgba(255, 255, 255, 0.04);
	font-size: 1.25rem;
	cursor: pointer;
	transition: all 0.15s ease;
}
.identity-avatar-item:hover {
	background: rgba(255, 255, 255, 0.08);
	transform: scale(1.08);
}
.identity-avatar-item.selected {
	border-color: var(--accent-strong);
	background: var(--accent-bg);
	box-shadow: 0 0 12px var(--accent-ring);
}

.identity-color-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.identity-color-item {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 2px solid transparent;
	cursor: pointer;
	transition: all 0.15s ease;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.identity-color-item:hover {
	transform: scale(1.15);
	box-shadow: 0 0 12px currentColor;
}
.identity-color-item.selected {
	border-color: white;
	transform: scale(1.1);
	box-shadow: 0 0 16px currentColor, inset 0 0 0 2px rgba(0, 0, 0, 0.3);
}

/* Presence chip clickable (own) */
.presence-chip-own {
	cursor: pointer;
	transition: all 0.15s ease;
}
.presence-chip-own:hover {
	background: rgba(255, 255, 255, 0.1) !important;
	border-color: var(--accent-border) !important;
}
.presence-chip-own:active {
	transform: scale(0.97);
}

/* ── Query Builder Modal ───────────────────────────────────────────────────── */

.qb-overlay {
	position: fixed;
	inset: 0;
	z-index: 9998;
	background: var(--modal-backdrop, rgba(0, 0, 0, 0.6));
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0.2s ease;
}

.qb-overlay.is-visible {
	opacity: 1;
	visibility: visible;
}

.qb-modal {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) scale(0.95);
	z-index: 9999;
	width: 90%;
	max-width: 480px;
	max-height: 85vh;
	overflow: hidden;
	border-radius: 16px;
	border: 1px solid var(--modal-border, rgba(255, 255, 255, 0.1));
	background: var(--panel-solid-bg, #0f0a1a);
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.qb-modal.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translate(-50%, -50%) scale(1);
}

.qb-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	border-bottom: 1px solid var(--modal-border, rgba(255, 255, 255, 0.08));
}

.qb-title {
	font-size: 15px;
	font-weight: 600;
	color: var(--accent-text, rgba(253, 242, 255, 0.95));
	letter-spacing: 0.01em;
}

.qb-close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 8px;
	border: none;
	background: transparent;
	color: var(--accent-text-soft, rgba(148, 163, 184, 0.7));
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.qb-close:hover {
	background: rgba(255, 255, 255, 0.08);
	color: var(--accent-text, rgba(253, 242, 255, 0.95));
}

.qb-body {
	padding: 16px 20px;
	max-height: calc(85vh - 140px);
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: var(--scrollbar-thumb, rgba(148, 163, 184, 0.15)) transparent;
}

.qb-section {
	margin-bottom: 16px;
}

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

.qb-section-title {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--accent-text-soft, rgba(148, 163, 184, 0.6));
	margin-bottom: 10px;
}

.qb-section-icon {
	width: 14px;
	height: 14px;
	opacity: 0.7;
}

.qb-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.qb-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border-radius: 999px;
	border: 1px solid var(--modal-border, rgba(255, 255, 255, 0.1));
	background: rgba(255, 255, 255, 0.05);
	color: var(--accent-text-soft, rgba(148, 163, 184, 0.85));
	font-size: 12px;
	cursor: pointer;
	transition: all 0.15s ease;
	user-select: none;
}

.qb-chip:hover {
	background: rgba(255, 255, 255, 0.1);
	border-color: rgba(255, 255, 255, 0.15);
	color: var(--accent-text, rgba(253, 242, 255, 0.95));
}

.qb-chip.is-active {
	background: var(--accent-strong, rgba(217, 70, 239, 0.5));
	border-color: var(--accent-strong-hover, rgba(217, 70, 239, 0.6));
	color: #fff;
}

.qb-chip.is-active:hover {
	background: var(--accent-strong-hover, rgba(217, 70, 239, 0.6));
}

.qb-tag-select {
	width: 100%;
	padding: 8px 12px;
	border-radius: 10px;
	border: 1px solid var(--modal-border, rgba(255, 255, 255, 0.1));
	background: rgba(255, 255, 255, 0.05);
	color: var(--accent-text, rgba(253, 242, 255, 0.95));
	font-size: 12px;
	cursor: pointer;
	transition: all 0.15s ease;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(148,163,184,0.6)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	padding-right: 32px;
}

.qb-tag-select:hover,
.qb-tag-select:focus {
	border-color: rgba(255, 255, 255, 0.18);
	outline: none;
}

.qb-tag-select option {
	background: var(--panel-solid-bg, #0f0a1a);
	color: var(--accent-text, rgba(253, 242, 255, 0.95));
}

.qb-date-row {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
}

.qb-date-row:last-child {
	margin-bottom: 0;
}

.qb-date-label {
	flex: 0 0 100px;
	font-size: 12px;
	color: var(--accent-text-soft, rgba(148, 163, 184, 0.7));
}

.qb-date-input {
	flex: 1;
	padding: 6px 10px;
	border-radius: 8px;
	border: 1px solid var(--modal-border, rgba(255, 255, 255, 0.1));
	background: rgba(255, 255, 255, 0.05);
	color: var(--accent-text, rgba(253, 242, 255, 0.95));
	font-size: 12px;
	transition: all 0.15s ease;
}

.qb-date-input:hover,
.qb-date-input:focus {
	border-color: rgba(255, 255, 255, 0.18);
	outline: none;
}

.qb-date-input::-webkit-calendar-picker-indicator {
	filter: invert(0.7);
	cursor: pointer;
}

.qb-preview {
	margin-top: 16px;
	padding: 12px;
	border-radius: 10px;
	border: 1px solid var(--modal-border, rgba(255, 255, 255, 0.08));
	background: rgba(0, 0, 0, 0.15);
}

.qb-preview-label {
	font-size: 10px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--accent-text-soft, rgba(148, 163, 184, 0.5));
	margin-bottom: 6px;
}

.qb-preview-query {
	font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
	font-size: 12px;
	color: var(--accent-text, rgba(253, 242, 255, 0.9));
	word-break: break-all;
	min-height: 20px;
}

.qb-preview-empty {
	color: var(--accent-text-soft, rgba(148, 163, 184, 0.4));
	font-style: italic;
}

.qb-footer {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	padding: 14px 20px;
	border-top: 1px solid var(--accent-border, rgba(255, 255, 255, 0.08));
}

.qb-btn {
	padding: 8px 16px;
	border-radius: 10px;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.15s ease;
}

.qb-btn-secondary {
	border: 1px solid var(--accent-border, rgba(255, 255, 255, 0.1));
	background: transparent;
	color: var(--accent-text-soft, rgba(148, 163, 184, 0.8));
}

.qb-btn-secondary:hover {
	background: var(--accent-bg-soft, rgba(255, 255, 255, 0.06));
	color: var(--accent-text, rgba(253, 242, 255, 0.95));
}

.qb-btn-primary {
	border: none;
	background: var(--accent-strong, rgba(217, 70, 239, 0.6));
	color: #fff;
}

.qb-btn-primary:hover {
	background: var(--accent-strong-hover, rgba(217, 70, 239, 0.7));
}

.qb-btn-primary:active {
	background: var(--accent-strong-active, rgba(217, 70, 239, 0.8));
}

/* ══════════════════════════════════════════════════════════════════════════════
   LIGHT THEME OVERRIDES
   Modal, Query Builder, Search Help - konsistent mit settingsPanel
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── monoLight Theme ── */
body[data-theme="monoLight"] #identityModal [data-role="identityModalBackdrop"],
body[data-theme="monoLight"] .qb-overlay {
	background: rgba(27, 31, 36, 0.22) !important;
}

body[data-theme="monoLight"] #identityModal [role="dialog"],
body[data-theme="monoLight"] .qb-modal,
body[data-theme="monoLight"] .ps-search-help-box {
	background: #eef1f5 !important;
	border-color: #d0d7de !important;
}

body[data-theme="monoLight"] #identityModal h3,
body[data-theme="monoLight"] #identityModal #identityPreviewName,
body[data-theme="monoLight"] #identityModal .text-slate-100,
body[data-theme="monoLight"] .qb-title {
	color: rgba(15, 23, 42, 0.98) !important;
}

body[data-theme="monoLight"] #identityModal label,
body[data-theme="monoLight"] #identityModal .text-slate-400,
body[data-theme="monoLight"] #identityModal .text-slate-200,
body[data-theme="monoLight"] #identityModal .text-slate-300,
body[data-theme="monoLight"] #identityModal #identityModalClose,
body[data-theme="monoLight"] #identityModal #identityModalCancel,
body[data-theme="monoLight"] #identityModal #identityRandomize,
body[data-theme="monoLight"] .qb-section-title,
body[data-theme="monoLight"] .qb-date-label,
body[data-theme="monoLight"] .qb-close,
body[data-theme="monoLight"] .ps-search-help-box {
	color: rgba(51, 65, 85, 0.9) !important;
}

body[data-theme="monoLight"] #identityModal input,
body[data-theme="monoLight"] .qb-tag-select,
body[data-theme="monoLight"] .qb-date-input {
	background: rgba(0, 0, 0, 0.04) !important;
	border-color: rgba(0, 0, 0, 0.12) !important;
	color: rgba(15, 23, 42, 0.98) !important;
}

body[data-theme="monoLight"] .qb-chip {
	background: rgba(0, 0, 0, 0.04) !important;
	border-color: rgba(0, 0, 0, 0.12) !important;
	color: rgba(51, 65, 85, 0.9) !important;
}

body[data-theme="monoLight"] .qb-chip:hover {
	background: rgba(0, 0, 0, 0.08) !important;
}

body[data-theme="monoLight"] .qb-chip.is-active {
	background: #0969da !important;
	border-color: #0969da !important;
	color: #fff !important;
}

body[data-theme="monoLight"] .qb-preview {
	background: rgba(0, 0, 0, 0.03) !important;
	border-color: rgba(0, 0, 0, 0.1) !important;
	color: rgba(15, 23, 42, 0.98) !important;
}

body[data-theme="monoLight"] #identityModal .identity-preview-chip,
body[data-theme="monoLight"] #identityModal .identity-avatar-grid {
	background: rgba(0, 0, 0, 0.04) !important;
	border-color: rgba(0, 0, 0, 0.1) !important;
}

body[data-theme="monoLight"] #identityModal .identity-avatar-item {
	background: transparent !important;
}

body[data-theme="monoLight"] #identityModal .identity-avatar-item:hover {
	background: rgba(0, 0, 0, 0.08) !important;
}

body[data-theme="monoLight"] #identityModal [role="dialog"] > div:first-child,
body[data-theme="monoLight"] #identityModal [role="dialog"] > div:last-child,
body[data-theme="monoLight"] .qb-header {
	border-color: #d0d7de !important;
}

body[data-theme="monoLight"] #identityModal [role="dialog"] > div:last-child,
body[data-theme="monoLight"] .identity-modal-footer {
	background: rgba(0, 0, 0, 0.03) !important;
}

body[data-theme="monoLight"] .ps-search-help-arrow {
	background: #eef1f5 !important;
	border-color: #d0d7de !important;
}

body[data-theme="monoLight"] #identityModalSave,
body[data-theme="monoLight"] .identity-modal-btn-primary {
	background-color: #0969da !important;
	border-color: #0969da !important;
	color: #ffffff !important;
}

body[data-theme="monoLight"] #identityModalSave:hover,
body[data-theme="monoLight"] .identity-modal-btn-primary:hover {
	background-color: #0550ae !important;
	border-color: #0550ae !important;
}

/* ── coffeeLight Theme ── */
body[data-theme="coffeeLight"] #identityModal [data-role="identityModalBackdrop"],
body[data-theme="coffeeLight"] .qb-overlay {
	background: rgba(68, 45, 30, 0.2) !important;
}

body[data-theme="coffeeLight"] #identityModal [role="dialog"],
body[data-theme="coffeeLight"] .qb-modal,
body[data-theme="coffeeLight"] .ps-search-help-box {
	background: #f3ebe2 !important;
	border-color: #d9c7bc !important;
}

body[data-theme="coffeeLight"] #identityModal h3,
body[data-theme="coffeeLight"] #identityModal #identityPreviewName,
body[data-theme="coffeeLight"] #identityModal .text-slate-100,
body[data-theme="coffeeLight"] .qb-title {
	color: rgba(50, 32, 18, 0.98) !important;
}

body[data-theme="coffeeLight"] #identityModal label,
body[data-theme="coffeeLight"] #identityModal .text-slate-400,
body[data-theme="coffeeLight"] #identityModal .text-slate-200,
body[data-theme="coffeeLight"] #identityModal .text-slate-300,
body[data-theme="coffeeLight"] #identityModal #identityModalClose,
body[data-theme="coffeeLight"] #identityModal #identityModalCancel,
body[data-theme="coffeeLight"] #identityModal #identityRandomize,
body[data-theme="coffeeLight"] .qb-section-title,
body[data-theme="coffeeLight"] .qb-date-label,
body[data-theme="coffeeLight"] .qb-close,
body[data-theme="coffeeLight"] .ps-search-help-box {
	color: rgba(92, 62, 41, 0.9) !important;
}

body[data-theme="coffeeLight"] #identityModal input,
body[data-theme="coffeeLight"] .qb-tag-select,
body[data-theme="coffeeLight"] .qb-date-input {
	background: rgba(0, 0, 0, 0.04) !important;
	border-color: rgba(0, 0, 0, 0.1) !important;
	color: rgba(50, 32, 18, 0.98) !important;
}

body[data-theme="coffeeLight"] .qb-chip {
	background: rgba(0, 0, 0, 0.04) !important;
	border-color: rgba(0, 0, 0, 0.1) !important;
	color: rgba(92, 62, 41, 0.9) !important;
}

body[data-theme="coffeeLight"] .qb-chip:hover {
	background: rgba(0, 0, 0, 0.08) !important;
}

body[data-theme="coffeeLight"] .qb-chip.is-active {
	background: #8b5a2b !important;
	border-color: #8b5a2b !important;
	color: #fff !important;
}

body[data-theme="coffeeLight"] .qb-preview {
	background: rgba(0, 0, 0, 0.03) !important;
	border-color: rgba(0, 0, 0, 0.08) !important;
	color: rgba(50, 32, 18, 0.98) !important;
}

body[data-theme="coffeeLight"] #identityModal .identity-preview-chip,
body[data-theme="coffeeLight"] #identityModal .identity-avatar-grid {
	background: rgba(0, 0, 0, 0.04) !important;
	border-color: rgba(0, 0, 0, 0.08) !important;
}

body[data-theme="coffeeLight"] #identityModal .identity-avatar-item {
	background: transparent !important;
}

body[data-theme="coffeeLight"] #identityModal .identity-avatar-item:hover {
	background: rgba(0, 0, 0, 0.06) !important;
}

body[data-theme="coffeeLight"] #identityModal [role="dialog"] > div:first-child,
body[data-theme="coffeeLight"] #identityModal [role="dialog"] > div:last-child,
body[data-theme="coffeeLight"] .qb-header {
	border-color: #d9c7bc !important;
}

body[data-theme="coffeeLight"] #identityModal [role="dialog"] > div:last-child,
body[data-theme="coffeeLight"] .identity-modal-footer {
	background: rgba(0, 0, 0, 0.03) !important;
}

body[data-theme="coffeeLight"] .ps-search-help-arrow {
	background: #f3ebe2 !important;
	border-color: #d9c7bc !important;
}

body[data-theme="coffeeLight"] #identityModalSave,
body[data-theme="coffeeLight"] .identity-modal-btn-primary {
	background-color: #b07049 !important;
	border-color: #b07049 !important;
	color: #ffffff !important;
}

body[data-theme="coffeeLight"] #identityModalSave:hover,
body[data-theme="coffeeLight"] .identity-modal-btn-primary:hover {
	background-color: #8b5a2b !important;
	border-color: #8b5a2b !important;
}

/* ── bitterLight Theme ── */
body[data-theme="bitterLight"] #identityModal [data-role="identityModalBackdrop"],
body[data-theme="bitterLight"] .qb-overlay {
	background: rgba(21, 21, 24, 0.2) !important;
}

body[data-theme="bitterLight"] #identityModal [role="dialog"],
body[data-theme="bitterLight"] .qb-modal,
body[data-theme="bitterLight"] .ps-search-help-box {
	background: #efecea !important;
	border-color: #d8d2cb !important;
}

body[data-theme="bitterLight"] #identityModal h3,
body[data-theme="bitterLight"] #identityModal #identityPreviewName,
body[data-theme="bitterLight"] #identityModal .text-slate-100,
body[data-theme="bitterLight"] .qb-title {
	color: rgba(27, 27, 32, 0.98) !important;
}

body[data-theme="bitterLight"] #identityModal label,
body[data-theme="bitterLight"] #identityModal .text-slate-400,
body[data-theme="bitterLight"] #identityModal .text-slate-200,
body[data-theme="bitterLight"] #identityModal .text-slate-300,
body[data-theme="bitterLight"] #identityModal #identityModalClose,
body[data-theme="bitterLight"] #identityModal #identityModalCancel,
body[data-theme="bitterLight"] #identityModal #identityRandomize,
body[data-theme="bitterLight"] .qb-section-title,
body[data-theme="bitterLight"] .qb-date-label,
body[data-theme="bitterLight"] .qb-close,
body[data-theme="bitterLight"] .ps-search-help-box {
	color: rgba(52, 52, 60, 0.9) !important;
}

body[data-theme="bitterLight"] #identityModal input,
body[data-theme="bitterLight"] .qb-tag-select,
body[data-theme="bitterLight"] .qb-date-input {
	background: rgba(0, 0, 0, 0.04) !important;
	border-color: rgba(0, 0, 0, 0.1) !important;
	color: rgba(27, 27, 32, 0.98) !important;
}

body[data-theme="bitterLight"] .qb-chip {
	background: rgba(0, 0, 0, 0.04) !important;
	border-color: rgba(0, 0, 0, 0.1) !important;
	color: rgba(52, 52, 60, 0.9) !important;
}

body[data-theme="bitterLight"] .qb-chip:hover {
	background: rgba(0, 0, 0, 0.08) !important;
}

body[data-theme="bitterLight"] .qb-chip.is-active {
	background: #ff2301 !important;
	border-color: #ff2301 !important;
	color: #fff !important;
}

body[data-theme="bitterLight"] .qb-preview {
	background: rgba(0, 0, 0, 0.03) !important;
	border-color: rgba(0, 0, 0, 0.08) !important;
	color: rgba(27, 27, 32, 0.98) !important;
}

body[data-theme="bitterLight"] #identityModal .identity-preview-chip,
body[data-theme="bitterLight"] #identityModal .identity-avatar-grid {
	background: rgba(0, 0, 0, 0.04) !important;
	border-color: rgba(0, 0, 0, 0.08) !important;
}

body[data-theme="bitterLight"] #identityModal .identity-avatar-item {
	background: transparent !important;
}

body[data-theme="bitterLight"] #identityModal .identity-avatar-item:hover {
	background: rgba(0, 0, 0, 0.06) !important;
}

body[data-theme="bitterLight"] #identityModal [role="dialog"] > div:first-child,
body[data-theme="bitterLight"] #identityModal [role="dialog"] > div:last-child,
body[data-theme="bitterLight"] .qb-header {
	border-color: #d8d2cb !important;
}

body[data-theme="bitterLight"] #identityModal [role="dialog"] > div:last-child,
body[data-theme="bitterLight"] .identity-modal-footer {
	background: rgba(0, 0, 0, 0.03) !important;
}

body[data-theme="bitterLight"] .ps-search-help-arrow {
	background: #efecea !important;
	border-color: #d8d2cb !important;
}

body[data-theme="bitterLight"] #identityModalSave,
body[data-theme="bitterLight"] .identity-modal-btn-primary {
	background-color: #ff2301 !important;
	border-color: #ff2301 !important;
	color: #ffffff !important;
}

body[data-theme="bitterLight"] #identityModalSave:hover,
body[data-theme="bitterLight"] .identity-modal-btn-primary:hover {
	background-color: #e52000 !important;
	border-color: #e52000 !important;
}

/* ── bitterDark Theme ── */
body[data-theme="bitterDark"] #identityModal [data-role="identityModalBackdrop"],
body[data-theme="bitterDark"] .qb-overlay {
	background: rgba(13, 12, 16, 0.6) !important;
}

body[data-theme="bitterDark"] #identityModal [role="dialog"],
body[data-theme="bitterDark"] .qb-modal,
body[data-theme="bitterDark"] .ps-search-help-box {
	background: #131216 !important;
	border-color: #2a2a30 !important;
}

body[data-theme="bitterDark"] #identityModal h3,
body[data-theme="bitterDark"] #identityModal #identityPreviewName,
body[data-theme="bitterDark"] #identityModal .text-slate-100,
body[data-theme="bitterDark"] .qb-title {
	color: rgba(250, 250, 252, 0.98) !important;
}

body[data-theme="bitterDark"] #identityModal label,
body[data-theme="bitterDark"] #identityModal .text-slate-400,
body[data-theme="bitterDark"] #identityModal .text-slate-200,
body[data-theme="bitterDark"] #identityModal .text-slate-300,
body[data-theme="bitterDark"] #identityModal #identityModalClose,
body[data-theme="bitterDark"] #identityModal #identityModalCancel,
body[data-theme="bitterDark"] #identityModal #identityRandomize,
body[data-theme="bitterDark"] .qb-section-title,
body[data-theme="bitterDark"] .qb-date-label,
body[data-theme="bitterDark"] .qb-close,
body[data-theme="bitterDark"] .ps-search-help-box {
	color: rgba(200, 200, 210, 0.9) !important;
}

body[data-theme="bitterDark"] #identityModal input,
body[data-theme="bitterDark"] .qb-tag-select,
body[data-theme="bitterDark"] .qb-date-input {
	background: rgba(255, 255, 255, 0.06) !important;
	border-color: rgba(255, 255, 255, 0.1) !important;
	color: rgba(250, 250, 252, 0.98) !important;
}

body[data-theme="bitterDark"] .qb-chip {
	background: rgba(255, 255, 255, 0.06) !important;
	border-color: rgba(255, 255, 255, 0.1) !important;
	color: rgba(200, 200, 210, 0.9) !important;
}

body[data-theme="bitterDark"] .qb-chip:hover {
	background: rgba(255, 255, 255, 0.1) !important;
}

body[data-theme="bitterDark"] .qb-chip.is-active {
	background: #ff2301 !important;
	border-color: #ff2301 !important;
	color: #fff !important;
}

body[data-theme="bitterDark"] .qb-preview {
	background: rgba(255, 255, 255, 0.05) !important;
	border-color: rgba(255, 255, 255, 0.08) !important;
	color: rgba(250, 250, 252, 0.98) !important;
}

body[data-theme="bitterDark"] #identityModal .identity-preview-chip,
body[data-theme="bitterDark"] #identityModal .identity-avatar-grid {
	background: rgba(255, 255, 255, 0.06) !important;
	border-color: rgba(255, 255, 255, 0.1) !important;
}

body[data-theme="bitterDark"] #identityModal .identity-avatar-item {
	background: transparent !important;
}

body[data-theme="bitterDark"] #identityModal .identity-avatar-item:hover {
	background: rgba(255, 255, 255, 0.08) !important;
}

body[data-theme="bitterDark"] #identityModal [role="dialog"] > div:first-child,
body[data-theme="bitterDark"] #identityModal [role="dialog"] > div:last-child,
body[data-theme="bitterDark"] .qb-header {
	border-color: #2a2a30 !important;
}

body[data-theme="bitterDark"] #identityModal [role="dialog"] > div:last-child,
body[data-theme="bitterDark"] .identity-modal-footer {
	background: rgba(255, 255, 255, 0.04) !important;
}

body[data-theme="bitterDark"] .ps-search-help-arrow {
	background: #131216 !important;
	border-color: #2a2a30 !important;
}

/* ═══════════════════════════════════════════════════════════
   Command Palette  (Shift+Cmd/Ctrl+P)
   ═══════════════════════════════════════════════════════════ */

/* ── Dialog shell ── */
.cmd-palette-dialog {
	background: var(--panel-solid-bg, #0f0a1a);
	border-color: var(--modal-border, rgba(255,255,255,0.1));
	box-shadow: 0 24px 80px rgba(0,0,0,0.55), 0 0 0 1px var(--modal-border, rgba(255,255,255,0.1));
	max-height: min(520px, 70vh);
	animation: cmdPaletteIn 0.18s ease-out;
}

#cmdPalette [data-role="cmdPaletteBackdrop"] {
	background: rgba(15, 23, 42, 0.22) !important;
	backdrop-filter: blur(6px) saturate(115%);
	-webkit-backdrop-filter: blur(6px) saturate(115%);
}

body[data-theme="coffeeLight"] #cmdPalette [data-role="cmdPaletteBackdrop"],
body[data-theme="bitterLight"] #cmdPalette [data-role="cmdPaletteBackdrop"],
body[data-theme="monoLight"] #cmdPalette [data-role="cmdPaletteBackdrop"] {
	background: rgba(15, 23, 42, 0.16) !important;
}
@keyframes cmdPaletteIn {
	from { opacity: 0; transform: translateY(-12px) scale(0.97); }
	to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* ── Search input area ── */
.cmd-palette-icon {
	color: var(--accent-text-soft, rgba(244,114,182,0.95));
	opacity: 0.7;
}
.cmd-palette-input {
	color: var(--accent-text, rgba(253,242,255,0.98));
	font-size: 15px;
	font-weight: 500;
	caret-color: var(--accent-strong, rgba(217,70,239,0.6));
	background-color: var(--panel-solid-bg, #0f0a1a) !important;
	border-color: transparent !important;
	appearance: none;
	-webkit-appearance: none;
}
.cmd-palette-input::placeholder {
	color: rgba(148,163,184,0.45);
	font-weight: 400;
}
.cmd-palette-hint {
	color: var(--accent-text-soft, rgba(244,114,182,0.95));
}

/* ── Filter chips ── */
.cmd-palette-filters {
	min-height: 34px;
	align-items: center;
	align-content: center;
	padding-top: 2px;
	padding-bottom: 8px;
	margin-top: -2px;
	position: relative;
	z-index: 2;
}
.cmd-palette-filters:empty {
	display: none;
}
.cmd-filter-chip {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
	border: 1px solid var(--accent-border, rgba(217,70,239,0.3));
	background: transparent;
	color: var(--accent-text-soft, rgba(244,114,182,0.95));
	user-select: none;
}
.cmd-filter-chip:hover {
	background: var(--accent-bg-soft, rgba(217,70,239,0.1));
}
.cmd-filter-chip:active {
	transform: scale(0.95);
}
.cmd-filter-chip--active {
	background: var(--accent-bg, rgba(217,70,239,0.15));
	border-color: var(--accent-border-strong, rgba(217,70,239,0.4));
	color: var(--accent-text, rgba(253,242,255,0.98));
}
.cmd-filter-chip--active:hover {
	background: var(--accent-bg-hover, rgba(217,70,239,0.2));
}
.cmd-filter-chip .chip-icon {
	font-size: 13px;
	line-height: 1;
	color: var(--accent-text-soft, rgba(244,114,182,0.85));
	opacity: 0.9;
}

.cmd-svg-icon {
	display: block;
	width: 14px;
	height: 14px;
	color: currentColor;
}
.cmd-svg-icon--item {
	width: 15px;
	height: 15px;
}
.cmd-svg-icon--chip {
	width: 13px;
	height: 13px;
}

/* ── Divider ── */
.cmd-palette-divider {
	height: 1px;
	background: var(--accent-border, rgba(217,70,239,0.3));
	opacity: 0.4;
	margin: 0 16px;
}

/* ── Results list ── */
.cmd-palette-results {
	scrollbar-width: thin;
	scrollbar-color: var(--scrollbar-thumb) transparent;
}
.cmd-palette-results:empty::after {
	content: attr(data-empty-text);
	display: block;
	text-align: center;
	padding: 24px 16px;
	font-size: 13px;
	color: rgba(148,163,184,0.45);
}

/* ── Result group header ── */
.cmd-group-header {
	padding: 6px 12px 4px;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--accent-text-soft, rgba(244,114,182,0.95));
	opacity: 0.6;
	user-select: none;
}

/* ── Result item ── */
.cmd-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 12px;
	border-radius: 10px;
	cursor: pointer;
	transition: background 0.12s, color 0.12s;
	color: rgba(226,232,240,0.85);
	font-size: 13px;
	user-select: none;
}

.cmd-item:hover {
	background: var(--accent-bg-soft, rgba(217,70,239,0.1));
	color: var(--accent-text, rgba(253,242,255,0.98));
}
.cmd-item--active {
	background: rgba(255,255,255,0.06);
	box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
	color: var(--accent-text, rgba(253,242,255,0.98));
}
.cmd-item-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 8px;
	background: var(--accent-bg-soft, rgba(217,70,239,0.1));
	color: var(--accent-text-soft, rgba(244,114,182,0.95));
	font-size: 14px;
	flex-shrink: 0;
	opacity: 0.9;
}
.cmd-item--active .cmd-item-icon {
	background: var(--accent-bg-hover, rgba(217,70,239,0.2));
	color: var(--accent-text, rgba(253,242,255,0.98));
}
.cmd-item-label {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-weight: 500;
}
.cmd-item-label mark {
	background: var(--accent-bg, rgba(217,70,239,0.15));
	color: var(--accent-text, rgba(253,242,255,0.98));
	border-radius: 2px;
	padding: 0 1px;
}
.cmd-item-shortcut {
	display: flex;
	align-items: center;
	gap: 3px;
	flex-shrink: 0;
}
.cmd-item-shortcut kbd {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	border-radius: 5px;
	border: 1px solid rgba(255,255,255,0.08);
	background: rgba(255,255,255,0.04);
	font-size: 10px;
	font-family: inherit;
	color: rgba(148,163,184,0.55);
	line-height: 1;
}
.cmd-item-meta {
	font-size: 11px;
	color: rgba(148,163,184,0.45);
	flex-shrink: 0;
}

/* ── Footer ── */
.cmd-palette-footer {
	border-top: 1px solid rgba(255,255,255,0.06);
	background: rgba(0,0,0,0.15);
}
.cmd-palette-key-hint {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 11px;
	color: rgba(148,163,184,0.4);
}
.cmd-palette-key-hint kbd {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 18px;
	height: 18px;
	padding: 0 4px;
	border-radius: 4px;
	border: 1px solid rgba(255,255,255,0.08);
	background: rgba(255,255,255,0.04);
	font-size: 10px;
	font-family: inherit;
	color: rgba(148,163,184,0.55);
	line-height: 1;
}
.cmd-palette-count {
	color: rgba(148,163,184,0.4);
}

/* ── Light-Theme overrides ── */
body[data-theme="coffeeLight"] .cmd-palette-dialog,
body[data-theme="bitterLight"] .cmd-palette-dialog,
body[data-theme="monoLight"] .cmd-palette-dialog {
	background: var(--panel-solid-bg, #f3ebe2);
	box-shadow: 0 24px 80px rgba(0,0,0,0.15), 0 0 0 1px var(--modal-border, #d9c7bc);
}
body[data-theme="coffeeLight"] .cmd-palette-input,
body[data-theme="bitterLight"] .cmd-palette-input,
body[data-theme="monoLight"] .cmd-palette-input {
	color: rgba(30,30,30,0.92);
	background-color: var(--panel-solid-bg, #f3ebe2) !important;
	border-color: transparent !important;
}
body[data-theme="coffeeLight"] .cmd-palette-input::placeholder,
body[data-theme="bitterLight"] .cmd-palette-input::placeholder,
body[data-theme="monoLight"] .cmd-palette-input::placeholder {
	color: rgba(100,100,100,0.5);
}
body[data-theme="coffeeLight"] .cmd-item,
body[data-theme="bitterLight"] .cmd-item,
body[data-theme="monoLight"] .cmd-item {
	color: rgba(30,30,30,0.75);
}
body[data-theme="coffeeLight"] .cmd-item:hover,
body[data-theme="bitterLight"] .cmd-item:hover,
body[data-theme="monoLight"] .cmd-item:hover {
	color: rgba(30,30,30,0.92);
}
body[data-theme="coffeeLight"] .cmd-item--active,
body[data-theme="bitterLight"] .cmd-item--active,
body[data-theme="monoLight"] .cmd-item--active {
	background: rgba(0,0,0,0.04);
	box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
	color: rgba(30,30,30,0.92);
}
body[data-theme="coffeeLight"] .cmd-group-header,
body[data-theme="bitterLight"] .cmd-group-header,
body[data-theme="monoLight"] .cmd-group-header {
	color: rgba(80,60,40,0.7);
}
body[data-theme="coffeeLight"] .cmd-palette-footer,
body[data-theme="bitterLight"] .cmd-palette-footer,
body[data-theme="monoLight"] .cmd-palette-footer {
	background: rgba(0,0,0,0.04);
	border-top-color: rgba(0,0,0,0.08);
}
body[data-theme="coffeeLight"] .cmd-item-shortcut kbd,
body[data-theme="bitterLight"] .cmd-item-shortcut kbd,
body[data-theme="monoLight"] .cmd-item-shortcut kbd,
body[data-theme="coffeeLight"] .cmd-palette-key-hint kbd,
body[data-theme="bitterLight"] .cmd-palette-key-hint kbd,
body[data-theme="monoLight"] .cmd-palette-key-hint kbd {
	border-color: rgba(0,0,0,0.1);
	background: rgba(0,0,0,0.04);
	color: rgba(80,60,40,0.5);
}
body[data-theme="coffeeLight"] .cmd-palette-key-hint,
body[data-theme="bitterLight"] .cmd-palette-key-hint,
body[data-theme="monoLight"] .cmd-palette-key-hint,
body[data-theme="coffeeLight"] .cmd-palette-count,
body[data-theme="bitterLight"] .cmd-palette-count,
body[data-theme="monoLight"] .cmd-palette-count {
	color: rgba(80,60,40,0.4);
}
body[data-theme="coffeeLight"] .cmd-palette-divider,
body[data-theme="bitterLight"] .cmd-palette-divider,
body[data-theme="monoLight"] .cmd-palette-divider {
	background: rgba(0,0,0,0.1);
}
body[data-theme="coffeeLight"] .cmd-item-label mark,
body[data-theme="bitterLight"] .cmd-item-label mark,
body[data-theme="monoLight"] .cmd-item-label mark {
	background: rgba(250,204,21,0.3);
	color: rgba(30,30,30,0.95);
}
body[data-theme="coffeeLight"] .cmd-filter-chip,
body[data-theme="bitterLight"] .cmd-filter-chip,
body[data-theme="monoLight"] .cmd-filter-chip {
	color: rgba(80,60,40,0.7);
	border-color: rgba(0,0,0,0.12);
}
body[data-theme="coffeeLight"] .cmd-filter-chip--active,
body[data-theme="bitterLight"] .cmd-filter-chip--active,
body[data-theme="monoLight"] .cmd-filter-chip--active {
	color: rgba(30,30,30,0.9);
}
body[data-theme="coffeeLight"] .cmd-palette-results:empty::after,
body[data-theme="bitterLight"] .cmd-palette-results:empty::after,
body[data-theme="monoLight"] .cmd-palette-results:empty::after {
	color: rgba(80,60,40,0.4);
}

/* ── Mobile adjustments ── */
@media (max-width: 640px) {
	.cmd-palette-dialog {
		margin-top: 8px;
		margin-left: 8px;
		margin-right: 8px;
		max-height: calc(100vh - 16px);
		max-width: calc(100vw - 16px);
		border-radius: 16px;
	}
}
