/*
 * The Journal — the Constellation Map and the forms view (desktop, tablet and phone).
 * One set of markup; the layout adapts with container queries on the
 * plugin's wrapper (phone ≤ 767px, tablet ≤ 979px), never Divi visibility.
 */

.te-journal {
	container: te-journal / inline-size;
	display: flex;
	flex-direction: column;
	gap: 18px;
}
.te-journal [hidden] {
	display: none !important;
}
.te-journal .te-journal-loading,
.te-journal .te-journal-empty {
	background: var(--te-paper);
	border: 1px dashed #C9BCA5;
	border-radius: 16px;
	padding: 24px;
	font-size: 15px;
	color: var(--te-muted-2);
}

/* ---------- Header ---------- */
.te-journal .te-journal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	flex-wrap: wrap;
}
.te-journal .te-journal-brand-name {
	font-size: 36px;
	line-height: 1.1;
}
.te-journal .te-journal-header-actions {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

/* ---------- Tabs ---------- */
.te-journal .te-journal-tabs {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}
.te-journal .te-journal-tabs:empty {
	display: none;
}
.te-journal .te-tab,
.te-journal .te-tab:hover {
	min-height: 42px;
	padding: 0 18px;
	margin: 0;
	border: 1.5px solid var(--te-border);
	border-radius: 999px;
	background: var(--te-card);
	color: var(--te-ink);
	font-family: var(--te-sans);
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	white-space: nowrap;
}
.te-journal .te-tab:hover {
	border-color: var(--te-indigo);
}
.te-journal .te-tab.is-selected {
	background: var(--te-indigo);
	border-color: var(--te-indigo);
	color: var(--te-cream);
}
.te-journal .te-tab:focus-visible {
	outline: 3px solid var(--te-tint);
	outline-offset: 2px;
}

.te-journal .te-journal-main {
	display: flex;
	flex-direction: column;
	gap: 18px;
}
.te-journal .te-journal-main > div:empty {
	display: none;
}

/* ---------- Map panel ---------- */
.te-journal .te-journal-panel {
	display: flex;
	flex-direction: column; /* the name line gets the whole width */
	gap: 14px;
	background: var(--te-paper);
	border: 1px solid var(--te-border-soft);
	border-radius: 20px;
	padding: 24px 28px;
}
/* Below the name line: status and trash link at the left, the buttons at the right. */
.te-journal .te-journal-panel-row {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 14px 24px;
}
.te-journal .te-journal-panel-main {
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex-grow: 1;
	min-width: 0;
}
.te-journal #te-journal-title {
	min-height: 48px;
	max-width: 560px;
	padding: 0 14px;
	background: var(--te-card);
	font-size: 24px;
}
.te-journal .te-journal-meta {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}
.te-journal .te-journal-status {
	font-size: 14px;
	color: var(--te-muted-2);
}
.te-journal .te-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: var(--te-chip);
	border-radius: 999px;
	padding: 4px 12px;
	color: var(--te-indigo);
}
.te-journal .te-chip-label {
	font-family: var(--te-serif);
	font-size: 15px;
}
.te-journal .te-chip-value {
	font-size: 14px;
	font-weight: 700;
}
.te-journal .te-journal-panel-actions {
	display: flex;
	gap: 10px;
	flex-shrink: 0;
	flex-wrap: wrap;
	justify-content: flex-end;
}
.te-journal .te-btn.is-on {
	background: var(--te-tint);
}

/* Pin */
.te-journal .te-pin,
.te-journal .te-pin:hover {
	flex-shrink: 0;
	width: 46px;
	height: 46px;
	padding: 0;
	margin: 0;
	border: 1.5px solid var(--te-indigo);
	border-radius: 50%;
	background: transparent;
	color: var(--te-indigo);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.te-journal .te-pin.is-pinned {
	background: var(--te-indigo);
	color: var(--te-white);
}
.te-journal .te-pin:focus-visible {
	outline: 3px solid var(--te-tint);
	outline-offset: 2px;
}

/* ---------- Map settings ---------- */
.te-journal .te-journal-settings {
	display: flex;
	flex-direction: column;
	gap: 12px;
	border-color: #B9B0D6;
	border-radius: 16px;
	padding: 18px 22px;
}
.te-journal .te-settings-title {
	font-size: 22px;
}
.te-journal .te-field-row {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}
.te-journal .te-settings-msg:empty {
	display: none;
}

/* ---------- New Journal ---------- */
.te-journal .te-card-strong {
	border: 2px solid var(--te-indigo);
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.te-journal .te-form-title {
	font-size: 26px;
}
.te-journal .te-new-map-fields {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
	align-items: flex-end;
}
.te-journal .te-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.te-journal .te-new-map-fields .te-field:first-child {
	width: 360px;
	max-width: 100%;
}
.te-journal .te-button-row {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

/* ---------- Cycle list ---------- */
.te-journal .te-journal-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.te-journal .te-row {
	background: var(--te-paper);
	border: 1px solid var(--te-border-soft);
	border-radius: 16px;
	overflow: hidden;
}
.te-journal .te-row.is-open {
	border-color: #B9B0D6;
}
.te-journal .te-row-draft,
.te-journal .te-row-draft.is-open {
	border: 2px solid var(--te-indigo);
	background: var(--te-card);
}
.te-journal .te-row-draft:focus {
	outline: none;
}
.te-journal .te-row-head,
.te-journal .te-row-head:hover {
	width: 100%;
	min-height: 60px;
	padding: 12px 20px;
	margin: 0;
	border: none;
	border-radius: 0;
	background: transparent;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 14px;
	text-align: left;
	font-family: var(--te-sans);
	color: var(--te-ink);
}
.te-journal .te-row-head-static,
.te-journal .te-row-head-static:hover {
	cursor: default;
}
.te-journal .te-row-head:focus-visible {
	outline: 3px solid var(--te-tint);
	outline-offset: -3px;
}
.te-journal .te-row-star {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--te-white);
	box-shadow: 0 0 0 3px rgba(47, 42, 110, 0.35);
	flex-shrink: 0;
}
.te-journal .te-row-label {
	font-family: var(--te-serif);
	font-size: 16px;
	color: var(--te-indigo);
	width: 132px;
	flex-shrink: 0;
	white-space: nowrap;
}
.te-journal .te-row-draft .te-row-label {
	width: auto;
	font-size: 19px;
}
.te-journal .te-row-when {
	font-size: 13px;
	color: var(--te-muted);
	width: 190px;
	flex-shrink: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.te-journal .te-row-snippet {
	flex-grow: 1;
	min-width: 0;
	font-size: 16px;
	color: #2A2536;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.te-journal .te-row-count {
	font-size: 13px;
	color: var(--te-muted);
	flex-shrink: 0;
}
.te-journal .te-chevron {
	display: inline-flex;
	color: var(--te-muted);
	flex-shrink: 0;
}
.te-journal .te-row.is-open .te-chevron {
	transform: rotate(180deg);
}
.te-journal .te-row-body {
	padding: 4px 20px 22px 46px;
	display: flex;
	flex-direction: column;
	gap: 18px;
}

/* Star tag, label on the left and the box on its right */
.te-journal .te-tag-row {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}
.te-journal .te-tag-label {
	color: #7A6A3A;
	flex-shrink: 0;
}
.te-journal .te-tag-row input[type="text"] {
	width: 300px;
	max-width: 100%;
	min-height: 40px;
	font-size: 15px;
}
.te-journal .te-optional {
	font-weight: 400;
}

/* One Expression Level: name, finger, the Ask, the loop, the answer */
.te-journal .te-level {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding-top: 16px;
	border-top: 1px solid var(--te-border-soft);
}
.te-journal .te-field-top {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
}
.te-journal .te-root h3.te-level-name,
.te-journal h3.te-level-name {
	margin: 0;
	padding: 0;
	font-family: var(--te-serif);
	font-weight: 400;
	font-size: 20px;
	line-height: 1.25;
}
.te-journal .te-level-soul .te-level-name {
	color: var(--te-soul);
}
.te-journal .te-level-mind .te-level-name {
	color: var(--te-mind);
}
.te-journal .te-level-brain .te-level-name {
	color: var(--te-brain);
}
.te-journal .te-ask {
	display: block;
	font-family: var(--te-serif);
	font-size: 17px;
	line-height: 1.4;
	color: var(--te-ask);
	max-width: 60ch;
}
.te-journal .te-row-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.te-journal .te-field-bottom {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding-left: 4px;
	min-height: 18px;
}
.te-journal .te-stamp {
	font-size: 12px;
	color: var(--te-muted);
}
.te-journal .te-row-tools {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}
.te-journal .te-row-foot {
	display: flex;
	gap: 10px;
	align-items: center;
	flex-wrap: wrap;
	padding-top: 14px;
	border-top: 1px solid var(--te-border-soft);
}

/* ---------- Tablet ---------- */
@container te-journal (max-width: 979px) {
	.te-journal .te-journal-panel-row {
		flex-direction: column;
		align-items: stretch;
	}
	.te-journal .te-journal-panel-actions {
		justify-content: flex-start;
	}
	.te-journal .te-row-when {
		width: auto;
	}
}

/* ---------- Phone ---------- */
@container te-journal (max-width: 767px) {
	.te-journal .te-journal-brand-name {
		font-size: 26px;
	}
	.te-journal .te-journal-header-actions {
		width: 100%;
	}
	.te-journal .te-journal-tabs {
		flex-wrap: nowrap;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		padding-bottom: 4px;
	}
	.te-journal .te-journal-panel,
	.te-journal .te-card {
		padding: 18px;
	}
	.te-journal #te-journal-title {
		font-size: 20px;
	}
	.te-journal .te-journal-panel-actions .te-btn-primary {
		order: -1;
		width: 100%;
	}
	.te-journal .te-row-head {
		flex-wrap: wrap;
		gap: 4px 10px;
		padding: 12px 16px;
	}
	.te-journal .te-row-label,
	.te-journal .te-row-when {
		width: auto;
	}
	.te-journal .te-row-snippet {
		order: 5;
		flex-basis: 100%;
	}
	.te-journal .te-row-body {
		padding: 4px 16px 18px;
	}
	.te-journal .te-tag-row input[type="text"] {
		width: 100%;
	}
}

/* =====================================================================
 * The sky
 * ================================================================== */

.te-journal .te-journal-forms {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

/* Header buttons */
.te-journal .te-btn-sky-toggle[aria-pressed="false"] {
	border-style: dashed;
}

/* ---------- The sky frame (all views) ---------- */
.te-journal .te-sky {
	position: relative;
	overflow: hidden;
	border-radius: 20px;
	background: #0E0D22;
}
.te-journal .te-sky-sizer {
	position: relative;
	overflow: hidden;
}
.te-journal .te-sky-stage,
.te-journal .te-sky-bg {
	position: absolute;
	left: 0;
	top: 0;
	width: 1440px;
	height: 900px;
}
.te-journal .te-sky-stage {
	transform-origin: 0 0;
}
.te-journal .te-sky-svg {
	position: absolute;
	left: 0;
	top: 0;
	display: block;
	overflow: visible;
	user-select: none;
	-webkit-user-select: none;
}
.te-journal .te-sky-star {
	cursor: pointer;
	outline: none;
}
.te-journal .te-sky-star:focus-visible .te-sky-hit {
	stroke: #E9E6FF;
	stroke-width: 2;
}
.te-journal .te-sky-full .te-sky-star,
.te-journal .te-sky-full .te-sky-grab,
.te-journal .te-sky-full .te-sky-name {
	touch-action: none;
}
.te-journal .te-sky-grab,
.te-journal .te-sky-name {
	cursor: grab;
}
.te-journal .te-sky-tag {
	pointer-events: none; /* A star's own tag never gets in the way of clicking the star. */
}
.te-journal .te-sky.is-dragging,
.te-journal .te-sky.is-dragging * {
	cursor: grabbing;
}
.te-is-phone .te-sky-grab,
.te-is-phone .te-sky-name {
	cursor: pointer;
}

/* ---------- The sky at the top of the page ---------- */
.te-journal .te-skyview {
	position: relative;
	border-radius: 20px;
	overflow: hidden;
	background: #0E0D22;
	color: #E9E6FF;
}
.te-journal .te-skyview .te-sky {
	border-radius: 0;
}
.te-journal .te-skyview-over {
	position: absolute;
	inset: 0;
	pointer-events: none;
}
.te-journal .te-skyview-over > * {
	pointer-events: auto;
}

/* Buttons on the sky */
.te-journal .te-skyview .te-sv-btn,
.te-journal .te-skyview .te-sv-btn:hover {
	border: 1px solid #6B66B8;
	background: rgba(14, 13, 34, 0.78);
	color: #E9E6FF;
	padding: 0 16px;
}
.te-journal .te-skyview .te-sv-btn:hover {
	background: var(--te-indigo);
	border-color: #C9C4FF;
}
.te-journal .te-skyview .te-sv-btn-warm,
.te-journal .te-skyview .te-sv-btn-warm:hover {
	align-self: flex-start;
	border: none;
	background: #F2C27A;
	color: #0E0D22;
	padding: 0 16px;
}

.te-journal .te-sv-bottom {
	position: absolute;
	left: 18px;
	bottom: 18px;
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}
.te-journal .te-sv-toast {
	position: fixed;
	left: 50%;
	bottom: 24px;
	transform: translateX(-50%);
	display: flex;
	align-items: center;
	gap: 12px;
	max-width: calc(100vw - 32px);
	padding: 8px 10px 8px 18px;
	border-radius: 999px;
	background: var(--te-indigo);
	color: #FFFFFF;
	font-size: 14px;
	font-weight: 700;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
	z-index: 9999;
}
.te-journal .te-sv-toast-btn,
.te-journal .te-sv-toast-btn:hover {
	min-height: 32px;
	padding: 0 14px;
	margin: 0;
	border: 1px solid #C9C4FF;
	border-radius: 999px;
	background: transparent;
	color: #FFFFFF;
	font-family: var(--te-sans);
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
}

/* The star card and the instructions box (same spot, lower right) */
.te-journal .te-sv-panel {
	position: absolute;
	right: 18px;
	bottom: 18px;
	width: 350px;
	max-height: calc(100% - 36px);
	display: flex;
	flex-direction: column;
	border: 1px solid #3A3670;
	border-radius: 16px;
	background: rgba(20, 18, 46, 0.96);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
	z-index: 3;
}
.te-journal .te-sv-grip {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 4px 6px 0 12px;
}
.te-journal .te-sv-grip-bar {
	flex-grow: 1;
	min-height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: grab;
	touch-action: none;
}
.te-journal .te-sv-grip-bar span {
	width: 40px;
	height: 4px;
	border-radius: 2px;
	background: #6B66B8;
}
.te-journal .te-sv-close,
.te-journal .te-sv-close:hover {
	width: 36px;
	height: 36px;
	padding: 0;
	margin: 0;
	border: none;
	border-radius: 50%;
	background: transparent;
	color: #C9C4FF;
	font-size: 16px;
	cursor: pointer;
}
.te-journal .te-sv-close:hover {
	background: rgba(201, 196, 255, 0.15);
}
.te-journal .te-sv-panel-body {
	overflow-y: auto;
	padding: 4px 18px 18px;
}
.te-journal .te-sv-card,
.te-journal .te-sv-instructions {
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.te-journal .te-sv-card-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
	flex-wrap: wrap;
}
.te-journal .te-skyview h2.te-sv-card-title {
	margin: 0;
	padding: 0;
	font-size: 22px;
	color: #FFFFFF;
}
.te-journal .te-sv-chip {
	padding: 2px 10px;
	border-radius: 999px;
	background: rgba(201, 196, 255, 0.16);
	color: #E9E6FF;
	font-size: 12px;
	font-weight: 700;
}
.te-journal .te-sv-kind {
	margin-top: -6px;
	font-size: 13px;
	color: #A9A5D6;
}
.te-journal .te-sv-level {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding-top: 10px;
	border-top: 1px solid #2E2B63;
}
.te-journal .te-skyview h3.te-level-name {
	font-size: 17px;
}
.te-journal .te-skyview .te-level-soul .te-level-name {
	color: #C9C4FF;
}
.te-journal .te-skyview .te-level-mind .te-level-name {
	color: #E7A9C6;
}
.te-journal .te-skyview .te-level-brain .te-level-name {
	color: #F2C27A;
}
.te-journal .te-skyview .te-stamp,
.te-journal .te-skyview .te-status {
	color: #A9A5D6;
}
.te-journal .te-skyview .te-status.te-error {
	color: #FFB4A6; /* error text, lightened to read on the dark sky */
}
.te-journal .te-skyview .te-member-text {
	white-space: pre-wrap;
	overflow-wrap: anywhere;
	color: #F4F2FF;
	font-size: 15px;
}
.te-journal .te-sv-quote {
	font-family: var(--te-serif);
	font-size: 16px;
}
.te-journal .te-sv-empty {
	font-size: 14px;
	color: #A9A5D6;
}
.te-journal .te-sv-link,
.te-journal .te-sv-link:hover {
	align-self: flex-start;
	padding: 4px 0;
	margin: 0;
	border: none;
	background: transparent;
	color: #C9C4FF;
	font-family: var(--te-sans);
	font-size: 13px;
	font-weight: 700;
	text-decoration: underline;
	cursor: pointer;
}
.te-journal .te-skyview textarea,
.te-journal .te-skyview input[type="text"] {
	border-color: #3A3670;
	background: #1B1840;
	color: #FFFFFF;
}
.te-journal .te-skyview input[readonly] {
	background: transparent;
}
.te-journal .te-sv-tag {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding-top: 10px;
	border-top: 1px solid #2E2B63;
}
.te-journal .te-skyview .te-tag-label {
	color: #F4E3B8;
}

/* Instructions accordion */
.te-journal .te-sv-acc {
	border-top: 1px solid #2E2B63;
	padding: 8px 0;
}
.te-journal .te-sv-acc summary {
	cursor: pointer;
	font-size: 15px;
	font-weight: 700;
	color: #FFFFFF;
	min-height: 32px;
	display: flex;
	align-items: center;
}
.te-journal .te-sv-acc p {
	padding: 4px 0 2px;
	font-size: 14px;
	line-height: 1.5;
	color: #E9E6FF;
}

/* ---------- The sky on phones ---------- */
.te-journal .te-skyview.is-phone {
	border-radius: 16px;
}
.te-journal .te-sky-phone {
	height: 62vh;
	height: 62svh;
	min-height: 380px;
	max-height: 600px;
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
}
.te-journal .te-sv-menu-btn {
	position: absolute;
	top: 10px;
	right: 10px;
}
.te-journal .te-sv-hint {
	position: absolute;
	top: 60px;
	left: 12px;
	right: 12px;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border-radius: 14px;
	background: rgba(20, 18, 46, 0.94);
	font-size: 14px;
}
.te-journal .te-sv-sheet {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	max-height: 75%;
	display: flex;
	flex-direction: column;
	border-top: 1px solid #3A3670;
	border-radius: 16px 16px 0 0;
	background: rgba(20, 18, 46, 0.98);
	box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.35);
	z-index: 3;
}
.te-journal .te-sv-sheet-top {
	display: flex;
	justify-content: flex-end;
	padding: 6px 8px 0;
}
.te-journal .te-sv-menu {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.te-journal .te-sv-menu .te-sv-btn {
	width: 100%;
	min-height: 46px;
}

/* Tablet: a narrower card */
@container te-journal (max-width: 979px) {
	.te-journal .te-sv-panel {
		width: 320px;
	}
}

/* =====================================================================
 * The Trash Bin
 * ================================================================== */

/* In the forms */
.te-journal .te-row-tools-right {
	display: flex;
	gap: 8px;
	margin-left: auto;
}
.te-journal .te-settings-trash,
.te-journal .te-sv-map-trash {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	padding-top: 12px;
	border-top: 1px solid var(--te-border-soft);
}
.te-journal .te-sv-map-trash {
	border-top-color: #2E2B63;
}

/* The list */
.te-journal .te-sv-trash {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.te-journal .te-sv-bundles {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
}
.te-journal .te-sv-bundle {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 12px 0;
	border-top: 1px solid #2E2B63;
}
.te-journal .te-sv-bundle.is-nested {
	margin-left: 18px;
	padding-left: 12px;
	border-left: 2px solid #3A3670;
}
.te-journal .te-sv-bundle-kind {
	font-size: 12px;
	font-weight: 700;
	color: #A9A5D6;
}
.te-journal .te-sv-bundle-label {
	font-size: 15px;
}
.te-journal .te-sv-confirm {
	font-size: 14px;
	color: #F4F2FF;
}
.te-journal .te-sv-empty-row {
	padding-top: 12px;
	border-top: 1px solid #2E2B63;
}

/* Below the header, while the sky is hidden */
.te-journal .te-trash-card {
	position: relative;
	padding: 4px 4px 8px;
}
.te-journal .te-trash-card .te-sv-panel-body {
	max-height: 70vh;
}

/* Phones: the compact Trash Bin button with its cargo light */
.te-journal .te-sv-trash-btn {
	position: absolute;
	top: 10px;
	left: 10px;
	gap: 8px;
}
.te-journal .te-sv-light {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #3A3670;
}
.te-journal .te-sv-trash-btn.has-trash .te-sv-light {
	background: #F2C27A;
	box-shadow: 0 0 8px 2px rgba(242, 194, 122, 0.8);
}

/* The wormhole and the ship */
.te-journal .te-sky-worm {
	opacity: 0.55;
	transform-box: fill-box;
	transform-origin: center;
	transition: opacity 0.2s ease, transform 0.2s ease;
	pointer-events: none;
}
.te-journal .te-sky.is-dragging-star .te-sky-worm {
	opacity: 0.85;
}
.te-journal .te-sky.is-over-trash .te-sky-worm {
	opacity: 1;
	transform: scale(1.08);
}
.te-journal .te-sky-ship {
	cursor: pointer;
	outline: none;
}
.te-journal .te-sky-ship:focus-visible {
	outline: 2px solid #E9E6FF;
	outline-offset: 4px;
}
.te-journal .te-sky-cargo-light {
	fill: #3A3670;
}
.te-journal .te-sky-cargo-glow {
	opacity: 0;
	transition: opacity 0.3s ease;
}
.te-journal .te-sky.has-trash .te-sky-cargo-light {
	fill: #F2C27A;
}
.te-journal .te-sky.has-trash .te-sky-cargo-glow {
	opacity: 0.9;
}
.te-journal .te-sky-door {
	fill: #221F45;
	stroke: #8F8AC4;
	transition: fill 0.25s ease;
}
.te-journal .te-sky.is-dragging-star .te-sky-door {
	fill: #F2C27A; /* the cargo door opens, lit from inside */
	stroke: #F4E3B8;
}

@media (prefers-reduced-motion: reduce) {
	.te-journal .te-sky-worm,
	.te-journal .te-sky-door,
	.te-journal .te-sky-cargo-glow {
		transition: none;
	}
}

/* =====================================================================
 * Visitors
 * ================================================================== */

.te-journal .te-visitor-head {
	align-items: flex-end;
}
.te-journal .te-visitor-head h2.te-journal-brand-name {
	margin: 0;
	padding: 0;
	font-weight: 400;
}
.te-journal .te-visitor-intro,
.te-journal .te-journal-intro {
	max-width: 62ch;
	margin-top: 4px;
	font-size: 16px;
}
.te-journal .te-soul-msg {
	margin: 0 0 8px;
	font-size: 15px;
}
.te-journal .te-soul-msg:empty {
	display: none;
}
.te-journal .te-visitor-login {
	font-size: 14px;
	color: var(--te-muted-2);
}
.te-journal .te-visitor-sky-note {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--te-serif);
	font-size: 20px;
	color: #C9C4FF;
	pointer-events: none;
	margin: 0;
	padding: 0 20px;
	text-align: center;
}
.te-journal .te-visitor-main {
	display: flex;
	flex-direction: column;
	gap: 18px;
}
.te-journal .te-visitor-card-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}
.te-journal .te-visitor-title input,
.te-journal .te-visitor-email input {
	max-width: 420px;
}
.te-journal .te-visitor-news label {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 15px;
	cursor: pointer;
}
.te-journal .te-visitor-news input[type="checkbox"] {
	width: 18px;
	height: 18px;
	margin: 3px 0 0;
	flex-shrink: 0;
	accent-color: var(--te-indigo);
}
.te-journal .te-visitor-hp {
	position: absolute;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* The member's confirmation after a waiting star is claimed */
.te-journal .te-claimed {
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.te-journal .te-claimed input {
	max-width: 420px;
}
.te-journal .te-visitor-card {
	display: flex;
	flex-direction: column;
	gap: 14px;
}
.te-journal .te-visitor-card .te-title {
	margin: 0;
}

/* A message about the sky itself appears in the middle of the Constellation Map */
.te-journal .te-sv-toast.is-in-sky {
	position: absolute;
	top: 50%;
	bottom: auto;
	transform: translate(-50%, -50%);
	z-index: 6;
}

/* =====================================================================
 * Map panel: name and Target Practice on one line (0.5.1)
 * ================================================================== */

.te-journal .te-journal-fields {
	display: flex;
	align-items: center;
	gap: 10px 14px;
	flex-wrap: wrap;
}
.te-journal .te-journal-fields .te-label {
	white-space: nowrap;
}
.te-journal .te-journal-fields #te-journal-title {
	flex: 1 1 240px;
	max-width: 420px;
}
.te-journal .te-journal-fields select {
	min-height: 48px;
	background: var(--te-card);
}
/* Save PDF: "PDF This Cycle" at the right of the star tag line; on a
   narrow screen the line wraps and the button sits at the right of its own
   line. ("PDF Entire Map" is one of the map panel's buttons.) */
.te-journal .te-pdf-btn {
	margin-left: auto;
	white-space: nowrap;
}
/* The Target Practice label stays with its dropdown when the name line wraps. */
.te-journal .te-journal-tp-group {
	display: inline-flex;
	align-items: center;
	gap: 10px 14px;
	flex-wrap: wrap;
}
.te-journal .te-journal-trash-line {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}
.te-journal .te-journal-trash-line:empty {
	display: none;
}
.te-journal .te-journal-trash-link,
.te-journal .te-journal-trash-link:hover {
	padding: 0;
	margin: 0;
	border: none;
	background: none;
	color: var(--te-muted-2);
	font-family: var(--te-sans);
	font-size: 14px;
	text-decoration: underline;
	cursor: pointer;
}
.te-journal .te-journal-trash-link:hover {
	color: var(--te-ink);
}
.te-journal .te-journal-meta .te-status:empty {
	display: none;
}

/* =====================================================================
 * Bodhi, the AI coach: a floating window like text messaging
 * ================================================================== */

/* The layer on <body> holding the chat window and the Privacy popup */
.te-journal.te-bodhi-layer {
	container: none;
	display: block;
	padding: 0;
	margin: 0;
	border-radius: 0;
	background: none;
}

/* The chat window and the Privacy popup: shared Bodhi styles in te-core.css (0.8.0). */

/* =====================================================================
 * The Dig on the sky (0.9.0): rose nebulae (#A0527C, Mind's rose; the
 * nebula colors themselves live in te-sky.js's COLORS block)
 * ================================================================== */

.te-journal .te-sky-nebula {
	cursor: grab;
	outline: none;
}
.te-journal .te-sky-full .te-sky-nebula {
	touch-action: none;
}
.te-is-phone .te-sky-nebula {
	cursor: pointer;
}
.te-journal .te-sky-nebula:focus-visible .te-sky-hit {
	stroke: #E8BCD2;
	stroke-width: 2;
}
.te-journal .te-sky-star-nebula {
	pointer-events: none;
}
/* Link to a star: pick the star */
.te-journal .te-sky.is-linking .te-sky-star {
	cursor: crosshair;
}
.te-journal .te-sky.is-linking .te-sky-star .te-sky-hit {
	stroke: rgba(232, 188, 210, 0.55);
	stroke-width: 1.5;
	stroke-dasharray: 3 3;
}

/* The star card's Dig section and the Dig card */
.te-journal .te-skyview .te-sv-digs .te-level-name {
	color: #E8BCD2;
}
.te-journal .te-sv-dig-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.te-journal .te-sv-dig {
	display: flex;
	align-items: flex-start;
	gap: 10px;
}
.te-journal .te-sv-dig-text {
	display: flex;
	flex-direction: column;
	gap: 1px;
	min-width: 0;
}
.te-journal .te-sv-dig-text .te-sv-link {
	padding: 2px 0 0;
}
.te-journal .te-sv-dig-dot {
	flex-shrink: 0;
	display: inline-block;
	width: 10px;
	height: 10px;
	margin-top: 6px;
	border-radius: 50%;
	background: radial-gradient(circle, #FBE3EE 0 25%, #A0527C 60%, rgba(160, 82, 124, 0.2) 100%);
	box-shadow: 0 0 8px rgba(160, 82, 124, 0.9);
}
.te-journal .te-skyview a.te-sv-btn {
	align-self: flex-start;
	text-decoration: none;
}
.te-journal .te-sv-dig-buttons {
	margin-top: 10px;
}
.te-journal .te-sv-dig-buttons a.te-sv-btn {
	align-self: auto;
}
.te-journal .te-skyview .te-sv-btn-dig,
.te-journal .te-skyview .te-sv-btn-dig:hover {
	border-color: #A0527C;
}
.te-journal .te-skyview .te-sv-btn-dig:hover {
	background: #A0527C;
	border-color: #E8BCD2;
}

/* Reset Stars asks which; an entry's Link/Unlink a Dig dropdown */
.te-journal .te-sv-reset {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}
.te-journal .te-sv-reset-label {
	color: #FFFFFF;
	font-size: 14px;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
.te-journal .te-sv-menu .te-sv-reset {
	flex-direction: column;
	align-items: stretch;
}
.te-journal .te-dig-row {
	margin-top: 10px;
}
.te-journal .te-dig-row select {
	width: 300px;
	max-width: 100%;
	min-height: 40px;
	font-size: 15px;
}
@container te-journal (max-width: 767px) {
	.te-journal .te-dig-row select {
		width: 100%;
	}
}

/* A row's Dig, shown in its one-line head */
.te-journal .te-row-dig {
	color: #7E3C60;
	background: #F6E6EE;
	border-radius: 999px;
	padding: 2px 10px;
	font-weight: 700;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 220px;
}

/* The visitor's entry, once saved in the browser */
.te-journal .te-visitor-saved {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 700;
	color: var(--te-indigo);
}
.te-journal .te-visitor-check {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--te-indigo);
	color: var(--te-cream);
	font-size: 13px;
}
.te-journal .te-visitor-keep {
	background: var(--te-chip);
}
