/* =========================================================================
   V's Journey — dark ops-log journal paper
   Deep blacks · purple/orange glow accents · mono telemetry · ruled paper
   Everything is scoped under .vsj-wrap so the theme stays untouched.
   ========================================================================= */

.vsj-wrap {
	--vsj-bg: #060608;
	--vsj-panel: #0b0b10;
	--vsj-ink: #e8e6f0;
	--vsj-ink-dim: #8f8ba3;
	--vsj-purple: #8b5cf6;
	--vsj-purple-soft: rgba(139, 92, 246, 0.14);
	--vsj-orange: #f97316;
	--vsj-orange-soft: rgba(249, 115, 22, 0.12);
	--vsj-line: rgba(139, 92, 246, 0.10);
	--vsj-rule: rgba(143, 139, 163, 0.07);
	--vsj-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
	--vsj-sans: "Space Grotesk", Inter, -apple-system, system-ui, sans-serif;

	max-width: 860px;
	margin: 0 auto;
	padding: clamp(1rem, 3vw, 2rem) 1rem 4rem;
	font-family: var(--vsj-sans);
	color: var(--vsj-ink);
}

.vsj-mono { font-family: var(--vsj-mono); letter-spacing: 0.08em; }

/* -------------------------------------------------- kill duplicate title
   The journal renders its own page header, so suppress the theme's/
   Elementor's automatic page title on journal pages.                     */
body.vsj-page .entry-title,
body.vsj-page h1.entry-title,
body.vsj-page .page-title,
body.vsj-page .elementor-page-title,
body.vsj-page .elementor-heading-title.elementor-page-title,
body.vsj-page header.entry-header,
body.vsj-page .page-header {
	display: none;
}

/* ---------------------------------------------------------------- header */
.vsj-header { margin-bottom: 2.5rem; position: relative; }

.vsj-kicker {
	display: inline-flex;
	align-items: center;
	gap: 0.6em;
	font-family: var(--vsj-mono);
	font-size: 0.72rem;
	letter-spacing: 0.22em;
	color: var(--vsj-purple);
	text-transform: uppercase;
	padding: 0.45em 1em;
	border: 1px solid var(--vsj-line);
	border-radius: 999px;
	background: linear-gradient(180deg, rgba(139, 92, 246, 0.06), rgba(139, 92, 246, 0.02));
	backdrop-filter: blur(6px);
	margin-bottom: 1.1rem;
}

.vsj-kicker-dot {
	width: 7px; height: 7px; border-radius: 50%;
	background: var(--vsj-orange);
	box-shadow: 0 0 10px 2px var(--vsj-orange-soft), 0 0 4px var(--vsj-orange);
	animation: vsj-pulse 2.4s ease-in-out infinite;
	flex: none;
}

@keyframes vsj-pulse {
	0%, 100% { opacity: 1; transform: scale(1); }
	50%      { opacity: 0.45; transform: scale(0.8); }
}

.vsj-title {
	font-size: clamp(2.2rem, 6vw, 3.4rem);
	font-weight: 700;
	line-height: 1.05;
	letter-spacing: -0.02em;
	margin: 0 0 0.6rem;
	background: linear-gradient(100deg, #ffffff 30%, #c4b5fd 70%, var(--vsj-orange) 110%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}

.vsj-sub {
	color: var(--vsj-ink-dim);
	font-size: 1.02rem;
	line-height: 1.65;
	max-width: 56ch;
	margin: 0;
}

.vsj-admin-crosslink { margin: -1rem 0 2rem; }
.vsj-admin-crosslink a {
	font-family: var(--vsj-mono);
	font-size: 0.72rem;
	letter-spacing: 0.18em;
	color: var(--vsj-orange);
	text-decoration: none;
	border-bottom: 1px dashed rgba(249, 115, 22, 0.4);
	padding-bottom: 2px;
	transition: color 0.2s ease, border-color 0.2s ease;
}
.vsj-admin-crosslink a:hover { color: #fdba74; border-color: #fdba74; }

/* ------------------------------------------------------------ entry card
   The "journal paper": a dark sheet with faint ruled lines, a glowing
   margin rule on the left, and a soft purple ambient glow.               */
.vsj-feed { display: flex; flex-direction: column; gap: 1.75rem; }

.vsj-entry {
	position: relative;
	display: flex;
	border: 1px solid var(--vsj-line);
	border-radius: 14px;
	overflow: hidden;
	background:
		/* faint ruled lines, like journal paper */
		repeating-linear-gradient(
			180deg,
			transparent 0px,
			transparent 31px,
			var(--vsj-rule) 31px,
			var(--vsj-rule) 32px
		),
		radial-gradient(120% 140% at 85% -20%, rgba(139, 92, 246, 0.09), transparent 55%),
		linear-gradient(180deg, #0c0c12, var(--vsj-panel));
	box-shadow:
		0 1px 0 rgba(255, 255, 255, 0.03) inset,
		0 20px 50px -30px rgba(0, 0, 0, 0.9);
	transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.35s ease, box-shadow 0.35s ease;
	opacity: 0;
	transform: translateY(18px);
}

.vsj-entry.vsj-in {
	opacity: 1;
	transform: translateY(0);
	transition:
		opacity 0.6s ease,
		transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
		border-color 0.35s ease,
		box-shadow 0.35s ease;
}

.vsj-entry:hover {
	border-color: rgba(139, 92, 246, 0.32);
	box-shadow:
		0 1px 0 rgba(255, 255, 255, 0.04) inset,
		0 0 0 1px rgba(139, 92, 246, 0.12),
		0 24px 60px -28px rgba(139, 92, 246, 0.28);
	transform: translateY(-2px);
}

/* the notebook margin rule */
.vsj-entry-margin {
	flex: none;
	width: 3px;
	background: linear-gradient(180deg, var(--vsj-purple), rgba(139, 92, 246, 0.15));
	box-shadow: 0 0 14px rgba(139, 92, 246, 0.5);
}
.vsj-entry--private > .vsj-entry-margin {
	background: linear-gradient(180deg, var(--vsj-orange), rgba(249, 115, 22, 0.15));
	box-shadow: 0 0 14px rgba(249, 115, 22, 0.45);
}

.vsj-entry-body {
	padding: clamp(1.25rem, 3vw, 1.9rem) clamp(1.25rem, 3.5vw, 2.2rem);
	width: 100%;
	min-width: 0;
}

.vsj-entry-meta {
	display: flex;
	align-items: center;
	gap: 0.9rem;
	flex-wrap: wrap;
	margin-bottom: 0.9rem;
}

.vsj-entry-stamp {
	font-size: 0.7rem;
	color: var(--vsj-ink-dim);
	text-transform: uppercase;
}

.vsj-badge {
	font-family: var(--vsj-mono);
	font-size: 0.62rem;
	letter-spacing: 0.2em;
	padding: 0.3em 0.8em;
	border-radius: 999px;
	border: 1px solid;
}
.vsj-badge--private {
	color: #fdba74;
	border-color: rgba(249, 115, 22, 0.35);
	background: var(--vsj-orange-soft);
}
.vsj-badge--public {
	color: #c4b5fd;
	border-color: rgba(139, 92, 246, 0.35);
	background: var(--vsj-purple-soft);
}

.vsj-entry-title {
	font-size: clamp(1.25rem, 2.6vw, 1.6rem);
	font-weight: 600;
	letter-spacing: -0.01em;
	line-height: 1.25;
	margin: 0 0 0.75rem;
}
.vsj-entry-title a {
	color: var(--vsj-ink);
	text-decoration: none;
	transition: color 0.2s ease;
}
.vsj-entry-title a:hover { color: #c4b5fd; }

.vsj-entry-content {
	color: #c9c6d8;
	font-size: 1rem;
	line-height: 2;             /* sits on the 32px ruled lines */
	overflow-wrap: break-word;
}
.vsj-entry-content p { margin: 0 0 1rem; line-height: 2; }
.vsj-entry-content a { color: var(--vsj-purple); }
.vsj-entry-content img { max-width: 100%; height: auto; border-radius: 10px; }
.vsj-entry-content blockquote {
	margin: 1rem 0;
	padding: 0.25rem 0 0.25rem 1.1rem;
	border-left: 2px solid var(--vsj-orange);
	color: var(--vsj-ink-dim);
	font-style: italic;
}
.vsj-entry-content code {
	font-family: var(--vsj-mono);
	font-size: 0.88em;
	background: rgba(139, 92, 246, 0.08);
	border: 1px solid var(--vsj-line);
	padding: 0.1em 0.4em;
	border-radius: 6px;
}
.vsj-entry-content pre {
	background: #08080c;
	border: 1px solid var(--vsj-line);
	border-radius: 10px;
	padding: 1rem 1.2rem;
	overflow-x: auto;
}
.vsj-entry-content pre code { background: none; border: 0; padding: 0; }

/* attachments */
.vsj-entry-media {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 0.6rem;
	margin-top: 1.1rem;
}
.vsj-entry-media:empty { display: none; }
.vsj-media-item {
	display: block;
	border-radius: 10px;
	overflow: hidden;
	border: 1px solid var(--vsj-line);
	line-height: 0;
	transition: border-color 0.25s ease, transform 0.25s ease;
}
.vsj-media-item:hover { border-color: rgba(139, 92, 246, 0.4); transform: scale(1.015); }
.vsj-media-img { width: 100%; height: 100%; object-fit: cover; }

/* tags */
.vsj-entry-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.1rem; }
.vsj-tag {
	font-family: var(--vsj-mono);
	font-size: 0.68rem;
	letter-spacing: 0.08em;
	color: var(--vsj-ink-dim);
	border: 1px solid var(--vsj-rule);
	border-radius: 999px;
	padding: 0.25em 0.8em;
	background: rgba(255, 255, 255, 0.015);
}

/* actions */
.vsj-entry-actions {
	display: flex;
	gap: 1.4rem;
	margin-top: 1.25rem;
	padding-top: 1rem;
	border-top: 1px solid var(--vsj-rule);
}
.vsj-readlink {
	font-family: var(--vsj-mono);
	font-size: 0.7rem;
	letter-spacing: 0.18em;
	color: var(--vsj-purple);
	text-decoration: none;
	transition: color 0.2s ease, text-shadow 0.2s ease;
}
.vsj-readlink:hover { color: #c4b5fd; text-shadow: 0 0 12px rgba(139, 92, 246, 0.6); }
.vsj-readlink--edit { color: var(--vsj-ink-dim); }
.vsj-readlink--edit:hover { color: var(--vsj-orange); text-shadow: 0 0 12px rgba(249, 115, 22, 0.5); }

/* ------------------------------------------------------------- composer */
.vsj-composer {
	position: relative;
	border: 1px solid rgba(249, 115, 22, 0.22);
	border-radius: 14px;
	background:
		radial-gradient(120% 160% at 10% -30%, rgba(249, 115, 22, 0.07), transparent 55%),
		linear-gradient(180deg, #0d0c11, #0a0a0e);
	padding: clamp(1.2rem, 3vw, 1.75rem);
	margin-bottom: 2.5rem;
	backdrop-filter: blur(8px);
}

.vsj-composer-head {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	font-size: 0.7rem;
	letter-spacing: 0.2em;
	color: var(--vsj-orange);
	margin-bottom: 1.1rem;
	text-transform: uppercase;
}

.vsj-composer-form { display: flex; flex-direction: column; gap: 0.8rem; }

.vsj-input {
	font-family: var(--vsj-sans);
	font-size: 0.95rem;
	color: var(--vsj-ink);
	background: rgba(255, 255, 255, 0.025);
	border: 1px solid var(--vsj-rule);
	border-radius: 10px;
	padding: 0.75em 1em;
	outline: none;
	width: 100%;
	transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.vsj-input::placeholder { color: rgba(143, 139, 163, 0.55); }
.vsj-input:focus {
	border-color: rgba(139, 92, 246, 0.45);
	box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
	background: rgba(139, 92, 246, 0.03);
}
.vsj-input-title { font-weight: 600; }
.vsj-input-body { resize: vertical; min-height: 140px; line-height: 1.8; }
.vsj-input-select {
	font-family: var(--vsj-mono);
	font-size: 0.78rem;
	letter-spacing: 0.06em;
	cursor: pointer;
	appearance: auto;
	background-color: #0d0c11;
}
.vsj-input-select option { background: #0d0c11; color: var(--vsj-ink); }

.vsj-composer-row {
	display: flex;
	gap: 0.8rem;
	align-items: center;
	flex-wrap: wrap;
}
.vsj-composer-row .vsj-input { flex: 1 1 200px; width: auto; }

.vsj-visibility { display: flex; align-items: center; gap: 0.7rem; flex: 1 1 260px; }
.vsj-visibility-label { font-size: 0.68rem; color: var(--vsj-ink-dim); flex: none; }

.vsj-filelabel { display: inline-flex; align-items: center; gap: 0.7rem; cursor: pointer; }
.vsj-filecount { font-size: 0.68rem; color: var(--vsj-orange); }

.vsj-btn {
	display: inline-block;
	font-family: var(--vsj-mono);
	font-size: 0.72rem;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--vsj-ink);
	background: rgba(139, 92, 246, 0.1);
	border: 1px solid rgba(139, 92, 246, 0.35);
	border-radius: 10px;
	padding: 0.85em 1.6em;
	cursor: pointer;
	transition: all 0.25s ease;
	user-select: none;
}
.vsj-btn:hover {
	background: rgba(139, 92, 246, 0.2);
	border-color: var(--vsj-purple);
	box-shadow: 0 0 20px rgba(139, 92, 246, 0.35);
	color: #fff;
}
.vsj-btn--primary {
	background: linear-gradient(120deg, rgba(139, 92, 246, 0.28), rgba(249, 115, 22, 0.22));
	border-color: rgba(139, 92, 246, 0.5);
	margin-left: auto;
}
.vsj-btn--ghost {
	background: transparent;
	border-color: var(--vsj-rule);
	color: var(--vsj-ink-dim);
}
.vsj-btn--ghost:hover { border-color: rgba(249, 115, 22, 0.5); color: var(--vsj-orange); box-shadow: 0 0 16px rgba(249, 115, 22, 0.2); }
.vsj-btn[disabled] { opacity: 0.45; pointer-events: none; }

.vsj-composer-status {
	font-size: 0.72rem;
	min-height: 1.2em;
	color: var(--vsj-ink-dim);
}
.vsj-composer-status.vsj-ok { color: #4ade80; }
.vsj-composer-status.vsj-err { color: #f87171; }

/* --------------------------------------------------------------- locked */
.vsj-locked {
	text-align: center;
	border: 1px solid var(--vsj-line);
	border-radius: 16px;
	padding: clamp(3rem, 8vw, 5rem) 1.5rem;
	background:
		radial-gradient(80% 100% at 50% 0%, rgba(139, 92, 246, 0.08), transparent 60%),
		linear-gradient(180deg, #0c0c12, #08080c);
	position: relative;
	overflow: hidden;
}
.vsj-locked::after {
	/* faint scanlines */
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: repeating-linear-gradient(
		180deg,
		transparent 0 2px,
		rgba(255, 255, 255, 0.012) 2px 4px
	);
}
.vsj-locked-glyph {
	font-size: 2.6rem;
	color: var(--vsj-orange);
	text-shadow: 0 0 30px rgba(249, 115, 22, 0.5);
	margin-bottom: 1rem;
}
.vsj-locked-code {
	font-family: var(--vsj-mono);
	font-size: 0.7rem;
	letter-spacing: 0.26em;
	color: var(--vsj-orange);
	margin-bottom: 1rem;
}
.vsj-locked-title {
	font-family: var(--vsj-sans);
	font-size: clamp(1.5rem, 4vw, 2.1rem);
	font-weight: 700;
	margin: 0 0 0.75rem;
	color: var(--vsj-ink);
}
.vsj-locked-text {
	color: var(--vsj-ink-dim);
	max-width: 46ch;
	margin: 0 auto 1.75rem;
	line-height: 1.7;
}

/* ------------------------------------------------------------ pagination */
.vsj-pagination {
	display: flex;
	justify-content: center;
	gap: 0.5rem;
	margin-top: 2.5rem;
	flex-wrap: wrap;
}
.vsj-pagination .page-numbers {
	font-family: var(--vsj-mono);
	font-size: 0.75rem;
	letter-spacing: 0.1em;
	color: var(--vsj-ink-dim);
	border: 1px solid var(--vsj-rule);
	border-radius: 8px;
	padding: 0.55em 0.95em;
	text-decoration: none;
	transition: all 0.2s ease;
}
.vsj-pagination .page-numbers:hover {
	color: var(--vsj-ink);
	border-color: rgba(139, 92, 246, 0.4);
}
.vsj-pagination .page-numbers.current {
	color: #c4b5fd;
	border-color: rgba(139, 92, 246, 0.5);
	background: var(--vsj-purple-soft);
}

/* ----------------------------------------------------------------- misc */
.vsj-empty {
	text-align: center;
	padding: 3rem 1rem;
	color: var(--vsj-ink-dim);
	border: 1px dashed var(--vsj-rule);
	border-radius: 14px;
	font-size: 0.78rem;
	letter-spacing: 0.14em;
}

@media (max-width: 560px) {
	.vsj-entry-body { padding: 1.1rem 1.1rem; }
	.vsj-btn--primary { margin-left: 0; width: 100%; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
	.vsj-entry { opacity: 1; transform: none; transition: none; }
	.vsj-kicker-dot { animation: none; }
}

/* =========================================================================
   v2 — THE EXPLORER: code-environment rendering
   journey/ ▸ public/ + private/ folders ▸ YYYY/ ▸ entry files (.md)
   ========================================================================= */

.vsj-ide {
	border: 1px solid var(--vsj-line);
	border-radius: 14px;
	overflow: hidden;
	background: linear-gradient(180deg, #0b0b11, #08080d);
	box-shadow:
		0 1px 0 rgba(255, 255, 255, 0.03) inset,
		0 26px 60px -34px rgba(0, 0, 0, 0.95);
}

/* window chrome */
.vsj-ide-chrome {
	display: flex;
	align-items: center;
	gap: 0.9rem;
	padding: 0.65rem 1rem;
	background: rgba(255, 255, 255, 0.015);
	border-bottom: 1px solid var(--vsj-rule);
}
.vsj-ide-dots { display: inline-flex; gap: 6px; }
.vsj-ide-dots i {
	width: 10px; height: 10px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.12);
}
.vsj-ide-dots i:nth-child(1) { background: rgba(249, 115, 22, 0.55); }
.vsj-ide-dots i:nth-child(2) { background: rgba(139, 92, 246, 0.55); }
.vsj-ide-dots i:nth-child(3) { background: rgba(77, 217, 255, 0.45); }
.vsj-ide-path {
	font-size: 0.68rem;
	color: var(--vsj-ink-dim);
	letter-spacing: 0.08em;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.vsj-ide-mode {
	margin-left: auto;
	font-size: 0.6rem;
	letter-spacing: 0.2em;
	color: var(--vsj-orange);
	border: 1px solid rgba(249, 115, 22, 0.3);
	border-radius: 5px;
	padding: 0.2em 0.6em;
}
[data-vsj-feed="public"] .vsj-ide-mode {
	color: var(--vsj-purple);
	border-color: rgba(139, 92, 246, 0.3);
}

/* layout */
.vsj-ide-body {
	display: grid;
	grid-template-columns: 264px minmax(0, 1fr);
	min-height: 420px;
}

/* ------------------------------------------------------------------ tree */
.vsj-tree {
	border-right: 1px solid var(--vsj-rule);
	background: rgba(255, 255, 255, 0.008);
	padding: 0.75rem 0.6rem 1rem;
	overflow-y: auto;
	max-height: 72vh;
	scrollbar-width: thin;
	scrollbar-color: rgba(139, 92, 246, 0.35) transparent;
}
.vsj-tree-head {
	font-size: 0.58rem;
	letter-spacing: 0.26em;
	color: var(--vsj-ink-dim);
	padding: 0 0.4rem 0.6rem;
}

.vsj-dir { margin: 0; }
.vsj-dir-name {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	font-family: var(--vsj-mono);
	font-size: 0.74rem;
	letter-spacing: 0.04em;
	color: var(--vsj-ink);
	padding: 0.32rem 0.4rem;
	border-radius: 7px;
	cursor: pointer;
	user-select: none;
	list-style: none;
	transition: background 0.2s ease, color 0.2s ease;
}
.vsj-dir-name::-webkit-details-marker { display: none; }
.vsj-dir-name:hover { background: rgba(139, 92, 246, 0.08); }
.vsj-dir-caret {
	width: 0; height: 0;
	border-left: 5px solid var(--vsj-ink-dim);
	border-top: 4px solid transparent;
	border-bottom: 4px solid transparent;
	transition: transform 0.25s ease;
	flex: none;
}
.vsj-dir[open] > .vsj-dir-name > .vsj-dir-caret { transform: rotate(90deg); }
.vsj-dir--private > .vsj-dir-name { color: #fdba74; }
.vsj-dir--public > .vsj-dir-name { color: #c4b5fd; }
.vsj-dir-count {
	margin-left: auto;
	font-size: 0.58rem;
	color: var(--vsj-ink-dim);
	border: 1px solid var(--vsj-rule);
	border-radius: 999px;
	padding: 0.05em 0.55em;
}
.vsj-dir-children {
	margin-left: 0.55rem;
	padding-left: 0.55rem;
	border-left: 1px solid var(--vsj-rule);
}
.vsj-tree-empty {
	display: block;
	font-family: var(--vsj-mono);
	font-size: 0.62rem;
	color: var(--vsj-ink-dim);
	padding: 0.3rem 0.4rem;
}

/* files */
.vsj-file {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	width: 100%;
	text-align: left;
	font-family: var(--vsj-mono);
	font-size: 0.68rem;
	letter-spacing: 0.02em;
	color: var(--vsj-ink-dim);
	background: transparent;
	border: 0;
	border-radius: 7px;
	padding: 0.32rem 0.45rem;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
	overflow: hidden;
}
.vsj-file:hover { background: rgba(139, 92, 246, 0.1); color: var(--vsj-ink); }
.vsj-file:focus-visible { outline: 2px solid var(--vsj-purple); outline-offset: -2px; }
.vsj-file.vsj-file-active {
	background: rgba(139, 92, 246, 0.16);
	color: #ffffff;
	box-shadow: inset 2px 0 0 var(--vsj-purple);
}
.vsj-file--private.vsj-file-active { box-shadow: inset 2px 0 0 var(--vsj-orange); }
.vsj-file-ico { flex: none; font-size: 0.7rem; opacity: 0.7; }
.vsj-file--private .vsj-file-ico { color: var(--vsj-orange); }
.vsj-file-name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	min-width: 0;
}

/* ---------------------------------------------------------------- editor */
.vsj-editor {
	display: flex;
	flex-direction: column;
	min-width: 0;
}
.vsj-tabbar {
	display: flex;
	border-bottom: 1px solid var(--vsj-rule);
	background: rgba(255, 255, 255, 0.008);
}
.vsj-tab {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	padding: 0.55rem 1.1rem;
	border-right: 1px solid var(--vsj-rule);
	background: rgba(139, 92, 246, 0.05);
	box-shadow: inset 0 -2px 0 var(--vsj-purple);
	max-width: 100%;
}
.vsj-tab-dot {
	width: 7px; height: 7px;
	border-radius: 50%;
	background: var(--vsj-purple);
	box-shadow: 0 0 8px rgba(139, 92, 246, 0.6);
	flex: none;
}
.vsj-tab-dot.vsj-tab-dot--private {
	background: var(--vsj-orange);
	box-shadow: 0 0 8px rgba(249, 115, 22, 0.6);
}
.vsj-tab-name {
	font-size: 0.66rem;
	letter-spacing: 0.04em;
	color: var(--vsj-ink);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.vsj-viewer {
	padding: clamp(0.9rem, 2.5vw, 1.6rem);
	overflow-y: auto;
	max-height: 72vh;
	scrollbar-width: thin;
	scrollbar-color: rgba(139, 92, 246, 0.35) transparent;
}
.vsj-viewer.vsj-loading { opacity: 0.45; pointer-events: none; }
.vsj-viewer .vsj-entry--viewer { opacity: 1; transform: none; }
.vsj-viewer .vsj-empty { border: 0; }

/* ------------------------------------------------------------ status bar */
.vsj-statusline {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	padding: 0.45rem 1rem;
	border-top: 1px solid var(--vsj-rule);
	background: rgba(255, 255, 255, 0.012);
	font-size: 0.58rem;
	letter-spacing: 0.16em;
	color: var(--vsj-ink-dim);
}
.vsj-statusline-sep { opacity: 0.4; }
.vsj-statusline-priv { color: #fdba74; }
.vsj-statusline-pub { color: #c4b5fd; }
.vsj-statusline-right { margin-left: auto; }

/* =========================================================================
   v2.1 — WINDOWED EDITOR: tabs, min/max, resize, filter, scratch buffer
   ========================================================================= */

/* variable-driven layout (divider column between tree and editor) */
.vsj-ide-body {
	grid-template-columns: var(--vsj-tree-w, 264px) 6px minmax(0, 1fr);
}
.vsj-tree,
.vsj-viewer { max-height: var(--vsj-ide-h, 72vh); }

/* window action buttons */
.vsj-ide-actions { display: inline-flex; gap: 0.35rem; margin-left: 0.6rem; }
.vsj-ide-mode { margin-left: auto; }
.vsj-winbtn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.3rem;
	min-width: 28px;
	height: 26px;
	padding: 0 0.45rem;
	color: var(--vsj-ink-dim);
	background: rgba(255, 255, 255, 0.02);
	border: 1px solid var(--vsj-rule);
	border-radius: 7px;
	cursor: pointer;
	transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.vsj-winbtn svg { width: 13px; height: 13px; }
.vsj-winbtn .vsj-mono { font-size: 0.56rem; letter-spacing: 0.14em; }
.vsj-winbtn:hover {
	color: #ffffff;
	border-color: rgba(139, 92, 246, 0.45);
	background: rgba(139, 92, 246, 0.12);
	box-shadow: 0 0 12px rgba(139, 92, 246, 0.25);
}
.vsj-winbtn:focus-visible { outline: 2px solid var(--vsj-purple); outline-offset: 2px; }

/* divider (sidebar resize) */
.vsj-divider {
	cursor: col-resize;
	background: transparent;
	position: relative;
	touch-action: none;
}
.vsj-divider::after {
	content: "";
	position: absolute;
	top: 0; bottom: 0;
	left: 2px;
	width: 2px;
	background: var(--vsj-rule);
	transition: background 0.2s ease, box-shadow 0.2s ease;
}
.vsj-divider:hover::after {
	background: var(--vsj-purple);
	box-shadow: 0 0 8px rgba(139, 92, 246, 0.5);
}

/* bottom resize grip */
.vsj-resize {
	height: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: ns-resize;
	background: rgba(255, 255, 255, 0.008);
	border-top: 1px solid var(--vsj-rule);
	touch-action: none;
}
.vsj-resize span {
	width: 44px;
	height: 3px;
	border-radius: 2px;
	background: var(--vsj-rule);
	transition: background 0.2s ease, box-shadow 0.2s ease;
}
.vsj-resize:hover span {
	background: var(--vsj-purple);
	box-shadow: 0 0 8px rgba(139, 92, 246, 0.5);
}

/* minimized: just the chrome bar */
.vsj-ide--min .vsj-ide-body,
.vsj-ide--min .vsj-statusline,
.vsj-ide--min .vsj-resize { display: none; }

/* maximized: fullscreen takeover */
.vsj-ide--max {
	position: fixed !important;
	inset: 10px !important;
	z-index: 99990;
	max-height: none;
	display: flex;
	flex-direction: column;
	box-shadow: 0 40px 120px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(139, 92, 246, 0.2);
}
.vsj-ide--max .vsj-ide-body { flex: 1; min-height: 0; }
.vsj-ide--max .vsj-tree,
.vsj-ide--max .vsj-viewer { max-height: none; height: 100%; }
.vsj-ide--max .vsj-resize { display: none; }

/* tabs (multi) */
.vsj-tabbar {
	overflow-x: auto;
	scrollbar-width: thin;
	scrollbar-color: rgba(139, 92, 246, 0.35) transparent;
	white-space: nowrap;
}
.vsj-tab {
	background: transparent;
	border: 0;
	border-right: 1px solid var(--vsj-rule);
	box-shadow: none;
	color: var(--vsj-ink-dim);
	cursor: pointer;
	flex: none;
	transition: background 0.2s ease, color 0.2s ease;
}
.vsj-tab:hover { background: rgba(139, 92, 246, 0.06); }
.vsj-tab.vsj-tab-active {
	background: rgba(139, 92, 246, 0.08);
	box-shadow: inset 0 -2px 0 var(--vsj-purple);
	color: var(--vsj-ink);
}
.vsj-tab--scratch.vsj-tab-active { box-shadow: inset 0 -2px 0 var(--vsj-orange); }
.vsj-tab-dot--scratch {
	background: var(--vsj-orange);
	box-shadow: 0 0 8px rgba(249, 115, 22, 0.6);
}
.vsj-tab-x {
	font-family: var(--vsj-sans);
	font-size: 0.9rem;
	line-height: 1;
	color: var(--vsj-ink-dim);
	border-radius: 4px;
	padding: 0 0.2rem;
	transition: color 0.2s ease, background 0.2s ease;
}
.vsj-tab-x:hover { color: #ffffff; background: rgba(249, 115, 22, 0.3); }

/* tree filter */
.vsj-tree-filter {
	display: block;
	width: calc(100% - 0.4rem);
	margin: 0 0.2rem 0.6rem;
	font-size: 0.64rem;
	letter-spacing: 0.06em;
	color: var(--vsj-ink);
	background: rgba(255, 255, 255, 0.025);
	border: 1px solid var(--vsj-rule);
	border-radius: 7px;
	padding: 0.45em 0.7em;
	outline: none;
	transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.vsj-tree-filter::placeholder { color: rgba(143, 139, 163, 0.5); }
.vsj-tree-filter:focus {
	border-color: rgba(139, 92, 246, 0.45);
	box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
}
.vsj-tree-nomatch {
	font-size: 0.62rem;
	color: var(--vsj-ink-dim);
	padding: 0.4rem;
}

/* scratch buffer */
.vsj-scratch { display: flex; flex-direction: column; gap: 0.8rem; height: 100%; }
.vsj-scratch-banner {
	font-size: 0.62rem;
	letter-spacing: 0.1em;
	line-height: 1.6;
	color: #fdba74;
	background: rgba(249, 115, 22, 0.07);
	border: 1px dashed rgba(249, 115, 22, 0.35);
	border-radius: 9px;
	padding: 0.6rem 0.85rem;
}
.vsj-scratch-banner--err {
	color: #f87171;
	border-color: rgba(248, 113, 113, 0.4);
	background: rgba(248, 113, 113, 0.07);
}
.vsj-scratch-input {
	flex: 1;
	min-height: 260px;
	width: 100%;
	resize: vertical;
	font-family: var(--vsj-mono);
	font-size: 0.86rem;
	line-height: 1.9;
	color: var(--vsj-ink);
	background:
		repeating-linear-gradient(
			180deg,
			transparent 0px,
			transparent 31px,
			var(--vsj-rule) 31px,
			var(--vsj-rule) 32px
		),
		rgba(255, 255, 255, 0.012);
	border: 1px solid var(--vsj-rule);
	border-radius: 10px;
	padding: 0.9rem 1.1rem;
	outline: none;
	tab-size: 4;
	transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.vsj-scratch-input:focus {
	border-color: rgba(249, 115, 22, 0.4);
	box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}
.vsj-scratch-row {
	display: flex;
	gap: 0.8rem;
	align-items: center;
	flex-wrap: wrap;
}
.vsj-scratch-row .vsj-btn--primary { margin-left: auto; }

/* status line scratch info */
.vsj-statusline-scratch { color: var(--vsj-orange); }

/* ------------------------------------------------------------- responsive */
@media (max-width: 760px) {
	.vsj-ide-body { grid-template-columns: 1fr; }
	.vsj-divider { display: none; }
	.vsj-tree {
		border-right: 0;
		border-bottom: 1px solid var(--vsj-rule);
		max-height: 260px;
	}
	.vsj-viewer { max-height: none; }
	.vsj-ide--max { inset: 0 !important; border-radius: 0; }
	.vsj-ide--max .vsj-tree { max-height: 220px; height: auto; }
	.vsj-winbtn .vsj-mono { display: none; }
	.vsj-winbtn[data-vsj-act="new"]::after { content: "+"; font-size: 0.9rem; }
}
