/* === css/main.css === */


/* === css/body.css === */
body {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    background-color: var(--bg-light-tone) !important;
    font-family: var(--app-font);
}

input, textarea {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

#plusZoom {
    cursor: pointer;
}

#minusZoom {
    cursor: pointer;
}

#zoomLevel {
    display: none;
}


.background_dots {
    background-image: radial-gradient(circle, rgb(54,39,51,0.6) 1px, transparent 1px);
    background-size: 20px 20px;
}


.background_grid {
    background-image: linear-gradient(to right, rgb(54,39,51,0.3) 1px, transparent 1px), linear-gradient(to bottom, rgb(54,39,51,0.3) 1px, transparent 1px);
    background-size: 20px 20px;
}

body.view-only #page-sidebar,
body.view-only .sidebar-trigger,
body.view-only #titleBox,
body.view-only #left-arrow,
body.view-only #send-all-down,
body.view-only #space-up {
    display: none !important;
}





/* === css/title.css === */
/********  Title  ********/

#canvas-header-bar {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 75px;
	background: var(--bg-dark-tone);
	border-bottom: 1px solid var(--border-dark-tone);
	z-index: 887;
	opacity: 0;
	transition: opacity 0.2s ease;
	pointer-events: none;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 20px;
	box-sizing: border-box;
}
#canvas-header-bar.visible,
#canvas-header-bar.folder-mode {
	opacity: 1;
	pointer-events: auto;
}

/* Header view toggle buttons */
#header-view-toggles {
	display: flex;
	gap: 6px;
	align-items: center;
}
.header-view-btn {
	background: var(--bg-dark-tone);
	border: 1px solid transparent;
	border-radius: 6px;
	width: 46px;
	height: 46px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	color: var(--text-light-tone);
	transition: all 0.15s ease;
	opacity: 0.6;
}
.header-view-btn img {
	width: 24px;
	height: 24px;
}
.header-view-btn:hover {
	border-color: var(--border-dark-tone);
	opacity: 0.85;
}
.header-view-btn.active {
	border-color: var(--border-dark-tone);
	opacity: 1;
	color: var(--text-light-tone);
}

/* Header action buttons (notes, bookmarks) — pinned to far right */
#header-actions {
	position: absolute;
	right: 20px;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	gap: 8px;
	align-items: center;
}
.header-action-btn {
	width: 46px;
	height: 46px;
	padding: 10px;
	border: 1px solid transparent;
	background: var(--bg-dark-tone);
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.15s ease;
	opacity: 0.6;
	box-sizing: border-box;
	object-fit: contain;
}
.header-action-btn:hover {
	border-color: var(--border-dark-tone);
	opacity: 0.85;
}

#title {
	position: fixed;
	top: 12px;
	left: 10px;
	z-index: 888;
	cursor: pointer;
	overflow: visible;
}

#title-row {
	display: flex;
	align-items: center;
}

#profile-btn {
	width: 0;
	min-width: 0;
	opacity: 0;
	cursor: pointer;
	border-radius: 50%;
	transition: width 0.25s ease, opacity 0.25s ease, margin 0.25s ease, padding 0.25s ease;
	margin-right: 0;
	object-fit: contain;
	flex-shrink: 0;
	overflow: hidden;
	pointer-events: none;
	padding: 0;
}

#profile-btn.visible {
	width: 24px;
	opacity: 1;
	margin-right: 6px;
	pointer-events: auto;
	padding: 8px;
	box-sizing: content-box;
	align-self: stretch;
	object-fit: contain;
	border: 1px solid transparent;
	border-radius: 4px;
}

#profile-btn.visible:hover {
	border: 1px solid var(--border-middle-tone);
}

#profile-btn.visible.selected {
	border: 1px solid var(--border-middle-tone);
}

#title_title {
	border: 1px solid transparent;
	font-size: 24px;
	color: var(--text-dark-tone);
	font-weight: 500;
	padding: 8px 16px;
	background-color: transparent;
	border-radius: 4px;
	transition: all 0.2s ease;
}

#title_title:hover {
	border: 1px solid var(--border-middle-tone);
}

/* #6E1055 */

#send-all-down {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	top: 100%;
	margin-top: 4px;
	width: 40px;
	cursor: pointer;
	background-color: transparent;
	padding: 6px;
	border-radius: 6px;
	opacity: 0.5;
	transition: opacity 0.15s ease;
}

#send-all-down:hover {
	opacity: 1;
}

#left-arrow {
	position: fixed;
	left: 0px;
	top: 50%;
	transform: translateY(-50%);
	z-index: 888;
}

#left-arrow-icon {
	width: 35px;
	height: 35px;
	background-color: transparent;
	border-radius: 50%;
	box-shadow: none;
	padding: 5px;
	transform: rotate(-90deg);
	animation: fadeInOut 6s infinite;
}

/* Animation for alternating visibility */
@keyframes fadeInOut {

	0%,
	100% {
		opacity: 0.7;
		/* Maximum opacity (70%) */
	}

	50% {
		opacity: 0;
		/* Invisible */
	}
}

#titleBox {
	display: none;
	position: fixed;
	top: 76px;
	left: 10px;
	flex-direction: column;
	align-items: flex-start;
	background-color: var(--bg-light-tone);
	border: 1px solid var(--border-middle-tone);
	border-radius: 8px;
	padding: 24px;
	z-index: 99999;
	font-size: 16px;
	gap: 10px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
	pointer-events: auto;
}

#titleBox-logo-wrap {
	align-self: center;
	margin-bottom: 2px;
}

#titleBox-logo {
	height: 24px;
	width: auto;
	object-fit: contain;
}

/* ── Create page modal ─────────────────────────────────── */

#create-page-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 999999;
}

#create-page-backdrop {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.25);
}

#create-page-box {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 1;
	background-color: var(--bg-light-tone);
	border: 1px solid var(--border-middle-tone);
	border-radius: 8px;
	padding: 24px;
	min-width: 320px;
	max-width: 90vw;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
	display: flex;
	flex-direction: column;
	gap: 14px;
}

#create-page-label {
	font-size: 15px;
	font-weight: 600;
	color: var(--text-dark-tone);
}

#create-page-input {
	width: 100%;
	box-sizing: border-box;
	padding: 8px 12px;
	border: 1px solid var(--border-light-tone);
	border-radius: 6px;
	font-size: 14px;
	font-family: inherit;
	background-color: var(--bg-light-tone);
	color: var(--text-dark-tone);
	outline: none;
}

#create-page-input:focus {
	border-color: var(--border-middle-tone);
}

#create-page-actions {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
}

#create-page-cancel,
#create-page-confirm {
	padding: 6px 16px;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	border: 1px solid var(--border-middle-tone);
	font-family: inherit;
}

#create-page-cancel {
	background: transparent;
	color: var(--text-light-tone);
}

#create-page-cancel:hover {
	background-color: var(--bg-middle-tone);
}

#create-page-confirm {
	background-color: var(--border-middle-tone);
	color: var(--bg-light-tone);
	border-color: var(--border-middle-tone);
}

#create-page-confirm:hover {
	background-color: var(--border-middle-tone);
}

#profileBox {
	display: none;
	position: fixed;
	top: 10px;
	left: 10px;
	flex-direction: column;
	align-items: flex-start;
	background-color: var(--bg-light-tone);
	border: 1px solid var(--border-middle-tone);
	border-radius: 8px;
	padding: 18px 22px;
	z-index: 99999;
	font-size: 15px;
	gap: 10px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
	pointer-events: auto;
	min-width: 180px;
}

/* GYST Logo section styles */
.title-logo-section {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 0 12px;
}

.title-logo {
	height: 24px;
	width: auto;
}

.logo-link {
	text-decoration: none;
	transition: opacity 0.2s ease;
}

.logo-link:hover {
	opacity: 0.8;
}



#title_account {
	display: flex;
	flex-direction: row;
	align-items: center;
}

#connect-google {
	height: 22px;
	width: 22px;
	cursor: pointer;
}

#google-connected-logo {
	height: 22px;
	width: 22px;
	cursor: pointer;
}

#google-connected-checkmark {
	height: 18px;
	width: 18px;
	cursor: pointer;
}

#tdb_status {
	display: flex;
	flex-direction: row;
	align-items: center;
}

.titlebox-label {
	font-size: 13px;
	text-decoration: underline;
}

/* Social media section styles for titleBox */
.social-media-section {
	text-align: center;
	margin: 10px 0 0 0;
	padding: 0;
	width: 100%;
	display: flex;
	justify-content: center;
}

.social-icons {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 20px;
}

.social-link {
	text-decoration: none;
	color: inherit;
	transition: transform 0.2s ease, opacity 0.2s ease;
	display: flex;
	align-items: center;
	justify-content: center;
}

.social-link:hover {
	transform: scale(1.1);
	opacity: 0.8;
}

.social-link i {
	font-size: 20px;
	color: #000000;
}

.profile-logout-section {
	margin-top: 12px;
	text-align: center;
	width: 100%;
}

.profile-logout-btn {
	font-size: 13px;
	color: var(--text-middle-tone);
	text-decoration: none;
	cursor: pointer;
}

.profile-logout-btn:hover {
	opacity: 0.7;
}

.x-icon {
	width: 20px;
	height: 20px;
	position: relative;
	top: -1px;
}

.status_button {
	border: none;
	border-radius: 4px;
	cursor: default;
	padding: 5px 11px;
	margin-left: 6px;
	background-color: var(--bg-middle-tone);
	transition: background-color 0.2s ease;
	color: var(--border-middle-tone);
	font-size: 13px;
}

.status_button.status_selected {
	background-color: var(--border-middle-tone);
	color: var(--bg-light-tone);
}

#privacy-picker-wrap {
	position: relative;
	display: inline-flex;
	align-items: center;
	margin-left: 6px;
}

#privacy-picker-btn {
	font-size: 18px;
	color: var(--text-light-tone);
	cursor: pointer;
	line-height: 1;
	padding: 0 4px;
	user-select: none;
	transition: color 0.2s;
}

#privacy-picker-btn:hover {
	color: var(--border-middle-tone);
}

#privacy-picker-list {
	display: none;
	position: absolute;
	left: calc(100% + 6px);
	top: 50%;
	transform: translateY(-50%);
	background: var(--bg-light-tone);
	border: 1px solid var(--border-light-tone);
	border-radius: 6px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
	padding: 4px 0;
	z-index: 10;
	white-space: nowrap;
}

#privacy-picker-wrap:hover #privacy-picker-list,
#privacy-picker-wrap.open #privacy-picker-list {
	display: flex;
	flex-direction: row;
}

#privacy-picker-wrap::after {
	content: '';
	position: absolute;
	left: 100%;
	top: 0;
	width: 20px;
	height: 100%;
	display: none;
}

#privacy-picker-wrap:hover::after {
	display: block;
}

.privacy-col {
	display: flex;
	flex-direction: column;
}

.edit-perm-col {
	display: none;
	flex-direction: column;
	border-left: 1px solid var(--border-light-tone);
}

.edit-perm-col.visible {
	display: flex;
}

.privacy-option,
.edit-perm-option {
	padding: 5px 16px;
	font-size: 13px;
	color: var(--text-middle-tone);
	cursor: pointer;
	transition: background-color 0.15s;
}

.privacy-option:hover,
.edit-perm-option:hover {
	background-color: var(--bg-middle-tone);
}

.privacy-option.active,
.edit-perm-option.active {
	background-color: var(--border-middle-tone);
	color: var(--bg-light-tone);
}

/* Copy row: only visible when public (2x3 table). Private = 2 rows only. */
#copy-page-link {
	display: none !important;
	align-items: center;
	justify-content: center;
	padding: 5px 16px;
	color: var(--text-light-tone);
	cursor: pointer;
	transition: color 0.15s;
}

#copy-page-link:hover {
	color: var(--border-middle-tone);
}

#privacy-picker-list.public-mode #copy-page-link {
	display: flex !important;
}

/* Owner password modal */
#edit-password-modal {
	display: none;
	position: fixed;
	top: 0; left: 0; right: 0; bottom: 0;
	z-index: 1000;
}

#edit-password-modal.visible {
	display: flex;
	align-items: center;
	justify-content: center;
}

#edit-password-modal-content {
	background: var(--bg-light-tone);
	border: 1px solid var(--border-light-tone);
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0,0,0,.15);
	padding: 20px 28px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-width: 260px;
}

#edit-password-modal-content label {
	font-size: 14px;
	color: var(--text-middle-tone);
	font-weight: 500;
}

#edit-password-input {
	border: 1px solid var(--border-light-tone);
	border-radius: 4px;
	padding: 8px 10px;
	font-size: 14px;
	outline: none;
	font-family: monospace;
}

#edit-password-input:focus {
	border-color: var(--border-middle-tone);
}

/* Visitor password bar */
#visitor-password-bar {
	position: fixed;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%);
	background: var(--bg-light-tone);
	border: 1px solid var(--border-light-tone);
	border-radius: 8px;
	box-shadow: 0 2px 12px rgba(0,0,0,.12);
	padding: 10px 18px;
	display: flex;
	align-items: center;
	gap: 10px;
	z-index: 900;
	font-size: 13px;
	color: var(--text-middle-tone);
	white-space: nowrap;
}

#visitor-password-input {
	border: 1px solid var(--border-light-tone);
	border-radius: 4px;
	padding: 5px 8px;
	font-size: 13px;
	width: 130px;
	outline: none;
}

#visitor-password-input:focus {
	border-color: var(--border-middle-tone);
}

#visitor-password-submit {
	background: var(--border-middle-tone);
	color: var(--bg-light-tone);
	border: none;
	border-radius: 4px;
	padding: 5px 12px;
	font-size: 13px;
	cursor: pointer;
}

#visitor-password-submit:hover {
	background: var(--text-middle-tone);
}

#visitor-password-error {
	color: #c0392b;
	font-size: 12px;
}

#titleRCBox {
	z-index: 8;
	display: none;
	position: absolute;
	top: 300px;
	left: 300px;
}

.status_selected {
	background-color: var(--border-middle-tone);
	color: var(--bg-light-tone);
}

#tdb_integrations {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: flex-start;
	margin-top: 3px;
	gap: 5px;
}

#tdb_export {
	display: flex;
	flex-direction: row;
	align-items: center;
	margin-top: 6px;
	gap: 6px;
}

.export-pdf-btn {
	height: 15px;
	cursor: pointer;
	opacity: 0.55;
	transition: opacity 0.15s;
}

.export-pdf-btn:hover {
	opacity: 1;
}

/* Template modal */
#template-modal {
	z-index: 100002;
	align-items: center;
	justify-content: center;
}

.template-modal-content {
	width: 90%;
	max-width: 480px;
	margin: 0;
	padding: 18px 24px;
	background: var(--bg-light-tone);
	border-radius: 10px;
	border: 1px solid var(--border-light-tone);
	box-shadow: 0 4px 24px rgba(0,0,0,0.15);
}

.template-modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 14px;
}

.template-modal-title {
	font-size: 14px;
	font-weight: 600;
	color: var(--text-dark-tone);
}

.template-modal-body {
	display: flex;
	align-items: center;
	gap: 8px;
}

#template-url-input {
	flex: 1;
	padding: 7px 10px;
	font-size: 12px;
	border: 1px solid var(--border-light-tone);
	border-radius: 5px;
	background: var(--bg-middle-tone);
	color: var(--text-dark-tone);
	outline: none;
	font-family: monospace;
}

#template-url-input:focus {
	border-color: var(--text-light-tone);
}

#template-copy-btn {
	height: 22px;
	width: 22px;
	padding: 2px;
	cursor: pointer;
	opacity: 0.55;
	transition: opacity 0.15s;
	object-fit: contain;
}

#template-copy-btn:hover {
	opacity: 1;
}

/* Template loading overlay */
#template-loading-overlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 100003;
	background: rgba(0,0,0,0.35);
	align-items: center;
	justify-content: center;
	flex-direction: column;
	gap: 16px;
}

#template-loading-overlay.visible {
	display: flex;
}

.template-loading-spinner {
	width: 36px;
	height: 36px;
	border: 3px solid rgba(255,255,255,0.3);
	border-top-color: var(--bg-light-tone);
	border-radius: 50%;
	animation: tpl-spin 0.7s linear infinite;
}

@keyframes tpl-spin {
	to { transform: rotate(360deg); }
}

.template-loading-text {
	color: var(--bg-light-tone);
	font-size: 14px;
	font-weight: 500;
}

.integration-icon {
	height: 15px;
	width: 15px;
}

#tdb_background {
	margin-top: 10px;
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: flex-start;
	position: relative;
}

#tdb_page_color {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 8px;
	margin-top: 6px;
}

#page-color-swatches {
	display: flex;
	gap: 4px;
	align-items: center;
}

.page-color-swatch {
	width: 18px;
	height: 18px;
	border-radius: 4px;
	border: 1.5px solid var(--border-light-tone);
	cursor: pointer;
	box-sizing: border-box;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.page-color-swatch:hover {
	border-color: var(--border-middle-tone);
}

.page-color-swatch.selected {
	border-color: var(--border-middle-tone);
	box-shadow: 0 0 0 2px rgba(139,90,43,0.3);
}

.background_btn {
	width: 35px;
	height: 35px;
	margin-left: 10px;
	cursor: pointer;
	border: 0.2px solid grey;
	border-radius: 22px;
}

/* Background image overlay */
#bg-image-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: -1;
	background-repeat: repeat;
	background-size: auto;
	display: none;
}

/* Background preview circle button */
#btn_bg_preview {
	width: 35px;
	height: 35px;
	margin-left: 10px;
	border-radius: 50%;
	border: 0.2px solid grey;
	background-size: cover;
	background-position: center;
	cursor: pointer;
	flex-shrink: 0;
}

/* Background opacity slider box */
#bg-opacity-box {
	position: absolute;
	display: none;
	align-items: center;
	padding: 3px 8px;
	height: 28px;
	background: var(--bg-light-tone);
	border: 1px solid var(--border-light-tone);
	border-radius: 4px;
	box-shadow: 0 1px 4px rgba(0,0,0,0.12);
	z-index: 9999;
}

#bg-opacity-slider {
	-webkit-appearance: none;
	appearance: none;
	width: 60px;
	height: 4px;
	background: var(--border-light-tone);
	border-radius: 2px;
	outline: none;
	cursor: pointer;
}

#bg-opacity-slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--text-light-tone);
	cursor: pointer;
}

#bg-opacity-slider::-moz-range-thumb {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--text-light-tone);
	border: none;
	cursor: pointer;
}

#bg-opacity-slider::-moz-range-track {
	height: 4px;
	background: var(--border-light-tone);
	border-radius: 2px;
}

/* Custom background image button */
#btn_background_custom_wrap {
	position: relative;
	display: inline-flex;
	align-items: center;
	margin-left: 10px;
}

#btn_background_custom {
	font-size: 22px;
	color: var(--text-light-tone);
	cursor: pointer;
	transition: color 0.2s;
	line-height: 1;
	padding: 0 4px;
	user-select: none;
}

#btn_background_custom:hover {
	color: var(--border-middle-tone);
}

.bg-custom-hover-btn {
	display: none;
	position: absolute;
	left: calc(100% + 6px);
	top: 50%;
	transform: translateY(-50%);
	padding: 4px 10px;
	background: var(--border-middle-tone);
	color: var(--bg-light-tone);
	font-size: 11px;
	border-radius: 4px;
	white-space: nowrap;
	cursor: pointer;
}

#btn_background_custom_wrap::after {
	content: '';
	position: absolute;
	left: 100%;
	top: 0;
	width: 20px;
	height: 100%;
	display: none;
}

#btn_background_custom_wrap:hover::after {
	display: block;
}

#btn_background_custom_wrap:hover .bg-custom-hover-btn {
	display: block;
}

#modal-drop-image-background {
	text-align: center;
	width: 100%;
	height: 400px;
	border: dashed 2px var(--border-middle-tone);
	border-radius: 6px;
	padding-top: 5px;
	font-size: 16px;
}

/* Removed btn_show_parents CSS */

/* Removed show_parents CSS */

/* Modal: text only, no overlay */
#show-commands {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: transparent;
	pointer-events: none;
	z-index: 1000;
	justify-content: center;
	align-items: center;
}

/* Modal content */
#show-commands-modal {
	pointer-events: auto;
	background-color: var(--bg-middle-tone);
	padding: 24px 32px;
	border-radius: 12px;
	border: 1px solid var(--border-middle-tone);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
	/* Adds space between lines of text */
	text-align: left;
	font-size: 16px;
	max-width: 560px;
	width: 90%;
}

#show-commands-title {
	font-size: 18px;
	font-weight: 600;
	color: var(--text-dark-tone);
	align-self: center;
	margin-bottom: 4px;
}

.show-commands-btn {
	cursor: pointer;
	background-color: var(--bg-light-tone);
	color: var(--text-dark-tone);
	border: 1px solid var(--text-dark-tone);
	border-radius: 8px;
	padding: 5px 13px;
	font-size: 13px;
	font-weight: 500;
	text-align: center;
	transition: background-color 0.2s;
	margin-bottom: 6px;
}

.show-commands-btn:hover {
	background-color: var(--bg-middle-tone);
}

/* Modal background */
#show-account {
	display: none;
	/* Hidden by default */
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	/* Semi-transparent background */
	z-index: 1000;
	justify-content: center;
	/* Horizontally center */
	align-items: center;
	/* Vertically center */
}

/* Modal content */
#show-account-modal {
	background-color: var(--bg-light-tone);
	padding: 24px 32px;
	border-radius: 12px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	text-align: center;
	font-size: 16px;
	max-width: 90vw;
	width: fit-content;
	min-width: 340px;
}

#show-account-btn {
	padding: 0px;
	align-self: flex-start;
	margin-top: 0px;
	margin-left: 0px;
	color: var(--border-middle-tone);
	text-decoration: underline;
	cursor: pointer;
}

#account_title {
	align-self: center;
	font-size: 20px;
	text-decoration: underline;
	color: var(--border-middle-tone);
}

#plan-cards {
	display: flex;
	gap: 16px;
	width: 100%;
	margin-top: 4px;
}

.plan-card-row {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
}

.plan-card {
	flex: 1 1 0;
	min-width: 200px;
	border: 1px solid var(--border-light-tone);
	border-radius: 10px;
	padding: 20px 16px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	background: var(--bg-light-tone);
	transition: border-color 0.2s;
}

.plan-card-active {
	border-color: var(--border-middle-tone);
	border-width: 2px;
}

.plan-card-header {
	font-size: 17px;
	font-weight: 600;
	color: var(--text-dark-tone);
}

.plan-card-price {
	font-size: 28px;
	font-weight: 700;
	color: var(--text-dark-tone);
	line-height: 1;
}

.plan-price-period {
	font-size: 14px;
	font-weight: 400;
	color: var(--text-light-tone);
}

.plan-card-features {
	list-style: none;
	padding: 0;
	margin: 8px 0 4px 0;
	font-size: 13px;
	color: var(--text-middle-tone);
	text-align: left;
	width: 100%;
}

.plan-card-features li {
	padding: 3px 0;
}

.plan-card-features li::before {
	content: "\2713 ";
	color: var(--text-light-tone);
	font-weight: 600;
	margin-right: 4px;
}

.billing-toggle {
	display: flex;
	gap: 0;
	border: 1px solid var(--border-light-tone);
	border-radius: 20px;
	overflow: hidden;
	margin-bottom: 4px;
}

.billing-option {
	padding: 4px 14px;
	font-size: 12px;
	cursor: pointer;
	color: var(--text-light-tone);
	transition: background 0.15s, color 0.15s;
	user-select: none;
}

.billing-option-active {
	background: var(--text-dark-tone);
	color: var(--bg-light-tone);
}

.billing-option:not(.billing-option-active):hover {
	background: var(--bg-middle-tone);
}

.plan-price-note {
	display: block;
	font-size: 12px;
	font-weight: 400;
	color: var(--text-light-tone);
	margin-top: 2px;
}

.special-price {
	display: block;
}

.original-price {
	display: block;
	font-size: 13px;
	font-weight: 400;
	color: var(--text-light-tone);
	text-decoration: line-through;
	margin-top: 3px;
}

#cancel-notice {
	font-size: 12px;
	color: #c0392b;
	background: #fdecea;
	border-radius: 6px;
	padding: 6px 10px;
	margin-top: 4px;
	text-align: center;
	width: 100%;
}

.plan-card-badge {
	font-size: 12px;
	color: var(--text-light-tone);
	border: 1px solid var(--border-middle-tone);
	border-radius: 12px;
	padding: 2px 12px;
	margin-top: 4px;
}

.plan-card-btn {
	width: 100%;
	padding: 8px 0;
	border: none;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	margin-top: 6px;
	transition: background 0.15s;
}

.plan-btn-upgrade {
	background: var(--text-dark-tone);
	color: var(--bg-light-tone);
	display: flex;
	flex-direction: column;
	align-items: center;
}

.plan-btn-upgrade:hover {
	background: var(--text-middle-tone);
}

.upgrade-btn-sub {
	display: block;
	font-size: 10px;
	font-weight: 400;
	opacity: 0.85;
	margin-top: 2px;
	white-space: nowrap;
}

.plan-btn-downgrade {
	background: var(--bg-middle-tone);
	color: var(--text-dark-tone);
	border: 1px solid var(--border-light-tone);
}

.plan-btn-downgrade:hover {
	background: #eddfd0;
}

.plan-btn-manage {
	background: var(--bg-middle-tone);
	color: var(--text-dark-tone);
	border: 1px solid var(--border-middle-tone);
}

.plan-btn-manage:hover {
	background: #eddcc8;
}

.plan-btn-switch-billing {
	background: transparent;
	color: var(--text-dark-tone);
	border: 1px solid var(--border-middle-tone);
	font-size: 13px;
}

.plan-btn-switch-billing:hover {
	background: var(--bg-middle-tone);
}

/* Change password button & modal */
#change-password-btn {
	color: var(--text-dark-tone);
	cursor: pointer;
	font-size: 14px;
	text-decoration: underline;
	margin-top: 2px;
}

#change-password-btn:hover {
	color: var(--text-light-tone);
}

#change-password-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.35);
	z-index: 10001;
	display: flex;
	align-items: center;
	justify-content: center;
}

#change-password-form {
	background: var(--bg-light-tone);
	border-radius: 10px;
	padding: 32px 28px 24px;
	width: 320px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.cp-title {
	font-size: 17px;
	font-weight: 600;
	color: var(--text-dark-tone);
	text-align: center;
	margin-bottom: 4px;
}

.cp-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.cp-field label {
	font-size: 13px;
	color: var(--text-middle-tone);
}

.cp-field input {
	padding: 8px 10px;
	border: 1px solid var(--border-light-tone);
	border-radius: 6px;
	font-size: 14px;
	outline: none;
	font-family: inherit;
}

.cp-field input:focus {
	border-color: var(--border-middle-tone);
}

#cp-save-btn {
	padding: 9px 0;
	border: none;
	border-radius: 6px;
	background: var(--text-dark-tone);
	color: var(--bg-light-tone);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	margin-top: 4px;
	font-family: inherit;
}

#cp-save-btn:hover {
	background: var(--text-middle-tone);
}

#cp-save-btn:disabled {
	opacity: 0.6;
	cursor: default;
}

#cp-message {
	font-size: 13px;
	padding: 6px 10px;
	border-radius: 6px;
	text-align: center;
}

#cp-message.cp-error {
	background: #fdecea;
	color: #c0392b;
}

#cp-message.cp-success {
	background: #eaf7ea;
	color: #27ae60;
}

#coffee {
	display: none;
}

#show-coffee:hover+#coffee {
	display: block;
}

#support {
	align-self: center;
	font-size: 16px;
}

/* Three-line layout for titleBox */
#titleBox-top-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	margin-bottom: 8px;
}

#titleBox-path-row {
	width: 100%;
	margin-bottom: 0px;
	position: relative;
	display: flex;
	align-items: center;
	gap: 4px;
}

.path-current-page {
	color: var(--text-dark-tone);
	font-weight: 600;
	cursor: default;
	user-select: text;
}

.view-mode-label {
	display: inline-block;
	margin-right: 10px;
	font-size: 11px;
	color: var(--text-light-tone);
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

/* Gear icon — official parent picker */
#gear-icon {
	display: inline-flex;
	align-items: center;
	margin-left: 6px;
	color: var(--text-light-tone);
	cursor: pointer;
	opacity: 0;
	transition: opacity 0.2s ease;
	vertical-align: middle;
}

#gear-icon:hover {
	color: var(--text-middle-tone);
}

#titleBox-path-row:hover #gear-icon {
	opacity: 1;
}

#parent-picker-dropdown {
	position: absolute;
	top: 100%;
	left: 0;
	margin-top: 6px;
	background: var(--bg-light-tone);
	border: 1px solid var(--border-light-tone);
	border-radius: 8px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
	z-index: 100000;
	min-width: 200px;
	max-height: 260px;
	overflow-y: auto;
	padding: 4px 0;
}

.parent-picker-header {
	padding: 6px 12px;
	font-size: 11px;
	font-weight: 600;
	color: var(--text-light-tone);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	border-bottom: 1px solid var(--bg-light-tone);
}

.parent-picker-item {
	display: flex;
	align-items: center;
	padding: 8px 12px;
	cursor: pointer;
	font-size: 14px;
	color: var(--text-dark-tone);
	transition: background 0.15s ease;
}

.parent-picker-item:hover {
	background: var(--bg-light-tone);
}

.parent-picker-item.official {
	font-weight: 600;
	color: #2d7a1f;
	cursor: default;
}

.parent-picker-item.official:hover {
	background: transparent;
}

.parent-picker-check {
	display: inline-block;
	width: 18px;
	font-size: 13px;
	color: #2d7a1f;
	flex-shrink: 0;
}

.parent-picker-title {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

#titleBox-account-row {
	width: 100%;
	display: flex;
	justify-content: flex-start;
}

/* Parent Page Back Button */
#parent-page-btn {
	width: 32px;
	height: 32px;
	padding: 6px;
	border: 1px solid var(--border-light-tone);
	background-color: var(--bg-light-tone);
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.2s ease;
	opacity: 0.6;
	object-fit: contain;
	box-sizing: border-box;
	flex-shrink: 0;
}

#parent-page-btn:hover {
	background-color: var(--bg-middle-tone);
	border-color: var(--border-middle-tone);
	opacity: 0.8;
}

/* View Toggle Buttons */
#view-toggle-section {
	display: flex;
	gap: 8px;
	align-items: center;
}

.view-toggle-icon {
	width: 32px;
	height: 32px;
	padding: 6px;
	border: 1px solid var(--border-light-tone);
	background-color: var(--bg-light-tone);
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.2s ease;
	opacity: 0.6;
}


.view-toggle-icon:hover {
	background-color: var(--bg-light-tone);
	border-color: var(--border-middle-tone);
	opacity: 0.8;
}

.view-toggle-icon.active {
	background-color: var(--border-middle-tone);
	border-color: var(--border-middle-tone);
	opacity: 1;
}

.view-toggle-icon.active:hover {
	background-color: var(--border-middle-tone);
}

/* ── Default View Gear ──────────────────────────────── */

#view-default-gear-wrap {
	position: relative;
	display: inline-flex;
	align-items: center;
	margin-left: -2px;
}

#view-default-gear {
	width: 20px;
	height: 20px;
	color: var(--border-middle-tone);
	cursor: pointer;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease, transform 0.3s ease;
}

#view-toggle-section:hover #view-default-gear {
	opacity: 0.5;
	pointer-events: auto;
}

#view-default-gear-wrap:hover #view-default-gear {
	opacity: 1;
	pointer-events: auto;
	transform: rotate(45deg);
}

#view-default-dropdown {
	display: none;
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	margin-top: 6px;
	background: var(--bg-light-tone);
	border: 1px solid var(--border-light-tone);
	border-radius: 6px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	padding: 8px 0;
	min-width: 130px;
	z-index: 10;
}

#view-default-dropdown::before {
	content: '';
	position: absolute;
	top: -6px;
	left: 50%;
	transform: translateX(-50%);
	border-left: 6px solid transparent;
	border-right: 6px solid transparent;
	border-bottom: 6px solid var(--border-light-tone);
}

#view-default-dropdown::after {
	content: '';
	position: absolute;
	top: -5px;
	left: 50%;
	transform: translateX(-50%);
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-bottom: 5px solid var(--bg-light-tone);
}

.vd-dropdown-title {
	padding: 4px 14px 6px;
	font-size: 10px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--text-light-tone);
}

.vd-option {
	padding: 6px 14px;
	font-size: 13px;
	color: var(--text-middle-tone);
	cursor: pointer;
	transition: background-color 0.12s ease;
	display: flex;
	align-items: center;
	gap: 6px;
}

.vd-option-icon {
	width: 14px;
	height: 14px;
	opacity: 0.6;
}

.vd-option:hover {
	background-color: var(--bg-middle-tone);
}

.vd-option.vd-active {
	color: var(--border-middle-tone);
	font-weight: 600;
	background-color: var(--bg-middle-tone);
}

/* Additional Action Buttons */
#action-buttons-section {
	display: flex;
	gap: 8px;
}

.action-icon {
	width: 32px;
	height: 32px;
	padding: 6px;
	border: 1px solid var(--border-light-tone);
	background-color: var(--bg-light-tone);
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.2s ease;
	opacity: 0.6;
}

.action-icon:hover {
	background-color: var(--bg-light-tone);
	border-color: var(--border-middle-tone);
	opacity: 0.8;
}

/* ── Folder View ─────────────────────────────────────────── */

#folder-view-container {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	bottom: 0;
	background-color: var(--bg-light-tone);
	z-index: 500;
	padding: 75px 0 0 0;
	box-sizing: border-box;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

/* header border provided by #canvas-header-bar */

#fv-drop-overlay {
	display: none;
	position: absolute;
	top: 12px;
	left: 12px;
	right: 12px;
	bottom: 12px;
	border: 3px dashed #6B9E5B;
	border-radius: 14px;
	background: rgba(107, 158, 91, 0.06);
	z-index: 600;
	pointer-events: none;
	align-items: flex-start;
	justify-content: center;
	padding-top: 30px;
}

#fv-drop-overlay.visible {
	display: flex;
}

#fv-drop-overlay span {
	font-size: 24px;
	font-weight: 600;
	color: #4a7a3d;
	letter-spacing: 1px;
	user-select: none;
}

#folder-view-table-container {
	max-width: 100%;
	flex: 1;
	margin: 0 0 0 5%;
	border: none;
	border-left: 1px solid var(--border-middle-tone);
	border-radius: 0;
	background: var(--bg-light-tone);
	box-shadow: none;
	overflow-y: auto;
}

/* Table */
#elements-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	font-size: 14px;
	table-layout: fixed;
	background-color: var(--bg-light-tone);
}

#elements-table thead {
	display: none;
}

#elements-table th:nth-child(1),
#elements-table td:nth-child(1) { width: 100%; }

#elements-table th {
	position: static;
	z-index: 2;
	background-color: var(--bg-middle-tone);
	padding: 14px 20px;
	text-align: left;
	font-weight: 600;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--text-light-tone);
	border-bottom: 1px solid var(--border-light-tone);
}

#elements-table th.sortable {
	cursor: pointer;
	user-select: none;
	transition: background-color 0.15s ease;
}

#elements-table th.sortable:hover {
	background-color: var(--bg-dark-tone);
}

.sort-arrow {
	margin-left: 4px;
	font-size: 11px;
	color: var(--text-light-tone);
}

#elements-table td {
	padding: 9px 20px;
	border-bottom: 1px solid var(--bg-light-tone);
	vertical-align: middle;
	color: var(--text-dark-tone);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 15px;
	background-color: var(--bg-light-tone);
}

#elements-table tbody tr:last-child td {
	border-bottom: none;
}

#elements-table tbody tr:hover {
	background-color: #f5f7fa;
}

/* Group separator row (shown when sorted by type) */
.group-separator {
	cursor: pointer;
	user-select: none;
}

#elements-table .group-separator:hover td {
	background-color: var(--bg-dark-tone);
}

#elements-table .group-separator td {
	position: static;
	z-index: 1;
	padding: 7px 20px;
	background-color: var(--bg-middle-tone);
	font-weight: 600;
	font-size: 18px;
	color: var(--text-middle-tone);
	border-bottom: 1px solid var(--border-light-tone);
	transition: background-color 0.12s ease;
	white-space: normal;
	overflow: visible;
}

.fv-list-header-inner {
	display: flex;
	align-items: center;
	width: 100%;
}

/* "more" row in folder view – small height */
.fv-more-row {
	user-select: none;
}

.fv-more-cell {
	padding: 2px 16px;
	line-height: 1.2;
	font-size: 11px;
	color: var(--text-light-tone);
	background-color: var(--bg-light-tone);
	border-bottom: 1px solid var(--border-light-tone);
}

/* ── Folder View – Layout toggle (list/grid) ────────────── */

#fv-layout-toggle {
	position: absolute;
	top: 18px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 6px;
	z-index: 3;
}

.fv-layout-btn {
	background: var(--bg-light-tone);
	border: 1px solid #d4d4d4;
	border-radius: 2px;
	width: 50px;
	height: 44px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	color: var(--text-light-tone);
	transition: all 0.15s ease;
}

.fv-layout-btn:hover {
	border-color: var(--text-light-tone);
	color: var(--text-middle-tone);
}

.fv-layout-btn.active {
	border-color: var(--border-middle-tone);
	color: var(--border-middle-tone);
	background: var(--bg-middle-tone);
}

/* ── Folder View – Grid layout ──────────────────────────── */

.fv-grid-section {
	margin-bottom: 2px;
}

.fv-grid-header {
	position: static;
	z-index: 1;
	cursor: pointer;
	user-select: none;
	padding: 10px 20px;
	background-color: var(--bg-middle-tone);
	font-weight: 600;
	font-size: 18px;
	color: var(--text-middle-tone);
	border-bottom: 1px solid var(--border-light-tone);
	display: flex;
	align-items: center;
}

.fv-show-toggle {
	font-weight: 500;
	font-size: 15px;
	margin-left: 6px;
	color: var(--text-middle-tone);
}

.fv-header-count {
	margin-left: auto;
	font-size: 15px;
	font-weight: 600;
	color: var(--text-middle-tone);
}

.fv-grid-header:hover {
	background-color: var(--bg-dark-tone);
}

.fv-grid-container {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	padding: 12px 20px;
}

.fv-grid-collapsed {
	max-height: 174px;
	overflow: hidden;
	position: relative;
}

.fv-grid-collapsed::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 50px;
	background: linear-gradient(to bottom, transparent 0%, var(--bg-light-tone) 90%);
	pointer-events: none;
}

.fv-grid-more {
	padding: 4px 20px;
	font-size: 12px;
	color: var(--text-light-tone);
	background-color: var(--bg-light-tone);
	border-bottom: 1px solid var(--border-light-tone);
	line-height: 1.3;
	user-select: none;
}

.fv-grid-card {
	position: relative;
	width: 150px;
	height: 125px;
	border: 1px solid var(--border-light-tone);
	border-radius: 6px;
	overflow: hidden;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 8px;
	font-size: 13px;
	text-align: center;
	background: var(--bg-light-tone);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.fv-grid-card:hover {
	border-color: var(--text-light-tone);
	box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.fv-grid-card-image:hover {
	border-color: transparent;
	box-shadow: none;
}

.fv-grid-card-image img {
	object-fit: cover;
	width: 100%;
	height: 85px;
	border-radius: 4px;
}

/* Image thumbnails – small squares like mobile */
.fv-card-image-thumb {
	width: 120px !important;
	height: 120px !important;
	padding: 0 !important;
	border-radius: 8px;
	overflow: hidden;
}

.fv-card-image-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 8px;
}

.fv-card-social-thumb {
	background: transparent;
	border: none;
	box-shadow: none;
	padding: 0;
	overflow: visible;
}

.fv-card-social-thumb:hover {
	border: none;
	box-shadow: none;
}

.fv-social-thumb-wrap {
	position: relative;
	width: 100%;
	height: 100%;
}

.fv-social-thumb-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 6px;
}

.fv-social-embed-iframe {
	width: 100%;
	height: 100%;
	border: none;
	border-radius: 6px;
	pointer-events: none;
}

.fv-social-thumb-placeholder {
	width: 100%;
	height: 100%;
	background: var(--text-dark-tone);
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.fv-social-thumb-placeholder span {
	color: var(--bg-light-tone);
	font-size: 22px;
}

.fv-social-favicon {
	position: absolute;
	bottom: 4px;
	right: 4px;
	width: 22px;
	height: 22px;
}

/* ── Social media preview modal ────────────────────── */

.fv-social-preview-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0,0,0,0.5);
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
}

.fv-social-preview-box {
	width: 620px;
	max-width: 92%;
	background: var(--bg-light-tone);
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}

.fv-social-preview-iframe-wrap {
	width: 100%;
	aspect-ratio: 16 / 10;
	background: #000;
}

.fv-social-preview-iframe {
	width: 100%;
	height: 100%;
	border: none;
}

.fv-social-preview-open-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	border-top: 1px solid var(--border-light-tone);
	font-size: 16px;
	font-weight: 500;
	color: var(--text-dark-tone);
	cursor: pointer;
	transition: background-color 0.12s ease;
}

.fv-social-preview-open-btn:hover {
	background-color: var(--bg-light-tone);
}

.fv-social-preview-arrow {
	margin-right: 6px;
}

.fv-grid-card-note {
	background: var(--bg-light-tone);
}

.fv-card-note-text {
	font-size: 14px;
	color: var(--text-middle-tone);
	overflow: hidden;
	line-height: 1.4;
	max-height: 100px;
	word-break: break-word;
	width: 100%;
	text-align: left;
}

.fv-card-note-text div,
.fv-card-note-text p {
	margin: 0;
	padding: 0;
}

.fv-card-list-text {
	font-size: 14px;
	color: var(--text-middle-tone);
	overflow: hidden;
	line-height: 1.4;
	max-height: 100px;
	width: 100%;
	text-align: left;
}

.fv-card-list-text ul,
.fv-card-list-text ol {
	margin: 0;
	padding-left: 14px;
	list-style-position: outside;
}

.fv-card-list-text li {
	margin: 0;
	padding: 0;
}

/* ── Folder View – Note edit modal ─────────────────────── */

#fv-note-edit-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
}

#fv-note-edit-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.35);
}

#fv-note-edit-body {
	position: relative;
	background: var(--bg-light-tone);
	border: 1px solid var(--border-middle-tone);
	border-radius: 8px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
	width: 60vw;
	max-width: 600px;
	min-height: 180px;
	max-height: 85vh;
	display: flex;
	flex-direction: column;
	padding: 20px;
}

#fv-note-edit-content {
	flex: 1;
	outline: none;
	font-size: 14px;
	line-height: 1.7;
	color: var(--text-dark-tone);
	overflow-y: auto;
	min-height: 300px;
	white-space: pre-wrap;
	word-wrap: break-word;
	border: none;
	border-radius: 4px;
	padding: 12px 14px;
	background: var(--bg-light-tone);
}

#fv-note-edit-content:focus {
	border: none;
	box-shadow: none;
}

#fv-note-edit-content div,
#fv-note-edit-content p {
	margin: 0;
	padding: 0;
}

/* List mode */
.fv-edit-list #fv-note-edit-content {
	list-style-type: circle;
}

.fv-edit-list #fv-note-edit-content ul {
	margin: 0;
	padding-left: 22px;
	list-style-type: circle;
}

.fv-edit-list #fv-note-edit-content li {
	padding: 2px 0;
	white-space: normal;
}

/* ── Folder View – Audio grid card ─────────────────────── */

.fv-grid-card-audio {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 12px 10px;
}

.fv-card-audio-icon {
	font-size: 28px;
	color: var(--text-light-tone);
}

.fv-card-audio-player {
	display: flex;
	align-items: center;
	gap: 8px;
}

.fv-audio-play-btn {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 1.5px solid var(--border-middle-tone);
	background: var(--bg-light-tone);
	color: var(--text-dark-tone);
	font-size: 12px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: background 0.15s;
}

.fv-audio-play-btn:hover {
	background: var(--bg-middle-tone);
}

.fv-audio-duration {
	font-size: 12px;
	color: var(--border-middle-tone);
	font-variant-numeric: tabular-nums;
}

/* ── Folder View – Table grid card preview ────────────── */

.fv-card-table-preview {
	width: 100%;
	height: 100%;
	overflow: hidden;
	font-size: 9px;
	line-height: 1.3;
}

.fv-card-table-preview table {
	border-collapse: collapse;
	width: 100%;
	font-size: 9px;
}

.fv-card-table-preview td {
	border: 1px solid var(--border-light-tone);
	padding: 2px 3px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 50px;
}

.fv-card-table-preview tr:first-child td {
	font-weight: 600;
	background-color: var(--bg-middle-tone);
}

/* ── Folder View – Table edit modal ──────────────────── */

#fv-table-edit-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
}

#fv-table-edit-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.35);
}

#fv-table-edit-body {
	position: relative;
	background: var(--bg-light-tone);
	border: 1px solid var(--border-middle-tone);
	border-radius: 8px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
	max-width: 90vw;
	max-height: 85vh;
	display: flex;
	flex-direction: column;
	padding: 20px;
}

#fv-table-edit-content {
	overflow: auto;
	max-height: 75vh;
	display: flex;
	justify-content: center;
	position: relative;
}

#fv-table-edit-content .gyst-table {
	border-collapse: collapse;
	border: 1px solid var(--border-light-tone);
	background-color: var(--bg-light-tone);
	font-size: 14px;
}

#fv-table-edit-content .gyst-table td {
	border: 1px solid var(--border-light-tone);
	padding: 6px 10px;
	min-width: 60px;
	min-height: 24px;
	vertical-align: top;
	outline: none;
}

#fv-table-edit-content .gyst-table td:focus,
#fv-table-edit-content .gyst-table td[contenteditable="true"] {
	background-color: var(--bg-middle-tone);
	box-shadow: inset 0 0 0 2px var(--border-middle-tone);
}

#fv-table-edit-content .gyst-table tr:first-child td {
	font-weight: 600;
	background-color: var(--bg-middle-tone);
}

#fv-table-edit-content .modal-table-wrap {
	position: relative;
	display: inline-block;
	margin: 25px 10px 10px 25px;
	overflow: visible;
}

.modal-insert-btn {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	font-weight: 400;
	color: var(--border-middle-tone);
	background: transparent;
	border: none;
	border-radius: 0;
	cursor: pointer;
	opacity: 0;
	transition: opacity 0.2s ease;
	z-index: 5;
	user-select: none;
	pointer-events: none;
	line-height: 1;
}

.modal-insert-btn.visible {
	opacity: 0.6;
	pointer-events: auto;
}

.modal-insert-btn:hover {
	opacity: 1;
}


/* ── Folder View – New note card ──────────────────────── */

.fv-new-note-card {
	display: flex;
	align-items: center;
	justify-content: center;
	border: 2px dashed var(--border-light-tone) !important;
	background: transparent;
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.fv-new-note-card:hover {
	border-color: var(--border-middle-tone) !important;
	background-color: var(--bg-middle-tone);
}

.fv-new-note-plus {
	font-size: 34px;
	color: var(--border-light-tone);
	font-weight: 300;
	line-height: 1;
	transition: color 0.15s ease;
}

.fv-new-note-card:hover .fv-new-note-plus {
	color: var(--text-light-tone);
}

.fv-card-favicon {
	width: 28px;
	height: 28px;
	object-fit: contain;
	margin-bottom: 6px;
}

/* Link cards – big favicon + url text on blue bg */
.fv-grid-card-link {
	height: 83px;
}

.fv-card-link-canvas {
	background-color: #f5f5f4;
	border: 1px solid var(--border-light-tone);
	border-radius: 6px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	cursor: pointer;
}

.fv-card-link-canvas:hover {
	border-color: var(--text-light-tone);
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.fv-card-link-favicon {
	width: 40px;
	height: 40px;
	object-fit: contain;
}

.fv-card-link-domain {
	font-size: 11px;
	color: var(--text-middle-tone);
	text-align: center;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 100%;
	padding: 0 6px;
}

.fv-card-link-canvas .fv-copy-btn,
.fv-card-link-canvas .fv-grid-preview-btn {
	display: none !important;
}

/* Link context modal */
.fv-link-ctx-modal {
	position: fixed;
	z-index: 9999;
	background: var(--bg-light-tone);
	border: 1px solid var(--border-light-tone);
	border-radius: 8px;
	box-shadow: 0 2px 12px rgba(0,0,0,0.15);
	min-width: 180px;
	max-width: 350px;
	overflow: hidden;
	text-align: center;
}

.fv-link-ctx-url {
	padding: 10px 14px;
	font-size: 12px;
	color: var(--text-middle-tone);
	word-break: break-all;
	border-bottom: 1px solid var(--border-light-tone);
	line-height: 1.4;
}

.fv-link-ctx-btn {
	padding: 10px 16px;
	font-size: 14px;
	color: var(--text-dark-tone);
	cursor: pointer;
	transition: background-color 0.1s;
}

.fv-link-ctx-btn:hover {
	background-color: #f0ebe3;
	color: var(--text-light-tone);
}

.fv-link-ctx-btn + .fv-link-ctx-btn {
	border-top: 1px solid var(--border-light-tone);
}

.fv-card-label {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 135px;
	font-size: 12px;
	color: var(--text-dark-tone);
	margin-top: 2px;
}

.fv-grid-card-page {
	height: 83px;
	border-color: var(--border-middle-tone);
	color: var(--text-middle-tone);
}
.fv-grid-card-page:hover {
	border-color: var(--border-middle-tone);
}

.fv-card-page-with-image {
	position: relative;
}

.fv-card-page-with-image::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: inherit;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	opacity: 0.7;
	border-radius: inherit;
}

.fv-card-page-with-image .fv-card-page-name {
	position: relative;
	z-index: 1;
}

.fv-card-page-name {
	font-weight: 600;
	font-size: 18px;
	color: var(--text-middle-tone);
}

/* Google file cards – like canvas */
.fv-card-google {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	overflow: visible;
}

.fv-card-google:hover {
	border: none !important;
	box-shadow: none !important;
}

.fv-card-google-icon {
	width: 80px;
	height: 80px;
	object-fit: contain;
}

.fv-card-google-textbox {
	margin-top: 5px;
	text-align: center;
	font-size: 12px;
	color: var(--text-dark-tone);
	border: 1px solid var(--border-light-tone);
	border-radius: 4px;
	padding: 3px 6px;
	background: var(--bg-light-tone);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 100%;
}

/* Google file context menu */
.fv-google-ctx-menu {
	position: fixed;
	z-index: 9999;
	background: var(--bg-light-tone);
	border: 1px solid var(--border-light-tone);
	border-radius: 6px;
	box-shadow: 0 2px 10px rgba(0,0,0,0.15);
	min-width: 100px;
	overflow: hidden;
}

.fv-google-ctx-item {
	padding: 8px 16px;
	font-size: 13px;
	color: var(--text-dark-tone);
	cursor: pointer;
	transition: background-color 0.1s;
}

.fv-google-ctx-item:hover {
	background-color: #f0ebe3;
	color: var(--text-light-tone);
}

.fv-google-ctx-item + .fv-google-ctx-item {
	border-top: 1px solid var(--border-light-tone);
}

.fv-grid-card-table,
.fv-grid-card-list {
	background: var(--bg-light-tone);
	border-color: var(--border-light-tone);
}

.fv-grid-card-file {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 12px 8px;
	background: transparent;
	border: none;
	box-shadow: none;
}

.fv-grid-card-file:hover {
	border: none;
	box-shadow: none;
}

.fv-card-file-icon {
	width: 48px;
	height: 48px;
	object-fit: contain;
	margin-bottom: 8px;
}

.fv-card-file-name {
	font-size: 13px;
	font-weight: 500;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 130px;
	color: var(--text-dark-tone);
}

.fv-file-ctx-modal {
	position: fixed;
	z-index: 10000;
	background: var(--bg-light-tone);
	border: none;
	border-radius: 8px;
	box-shadow: 0 4px 16px rgba(0,0,0,0.13);
	min-width: 140px;
	padding: 6px 0;
	font-size: 14px;
}

/* ── Folder View – Peek row (1/3 visible) ─────────────── */

.fv-list-peek-row {
	position: relative;
	max-height: 18px;
	overflow: hidden;
}

.fv-list-peek-row td {
	padding-bottom: 0 !important;
}

/* ── Folder View – Clickable rows ─────────────────────── */

.fv-row-clickable {
	cursor: pointer;
	transition: background-color 0.12s ease;
}

.fv-row-clickable td {
	position: relative;
}

.fv-row-clickable:hover {
	background-color: #f0f4fa;
}

/* Category-specific row colors (match grid card colors) */

.fv-row-clickable.fv-cat-note td,
.fv-row-clickable.fv-cat-list td,
.fv-row-clickable.fv-cat-table td {
	background-color: var(--bg-light-tone);
}
.fv-row-clickable.fv-cat-note:hover td,
.fv-row-clickable.fv-cat-list:hover td,
.fv-row-clickable.fv-cat-table:hover td {
	background-color: var(--bg-light-tone);
}

/* ── Folder View – Image thumbnail ────────────────────── */

.fv-thumbnail {
	height: 40px;
	width: auto;
	max-width: 56px;
	border-radius: 4px;
	vertical-align: middle;
	margin-right: 10px;
	object-fit: cover;
}

.fv-image-name {
	vertical-align: middle;
}

/* ── Folder View – File extension badge ───────────────── */

.fv-file-ext {
	display: inline-block;
	padding: 2px 6px;
	border-radius: 3px;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.5px;
	background-color: #fff3e0;
	color: #e65100;
	margin-right: 8px;
	vertical-align: middle;
}

/* ── Folder View – Note expand row ────────────────────── */

.fv-note-expanded td {
	padding: 0 16px 12px 16px;
	border-bottom: 1px solid var(--border-light-tone);
	background-color: var(--bg-light-tone);
	white-space: normal;
}

.fv-note-content {
	padding: 10px 12px;
	font-size: 14px;
	line-height: 1.6;
	color: var(--text-dark-tone);
	max-height: 300px;
	overflow-y: auto;
	word-wrap: break-word;
}

.fv-note-editing {
	border: 1px solid #90caf9;
	border-radius: 4px;
	padding: 10px 12px;
	background-color: var(--bg-light-tone);
	outline: none;
	min-height: 60px;
}

.fv-note-editing:focus {
	border-color: #1565c0;
	box-shadow: 0 0 0 2px rgba(21, 101, 192, 0.15);
}

/* ── Folder View – Image preview modal ────────────────── */

#fv-image-modal {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 100001;
}

#fv-image-modal-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(243, 235, 219, 0.85);
}

#fv-image-modal-body {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	max-width: 90vw;
	max-height: 85vh;
	display: flex;
	flex-direction: column;
	align-items: center;
}

#fv-image-modal-img {
	max-width: 90vw;
	max-height: 75vh;
	border-radius: 8px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
	object-fit: contain;
}

#fv-image-modal-caption {
	margin-top: 12px;
	color: var(--text-dark-tone);
	font-size: 14px;
	text-align: center;
}

#fv-image-modal-close {
	position: absolute;
	top: -40px;
	right: -10px;
	background: none;
	border: none;
	color: var(--text-dark-tone);
	font-size: 32px;
	cursor: pointer;
	line-height: 1;
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
	transition: transform 0.15s ease;
}

#fv-image-modal-close:hover {
	transform: scale(1.2);
}

/* ── Folder View – Iframe preview popup ──────────────── */

.fv-iframe-preview {
	position: fixed;
	z-index: 9999;
	width: 600px;
	height: 500px;
	border: 2px solid;
	border-radius: 8px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
	background: var(--bg-light-tone);
	pointer-events: auto;
	overflow: hidden;
	resize: both;
	min-width: 300px;
	min-height: 200px;
}

.fv-iframe-header {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 30px;
	color: var(--bg-light-tone);
	display: flex;
	align-items: center;
	padding: 0 10px;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: underline;
}

.fv-iframe-preview iframe {
	position: absolute;
	top: 30px;
	left: 0;
	width: 100%;
	height: calc(100% - 30px);
	border: none;
	pointer-events: auto;
}

/* ── Folder View – Copy link button ─────────────────── */

.fv-copy-btn {
	position: absolute;
	bottom: 4px;
	right: 6px;
	font-size: 13px;
	cursor: pointer;
	padding: 2px;
	line-height: 1;
	z-index: 2;
}

.fv-copy-icon {
	width: 13px;
	height: 13px;
	vertical-align: middle;
	opacity: 0.5;
	transition: opacity 0.15s ease;
}

.fv-copy-btn:hover .fv-copy-icon {
	opacity: 1;
}

/* List view: show on hover only */
.fv-row-clickable .fv-copy-btn {
	opacity: 0;
	transition: opacity 0.15s ease;
}

.fv-row-clickable:hover .fv-copy-btn {
	opacity: 1;
}

/* Grid view: show on hover only */
.fv-grid-card .fv-copy-btn {
	opacity: 0;
	transition: opacity 0.15s ease;
}

.fv-grid-card:hover .fv-copy-btn {
	opacity: 1;
}

/* Grid card delete button (top-right, visible on hover) */
.fv-grid-delete-btn {
	position: absolute;
	top: 3px;
	right: 5px;
	font-size: 15px;
	line-height: 1;
	color: var(--text-dark-tone);
	cursor: pointer;
	z-index: 2;
	opacity: 0;
	transition: opacity 0.15s ease, color 0.15s ease;
}

.fv-grid-card:hover .fv-grid-delete-btn {
	opacity: 1;
}

.fv-grid-delete-btn:hover {
	color: #e74c3c;
}

/* Grid card preview button (bottom-left, always visible) */
.fv-grid-preview-btn {
	position: absolute;
	bottom: 4px;
	left: 4px;
	font-size: 9px;
	color: var(--text-light-tone);
	cursor: pointer;
	padding: 1px 5px;
	line-height: 1.2;
	z-index: 2;
	border: 1px solid #d4d4d4;
	border-radius: 3px;
	background: var(--bg-light-tone);
	transition: color 0.15s ease, border-color 0.15s ease;
}

.fv-grid-preview-btn:hover {
	color: #4a90e2;
	border-color: #4a90e2;
}

/* ── Feed Modals (Notes / Bookmarks) ────────────────────────────────── */

.feed-modal {
	display: none;
	position: fixed;
	top: 80px;
	right: 10px;
	width: 480px;
	height: 73vh;
	min-width: 340px;
	min-height: 300px;
	max-width: 85vw;
	max-height: 88vh;
	z-index: 100000;
	background: var(--bg-light-tone);
	border: 1px solid var(--border-middle-tone);
	border-radius: 8px;
	box-shadow: 0 4px 16px rgba(0,0,0,0.1);
	overflow: visible;
	direction: ltr;
	resize: none;
}

.feed-modal.show { display: flex; }

.feed-modal-content {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	overflow: hidden;
	border-radius: 7px;
}

/* Header */
.feed-modal-header {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 16px;
	border-bottom: 1px solid var(--border-light-tone);
	background-color: var(--bg-dark-tone);
	user-select: none;
	flex-shrink: 0;
	cursor: grab;
}
.feed-modal-header:active { cursor: grabbing; }
.feed-modal-title {
	flex: 1;
	font-weight: 600;
	font-size: 15px;
	color: var(--text-light-tone);
}
.modal-icon { width: 22px; height: 22px; opacity: 0.8; object-fit: contain; }
.modal-close-btn {
	background: none; border: none; font-size: 22px; color: var(--text-dark-tone);
	cursor: pointer; padding: 0; width: 28px; height: 28px;
	display: flex; align-items: center; justify-content: center;
	border-radius: 4px; transition: background .15s;
}
.modal-close-btn:hover { background: transparent; color: var(--text-dark-tone); }

/* Sections & separators */
.feed-section { padding: 8px 14px; border-bottom: 1px solid var(--border-light-tone); }

/* Filter / search section */
.feed-filter-section { flex-shrink: 0; }
.feed-show-all-row {
	padding: 8px 14px;
	border-bottom: 1px solid var(--border-light-tone);
	text-align: right;
	cursor: pointer;
}
.feed-show-all-link {
	font-size: 12px;
	color: var(--text-light-tone, var(--text-light-tone));
}
.feed-show-all-link:hover {
	color: var(--text-middle-tone, var(--text-middle-tone));
}
.feed-popular-tags {
	display: flex; flex-wrap: wrap; gap: 6px;
	margin-bottom: 8px; min-height: 20px;
}
.feed-search-row { position: relative; }
.feed-search-input {
	width: 100%; padding: 7px 10px; border: 1px solid var(--border-light-tone);
	border-radius: 6px; font-size: 13px; outline: none;
	box-sizing: border-box;
	background-color: var(--bg-light-tone);
}
.feed-search-input:focus { border-color: var(--text-light-tone); }
.feed-search-dropdown {
	display: none; max-height: 200px;
	overflow-y: auto;
	background: var(--bg-light-tone);
	border: 1px solid var(--border-light-tone);
	border-radius: 8px;
	margin-top: 6px;
}
.feed-search-dropdown.open { display: block; }
.feed-dd-columns {
	display: flex;
	flex-direction: row;
}
.feed-dd-col {
	flex: 1;
	padding: 6px 10px;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}
.feed-dd-divider {
	width: 1px;
	background-color: var(--border-light-tone);
}
.feed-search-dropdown .feed-dd-title {
	font-size: 11px; font-weight: 600; color: var(--text-light-tone);
	text-transform: uppercase; padding: 0 0 4px; letter-spacing: .4px;
}
.feed-dd-empty {
	font-size: 12px;
	color: var(--text-light-tone);
	padding: 6px 0;
	font-style: italic;
}

/* Selected tags */
.feed-selected-tags {
	display: flex; flex-wrap: wrap; gap: 6px;
	align-items: center; min-height: 28px; flex-shrink: 0;
	background-color: var(--bg-middle-tone);
	border: 1px solid var(--border-light-tone);
}
.feed-no-tags { font-style: italic; color: var(--border-light-tone); font-size: 13px; }
.feed-clear-btn {
	background: none; border: none; color: var(--text-dark-tone);
	font-size: 12px; cursor: pointer; padding: 2px 4px;
	margin-left: auto;
}
.feed-clear-btn:hover { text-decoration: underline; }

/* Tag pills */
.feed-tag-pill {
	display: inline-flex; align-items: center; gap: 4px;
	padding: 3px 10px; border-radius: 14px; font-size: 12px;
	cursor: pointer; user-select: none; white-space: nowrap;
	border: 1px solid transparent; transition: opacity .15s;
}
.feed-tag-pill:hover { opacity: .85; }
.feed-tag-pill.regular {
	background: #e2f0e2; color: #2e7d32; border-color: #c8e6c8;
}
.feed-tag-pill.page {
	background: var(--bg-dark-tone); color: #8d6e3f; border-color: #e0d0b8;
}
.feed-tag-pill .tag-icon {
	width: 13px; height: 13px; vertical-align: middle;
}
.feed-tag-pill .tag-remove {
	margin-left: 2px; font-size: 14px; line-height: 1; cursor: pointer;
}

/* Grid */
.feed-grid-section {
	flex: 1; overflow-y: auto; border-bottom: none !important;
}
.feed-grid {
	display: flex; flex-wrap: wrap; gap: 10px;
	padding: 4px 0;
}

/* Cards */
.feed-card {
	width: 180px; background: var(--bg-middle-tone);
	border: 1px solid var(--border-light-tone); border-radius: 8px;
	padding: 10px; cursor: pointer; overflow: hidden;
	transition: box-shadow .15s, border-color .15s;
	display: flex; flex-direction: column; min-height: 80px;
	box-sizing: border-box; flex-shrink: 0;
}
.feed-card:hover { border-color: var(--text-light-tone); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.feed-card-text {
	font-size: 13px; color: var(--text-dark-tone); line-height: 1.4;
	overflow: hidden; display: -webkit-box;
	-webkit-line-clamp: 4; -webkit-box-orient: vertical;
}
.feed-card-date {
	font-size: 11px; color: var(--text-light-tone); margin-top: auto; padding-top: 6px;
}
.feed-card-tags {
	display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px;
}
.feed-card-tags .feed-tag-pill { font-size: 10px; padding: 1px 6px; cursor: default; }

/* Bookmark card specifics */
.feed-card-bm .feed-card-title {
	font-size: 12px; font-weight: 500; color: var(--text-dark-tone);
	overflow: hidden; display: -webkit-box;
	-webkit-line-clamp: 2; -webkit-box-orient: vertical;
}

.feed-bm-embed-wrap {
	position: relative; width: 100%; height: 120px;
	border-radius: 6px; overflow: hidden; margin-bottom: 6px;
	background: #000;
}
.feed-bm-embed-wrap iframe {
	width: 100%; height: 100%; border: none; pointer-events: none;
}

.feed-bm-img-wrap {
	position: relative; width: 100%; height: 80px;
	border-radius: 6px; overflow: hidden; margin-bottom: 6px;
}
.feed-bm-img-wrap > img:first-child {
	width: 100%; height: 100%; object-fit: cover;
}

.feed-card-favicon {
	position: absolute; bottom: 4px; right: 4px;
	width: 18px; height: 18px; border-radius: 4px;
	background: var(--bg-light-tone);
}

.feed-bm-no-thumb {
	display: flex; align-items: center; justify-content: center;
	height: 50px; margin-bottom: 6px;
	background: #f0ede8; border-radius: 6px;
}
.feed-bm-no-thumb span { font-size: 22px; }
.feed-bm-favicon-lg { width: 28px; height: 28px; border-radius: 6px; }

.feed-bm-desc {
	font-size: 11px; color: var(--text-light-tone); margin-top: 3px; line-height: 1.35;
	overflow: hidden; display: -webkit-box;
	-webkit-line-clamp: 2; -webkit-box-orient: vertical;
}

.feed-bm-url-row {
	display: flex; align-items: center; margin-top: 4px; gap: 4px;
}
.feed-bm-url-favicon { width: 12px; height: 12px; border-radius: 2px; }
.feed-bm-url-text {
	font-size: 10px; color: var(--text-light-tone); flex: 1;
	overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}

/* FAB */
.feed-fab {
	position: absolute; bottom: 14px; right: 14px;
	width: 46px; height: 46px; border-radius: 50%;
	background: var(--bg-light-tone); border: 1px solid var(--border-middle-tone);
	cursor: pointer; box-shadow: 0 2px 4px rgba(0,0,0,.15);
	z-index: 5; transition: border-color .15s;
	padding: 0; margin: 0;
	font-size: 0; color: transparent;
}
.feed-fab::before,
.feed-fab::after {
	content: '';
	position: absolute;
	top: 50%; left: 50%;
	transform: translate(-50%, -50%);
	background-color: var(--border-middle-tone);
	border-radius: 1px;
}
.feed-fab::before {
	width: 18px; height: 2px;
}
.feed-fab::after {
	width: 2px; height: 18px;
}
.feed-fab:hover { border-color: var(--border-middle-tone); }

/* ── Edit / Detail view ────────────────────────────────────────────── */

.feed-list-view, .feed-edit-view {
	display: flex; flex-direction: column;
	width: 100%; height: 100%; overflow: hidden;
}
.feed-edit-view { display: none; }

.feed-edit-topbar {
	display: flex; justify-content: space-between; align-items: center;
	padding: 10px 16px; border-bottom: 1px solid var(--border-light-tone);
	flex-shrink: 0; cursor: grab;
}
.feed-edit-topbar:active { cursor: grabbing; }
.feed-edit-back, .feed-edit-done {
	background: none; border: none; font-size: 14px;
	cursor: pointer; color: var(--text-dark-tone); font-weight: 500;
	padding: 4px 8px;
}
.feed-edit-back:hover, .feed-edit-done:hover { text-decoration: underline; }

.feed-edit-body {
	flex: 1; overflow-y: auto; display: flex; flex-direction: column;
	min-height: 0;
}

/* Note editor */
.feed-note-content-area {
	flex: 1; display: flex; flex-direction: column;
	padding: 16px;
}
.feed-note-date {
	text-align: center; font-size: 12px; color: var(--text-light-tone);
	margin-bottom: 10px;
}
.feed-note-input {
	flex: 1; border: none; outline: none; resize: none;
	font-size: 15px; line-height: 1.6; color: var(--text-dark-tone);
	font-family: inherit; padding: 0;
	background-color: var(--bg-light-tone);
}

/* Bookmark preview */
.feed-bm-preview-area {
	display: flex; flex-direction: column; align-items: center;
	padding: 12px 16px; gap: 10px;
}
.feed-bm-preview {
	width: 100%; border-radius: 8px;
	overflow: hidden; background: var(--bg-light-tone); position: relative;
}
.feed-bm-preview iframe,
.feed-bm-preview img {
	width: 100%; height: 160px; border: none; object-fit: cover;
}
.feed-bm-go-btn {
	display: inline-block; padding: 8px 20px;
	border: 1px solid var(--text-dark-tone); border-radius: 6px;
	color: var(--text-dark-tone); text-decoration: none; font-size: 13px;
	font-weight: 500; transition: background .15s;
}
.feed-bm-go-btn:hover { background: var(--bg-light-tone); }

/* Tags section in edit view */
.feed-edit-tags-section {
	border-top: 1px solid var(--border-light-tone);
	overflow-y: auto; flex-shrink: 0;
}
.feed-edit-selected-tags {
	display: flex; flex-wrap: wrap; gap: 6px;
	padding: 8px 14px; min-height: 28px; align-items: center;
	background-color: var(--bg-middle-tone);
}
.feed-edit-tag-picker { padding: 8px 14px; border-top: 1px solid var(--border-light-tone); }


/* AI Button Styles */
.ai-button {
	background-color: var(--bg-light-tone);
	color: #000000;
	border: 2px solid #000000;
	padding: 8px 16px;
	border-radius: 6px;
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	transition: all 0.2s ease;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ai-button:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.ai-button:active {
	transform: translateY(0);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* AI Modal Styles */
.ai-modal {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.3);
	z-index: 100001;
	justify-content: center;
	align-items: center;
}

.ai-modal.show {
	display: flex;
}

.ai-modal-content {
	background-color: var(--bg-light-tone);
	width: 400px;
	max-width: 90vw;
	height: 500px;
	max-height: 80vh;
	border-radius: 12px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	animation: aiModalSlideIn 0.3s ease-out;
}

@keyframes aiModalSlideIn {
	from {
		opacity: 0;
		transform: scale(0.9) translateY(-20px);
	}
	to {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}

.ai-modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px 20px;
	background-color: #000000;
	color: var(--bg-light-tone);
	border-bottom: 1px solid #000000;
}

.ai-modal-title {
	font-size: 16px;
	font-weight: 600;
}

.ai-modal-body {
	flex: 1;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.ai-chat-container {
	flex: 1;
	display: flex;
	flex-direction: column;
	height: 100%;
}

.ai-messages {
	flex: 1;
	padding: 16px;
	overflow-y: auto;
	background-color: var(--bg-light-tone);
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.ai-message {
	max-width: 80%;
	padding: 12px 16px;
	border-radius: 12px;
	word-wrap: break-word;
}

.ai-assistant-message {
	background-color: var(--bg-light-tone);
	color: #000000;
	align-self: flex-start;
	border-bottom-left-radius: 4px;
	border: 1px solid #000000;
}

.ai-user-message {
	background-color: #000000;
	color: var(--bg-light-tone);
	align-self: flex-end;
	border-bottom-right-radius: 4px;
	border: 1px solid #000000;
}

.message-content {
	line-height: 1.4;
}

.ai-input-container {
	display: flex;
	padding: 16px;
	background-color: var(--bg-light-tone);
	border-top: 1px solid #000000;
	gap: 8px;
}

.ai-input {
	flex: 1;
	padding: 12px 16px;
	border: 1px solid #000000;
	border-radius: 20px;
	outline: none;
	font-size: 14px;
	transition: border-color 0.2s ease;
	background-color: var(--bg-light-tone);
	color: #000000;
}

.ai-input:focus {
	border-color: #000000;
	box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.ai-send-btn {
	background-color: #000000;
	color: var(--bg-light-tone);
	border: 1px solid #000000;
	padding: 12px 20px;
	border-radius: 20px;
	cursor: pointer;
	font-weight: 600;
	transition: all 0.2s ease;
}

.ai-send-btn:hover {
	background-color: var(--bg-light-tone);
	color: #000000;
	transform: translateY(-1px);
}

.ai-send-btn:active {
	transform: translateY(0);
}

/* Edit title hover button */
.edit-title-hover-btn {
	position: absolute;
	z-index: 9998;
	background: var(--bg-light-tone);
	border: 1px solid var(--border-light-tone);
	border-radius: 4px;
	padding: 3px 8px;
	font-size: 12px;
	color: var(--border-middle-tone);
	cursor: pointer;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
	pointer-events: auto;
	white-space: nowrap;
	transition: opacity 0.3s ease;
}

.edit-title-hover-btn:hover {
	background: var(--bg-middle-tone);
}

/* PDF right-click menu in folder view */
.fv-pdf-rc-menu {
	position: absolute;
	z-index: 10000;
}


/* === css/style.css === */
#font-size-box {
    position: absolute;
    display: none;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    height: 28px;
    background: var(--bg-light-tone);
    border: 1px solid var(--border-light-tone);
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
    z-index: 101;
}

#font-size-box::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -12px;
    height: 12px;
}

#font-size-display {
    font-size: 11px;
    color: var(--text-middle-tone);
    min-width: 18px;
    text-align: center;
    user-select: none;
}

#font-size-range {
    -webkit-appearance: none;
    appearance: none;
    width: 60px;
    height: 4px;
    background: var(--border-light-tone);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

#font-size-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-light-tone);
    cursor: pointer;
}

#font-size-range::-moz-range-thumb {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-light-tone);
    border: none;
    cursor: pointer;
}

#font-size-range::-moz-range-track {
    height: 4px;
    background: var(--border-light-tone);
    border-radius: 2px;
}

#stop-drawing-btn {
    padding: 8px 16px;
    background-color: var(--bg-light-tone);
    border: 1px solid var(--border-light-tone);
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

#stop-drawing-btn:hover {
    background-color: var(--bg-light-tone);
}


/* === css/note.css === */
.note {
  position: absolute;
  padding : 3px;
  text-align: left;
  background-color: transparent;
  cursor: pointer;
  font-size: 16px;
  font-family: Geneva, sans-serif;
  white-space: normal;
  width: max-content;
  border-style : solid;
  border-width : 1px;
  border-radius : 3px;
  border-color: rgb(0, 0, 0, 0);
  overflow: hidden;
}

.note:hover {
    overflow: auto;
}

.note:not([style*="border-style"]):hover {
    border-color: grey;
}

.note:hover::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.note:hover::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.25);
    border-radius: 3px;
}

.note:hover::-webkit-scrollbar-track {
    background: transparent;
}

.note.active {
    border: 2.5px solid #6B9E5B !important;
    border-radius: 6px;
    resize: both;
    overflow: auto;
    box-sizing: border-box;
}

[contenteditable="true"] {
    outline: none;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}


#noteRCBox{
    z-index: 101;
    background-color: var(--bg-light-tone);
    display : none;
    position: absolute;
}


#noteStyleBox{
    z-index: 101;
    background-color: var(--bg-light-tone);
    display : none;
    position: absolute;
}

#noteStyleBox .buttonIcon {
    height: 26px;
    width: 26px;
    padding: 2px;
    object-fit: contain;
}

#note-font-select-wrapper {
    position: relative;
    display: inline-block;
    vertical-align: middle;
}

#note-font-selected {
    height: 28px;
    padding: 2px 8px 2px 6px;
    border: 1px solid var(--border-light-tone);
    border-radius: 4px;
    font-size: 12px;
    background: var(--bg-light-tone);
    color: var(--text-dark-tone);
    cursor: pointer;
    outline: none;
    max-width: 100px;
    min-width: 60px;
    line-height: 24px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    user-select: none;
}

#note-font-selected::after {
    content: '▾';
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: var(--text-light-tone);
    pointer-events: none;
}

#note-font-selected:hover,
#note-font-select-wrapper.open #note-font-selected {
    border-color: var(--border-middle-tone);
}

#note-font-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 150px;
    max-height: 220px;
    overflow-y: auto;
    background: var(--bg-light-tone);
    border: 1px solid var(--border-light-tone);
    border-radius: 4px;
    box-shadow: 0 3px 8px rgba(0,0,0,.15);
    z-index: 101;
    margin-top: 2px;
}

.font-option {
    padding: 5px 8px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.font-option:hover {
    background: var(--bg-middle-tone);
}

.font-option.selected {
    background: var(--bg-middle-tone);
    font-weight: 600;
}

.font-option-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    font-size: 14px;
    color: var(--text-light-tone);
    border-radius: 50%;
    flex-shrink: 0;
    cursor: pointer;
    line-height: 1;
}

.font-option-delete:hover {
    color: #c0392b;
    background: rgba(192,57,43,.1);
}

#add-font-btn {
    color: var(--text-light-tone);
    font-size: 12px;
    border-top: 1px solid var(--border-light-tone);
    margin-top: 2px;
    padding-top: 6px;
}

#add-font-btn:hover {
    color: #8b5a2b;
}

#noteStyleBox #noteStyleBox_7 {
    height: 40px;
    width: 40px;
    padding: 0;
}

#noteStyleBox .pickr {
    width: 22px;
    height: 22px;
}

#noteStyleBox .pickr .pcr-button {
    width: 20px !important;
    height: 20px !important;
}

#noteStyleColor{
    z-index: 101;
    display : none;
    position: absolute;
}

.pickr {
    width: 30px;
    height: 30px;
    /*position: absolute !important;*/
    transform : none !important;
    height: 100%;
    display: flex;
    align-items: center;
}

.pcr-interaction {
    display: none !important;
}

.pcr-app {
    position: absolute !important;
}

/* Post-it note styling */
.post-it-note {
    border-radius: 0px !important;
}

/* Border controls box */
#noteBorderBox {
    z-index: 101;
    background-color: var(--bg-light-tone);
    display: none;
    position: absolute;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    border: 1px solid var(--border-light-tone);
}

#noteBorderBox .nb-label {
    font-size: 11px;
    color: var(--text-light-tone);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

#noteBorderBox input[type="range"] {
    width: 70px;
    height: 4px;
    cursor: pointer;
    accent-color: var(--border-middle-tone);
}

#noteBorderBox span {
    font-size: 12px;
    color: var(--text-middle-tone);
    min-width: 16px;
    text-align: center;
}

#noteBorderBox .pickr {
    width: 24px;
    height: 24px;
}

/* List element styling */
.list {
    position: absolute;
    padding: 0;
    text-align: left;
    background-color: var(--bg-light-tone);
    cursor: pointer;
    font-size: 16px;
    white-space: normal;
    border-style: solid;
    border-width: 1px;
    border-radius: 3px;
    border-color: rgb(0, 0, 0, 0);
    overflow: hidden;
}

.list:hover {
    overflow: auto;
}

.list:not([style*="border-style"]):hover {
    border-color: grey;
}

.list:hover::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.list:hover::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.25);
    border-radius: 3px;
}

.list:hover::-webkit-scrollbar-track {
    background: transparent;
}

.list.active {
    border: 2.5px solid var(--border-middle-tone) !important;
    border-radius: 6px;
    overflow: auto;
    box-sizing: border-box;
}

.list ul {
    margin: 0 !important;
    padding: 1px 1px 1px 13px !important;
    list-style-type: disc;
    -webkit-padding-start: 13px !important;
}

.list ul.checklist {
    list-style-type: disc;
    padding: 1px 1px 1px 13px !important;
    -webkit-padding-start: 13px !important;
}

.list ul li {
    margin-bottom: 0;
    line-height: 1.3;
    position: relative;
}

.list ul li::marker {
    color: var(--text-middle-tone);
}

/* Checklist check button */
.list-check-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    font-size: 12px;
    line-height: 18px;
    color: var(--text-light-tone);
    border: 1px solid var(--border-light-tone);
    border-radius: 3px;
    cursor: pointer;
    margin-left: 6px;
    vertical-align: middle;
    user-select: none;
    -webkit-user-select: none;
    background: var(--bg-light-tone);
    transition: all 0.15s ease;
}

.list-check-btn:hover {
    border-color: var(--text-light-tone);
    color: var(--text-middle-tone);
    background: var(--bg-light-tone);
}

.list ul li.checked .list-check-btn {
    background: #2d7a1f;
    border-color: #2d7a1f;
    color: var(--bg-light-tone);
}

.list ul li.checked {
    color: var(--text-light-tone);
    text-decoration: line-through;
}

/* List right-click box */
#listRCBox {
    z-index: 101;
    background-color: var(--bg-light-tone);
    display: none;
    position: absolute;
}

#listRCBox .buttonIcon {
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.15s ease;
    width: 18px;
    height: 18px;
    padding: 2px;
}

#listRCBox .buttonIcon:hover {
    opacity: 0.8;
}

#listRCBox .buttonIcon.active-toggle {
    opacity: 1;
    background-color: var(--bg-middle-tone);
    border-radius: 4px;
}



/* === css/table.css === */
/* Table Element Styles */

.table-element {
    position: absolute;
    z-index: 1;
    cursor: default;
    display: inline-block;
    width: max-content;
}

.gyst-table {
    border-collapse: collapse;
    border: 1px solid var(--border-light-tone);
    background-color: var(--bg-light-tone);
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.table-element.active .gyst-table {
    border-radius: 6px;
}

.table-element.active:not(.table-editing) .gyst-table {
    box-shadow: 0 0 0 1.5px rgba(139, 115, 85, 0.6);
}

.gyst-table td {
    border: 1px solid var(--border-light-tone);
    padding: 6px 10px;
    min-width: 60px;
    min-height: 24px;
    vertical-align: top;
    outline: none;
}

.gyst-table td.table-cell-active {
    outline: 2px solid var(--border-middle-tone);
    outline-offset: -1px;
    position: relative;
    z-index: 2;
}

.gyst-table td:focus {
    background-color: var(--bg-middle-tone);
    outline: 2px solid var(--border-middle-tone);
    outline-offset: -1px;
}

.gyst-table td[contenteditable="true"] {
    background-color: var(--bg-middle-tone);
}

.gyst-table tr:first-child td {
    font-weight: 600;
    background-color: var(--bg-middle-tone);
}


/* Delete column button */
.table-col-delete {
    background-color: var(--bg-middle-tone);
    color: var(--text-light-tone);
    font-size: 11px;
    padding: 4px 10px;
    border: 1px solid var(--border-light-tone);
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    z-index: 10;
}

.table-col-delete:hover {
    background-color: var(--bg-dark-tone);
}

/* Column highlight on right-click */
.table-col-highlight {
    background-color: #fce8d5 !important;
}

/* Delete row button */
.table-row-delete {
    background-color: var(--bg-middle-tone);
    color: var(--text-light-tone);
    font-size: 11px;
    padding: 4px 10px;
    border: 1px solid var(--border-light-tone);
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    z-index: 10;
}

.table-row-delete:hover {
    background-color: var(--bg-dark-tone);
}

/* Row highlight on right-click */
.table-row-highlight {
    background-color: #fce8d5 !important;
}

/* ─── Table context menu (first-cell right-click) ────────────────── */

.table-ctx-menu {
    background: var(--bg-light-tone);
    border: 1px solid var(--border-light-tone);
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    z-index: 25;
    padding: 8px 0;
    min-width: 160px;
    font-size: 12px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    user-select: none;
}

.table-ctx-section {
    padding: 4px 12px 6px;
}

.table-ctx-label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-light-tone);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.table-ctx-swatches {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.table-ctx-swatch {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1.5px solid var(--border-light-tone);
    cursor: pointer;
    transition: transform 0.1s, border-color 0.15s;
    box-sizing: border-box;
}

.table-ctx-swatch:hover {
    transform: scale(1.15);
    border-color: var(--border-middle-tone);
}

.table-ctx-swatch.selected {
    border-color: var(--text-light-tone);
    box-shadow: 0 0 0 2px rgba(139,90,43,0.3);
}

.table-ctx-swatch.swatch-none {
    background: var(--bg-light-tone);
    position: relative;
}

.table-ctx-swatch.swatch-none::after {
    content: '';
    position: absolute;
    top: 2px; left: 2px; right: 2px; bottom: 2px;
    border-bottom: 1.5px solid #c0392b;
    transform: rotate(-45deg);
}

.table-ctx-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    cursor: pointer;
    font-size: 12px;
    color: var(--text-dark-tone);
    white-space: nowrap;
}

.table-ctx-option:hover {
    background: var(--bg-middle-tone);
}

.table-ctx-option input[type="checkbox"] {
    margin: 0;
}

.table-ctx-sep {
    height: 1px;
    background: var(--bg-dark-tone);
    margin: 4px 0;
}

.table-ctx-action {
    padding: 5px 12px;
    cursor: pointer;
    font-size: 12px;
    color: var(--text-dark-tone);
}

.table-ctx-action:hover {
    background: var(--bg-middle-tone);
}

.table-ctx-danger {
    color: #c0392b;
}

.table-ctx-danger:hover {
    background: #fce8e8;
}

/* ─── Column filter icon ─────────────────────────────────────────── */

.table-filter-icon {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light-tone);
    opacity: 0.55;
    cursor: pointer;
    border-radius: 2px;
    transition: color 0.15s, opacity 0.15s;
    z-index: 3;
}

.table-filter-icon:hover {
    color: var(--text-light-tone);
    opacity: 1;
}

.table-filter-icon.active {
    color: var(--text-light-tone);
    opacity: 1;
    background: rgba(245, 240, 232, 0.45);
}

/* ─── Column sort icon (just left of filter) ────────────────────── */

.table-sort-icon {
    position: absolute;
    bottom: 2px;
    right: 16px;
    width: 12px;
    height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light-tone);
    opacity: 0.55;
    cursor: pointer;
    border-radius: 2px;
    transition: color 0.15s, opacity 0.15s;
    z-index: 3;
}

.table-sort-icon:hover {
    color: var(--text-light-tone);
    opacity: 1;
}

.table-sort-icon.active {
    color: var(--text-light-tone);
    opacity: 1;
    background: rgba(245, 240, 232, 0.45);
}

/* ─── Column lock icon (left of sort) ───────────────────────────── */

.table-lock-icon {
    position: absolute;
    bottom: 2px;
    right: 30px;
    width: 12px;
    height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light-tone);
    opacity: 0.55;
    cursor: pointer;
    border-radius: 2px;
    transition: color 0.15s, opacity 0.15s;
    z-index: 3;
}

.table-lock-icon:hover {
    color: var(--text-light-tone);
    opacity: 1;
}

.table-lock-icon.active {
    color: var(--text-light-tone);
    opacity: 1;
    background: rgba(245, 240, 232, 0.45);
}

/* ─── Lock values dropdown ──────────────────────────────────────── */

.table-lock-dropdown {
    position: absolute;
    background: var(--bg-light-tone);
    border: 1px solid var(--border-light-tone);
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 20;
    min-width: 140px;
    max-height: 240px;
    overflow-y: auto;
    padding: 6px 0;
    font-size: 12px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.table-lock-dropdown .lock-value-row {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
}

.table-lock-dropdown .lock-value-row input {
    flex: 1;
    border: 1px solid var(--border-light-tone);
    border-radius: 3px;
    padding: 3px 6px;
    font-size: 12px;
    outline: none;
}

.table-lock-dropdown .lock-value-row input:focus {
    border-color: var(--border-middle-tone);
}

.table-lock-dropdown .lock-value-remove {
    cursor: pointer;
    color: #c0392b;
    font-size: 14px;
    line-height: 1;
    padding: 0 2px;
}

.table-lock-dropdown .lock-value-remove:hover {
    color: #e74c3c;
}

.table-lock-dropdown .lock-add-btn {
    display: block;
    width: calc(100% - 16px);
    margin: 4px 8px 2px;
    padding: 4px;
    background: var(--bg-middle-tone);
    border: 1px solid var(--border-light-tone);
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
    color: var(--text-light-tone);
    text-align: center;
}

.table-lock-dropdown .lock-add-btn:hover {
    background: var(--bg-dark-tone);
}

.table-lock-dropdown .lock-clear-btn {
    display: block;
    width: calc(100% - 16px);
    margin: 2px 8px;
    padding: 4px;
    background: transparent;
    border: 1px solid var(--border-light-tone);
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
    color: #c0392b;
    text-align: center;
}

.table-lock-dropdown .lock-clear-btn:hover {
    background: #fce8e8;
}

/* ─── Cell value picker (for locked columns) ────────────────────── */

.table-cell-picker {
    position: absolute;
    background: var(--bg-light-tone);
    border: 1px solid var(--border-light-tone);
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 25;
    min-width: 80px;
    max-height: 180px;
    overflow-y: auto;
    padding: 4px 0;
    font-size: 12px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.table-cell-picker-option {
    padding: 4px 10px;
    cursor: pointer;
    white-space: nowrap;
}

.table-cell-picker-option:hover {
    background: var(--bg-middle-tone);
}

.table-cell-picker-option.selected {
    font-weight: 600;
    color: var(--text-light-tone);
}

/* ─── Filter dropdown ────────────────────────────────────────────── */

.table-filter-dropdown {
    position: absolute;
    background: var(--bg-light-tone);
    border: 1px solid var(--border-light-tone);
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 20;
    min-width: 120px;
    max-height: 200px;
    overflow-y: auto;
    padding: 4px 0;
    font-size: 12px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.table-filter-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    cursor: pointer;
    white-space: nowrap;
}

.table-filter-option:hover {
    background: var(--bg-middle-tone);
}

.table-filter-select-all {
    border-bottom: 1px solid var(--bg-dark-tone);
    margin-bottom: 2px;
    padding-bottom: 6px;
}

/* ─── Filtered (hidden) rows ─────────────────────────────────────── */

.table-row-filtered {
    display: none !important;
}

/* ─── Insert-between (+) buttons ─────────────────────────────────── */

.table-insert-between {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 400;
    color: var(--text-light-tone);
    background: transparent;
    border: none;
    border-radius: 0;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 5;
    user-select: none;
    pointer-events: none;
    line-height: 1;
    width: auto;
    height: auto;
    min-width: 1em;
    min-height: 1em;
}

.table-insert-between.visible {
    opacity: 0.6;
    pointer-events: auto;
}

.table-insert-between:hover {
    opacity: 1 !important;
}

/* ─── Drag handles (6-dot grip) ──────────────────────────────────── */

.table-row-grip {
    position: absolute;
    left: -2px;
    top: 50%;
    transform: translate(-100%, -50%);
    width: 14px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light-tone);
    cursor: grab;
    border-radius: 2px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s, color 0.15s;
}

.table-element.table-editing .table-row-grip {
    pointer-events: auto;
}

.table-element.table-editing .table-row-grip.grip-visible {
    opacity: 0.3;
}

.table-element.table-editing .table-row-grip:hover {
    opacity: 1;
    color: var(--text-light-tone);
    background: var(--bg-middle-tone);
}

.table-col-grip {
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translate(-50%, -100%) rotate(90deg);
    width: 14px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light-tone);
    cursor: grab;
    border-radius: 2px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s, color 0.15s;
}

.table-element.table-editing .table-col-grip {
    pointer-events: auto;
}

.table-element.table-editing .table-col-grip.grip-visible {
    opacity: 0.3;
}

.table-element.table-editing .table-col-grip:hover {
    opacity: 1;
    color: var(--text-light-tone);
    background: var(--bg-middle-tone);
}

/* ─── Copy glow animation ────────────────────────────────────────── */

@keyframes table-click-glow {
    0%   { box-shadow: inset 0 0 0 100px rgba(196, 168, 130, 0.2); }
    100% { box-shadow: inset 0 0 0 100px transparent; }
}

.table-click-glow td {
    animation: table-click-glow 0.5s ease;
}

.table-col-click-glow {
    animation: table-click-glow 0.5s ease;
}

/* ─── Copied toast ───────────────────────────────────────────────── */

.table-copied-toast {
    position: absolute;
    background: var(--bg-light-tone);
    border: 1px solid var(--border-light-tone);
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 4px 10px;
    font-size: 11px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-light-tone);
    white-space: nowrap;
    z-index: 30;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.table-copied-toast.fade-out {
    opacity: 0;
}

/* ─── Drag ghost ─────────────────────────────────────────────────── */

.table-drag-ghost {
    border-collapse: collapse;
    border: 1px solid var(--border-middle-tone);
    border-radius: 4px;
    background: var(--bg-light-tone);
}

/* ─── Dragging state (dimmed original) ───────────────────────────── */

.table-row-dragging {
    opacity: 0.25;
}

.table-col-dragging {
    opacity: 0.25;
}

/* ─── Insertion indicator ────────────────────────────────────────── */

.table-drag-indicator {
    position: absolute;
    height: 2px;
    background: var(--border-middle-tone);
    z-index: 20;
    pointer-events: none;
    border-radius: 1px;
    display: none;
}

.table-drag-indicator-v {
    width: 2px;
    height: auto;
}

/* ─── Highlight after drop ───────────────────────────────────────── */

.table-row-just-moved td {
    background-color: var(--bg-middle-tone) !important;
    transition: background-color 0.8s ease;
}

.table-col-just-moved {
    background-color: var(--bg-middle-tone) !important;
    transition: background-color 0.8s ease;
}

/* Highlight border lines on resize hover */
.gyst-table td.table-col-resize-highlight {
    box-shadow: inset -0.5px 0 0 0 var(--border-middle-tone), 0.5px 0 0 0 var(--border-middle-tone);
}

.gyst-table td.table-row-resize-highlight {
    box-shadow: inset 0 -0.5px 0 0 var(--border-middle-tone), 0 0.5px 0 0 var(--border-middle-tone);
}

/* Column resize handle */
.table-col-resizer {
    position: absolute;
    top: 0;
    width: 5px;
    height: 100%;
    cursor: col-resize;
    z-index: 5;
    user-select: none;
}

/* Row resize handle */
.table-row-resizer {
    position: absolute;
    left: 0;
    width: 100%;
    height: 5px;
    cursor: row-resize;
    z-index: 5;
    user-select: none;
}


/* === css/noteLink.css === */
.noteLink {
    position: absolute;
    display: flex;
    align-items: center;
    padding: 5px;
    border: 1px solid grey;
    border-radius: 5px;
    background-color: #e9f7f7;
    font-size: 14px;
}

.noteLink:hover {
    cursor: pointer;
}

.noteLink-icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
}

.noteLink-hover-text {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 5px;
    white-space: nowrap;
    transition: opacity 1.5s, visibility 1.5s;
}

.noteLink:hover .noteLink-hover-text {
    opacity: 1;
    visibility: visible;
}

.noteLink.active {
    border: 2.5px solid #4A7FB5 !important;
    border-radius: 6px;
    text-decoration: underline;
    box-sizing: border-box;
    overflow: visible;
}

/**********   Note Link   ***********/
/*
.noteLink {

  position: absolute;
  padding: 5px 8px 5px 8px;
  border-width: 1px;
  border-style: solid;
  border-color: rgb(0, 0, 0, 0);
  border-radius : 2px;
  text-align: center;
  background-color : #e9f7f7;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
  font-size: 14px;

}

.noteLink:hover {
    box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.3);
}

.noteLink_link {
  display: none;
  position: absolute;
  top:6px;
  right: -12px;
  width:100%;
  height:100%;
  display:flex;
  color: #049FD5;
  opacity: 0;
  align-items:center;
  justify-content:center;
  font-size:19px;
  text-decoration: underline;
  cursor: pointer;


  /* transition effect. not necessary */
  transition: opacity .2s, font-size .2s, color .2s;
}

.noteLink_content{
    opacity :1;
    width:100%;
    height:100%;

    /* transition effect. not necessary */
    transition: opacity .2s, font-size .2s, color .2s;
    white-space: no-wrap;
}

.noteLink_favicon{
    position : absolute;
    bottom : -7px;
    right : -10px;
    width : 23px;
    height : 23px;
    opacity : 0.7;
    border-radius: 4px;

    transition: opacity .5s, bottom .5s, right .5s, width .5s, height .5s;
}


#noteLinkRCBox{
    z-index: 101;
    background-color: #FBF8F3;
    display : none;
    position: absolute;
    top: 300px;
    left: 300px;
}

/* === css/imageLink.css === */
/**********  Image Link   ***********/

.imageLink {
	position: absolute;
	border: 1px solid transparent;
	border-radius: 5px;
	text-align: center;
	display: inline-block;
	box-sizing: border-box;
	cursor: pointer;
	transition: all 0.3s ease;
	overflow: visible;
}

.imageLink.active {
	resize: both;
	overflow: auto;
	border: 2.5px solid #4A7FB5 !important;
	border-radius: 6px;
	box-sizing: border-box;
}

.imageLink:hover {
	border-color: rgba(128, 128, 128, 0.3);
}

.imageLink.active:hover {
	border: 2.5px solid #4A7FB5 !important;
}

.imageLink .always-visible-icon {
	display: block;
	position: absolute;
	top: 10px;
	right: 10px;
	width: 28px;
	height: 28px;
	background-color: transparent;
	border-radius: 0;
	padding: 0;
	z-index: 1;
	transition: all 0.3s ease;
	opacity: 1;
}

.imageLink:hover .always-visible-icon {
	opacity: 1;
	background-color: transparent;
	transform: scale(1.05);
}

.imageLink .always-visible-icon svg {
	width: 100%;
	height: 100%;
	fill: #333;
}

.imageLink .always-visible-icon img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.imageLink .image-container {
	position: relative;
	width: 100%;
	height: 100%;
	overflow: hidden;
}

.imageLink .main-image {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
	transition: transform 0.3s ease;
}

.imageLink:hover .main-image {
	transform: scale(1.02);
}

.imageLink-hover-text {
	position: absolute;
	top: 100%;
	left: 0;
	width: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
	background-color: transparent;
	color: #000000 !important;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
	text-decoration: none;
	font-family: Geneva !important;
	font-size: 14px;
	font-weight: normal;
	padding: 5px 0;
	word-break: break-word;
	letter-spacing: 0.3px;
	text-align: center;
	z-index: 10;
	box-sizing: border-box;
}

.imageLink:hover .imageLink-hover-text {
	opacity: 1;
	visibility: visible;
	cursor: pointer;
}

#imageLinkRCBox {
	z-index: 101;
	background-color: #FBF8F3;
	display: none;
	position: absolute;
	top: 300px;
	left: 300px;
}

.imageLink a {
	color: #000000 !important;
	text-decoration: none;
}

.imageLink a:hover {
	color: #000000 !important;
}

/* Remove the underline effect for imageLink hover text */
.imageLink .imageLink-hover-text::after {
	display: none;
}


/* === css/pageLink2.css === */

.pageLink {
    position: absolute;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
    border: 1px solid var(--border-middle-tone);
    border-radius: 4px;
    background-color: var(--bg-dark-tone);
    color: var(--text-middle-tone);
    font-size: 20px;
    white-space: nowrap;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    overflow: hidden;
}

.pageLink.active {
    border: 2.5px solid var(--border-middle-tone) !important;
    border-radius: 6px;
    text-decoration: underline;
    box-sizing: border-box;
    resize: both;
    overflow: auto;
}

.pageLink:hover {
    cursor: pointer;
}

.pageLink-icon {
    display: none;
}

.pageLink > span {
    padding: 5px 10px;
    display: flex;
    align-items: center;
}

#pageLinkRCBox {
    z-index: 101;
    background-color: var(--bg-light-tone);
    display: none;
    position: absolute;
    top: 300px;
    left: 300px;
    border: 1px solid var(--border-light-tone);
    border-radius: 5px;
    padding: 4px 5px;
    flex-direction: row;
    align-items: center;
    gap: 2px;
}

#pageLinkRCBox .buttonIcon {
    width: 30px;
    height: 30px;
    padding: 5px;
    cursor: pointer;
    opacity: 0.55;
}

#pageLinkRCBox .buttonIcon:hover {
    opacity: 1;
}

#pl-color-swatches {
    z-index: 101;
    display: none;
    position: absolute;
    gap: 3px;
    align-items: center;
    background: var(--bg-light-tone);
    padding: 5px 7px;
    border-radius: 6px;
    border: 1px solid var(--border-light-tone);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

#pageLinkStyleBox{
    z-index: 101;
    background-color: var(--bg-light-tone);
    display : none;
    position: absolute;
}

#modal-drop-image-pageLink {
    text-align: center;
    width: 100%;
    height: 400px;
    border: dashed 2px var(--border-middle-tone);
    border-radius: 6px;
    padding-top: 5px;
    font-size: 16px;
}

/* Preview hover button */
.preview-hover-btn {
    position: absolute;
    z-index: 101;
    background: var(--bg-light-tone);
    border: 1px solid var(--border-light-tone);
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 12px;
    color: var(--border-middle-tone);
    cursor: default;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    pointer-events: auto;
    white-space: nowrap;
    transition: opacity 0.3s ease;
}

.preview-hover-btn:hover {
    background: var(--bg-middle-tone);
}

/* Blue preview button for noteLinks and imageLinks */
.preview-hover-btn.blue {
    border-color: #a3c4e0;
    color: #4A7FB5;
}

.preview-hover-btn.blue:hover {
    background: #eaf2fa;
}

#pl-font-size-box {
    position: absolute;
    display: none;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    height: 28px;
    background: var(--bg-light-tone);
    border: 1px solid var(--border-light-tone);
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
    z-index: 101;
}

#pl-font-size-box::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -12px;
    height: 12px;
}

#pl-font-size-display {
    font-size: 11px;
    color: var(--text-middle-tone);
    min-width: 18px;
    text-align: center;
    user-select: none;
}

#pl-font-size-range {
    -webkit-appearance: none;
    appearance: none;
    width: 60px;
    height: 4px;
    background: var(--border-light-tone);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

#pl-font-size-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-light-tone);
    cursor: pointer;
}


/* ── PageLink color swatches ───────────────────────────── */

.pl-color-swatches {
    display: flex;
    gap: 3px;
    align-items: center;
}

.pl-swatch {
    width: 15px;
    height: 15px;
    border-radius: 3px;
    border: 1.5px solid var(--border-light-tone);
    cursor: pointer;
    box-sizing: border-box;
}

.pl-swatch:hover {
    border-color: var(--border-middle-tone);
}

.pl-swatch-selected {
    border-color: var(--border-middle-tone);
    box-shadow: 0 0 0 2px rgba(139,90,43,0.3);
}


/* === css/list.css === */
/**********   List   ***********/

.list {
  list-style-type: circle;
  position: absolute;
  padding: 5px 12px 7px 25px;
  border-style: solid;
  border-width: 1px;
  border-color: rgb(0, 0, 0, 0);
  border-radius: 8px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
  background-color: var(--bg-light-tone);
  white-space: nowrap;
}

.list:hover {
  box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.3);
}

#listStyleBox {
  z-index: 101;
  background-color: var(--bg-light-tone);
  display: none;
  position: absolute;
}


/* === css/to_do_lists.css === */
/* to_do_lists styles (extend list.css as needed) */


/* === css/images.css === */
/**********  Image   ***********/

.image {
	position: absolute;
	border-color: rgb(0, 0, 0, 0);
	border-style: solid;
	border-width: 1px;
	border-radius: 5px;
	/* Clip content until final size; .active overrides for resize handles */
	overflow: hidden;
}

.image img {
	width: 100%;
	height: 100%;
	max-width: 100%;
	max-height: 100%;
	object-fit: fill;
	vertical-align: top;
}

.image:hover {
	border-color: grey;
	cursor: pointer;
}

.image.active {
	border: 2.5px solid #6B9E5B !important;
	border-radius: 6px;
	overflow: visible;
	box-sizing: border-box;
}

/* ── Image Resize Handles ────────────────────────────────── */

.image-resize-handle {
	position: absolute;
	z-index: 10;
	background: transparent;
}

.image-resize-handle-corner {
	width: 20px;
	height: 20px;
	right: -6px;
	bottom: -6px;
	cursor: nwse-resize;
}
.image-resize-handle-corner::after {
	content: '';
	position: absolute;
	right: 2px;
	bottom: 2px;
	width: 8px;
	height: 8px;
	border-right: 2px solid #6B9E5B;
	border-bottom: 2px solid #6B9E5B;
	border-radius: 0 0 2px 0;
}

.image-resize-handle-right {
	width: 8px;
	top: 0;
	bottom: 12px;
	right: -4px;
	cursor: ew-resize;
}
.image-resize-handle-right:hover,
.image-resize-handle-right.active {
	background: rgba(107,158,91,0.45);
	border-radius: 3px;
}

.image-resize-handle-bottom {
	height: 8px;
	left: 0;
	right: 12px;
	bottom: -4px;
	cursor: ns-resize;
}
.image-resize-handle-bottom:hover,
.image-resize-handle-bottom.active {
	background: rgba(107,158,91,0.45);
	border-radius: 3px;
}

#imageRCBox {
	z-index: 101;
	background-color: var(--bg-light-tone);
	display: none;
	position: absolute;
	top: 300px;
	left: 300px;
}

#imageOpacityBox {
	height: 28px;
	padding: 3px 8px;
}

#image-opacity-slider {
	-webkit-appearance: none;
	appearance: none;
	width: 60px;
	height: 4px;
	background: var(--border-light-tone);
	border-radius: 2px;
	outline: none;
	cursor: pointer;
}

#image-opacity-slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--text-light-tone);
	cursor: pointer;
}

#image-opacity-slider::-moz-range-thumb {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--text-light-tone);
	border: none;
	cursor: pointer;
}

#image-opacity-slider::-moz-range-track {
	height: 4px;
	background: var(--border-light-tone);
	border-radius: 2px;
}


/* === css/imagePageLink2.css === */
.imagePageLink {
    position: absolute;
    background-color: transparent;
    overflow: hidden;
    text-align: center;
    display: inline-block;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
}

.imagePageLink:hover {
    cursor: pointer;
}

.imagePageLink:hover .hover-icon{
    opacity: 1;
}

.imagePageLink.active {
    resize: both;
    overflow: hidden;
    padding-bottom: 3px;
}

.imagePageLink.active .main-image {
    border: 2.5px solid var(--border-middle-tone) !important;
    border-radius: 6px;
    box-sizing: border-box;
    overflow: visible;
}

.imagePageLink.active .text-box {
    border: 2.5px solid var(--border-middle-tone) !important;
    border-radius: 6px;
    box-sizing: border-box;
    overflow: visible;
}

.imagePageLink .image-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.imagePageLink .main-image {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid var(--border-middle-tone);
    border-radius: 5px;
}

.imagePageLink .hover-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    opacity: 0;
    transition: opacity 0.3s;
}

.imagePageLink .text-box {
    margin-top: 5px;
    text-align: center;
    font-size: 14px;
    color: var(--text-dark-tone);
    word-wrap: break-word;
    max-width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--border-middle-tone);
    border-radius : 4px;
    padding: 2px;
}



/* Adjusted style for style_2 */
.imagePageLink.style_2 .text-box {
    margin-top: 5px;
    text-align: center;
    font-size: 14px;
    color: var(--text-dark-tone);
    word-wrap: break-word;
    max-width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--border-middle-tone);
    border-radius: 4px;
    padding: 3px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

/* Show the text box on hover */
.imagePageLink.style_2:hover .text-box {
    opacity: 1;
}

.imagePageLink.style_2 .hover-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    opacity: 1;
}


#imagePageLinkRCBox{
    z-index: 101;
    background-color: var(--bg-light-tone);
    display : none;
    position: absolute;
    top: 300px;
    left: 300px;
}

#imagePageLinkRCBox .button {
    height: 24px;
    width: 24px;
    object-fit: contain;
    padding: 2px;
    vertical-align: middle;
}

#modal-drop-image-imagePageLink {
    text-align: center;
    width: 100%;
    height: 400px;
    border: dashed 2px var(--border-middle-tone);
    border-radius : 6px;
    padding-top: 5px;
    font-size: 16px;
}

/* === css/files.css === */

.docx,
.xlsx,
.pdf,
.ppt,
.pptx {
    position: absolute;
    /*box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);*/
    cursor: pointer;
}

.docx:hover,
.xlsx:hover,
.ppt:hover,
.pptx:hover,
.pdf:hover {
    cursor: pointer;
}

.docx.active,
.xlsx.active,
.ppt.active,
.pptx.active,
.pdf.active {
    /*box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);*/
    resize: both;
    overflow: auto;
}


.docx.active .main-image,
.xlsx.active .main-image,
.ppt.active .main-image,
.pptx.active .main-image,
.pdf.active .main-image {
    border: 2.5px solid #8B7355 !important;
    border-radius: 6px;
    box-sizing: border-box;
    overflow: visible;
}

.docx.active .text-box,
.xlsx.active .text-box,
.ppt.active .text-box,
.pptx.active .text-box,
.pdf.active .text-box {
    border: 2.5px solid #8B7355 !important;
    border-radius: 6px;
    box-sizing: border-box;
    overflow: visible;
}

.image-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.docx .main-image,
.xlsx .main-image,
.ppt .main-image,
.pptx .main-image,
.pdf .main-image {
    width: 100%;
    height: auto;
    display: block;
}

.pdf .main-image.pdf-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    border-radius: 3px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.docx .text-box,
.xlsx .text-box,
.pdf .text-box,
.ppt .text-box,
.pptx .text-box {
    margin-top: 5px;
    text-align: center;
    font-size: 12px;
    color: var(--text-dark-tone);
    word-wrap: break-word;
    max-width: 100%;
    box-sizing: border-box;
    border: 1px solid grey;
    border-radius: 4px;
    padding: 2px;

    /* Ellipsis for overflow text */
    overflow: hidden;
    display: -webkit-box; /* Enable multiline truncation */
    -webkit-line-clamp: 2; /* Limit to 2 lines */
    -webkit-box-orient: vertical;
    text-overflow: ellipsis; /* Adds "..." */
}

/* Show full text on hover */
.docx .text-box:hover,
.pptx .text-box:hover,
.ppt .text-box:hover,
.xlsx .text-box:hover,
.pdf .text-box:hover {
    overflow: visible;
    white-space: normal; /* Allows multiline text */
    text-overflow: unset; /* Remove "..." */
    -webkit-line-clamp: unset; /* Remove the line clamping */
    position: relative;
    z-index: 1; /* Ensure it shows above other elements */
    background: var(--bg-light-tone); /* Optional: Add a background to make the full text stand out */
    padding: 3px; /* Optional: Add padding for readability */
}


#docxRCBox{
    z-index: 101;
    background-color: var(--bg-light-tone);
    display: none;
    position: absolute;
    top: 300px;
    left: 300px;
    align-items: center;
    padding: 4px 6px;
    border: 1px solid var(--border-light-tone);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}

#docxRCBox .buttonIcon {
    width: 28px;
    height: 28px;
    padding: 3px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.15s ease;
    border-radius: 3px;
}

#docxRCBox .buttonIcon:hover {
    opacity: 0.85;
}

#xlsxRCBox{
    z-index: 101;
    background-color: var(--bg-light-tone);
    display: none;
    position: absolute;
    top: 300px;
    left: 300px;
    align-items: center;
    padding: 4px 6px;
    border: 1px solid var(--border-light-tone);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}

#xlsxRCBox .buttonIcon {
    width: 28px;
    height: 28px;
    padding: 3px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.15s ease;
    border-radius: 3px;
}

#xlsxRCBox .buttonIcon:hover {
    opacity: 0.85;
}

#pptRCBox{
    z-index: 101;
    background-color: var(--bg-light-tone);
    display: none;
    position: absolute;
    top: 300px;
    left: 300px;
    align-items: center;
    padding: 4px 6px;
    border: 1px solid var(--border-light-tone);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}

#pptRCBox .buttonIcon {
    width: 28px;
    height: 28px;
    padding: 3px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.15s ease;
    border-radius: 3px;
}

#pptRCBox .buttonIcon:hover {
    opacity: 0.85;
}

#pdfRCBox{
    z-index: 101;
    background-color: var(--bg-light-tone);
    display: none;
    position: absolute;
    top: 300px;
    left: 300px;
    align-items: center;
    gap: 4px;
    padding: 4px 6px;
    border: 1px solid var(--border-light-tone);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}

#pdfRC_toggle {
    display: flex;
    align-items: center;
    background: var(--bg-middle-tone);
    border-radius: 4px;
    padding: 2px;
    gap: 2px;
}

#pdfRCBox .buttonIcon {
    width: 28px;
    height: 28px;
    padding: 3px;
    cursor: pointer;
    opacity: 0.4;
    transition: opacity 0.15s ease, background-color 0.15s ease;
    border-radius: 3px;
}

#pdfRCBox .buttonIcon:hover {
    opacity: 0.7;
}

#pdfRC_toggle .buttonIcon.active-toggle {
    opacity: 1;
    background-color: var(--bg-light-tone);
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    border-radius: 3px;
}

.pdfRC-divider {
    width: 1px;
    height: 24px;
    background: var(--border-light-tone);
    margin: 0 2px;
}

#pdfRC_download {
    opacity: 0.5;
}

#pdfRC_download:hover {
    opacity: 0.85;
}

/* PDF preview */
#pdf-preview-container {
    position: fixed;
    z-index: 101;
    width: 600px;
    height: 500px;
    border: 2px solid var(--border-middle-tone);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    background: var(--bg-light-tone);
    pointer-events: auto;
    overflow: hidden;
    resize: both;
    min-width: 300px;
    min-height: 200px;
}

.pdf-preview-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: var(--border-middle-tone);
    color: var(--bg-light-tone);
    display: flex;
    align-items: center;
    padding: 0 10px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: underline;
    z-index: 1;
}

.pdf-preview-iframe {
    position: absolute;
    top: 30px;
    left: 0;
    width: 100%;
    height: calc(100% - 30px);
    border: none;
    pointer-events: auto;
}

.pdf-preview-resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    background: var(--border-middle-tone);
    cursor: se-resize;
    border-radius: 0 0 6px 0;
}


/* === css/file-links.css === */

.google-doc,
.google-sheet,
.google-presentation {
    position: absolute;
    /*box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);*/
    cursor: pointer;
}


.google-doc:hover,
.google-sheet:hover,
.google-presentation:hover {
    cursor: pointer;
}

.google-doc:hover .hover-icon,
.google-sheet:hover .hover-icon,
.google-presentation:hover .hover-icon {
    opacity: 1;
}


.google-doc.active,
.google-sheet.active,
.google-presentation.active {
    /*box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);*/
    resize: both;
    overflow: auto;
}


.google-doc.active .main-image,
.google-sheet.active .main-image,
.google-presentation.active .main-image {
    border: 2.5px solid #4A7FB5 !important;
    border-radius: 6px;
    box-sizing: border-box;
    overflow: visible;
}

.google-doc .hover-icon,
.google-sheet .hover-icon,
.google-presentation .hover-icon {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 20px;
    height: 20px;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 2;
}

.google-doc.active .text-box,
.google-sheet.active .text-box,
.google-presentation.active .text-box {
    border: 2.5px solid #4A7FB5 !important;
    border-radius: 6px;
    box-sizing: border-box;
    overflow: visible;
}

.image-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.google-doc .main-image,
.google-sheet .main-image,
.google-presentation .main-image {
    width: 100%; /* Dynamically updated by JS */
    height: auto; /* Dynamically updated by JS */
    display: block;
}

.google-doc .text-box,
.google-sheet .text-box,
.google-presentation .text-box {
    margin-top: 5px;
    text-align: center;
    font-size: 12px;
    color: var(--text-dark-tone);
    word-wrap: break-word;
    max-width: 100%;
    box-sizing: border-box;
    border: 1px solid grey;
    border-radius: 4px;
    padding: 4px;

    /* Ellipsis for overflow text */
    overflow: hidden;
    display: -webkit-box; /* Enable multiline truncation */
    -webkit-line-clamp: 2; /* Limit to 2 lines */
    -webkit-box-orient: vertical;
    text-overflow: ellipsis; /* Adds "..." */
}

/* Show full text on hover */
.google-doc .text-box:hover,
.google-sheet .text-box:hover,
.google-presentation .text-box:hover {
    overflow: visible;
    white-space: normal; /* Allows multiline text */
    text-overflow: unset; /* Remove "..." */
    -webkit-line-clamp: unset; /* Remove the line clamping */
    position: relative;
    z-index: 1; /* Ensure it shows above other elements */
    background: var(--bg-light-tone); /* Optional: Add a background to make the full text stand out */
    padding: 3px; /* Optional: Add padding for readability */
}


#docxRCBox{
    z-index: 8;
    display : none;
    position: absolute;
    top: 300px;
    left: 300px;
}

#xlsxRCBox{
    z-index: 8;
    display : none;
    position: absolute;
    top: 300px;
    left: 300px;
}

#pptRCBox{
    z-index: 8;
    display : none;
    position: absolute;
    top: 300px;
    left: 300px;
}

#pdfRCBox{
    z-index: 8;
    display : none;
    position: absolute;
    top: 300px;
    left: 300px;
}




/* === css/select.css === */
#selectionRCBox {
	z-index: 101;
	background-color: var(--bg-light-tone);
	display: none;
	position: absolute;
	top: 300px;
	left: 300px;
}

#selectionRCBox .buttonIcon {
	width: 22px;
	height: 22px;
	padding: 2px;
	cursor: pointer;
	opacity: 0.5;
	transition: opacity 0.15s ease;
}

#selectionRCBox .buttonIcon:hover {
	opacity: 0.9;
}

/* Add styles for draggable elements */
.note,
.pageLink,
.noteLink,
.image,
.google-doc,
.google-presentation,
.google-sheet,
.pdf,
.docx,
.xlsx,
.youtube,
.instagram,
.imagePageLink,
.imageLink {
	transition: none !important;
	transform: none;
	will-change: transform;
	position: absolute;
}

/* Style for elements being dragged */
.dragging {
	pointer-events: none;
	user-select: none;
	transition: none !important;
}

/* Prevent text selection during drag selection */
body.drag-selecting {
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}


/* === css/right-click.css === */
/* Container for the row of buttons */
.choiceBoxHoriz {
	position: absolute;
	z-index: 101;
	background-color: #FBF8F3;
	display: none;
	align-items: center;
	gap: 6px;
	height: 50px;
	border: none;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	border-radius: 6px;
	overflow: visible;
	padding: 5px 8px;
	cursor: pointer;
	white-space: nowrap;
}

/* General toolbar icon styles */
.choiceBoxHoriz .buttonIcon,
.choiceBoxHoriz .button {
	height: 26px;
	width: 26px;
	padding: 2px;
	object-fit: contain;
	cursor: pointer;
	vertical-align: middle;
}

/* pageRCBox icons — slightly smaller */
#pageRCBox .button {
	height: 28px;
	width: 28px;
}

/* General button styles */
.button {
	height: 36px;
	width: 36px;
	object-fit: contain; /* Ensure the image maintains its aspect ratio */
	cursor: pointer; /* Pointer cursor on hover */
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.button:hover {
	transform: scale(1.05);
	opacity: 0.9;
}

/* Hover container for the hover button and menu */
.hoverContainer {
	position: relative; /* Position the hoverMenu relative to this container */
}

/* Hover menu container styles */
.hoverMenu {
	display: none; /* Hidden by default */
	flex-direction: column; /* Stack the buttons vertically */
	position: absolute; /* Position relative to the hoverContainer */
	top: 100%; /* Offset to place directly underneath the hoverButton */
	left: 0; /* Align to the left edge of the hoverButton */
	z-index: 101;
	background-color: #FBF8F3;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	border-radius: 8px;
	padding: 8px;
}

/* Show the hover menu when the hoverButton is hovered */
.hoverContainer:hover .hoverMenu {
	display: flex; /* Show the hover menu */
}

/* Sub-button styles (inherit main button styles, but you can customize if needed) */
.hoverMenu .button {
	margin-top: 5px; /* Space between */
}



.choiceBox {
	border: none;
	border-radius: 8px;
	background-color: #FBF8F3;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 12px;
}

/* Other button styles for .choiceButton and .choiceButtonSmall */
.choiceButton {
	width: 140px;
	background-color: #2ecc71;
	color: var(--bg-light-tone);
	padding: 8px 16px;
	margin: 6px;
	border-radius: 6px;
	transition: background-color 0.2s ease;
	border: none;
}

.choiceButton:hover {
	background-color: #27ae60;
}

.choiceButtonSmall {
	width: 32px;
	background-color: #2ecc71;
	color: var(--bg-light-tone);
	padding: 6px;
	margin: 4px;
	border-radius: 4px;
	transition: background-color 0.2s ease;
	border: none;
}

.choiceButtonSmall:hover {
	background-color: #27ae60;
}

/* Styling for the follower div */
#follower {
	z-index: 999999;
	background-color: #FBF8F3;
	color: #5D4037;
	position: absolute;
	top: 30px;
	border: 0.5px solid #8B7355;
	border-radius: 4px;
	padding: 4px 8px;
	font-size: 13px;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	white-space: nowrap;
	transform-origin: 0 0;
	pointer-events: none;
}

/* Google connected status container */
.google-connected {
	display: flex;
	align-items: center;
	gap: 8px;
}

/* Google not connected container */
.google-not-connected {
	display: flex;
	align-items: center;
	gap: 8px;
}

/* Connect button styling */
.connect-button {
	background-color: #FBF8F3;
	color: #3E2723;
	border: 1px solid #3E2723;
	border-radius: 8px;
	padding: 8px 16px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: none;
	margin-left: 8px;
	height: 36px;
	line-height: 20px;
}

.connect-button:hover {
	background-color: #FBF8F3;
	color: #3E2723;
	border: 1px solid #3E2723;
}

/* Disconnect button styling */
.disconnect-button {
	background-color: #FBF8F3;
	color: #3E2723;
	border: 1px solid #3E2723;
	border-radius: 8px;
	padding: 8px 16px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: none;
	margin-left: 8px;
	height: 36px;
	line-height: 20px;
}

.disconnect-button:hover {
	background-color: #FBF8F3;
	color: #3E2723;
	border: 1px solid #3E2723;
}



/* Custom tooltip for Google icon */
#connect-google {
	position: relative;
}

#connect-google::after {
	content: "You are not connected to your Google account";
	position: absolute;
	bottom: 100%;
	left: 50%;
	transform: translateX(-50%);
	background-color: #FBF8F3;
	color: #5D4037;
	padding: 6px 10px;
	border-radius: 4px;
	font-size: 12px;
	white-space: nowrap;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
	z-index: 101;
	pointer-events: none;
	border: 0.5px solid #8B7355;
}

#connect-google::before {
	content: '';
	position: absolute;
	bottom: 100%;
	left: 50%;
	transform: translateX(-50%);
	border: 5px solid transparent;
	border-top-color: #8B7355;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
	z-index: 101;
	pointer-events: none;
}

#connect-google:hover::after,
#connect-google:hover::before {
	opacity: 1;
	visibility: visible;
}


/* === css/modal.css === */

/* DROPPING IMAGES */

/* The Modal (background) */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1; /* Sit on top */
  padding-top: 100px; /* Location of the box */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgb(0,0,0); /* Fallback color */
  background-color: rgba(0,0,0,0.4); /* Black w/ opacity */

}

/* Fade-in transition for drop-image modals */
.modal.forBackgroundImage,
.modal.forImagePageLink,
.modal.forImageLink,
.modal.forPageLink,
.modal.forFontUpload {
  display: block !important;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal.forBackgroundImage.visible,
.modal.forImagePageLink.visible,
.modal.forImageLink.visible,
.modal.forPageLink.visible,
.modal.forFontUpload.visible {
  opacity: 1;
  pointer-events: auto;
}

/* Modal Content */
.modal-content {
  background-color: var(--bg-light-tone);
  margin: auto;
  padding: 20px;
  border: 1px solid var(--text-light-tone);
  width: 60%;
}

/* Drop-image modals: fit content height */
.modal.forBackgroundImage .modal-content,
.modal.forImagePageLink .modal-content,
.modal.forImageLink .modal-content,
.modal.forPageLink .modal-content,
.modal.forFontUpload .modal-content {
  width: 65%;
  max-width: 650px;
  height: auto;
  border-radius: 8px;
}

.modal.forBackgroundImage .drop-area,
.modal.forImagePageLink .drop-area,
.modal.forImageLink .drop-area,
.modal.forPageLink .drop-area,
.modal.forFontUpload .drop-area {
  border: dashed 2px #2e7d32 !important;
}

.modal.forFontUpload {
  z-index: 10000;
}

#modal-drop-font {
  text-align: center;
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: dashed 2px #734b02;
  border-radius: 6px;
  font-size: 15px;
  color: var(--text-middle-tone);
  cursor: pointer;
}

/* The Close Button */
.close {
  color: var(--text-light-tone);
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: #000;
  text-decoration: none;
  cursor: pointer;
}

/* Feedback button in titleBox */
#feedback-section {
  align-self: stretch;
  margin: 5px 0;
}

#feedback-btn {
  cursor: pointer;
  background-color: var(--bg-light-tone);
  color: var(--text-dark-tone);
  border: 1px solid var(--text-dark-tone);
  border-radius: 8px;
  padding: 5px 13px;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  transition: background-color 0.2s;
}

#feedback-btn:hover {
  background-color: var(--bg-middle-tone);
}

/* Feedback modal dialog (above titleBox) */
#feedback-modal {
  z-index: 100002;
  padding-top: 0;
  align-items: center;
  justify-content: center;
}

.feedback-modal-content {
  width: 90%;
  max-width: 600px;
  height: auto !important;
  max-height: none;
  margin: 0;
  padding: 18px 24px;
  resize: none !important;
  overflow: visible;
  border-radius: 10px;
  border: 1px solid var(--border-middle-tone);
  background-color: #FBF8F3 !important;
}

#feedback-thanks {
  padding: 12px 0;
  font-size: 16px;
  color: var(--text-dark-tone);
  text-align: center;
}

#feedback-message {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--border-light-tone);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  background-color: var(--bg-light-tone);
  resize: none !important;
  -webkit-appearance: none;
  min-height: 260px;
  height: 260px;
  overflow-y: auto;
  overflow-x: hidden;
  color: #333;
  display: block;
}

#feedback-message::-webkit-resizer {
  display: none !important;
  width: 0;
  height: 0;
}

#feedback-message::-webkit-scrollbar {
  width: 0;
  background: transparent;
}

textarea#feedback-message {
  resize: none !important;
  -webkit-resize: none;
  -moz-resize: none;
}

#feedback-message:focus {
  outline: none;
  border-color: var(--border-middle-tone);
}

#feedback-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

#feedback-send {
  padding: 5px 16px;
  border: none;
  border-radius: 6px;
  background-color: #3E2723;
  color: var(--bg-light-tone);
  font-size: 13px;
  cursor: pointer;
  transition: background-color 0.2s;
}

#feedback-send:hover:not(:disabled) {
  background-color: var(--text-middle-tone);
}

#feedback-send:disabled {
  background-color: #999;
  cursor: not-allowed;
}

#feedback-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

#feedback-attachments:empty {
  display: none;
}

.feedback-attach-item {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 5px;
  border: 1px solid var(--border-light-tone);
  overflow: hidden;
  background: var(--bg-middle-tone);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feedback-attach-item img,
.feedback-attach-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feedback-attach-item .feedback-attach-icon {
  font-size: 20px;
  color: var(--text-light-tone);
}

.feedback-attach-remove {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 16px;
  height: 16px;
  background: var(--text-dark-tone);
  color: var(--bg-light-tone);
  border: none;
  border-radius: 50%;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
  cursor: pointer;
  padding: 0;
}

.feedback-attach-remove:hover {
  background: #d32f2f;
}

.feedback-modal-content::after,
.feedback-modal-content::before {
  display: none !important;
  content: none !important;
}

.feedback-modal-content.drag-over {
  border-color: var(--border-middle-tone);
  background: var(--bg-middle-tone);
}






/* === css/popup.css === */
.popup {
  display: none;
  position: fixed;
  top: 20%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(255, 253, 250, 0.98);
  color: #222;
  padding: 16px 24px;
  border-radius: 10px;
  font-size: 17px;
  border: 1px solid #d4b896;
  box-shadow: 0 2px 12px rgba(139, 90, 43, 0.12);
  z-index: 15;
  text-align: center;
}

.popup a {
  display: inline-block;
  margin-top: 8px;
  color: #8b5a2b;
  text-decoration: underline;
}

.popup a:hover {
  color: #6d4722;
}

/* === css/youtube.css === */



.youtube {
    position: absolute;
    border-color: rgb(0, 0, 0, 0);
    border-style: solid;
    border-width: 1px;
    border-radius: 5px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.youtube-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  z-index: 2; /* Place the overlay above the iframe */
}

.youtube:hover {
    border-color: grey;
    cursor: pointer;
    opacity: 1;
    box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.3);
}

.youtube iframe{
    width: 100%;
    height: 100%;
}

.youtube.active {
    border: 2.5px solid #4A7FB5 !important;
    border-radius: 6px;
    resize: both;
    overflow: auto;
    box-sizing: border-box;
}


/* ── Video (dropped .mov / .mp4 / .webm) ── */

.video {
    position: absolute;
    border-color: rgb(0, 0, 0, 0);
    border-style: solid;
    border-width: 1px;
    border-radius: 5px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 2;
}

.video:hover {
    border-color: grey;
    cursor: pointer;
    opacity: 1;
    box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.3);
}

.video video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.video.active {
    border: 2.5px solid #4A7FB5 !important;
    border-radius: 6px;
    resize: both;
    overflow: auto;
    box-sizing: border-box;
}


/* === css/instagram.css === */
/* Instagram Post Embed Styles */

.instagram {
    position: absolute;
    border: 1px solid var(--border-light-tone);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-light-tone);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
}

.instagram-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2; /* Place the overlay above the iframe */
}

.instagram:hover {
    border-color: var(--text-light-tone);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.instagram iframe{
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.instagram.active {
    border: 2.5px solid #4A7FB5 !important;
    border-radius: 6px;
    resize: both;
    overflow: auto;
    box-sizing: border-box;
}



/* === css/social_embeds.css === */
/* X, LinkedIn, Reddit, TikTok, Pinterest embed styles (same as Instagram) */

.x-embed, .linkedin-embed, .reddit-embed, .tiktok-embed {
  position: absolute;
  border: 1px solid var(--border-light-tone);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-light-tone);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  cursor: pointer;
}

.x-embed-overlay, .linkedin-embed-overlay, .reddit-embed-overlay, .tiktok-embed-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
}

.x-embed:hover, .linkedin-embed:hover, .reddit-embed:hover, .tiktok-embed:hover {
  border-color: var(--text-light-tone);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.x-embed-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 12px;
  box-sizing: border-box;
}
.x-embed-link a {
  color: var(--text-dark-tone);
  font-weight: 600;
  text-decoration: none;
}
.x-embed-link a:hover {
  text-decoration: underline;
}

.x-embed iframe, .linkedin-embed iframe, .reddit-embed iframe, .tiktok-embed iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.x-embed.active, .linkedin-embed.active, .reddit-embed.active, .tiktok-embed.active {
  border: 2px solid #2d7a1f !important;
  resize: both;
  overflow: auto;
  box-sizing: border-box;
}


/* === css/pinterest.css === */
/* Pinterest Pin Embed Styles */

.pinterest-embed {
    position: absolute;
    border: 1px solid transparent;
    border-radius: 5px;
    overflow: hidden;
    background: var(--bg-light-tone);
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.pinterest-embed-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.pinterest-embed:hover {
    border-color: rgba(128, 128, 128, 0.3);
}

.pinterest-embed-card {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pinterest-embed-image {
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

.pinterest-embed-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pinterest-embed-placeholder {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light-tone);
    min-height: 120px;
}

.pinterest-embed-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--bg-light-tone);
    border-top: 1px solid var(--border-light-tone);
    flex-shrink: 0;
}

.pinterest-embed-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.pinterest-embed-text {
    min-width: 0;
    flex: 1;
}

.pinterest-embed-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark-tone);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.pinterest-embed-author {
    font-size: 11px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.pinterest-embed.active {
    border: 2.5px solid #4A7FB5 !important;
    border-radius: 6px;
    resize: both;
    overflow: auto;
    box-sizing: border-box;
}

.pinterest-embed.active:hover {
    border: 2.5px solid #4A7FB5 !important;
}


/* === css/lines.css === */
/* Connexion lines between elements */

.connexion-line {
    position: absolute;
    height: 0;
    z-index: 0;
    transform-origin: 0 0;
    border-top: 2px dashed var(--border-middle-tone);
}

.connexion-line.solid {
    border-top-style: solid;
}

/* Invisible wider hit area for clicking */
.connexion-hitarea {
    position: absolute;
    top: -8px;
    left: 0;
    right: 0;
    height: 16px;
    cursor: pointer;
    pointer-events: auto;
}

/* Arrowheads — pure CSS triangles matching line color */
.connexion-arrow {
    position: absolute;
    display: none;
    pointer-events: none;
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

.connexion-arrow.active {
    display: block;
}

.connexion-arrow-start {
    left: 0;
    top: -6px;
    border-right: 10px solid var(--border-middle-tone);
}

.connexion-arrow-end {
    right: 0;
    top: -6px;
    border-left: 10px solid var(--border-middle-tone);
}

/* Standalone SVG for curved lines */
.connexion-curve-svg {
    position: absolute;
    pointer-events: none;
    z-index: 0;
    overflow: visible;
}

/* Options bar when clicking a line */
.connexion-options {
    position: absolute;
    display: flex;
    gap: 4px;
    background: var(--bg-light-tone);
    border: 1px solid var(--border-light-tone);
    border-radius: 6px;
    padding: 4px 6px;
    z-index: 101;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    overflow: visible;
}

.connexion-opt-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid var(--border-light-tone);
    background: var(--bg-light-tone);
    font-size: 16px;
    color: var(--border-middle-tone);
}

.connexion-opt-btn:hover {
    background: var(--bg-middle-tone);
}

.connexion-opt-btn img {
    height: 14px;
    width: auto;
}

.connexion-opt-btn.active {
    background: var(--bg-middle-tone);
    border-color: var(--border-light-tone);
}

/* Dashed line icon */
.dashed-icon {
    display: block;
    width: 16px;
    height: 0;
    border-top: 2px dashed var(--border-middle-tone);
}

/* Curve carousel icons */
.straight-icon {
    display: block;
    width: 16px;
    height: 0;
    border-top: 2px solid var(--border-middle-tone);
}

.curve-gentle-icon {
    display: block;
    width: 16px;
    height: 6px;
    border: 2px solid var(--border-middle-tone);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
}

.curve-strong-icon {
    display: block;
    width: 16px;
    height: 10px;
    border: 2px solid var(--border-middle-tone);
    border-bottom: none;
    border-radius: 16px 16px 0 0;
}

.curve-s-icon {
    display: block;
    width: 16px;
    height: 12px;
    position: relative;
}
.curve-s-icon::before,
.curve-s-icon::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 6px;
    border: 2px solid var(--border-middle-tone);
}
.curve-s-icon::before {
    top: 0;
    left: 0;
    border-bottom: none;
    border-right: none;
    border-radius: 8px 0 0 0;
}
.curve-s-icon::after {
    bottom: 0;
    right: 0;
    border-top: none;
    border-left: none;
    border-radius: 0 0 8px 0;
}

/* Flipped (mirrored) curve icons */
.curve-gentle-flip-icon {
    display: block;
    width: 16px;
    height: 6px;
    border: 2px solid var(--border-middle-tone);
    border-top: none;
    border-radius: 0 0 8px 8px;
}

.curve-strong-flip-icon {
    display: block;
    width: 16px;
    height: 10px;
    border: 2px solid var(--border-middle-tone);
    border-top: none;
    border-radius: 0 0 16px 16px;
}

.curve-s-flip-icon {
    display: block;
    width: 16px;
    height: 12px;
    position: relative;
}
.curve-s-flip-icon::before,
.curve-s-flip-icon::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 6px;
    border: 2px solid var(--border-middle-tone);
}
.curve-s-flip-icon::before {
    top: 0;
    right: 0;
    border-bottom: none;
    border-left: none;
    border-radius: 0 8px 0 0;
}
.curve-s-flip-icon::after {
    bottom: 0;
    left: 0;
    border-top: none;
    border-right: none;
    border-radius: 0 0 0 8px;
}

/* Color swatch button */
.connexion-opt-btn.connexion-color-btn {
    width: 20px;
    height: 20px;
    min-width: 20px;
    padding: 0;
    border: none;
    background: none;
}

.connexion-opt-btn.connexion-color-btn:hover {
    background: none;
}

.connexion-color-swatch {
    display: block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1.5px solid var(--border-light-tone);
    cursor: pointer;
}

/* Shrink & center the Pickr-generated button inside the color btn */
.connexion-color-btn .pcr-button {
    width: 14px !important;
    height: 14px !important;
    position: static !important;
    margin: auto !important;
}


/* === css/draw.css === */
/* Add these styles to your existing CSS */
#enable-drawing {
    position: fixed;
    top: 200px;
    right: 20px;
    z-index: 1001;
    padding: 8px 16px;
    background-color: var(--bg-light-tone);
    border: 1px solid var(--border-light-tone);
    border-radius: 4px;
    cursor: pointer;
}

/* Prevent text selection during rotation */
body.rotating {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Custom color for drawings - this should override the default colors */
.drawing[data-custom-color] {
    stroke: inherit !important;
}

#enable-drawing:hover {
    background-color: var(--bg-light-tone);
}

.drawing {
    pointer-events: all;
    stroke: #000000;
    stroke-width: 2px;
    fill: none;
    cursor: grab;
}

.drawing:hover {
    cursor: grab;
    stroke-width: 4px;
}

.drawing:active {
    cursor: grabbing;
}

.drawing.active {
    stroke: #6B9E5B !important;
    stroke-width: 2.5px !important;
}

svg .drawing.active {
    stroke: #6B9E5B !important;
    stroke-width: 2.5px !important;
}

.drawing.active[class*="drawing"] {
    stroke: #6B9E5B !important;
    stroke-width: 2.5px !important;
}

svg.drawing .drawing.active,
svg .drawing.active,
.drawing.active {
    stroke: #6B9E5B !important;
    stroke-width: 2.5px !important;
}

/* Override for drawings with custom colors - even higher specificity */
.drawing.active[data-custom-color] {
    stroke: var(--custom-stroke-color) !important;
    stroke-width: 3px !important;
}

svg .drawing.active[data-custom-color] {
    stroke: var(--custom-stroke-color) !important;
    stroke-width: 3px !important;
}

/* Maximum specificity for custom colors */
svg.drawing .drawing.active[data-custom-color],
svg .drawing.active[data-custom-color],
.drawing.active[data-custom-color] {
    stroke: var(--custom-stroke-color) !important;
    stroke-width: 3px !important;
}

/* Ultra-high specificity for immediate color changes */
.drawing.active[data-custom-color][style*="stroke"] {
    stroke: var(--custom-stroke-color) !important;
    stroke-width: 3px !important;
}

svg .drawing.active[data-custom-color][style*="stroke"] {
    stroke: var(--custom-stroke-color) !important;
    stroke-width: 3px !important;
}

/* NUCLEAR OPTION: Override everything for custom colors */
.drawing.active[data-custom-color] {
    stroke: var(--custom-stroke-color) !important;
    stroke-width: 3px !important;
}

svg .drawing.active[data-custom-color] {
    stroke: var(--custom-stroke-color) !important;
    stroke-width: 3px !important;
}

/* Even more specific - target the exact element */
path.drawing.active[data-custom-color] {
    stroke: var(--custom-stroke-color) !important;
    stroke-width: 3px !important;
}

svg path.drawing.active[data-custom-color] {
    stroke: var(--custom-stroke-color) !important;
    stroke-width: 3px !important;
}

/* === css/audio.css === */
/* ─── Recording modal ────────────────────────────────────────────── */

#audio-record-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.25);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

#audio-record-modal {
    background: var(--bg-light-tone);
    border: 2px solid var(--border-middle-tone);
    border-radius: 12px;
    padding: 28px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    min-width: 220px;
    box-shadow: 0 4px 20px rgba(139,90,43,0.15);
}

#audio-record-timer {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-dark-tone);
    font-variant-numeric: tabular-nums;
}

#audio-record-controls {
    display: flex;
    gap: 16px;
}

#audio-record-controls button {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--border-middle-tone);
    background: var(--bg-light-tone);
    color: var(--text-dark-tone);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, transform 0.1s;
}

#audio-record-controls button:hover {
    background: var(--bg-middle-tone);
    transform: scale(1.08);
}

#audio-record-controls button.recording {
    border-color: #c0392b;
    color: #c0392b;
}

/* ─── On-canvas audio element ────────────────────────────────────── */

.audio-element {
    position: absolute;
    background: var(--bg-light-tone);
    border: 1px solid var(--border-light-tone);
    border-radius: 8px;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    z-index: 5;
    box-shadow: 0 1px 6px rgba(139,90,43,0.10);
    user-select: none;
    min-width: 200px;
}

.audio-element:hover {
    border-color: var(--border-middle-tone);
}

.audio-element.active {
    border: 2.5px solid #6B9E5B !important;
    border-radius: 6px;
    box-sizing: border-box;
}

.audio-play-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1.5px solid var(--border-middle-tone);
    background: var(--bg-light-tone);
    color: var(--text-dark-tone);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s;
}

.audio-play-btn:hover {
    background: var(--bg-middle-tone);
}

.audio-scrubber-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.audio-scrubber {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: var(--bg-dark-tone);
    outline: none;
    cursor: pointer;
}

.audio-scrubber::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-middle-tone);
    cursor: pointer;
}

.audio-scrubber::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-middle-tone);
    border: none;
    cursor: pointer;
}

.audio-time {
    font-size: 11px;
    color: var(--text-light-tone);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* ─── Mic icon in pageRCBox ──────────────────────────────────────── */

#record-audio-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text-dark-tone);
}


/* === css/sidebar.css === */
/* Page Navigation Sidebar Styles */

.page-sidebar {
    position: fixed;
    top: 0; /* Start from very top */
    left: -255px; /* Start off-screen (15% less than 300px) */
    width: 255px; /* 15% less than 300px */
    height: 100vh; /* Full height */
    background-color: var(--bg-light-tone);
    border-right: 1px solid var(--border-middle-tone);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 800; /* Below title (z-index: 888) but above page content */
    transition: left 0.6s ease-in-out;
    overflow-y: auto;
}

.page-sidebar.show {
    left: 0;
}

.sidebar-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Removed sidebar header styles */



.sidebar-body {
    flex: 1;
    padding: 20px 0 0 0;
    color: #495057;
    overflow-y: auto;
}

/* File Explorer Tree Styles */
.page-tree {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.4;
}

.page-tree-item {
    display: flex;
    align-items: center;
    padding: 4px 16px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.1s ease;
}

.page-tree-item:hover {
    background-color: var(--bg-middle-tone);
}

.page-tree-item.active {
    background-color: #007acc;
    color: var(--bg-light-tone);
}

.page-tree-item.active:hover {
    background-color: #005a9e;
}

.page-tree-toggle {
    width: 16px;
    height: 16px;
    margin-right: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease;
    color: var(--text-light-tone);
    font-size: 10px;
    font-weight: bold;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.page-tree-toggle.expanded {
    transform: rotate(90deg);
}

.page-tree-toggle.collapsed {
    transform: rotate(0deg);
}

/* Ensure toggle buttons are clickable */
.page-tree-toggle[data-toggle="true"] {
    pointer-events: auto;
    z-index: 1;
    position: relative;
}

/* Ensure collapsed children are hidden */
.page-tree-children.collapsed {
    display: none;
}

.page-tree-icon {
    width: 22px;
    height: 22px;
    margin-right: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    object-fit: contain;
}

.page-tree-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-light-tone);
}

.page-tree-item.active .page-tree-title {
    color: var(--text-dark-tone);
    font-weight: 700;
}

.page-tree-children {
    margin-left: 16px;
    border-left: 1px solid var(--border-light-tone);
}

.page-tree-children.collapsed {
    display: none;
}

/* Folder and file icons */
.page-tree-icon.folder {
    color: #ffd43b;
}

.page-tree-icon.file {
    color: #6c757d;
}

.page-tree-icon.home {
    color: #007acc;
}

/* Additional Cursor-like styling */
.page-tree-item {
    border-radius: 3px;
    margin: 1px 4px;
}

.page-tree-item.active {
    background-color: transparent;
    color: var(--text-dark-tone);
    font-weight: 700;
}

.page-tree-item.active:hover {
    background-color: var(--bg-middle-tone);
}

.page-tree-item.active .page-tree-icon {
    transform: none;
}

.page-tree-item.in-path {
    color: #3b82f6;
    font-weight: 600;
}

.page-tree-item.child-of-current {
    background-color: transparent;
    border-radius: 3px;
}

.page-tree-item.child-of-current:hover {
    background-color: var(--bg-light-tone);
}

.page-tree-item.in-path .page-tree-icon {
    /* Icon color handled by image */
}

.page-tree-item.active .page-tree-toggle {
    color: var(--text-dark-tone);
}

/* Smooth transitions */
.page-tree-children {
    transition: all 0.2s ease;
}

.page-tree-toggle {
    transition: transform 0.2s ease;
}

.page-tree-icon {
    transition: transform 0.2s ease;
}

/* Current page animation */
.page-tree-item.active .page-tree-icon {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1.1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1.1); }
}

/* Hover trigger area on the left edge */
.sidebar-trigger {
    position: fixed;
    top: 0;
    left: 0;
    width: 10px;
    height: 100vh;
    z-index: 999;
}

/* Ensure sidebar appears above other content */
.page-sidebar {
    z-index: 1001;
}

/* Drag-and-drop visual feedback */
.page-tree-item.drag-over {
    background-color: var(--bg-middle-tone);
    border: 1.5px dashed var(--border-middle-tone);
    border-radius: 4px;
}

.page-tree-item.dragging {
    opacity: 0.4;
}

.sidebar-drag-ghost {
    position: fixed;
    z-index: 99999;
    padding: 4px 12px;
    background: var(--bg-light-tone);
    border: 1px solid var(--border-middle-tone);
    border-radius: 4px;
    font-size: 13px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-dark-tone);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    pointer-events: none;
    white-space: nowrap;
}

/* Sidebar right-click context menu */
#sidebarRCBox {
	position: fixed;
	z-index: 10000000;
	background: var(--bg-light-tone);
	border: 1px solid var(--border-light-tone);
	border-radius: 6px;
	box-shadow: 0 3px 12px rgba(0,0,0,.15);
	padding: 4px 0;
	min-width: 120px;
}

.sidebar-rc-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 7px 14px;
	font-size: 13px;
	color: var(--text-dark-tone);
	cursor: pointer;
	white-space: nowrap;
}

.sidebar-rc-item:hover {
	background: #fdecea;
	color: #c0392b;
}

.sidebar-rc-icon {
	width: 16px;
	height: 16px;
	object-fit: contain;
}

