.elw-coming-soon {
	max-width: 720px;
	margin: 60px auto;
	padding: 60px 40px;
	text-align: center;
	background: linear-gradient(180deg, #16131f 0%, #241c33 100%);
	color: #f1ecf9;
	border-radius: 14px;
	font-family: Georgia, 'Times New Roman', serif;
}
.elw-coming-soon .elw-eyebrow {
	letter-spacing: .2em;
	text-transform: uppercase;
	font-size: 12px;
	color: #b79df0;
	margin-bottom: 18px;
	font-family: Arial, sans-serif;
}
.elw-coming-soon h1 {
	font-size: 42px;
	margin: 0 0 18px;
	color: #ffffff;
}
.elw-coming-soon p.tagline {
	font-size: 18px;
	line-height: 1.6;
	color: #d5c9ef;
	margin-bottom: 32px;
}
.elw-coming-soon .elw-progress-wrap {
	max-width: 320px;
	margin: 0 auto 12px;
	background: rgba(255,255,255,0.1);
	border-radius: 20px;
	overflow: hidden;
	height: 10px;
}
.elw-coming-soon .elw-progress-bar {
	height: 100%;
	background: linear-gradient(90deg, #8a5cf6, #d18cf0);
}
.elw-coming-soon .elw-progress-label {
	font-family: Arial, sans-serif;
	font-size: 12px;
	color: #a999cf;
	letter-spacing: .05em;
}
.elw-coming-soon .elw-footer-note {
	margin-top: 36px;
	font-family: Arial, sans-serif;
	font-size: 12px;
	color: #7c6f96;
}

/* Vitality Bridge card */
.elw-vitality-card {
	max-width: 560px;
	margin: 24px auto;
	padding: 28px;
	border-radius: 12px;
	background: #1b1626;
	color: #f1ecf9;
	font-family: Arial, sans-serif;
}
.elw-vitality-notice {
	background: rgba(255,255,255,0.08);
	padding: 10px 14px;
	border-radius: 8px;
	font-size: 13px;
	margin-bottom: 16px;
}
.elw-vitality-wallet {
	display: flex;
	gap: 20px;
	flex-wrap: wrap;
	margin-bottom: 18px;
}
.elw-vitality-stat {
	text-align: center;
}
.elw-vitality-num {
	display: block;
	font-size: 26px;
	font-weight: 700;
	color: #d18cf0;
}
.elw-vitality-label {
	display: block;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: #a999cf;
	margin-top: 2px;
}
.elw-vitality-activity p {
	font-size: 14px;
	margin: 4px 0;
	color: #d5c9ef;
}
.elw-vitality-activity p.description {
	font-size: 12px;
	color: #8a7cae;
}
.elw-vitality-convert-btn {
	margin-top: 14px;
	background: linear-gradient(90deg, #8a5cf6, #d18cf0);
	color: #fff;
	border: none;
	padding: 10px 22px;
	border-radius: 24px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}
.elw-vitality-convert-btn:disabled {
	opacity: .6;
	cursor: default;
}
.elw-vitality-result {
	margin-top: 10px;
	font-size: 13px;
	color: #b79df0;
	min-height: 16px;
}

/* Marketplace / Inventory */
.elw-market {
	max-width: 720px;
	margin: 24px auto;
}
.elw-market-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 16px;
	font-family: Arial, sans-serif;
}
.elw-market-balance {
	font-size: 14px;
	color: #4a3b6b;
}
.elw-market-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 14px;
}
.elw-market-card {
	background: #1b1626;
	color: #f1ecf9;
	border-radius: 10px;
	padding: 14px;
	text-align: center;
	font-family: Arial, sans-serif;
}
.elw-market-card-icon {
	font-size: 32px;
	margin-bottom: 8px;
}
.elw-market-card-icon img {
	max-width: 60px;
	max-height: 60px;
	border-radius: 6px;
}
.elw-market-card-name {
	font-weight: 700;
	font-size: 14px;
	margin-bottom: 4px;
}
.elw-market-card-desc {
	font-size: 11px;
	color: #a999cf;
	margin-bottom: 8px;
}
.elw-market-card-price {
	font-size: 12px;
	color: #d18cf0;
	margin-bottom: 10px;
}
.elw-market-buy-btn {
	background: linear-gradient(90deg, #8a5cf6, #d18cf0);
	color: #fff;
	border: none;
	padding: 6px 16px;
	border-radius: 16px;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
}
.elw-market-buy-btn:disabled {
	opacity: .6;
	cursor: default;
}
.elw-inventory-list h3 {
	font-family: Arial, sans-serif;
}

/* Submit form */
.elw-submit-form {
	max-width: 560px;
	margin: 24px auto;
	padding: 24px;
	border-radius: 12px;
	background: #1b1626;
	color: #f1ecf9;
	font-family: Arial, sans-serif;
}
.elw-submit-form h3 {
	margin-top: 0;
	color: #fff;
}
.elw-submit-form label {
	display: block;
	font-size: 13px;
	color: #a999cf;
	margin: 12px 0 4px;
}
.elw-submit-form select,
.elw-submit-form textarea,
.elw-submit-form input[type="text"] {
	width: 100%;
	padding: 8px 10px;
	border-radius: 6px;
	border: 1px solid rgba(255,255,255,0.2);
	background: rgba(255,255,255,0.05);
	color: #f1ecf9;
	font-family: inherit;
	box-sizing: border-box;
}
/* Guards against theme/global stylesheets that set a white focus background
   on form fields — without this, the textarea can go white-on-white (white
   text on the theme's white focus background) while actively typing. */
.elw-submit-form select:focus,
.elw-submit-form textarea:focus,
.elw-submit-form input[type="text"]:focus {
	background-color: #241c33 !important;
	color: #f1ecf9 !important;
	outline: 2px solid #8a5cf6;
	outline-offset: 1px;
}
.elw-submit-btn {
	margin-top: 14px;
	background: linear-gradient(90deg, #8a5cf6, #d18cf0);
	color: #fff;
	border: none;
	padding: 10px 22px;
	border-radius: 24px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}
.elw-submit-history {
	margin-top: 20px;
}
.elw-submit-history-row {
	padding: 8px 0;
	border-top: 1px solid rgba(255,255,255,0.1);
}
.elw-submit-history-main {
	display: flex;
	justify-content: space-between;
	font-size: 13px;
}
.elw-submit-history-text {
	font-size: 12px;
	color: #a999cf;
	margin-top: 2px;
}
.elw-submit-status {
	font-size: 11px;
	padding: 2px 8px;
	border-radius: 10px;
}
.elw-submit-status-approved { background: #1f4d2e; color: #8ee6a8; }
.elw-submit-status-rejected { background: #4d1f22; color: #e68e94; }
.elw-submit-status-pending { background: #4d3f1f; color: #e6c98e; }

/* Live Dashboard */
.elw-live-dashboard {
	max-width: 1100px;
	margin: 24px auto;
	font-family: Arial, sans-serif;
	color: #f1ecf9;
}

/* Hotsheet — public, curated stories only */
.elw-hotsheet {
	background: #1b1626;
	border-radius: 12px;
	padding: 24px;
}
.elw-hotsheet h3 {
	margin-top: 0;
	color: #fff;
}
.elw-hotsheet-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
}
.elw-hotsheet-cols-2 .elw-hotsheet-grid {
	grid-template-columns: 1fr 1fr;
}
@media (max-width: 640px) {
	.elw-hotsheet-cols-2 .elw-hotsheet-grid {
		grid-template-columns: 1fr;
	}
}
.elw-hotsheet-story {
	background: rgba(255,255,255,0.03);
	border-radius: 10px;
	overflow: hidden;
}
.elw-hotsheet-story-image img {
	width: 100%;
	aspect-ratio: 16/9;
	object-fit: cover;
	display: block;
}
.elw-hotsheet-story-body {
	padding: 16px;
}
.elw-hotsheet-story-title {
	margin: 0 0 4px;
	color: #fff;
	font-size: 18px;
}
.elw-hotsheet-story-when {
	font-size: 11px;
	color: #7c6f96;
	margin-bottom: 10px;
}
.elw-hotsheet-story-text {
	font-size: 14px;
	color: #d5c9ef;
	line-height: 1.6;
}
.elw-hotsheet-story-text p {
	margin: 0 0 10px;
}
.elw-hotsheet-story-related {
	margin-top: 12px;
	padding-top: 10px;
	border-top: 1px solid rgba(255,255,255,0.1);
	font-size: 12px;
	color: #a999cf;
}
.elw-hotsheet-story-related-label {
	color: #7c6f96;
	margin-right: 4px;
}

/* Console tabs */
.elw-console-topbar {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 20px;
}
.elw-console-tabs {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	flex: 1 1 auto;
}
.elw-console-tab {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	background: linear-gradient(180deg, #221a33 0%, #191325 100%);
	border: 1px solid rgba(255,255,255,0.08);
	border-radius: 12px;
	color: #a999cf;
	font-family: inherit;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	padding: 14px 22px;
	cursor: pointer;
	flex: 1 1 100px;
	min-width: 90px;
	transition: border-color .15s ease, color .15s ease;
}
.elw-console-tab-icon {
	font-size: 20px;
	line-height: 1;
}
.elw-console-tab:hover {
	color: #f1ecf9;
	border-color: rgba(209,140,240,0.4);
}
.elw-console-tab.is-active {
	color: #fff;
	border-color: #d18cf0;
	box-shadow: 0 0 0 1px rgba(209,140,240,0.4), 0 0 18px rgba(138,92,246,0.35);
}
.elw-console-panel {
	display: none !important;
}
.elw-console-panel.is-active {
	display: block !important;
}

/* Topbar stats — replaces the old large avatar/hero header card entirely;
   just the live cycle counter + wallet balance, sized to sit inline next
   to the tab row rather than as a separate block. */
.elw-console-topbar-stats {
	display: flex;
	align-items: center;
	gap: 18px;
	flex: 0 0 auto;
	padding: 8px 4px;
	white-space: nowrap;
}
.elw-console-topbar-stat {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	line-height: 1.2;
}
.elw-console-topbar-stat-label {
	font-size: 9px;
	text-transform: uppercase;
	letter-spacing: .1em;
	color: #7c6f96;
}
.elw-console-topbar-stat-value {
	font-size: 15px;
	font-weight: 700;
	color: #d18cf0;
}
.elw-console-topbar-cycle .elw-console-topbar-stat-value {
	color: #fff;
}
.elw-console-topbar-login {
	font-size: 12px;
	font-weight: 700;
	color: #d18cf0;
	text-decoration: none;
	border: 1px solid rgba(209,140,240,0.4);
	border-radius: 8px;
	padding: 6px 12px;
}
.elw-console-topbar-login:hover {
	color: #fff;
	border-color: #d18cf0;
}
@media (max-width: 600px) {
	.elw-console-topbar {
		flex-direction: column;
	}
	.elw-console-topbar-stats {
		align-self: flex-start;
	}
}


/* Character roster */
.elw-roster h3,
.elw-locations-roster h3 {
	margin-top: 0;
	color: #fff;
}
.elw-roster-grid,
.elw-locations-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 16px;
}
.elw-roster-card,
.elw-locations-card {
	background: #1b1626;
	border-radius: 12px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}
.elw-roster-avatar img,
.elw-locations-card-image img {
	width: 100%;
	aspect-ratio: 4/3;
	object-fit: cover;
	display: block;
}
.elw-roster-avatar-placeholder {
	width: 100%;
	aspect-ratio: 4/3;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 40px;
	background: rgba(255,255,255,0.06);
}
.elw-roster-body,
.elw-locations-card-body {
	padding: 14px;
}
.elw-roster-body h4,
.elw-locations-card-body h4 {
	margin: 0 0 4px;
	color: #fff;
}
.elw-roster-tagline,
.elw-locations-card-region {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: #b79df0;
	margin-bottom: 8px;
}
.elw-roster-bio,
.elw-locations-card-desc {
	font-size: 13px;
	color: #d5c9ef;
	margin: 0 0 12px;
	line-height: 1.5;
}
.elw-roster-message-btn,
.elw-locations-view-map-btn {
	background: linear-gradient(90deg, #8a5cf6, #d18cf0);
	color: #fff;
	border: none;
	padding: 8px 16px;
	border-radius: 20px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}


.elw-submit-actions-remaining {
	font-size: 13px;
	color: #d18cf0;
	background: rgba(255,255,255,0.06);
	padding: 8px 12px;
	border-radius: 8px;
	margin-bottom: 14px;
}
.elw-submit-actions-empty {
	color: #e6c98e;
}

.elw-worldmap {
	max-width: 900px;
	margin: 24px auto;
	font-family: Arial, sans-serif;
}
.elw-worldmap-image-wrap {
	position: relative;
	display: inline-block;
	max-width: 100%;
	border-radius: 10px;
	overflow: hidden;
}
.elw-worldmap-image {
	display: block;
	max-width: 100%;
}
.elw-worldmap-pin {
	position: absolute;
	width: 18px;
	height: 18px;
	margin-left: -9px;
	margin-top: -18px;
	background: #d18cf0;
	border: 2px solid #fff;
	border-radius: 50% 50% 50% 0;
	transform: rotate(-45deg);
	box-shadow: 0 2px 5px rgba(0,0,0,0.4);
	cursor: pointer;
	padding: 0;
}
.elw-worldmap-pin:hover {
	background: #8a5cf6;
}
.elw-worldmap-pin-character {
	background: #57c8ff;
	border-radius: 50%;
	transform: none;
	width: 14px;
	height: 14px;
	margin-left: -7px;
	margin-top: -7px;
	box-shadow: 0 0 8px rgba(87,200,255,.7);
}
.elw-worldmap-pin-character:hover {
	background: #8adeff;
}
.elw-worldmap-popup {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: #1b1626;
	color: #f1ecf9;
	border-radius: 12px;
	padding: 20px;
	max-width: 400px;
	width: 90%;
	z-index: 9999;
	box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.elw-worldmap-popup h4 {
	margin: 0 0 4px;
	color: #fff;
}
.elw-worldmap-popup-region {
	font-size: 12px;
	color: #a999cf;
	margin-bottom: 10px;
	text-transform: uppercase;
	letter-spacing: .05em;
}
.elw-worldmap-popup img {
	max-width: 100%;
	border-radius: 8px;
	margin-bottom: 10px;
}
.elw-worldmap-popup p {
	font-size: 14px;
	line-height: 1.5;
	color: #d5c9ef;
}
.elw-worldmap-popup-close {
	position: absolute;
	top: 10px;
	right: 14px;
	background: none;
	border: none;
	color: #f1ecf9;
	font-size: 22px;
	cursor: pointer;
	line-height: 1;
}

/* ==================================================================
   Conversations ([conversation] shortcode)
   ================================================================== */

.elw-conversation {
	border: 1px solid rgba( 0, 0, 0, 0.12 );
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
}

.elw-conversation-locked p {
	margin: 0;
	padding: 20px;
}

/* ---- Wallet tile: mirrors the Marketplace/topbar stat treatment ---- */
.elw-conversation-wallet {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	align-items: center;
	padding: 10px 16px;
	background: #12151c;
	color: #f4f6fb;
}

.elw-conversation-wallet-item {
	display: flex;
	flex-direction: column;
	line-height: 1.25;
}

.elw-conversation-wallet-label {
	font-size: 10px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	opacity: 0.65;
}

.elw-conversation-wallet-value {
	font-size: 16px;
	font-weight: 700;
}

.elw-conversation-wallet-cost .elw-conversation-wallet-value {
	color: #ffc46b;
}

.elw-conversation-wallet-memory {
	margin-left: auto;
	text-align: right;
}

.elw-conversation-wallet-memory .elw-conversation-wallet-value {
	font-size: 13px;
	font-weight: 600;
	opacity: 0.8;
}

/* ---- Layout ---- */
.elw-conversation-body {
	display: flex;
	align-items: stretch;
}

.elw-conversation-rail {
	width: 240px;
	flex: 0 0 240px;
	border-right: 1px solid rgba( 0, 0, 0, 0.1 );
	padding: 14px;
	background: #f7f8fa;
	overflow-y: auto;
}

.elw-conversation-rail-block + .elw-conversation-rail-block {
	margin-top: 20px;
}

.elw-conversation-rail-title {
	display: block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	opacity: 0.6;
	margin-bottom: 6px;
}

.elw-conversation-rail select {
	width: 100%;
	max-width: 100%;
	padding: 6px;
}

.elw-conversation-rail-actions {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-top: 8px;
}

.elw-conversation-btn {
	cursor: pointer;
	border-radius: 6px;
	border: 1px solid transparent;
	padding: 8px 12px;
	font-size: 13px;
	font-weight: 600;
}

.elw-conversation-btn-primary {
	background: #2a5bd7;
	color: #fff;
}

.elw-conversation-btn-primary:hover:not( :disabled ) {
	background: #1f47ab;
}

.elw-conversation-btn-primary:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.elw-conversation-btn-ghost {
	background: transparent;
	border-color: rgba( 0, 0, 0, 0.2 );
	color: inherit;
}

.elw-conversation-btn-ghost:hover {
	background: rgba( 0, 0, 0, 0.05 );
}

.elw-conversation-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.elw-conversation-list-item {
	display: flex;
	flex-direction: column;
	width: 100%;
	text-align: left;
	background: transparent;
	border: 0;
	border-radius: 6px;
	padding: 7px 8px;
	cursor: pointer;
}

.elw-conversation-list-item:hover,
.elw-conversation-list-item.is-active {
	background: rgba( 42, 91, 215, 0.1 );
}

.elw-conversation-list-name {
	font-weight: 600;
	font-size: 13px;
}

.elw-conversation-list-time {
	font-size: 11px;
	opacity: 0.6;
}

/* ---- Thread ---- */
.elw-conversation-thread {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.elw-conversation-thread-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	padding: 10px 16px;
	border-bottom: 1px solid rgba( 0, 0, 0, 0.08 );
	font-weight: 600;
}

.elw-conversation-status {
	font-size: 12px;
	font-weight: 500;
	opacity: 0.7;
}

.elw-conversation-status.is-error {
	color: #b32d2e;
	opacity: 1;
}

.elw-conversation-transcript {
	overflow-y: auto;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.elw-conversation-empty {
	margin: auto;
	text-align: center;
	opacity: 0.55;
	font-size: 13px;
}

.elw-conversation-msg {
	max-width: 78%;
	display: flex;
	flex-direction: column;
}

.elw-conversation-msg-user {
	align-self: flex-end;
	align-items: flex-end;
}

.elw-conversation-msg-character {
	align-self: flex-start;
}

.elw-conversation-bubble {
	padding: 9px 13px;
	border-radius: 14px;
	white-space: pre-wrap;
	word-wrap: break-word;
	line-height: 1.5;
	font-size: 14px;
}

.elw-conversation-msg-user .elw-conversation-bubble {
	background: #2a5bd7;
	color: #fff;
	border-bottom-right-radius: 4px;
}

.elw-conversation-msg-character .elw-conversation-bubble {
	background: #eef0f4;
	color: #14171f;
	border-bottom-left-radius: 4px;
}

.elw-conversation-msg.is-thinking .elw-conversation-bubble {
	opacity: 0.55;
	font-style: italic;
}

.elw-conversation-time {
	font-size: 10px;
	opacity: 0.5;
	margin-top: 3px;
	padding: 0 4px;
}

.elw-conversation-composer {
	display: flex;
	gap: 8px;
	padding: 10px 12px;
	border-top: 1px solid rgba( 0, 0, 0, 0.08 );
	align-items: flex-end;
}

.elw-conversation-composer textarea {
	flex: 1 1 auto;
	resize: vertical;
	min-height: 42px;
	padding: 9px 11px;
	border-radius: 8px;
	border: 1px solid rgba( 0, 0, 0, 0.2 );
	font-family: inherit;
	font-size: 14px;
}

.elw-conversation-composer textarea:disabled {
	background: #f2f3f5;
}

.elw-roster-talk-btn {
	margin-left: 6px;
}

@media ( max-width: 782px ) {
	.elw-conversation-body {
		flex-direction: column;
	}

	.elw-conversation-rail {
		width: auto;
		flex: 1 1 auto;
		border-right: 0;
		border-bottom: 1px solid rgba( 0, 0, 0, 0.1 );
	}

	.elw-conversation-msg {
		max-width: 90%;
	}

	.elw-conversation-wallet-memory {
		margin-left: 0;
		text-align: left;
	}
}

/* ---- Conversation: avatars, story events, link badge ---- */

.elw-conversation-row {
	display: flex;
	align-items: flex-end;
	gap: 8px;
}

.elw-conversation-msg-user .elw-conversation-row {
	justify-content: flex-end;
}

.elw-conversation-thread-header {
	/* name + optional story badge on the left, status pushed right */
	justify-content: flex-start;
}

.elw-conversation-thread-header .elw-conversation-status {
	margin-left: auto;
}

.elw-conversation-story-badge {
	font-size: 11px;
	font-weight: 600;
	padding: 2px 8px;
	border-radius: 10px;
	background: rgba( 42, 91, 215, 0.12 );
	color: #2a5bd7;
	white-space: nowrap;
}

.elw-conversation-story-event {
	align-self: center;
	max-width: 92%;
	text-align: center;
	border-top: 1px dashed rgba( 0, 0, 0, 0.15 );
	border-bottom: 1px dashed rgba( 0, 0, 0, 0.15 );
	padding: 7px 10px;
	margin: 2px 0;
}

.elw-conversation-story-event-text {
	font-size: 12.5px;
	font-style: italic;
	line-height: 1.5;
	opacity: 0.75;
	white-space: pre-wrap;
}

.elw-conversation-hint {
	font-size: 11px;
	line-height: 1.45;
	opacity: 0.6;
	margin: 6px 0 0;
}

.elw-conversation-rail select:disabled {
	opacity: 0.6;
}

/* ---- Rail portrait: the selected persona, shown once in the sidebar ---- */

.elw-conversation-rail-portrait {
	width: 100%;
	aspect-ratio: 1 / 1;
	max-height: 190px;
	margin: 10px 0 4px;
	border-radius: 10px;
	overflow: hidden;
	background: #d8dce4;
	display: flex;
	align-items: center;
	justify-content: center;
}

.elw-conversation-rail-portrait img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.elw-conversation-rail-portrait-placeholder {
	font-size: 44px;
	font-weight: 700;
	color: #6b7280;
	user-select: none;
}

.elw-conversation-rail-portrait-name {
	font-weight: 600;
	font-size: 14px;
	text-align: center;
	margin-bottom: 10px;
}

@media ( max-width: 782px ) {
	/* On a stacked layout a full-width square portrait would push the
	   transcript off-screen, so shrink it to a chip. */
	.elw-conversation-rail-portrait {
		width: 64px;
		height: 64px;
		max-height: 64px;
		margin: 8px auto 4px;
	}

	.elw-conversation-rail-portrait-placeholder {
		font-size: 26px;
	}
}

/* ---- Generated images in the transcript ---- */

.elw-conversation-image {
	align-self: flex-start;
	max-width: 78%;
	border-radius: 12px;
	overflow: hidden;
	background: #eef0f4;
}

.elw-conversation-image img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 12px;
}

.elw-conversation-image.is-pending {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 150px;
	width: 260px;
	padding: 20px;
	border: 1px dashed rgba( 0, 0, 0, 0.18 );
	background: repeating-linear-gradient(
		45deg,
		#f3f4f7,
		#f3f4f7 10px,
		#eceef3 10px,
		#eceef3 20px
	);
}

.elw-conversation-image-spinner {
	width: 26px;
	height: 26px;
	border-radius: 50%;
	border: 3px solid rgba( 42, 91, 215, 0.25 );
	border-top-color: #2a5bd7;
	animation: elw-conv-spin 0.9s linear infinite;
}

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

.elw-conversation-image-label {
	font-size: 12px;
	opacity: 0.65;
}

.elw-conversation-image.is-failed {
	padding: 12px 14px;
	font-size: 12.5px;
	color: #b32d2e;
	background: rgba( 179, 45, 46, 0.07 );
	border: 1px solid rgba( 179, 45, 46, 0.2 );
}

@media ( prefers-reduced-motion: reduce ) {
	.elw-conversation-image-spinner { animation: none; }
}

@media ( max-width: 782px ) {
	.elw-conversation-image { max-width: 90%; }
	.elw-conversation-image.is-pending { width: 100%; }
}

.elw-conversation-image.is-curated {
	background: transparent;
}

.elw-conversation-image-caption {
	font-size: 11px;
	opacity: 0.55;
	padding: 4px 2px 0;
	font-style: italic;
}

/* ---- Attaching an image to a conversation ---- */

.elw-conversation-attach-btn {
	flex: 0 0 auto;
	cursor: pointer;
	font-size: 18px;
	line-height: 1;
	padding: 10px 8px;
	border-radius: 8px;
	opacity: 0.6;
	user-select: none;
}

.elw-conversation-attach-btn:hover {
	opacity: 1;
	background: rgba( 0, 0, 0, 0.05 );
}

 /* An author-level display rule outranks the browser's built-in
   [hidden] { display: none }, so hiding this panel by setting the
   hidden attribute silently did nothing. This restores it. */
.elw-conversation-attach-preview[hidden] {
	display: none;
}

.elw-conversation-attach-preview {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 10px 12px;
	border-top: 1px solid rgba( 0, 0, 0, 0.08 );
	background: #f7f8fa;
}

.elw-conversation-attach-preview img {
	width: 56px;
	height: 56px;
	object-fit: cover;
	border-radius: 6px;
	flex: 0 0 56px;
}

.elw-conversation-attach-meta {
	flex: 1 1 auto;
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 12px;
	line-height: 1.45;
	opacity: 0.75;
	font-style: italic;
}

.elw-conversation-attach-remove {
	margin-left: auto;
	background: transparent;
	border: 0;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	opacity: 0.5;
	padding: 0 4px;
}

.elw-conversation-attach-remove:hover { opacity: 1; }

.elw-conversation-attached-img {
	display: block;
	max-width: 100%;
	border-radius: 8px;
	margin-bottom: 6px;
}

.elw-conversation-attach-desc {
	flex: 1 1 auto;
	min-height: 44px;
	resize: vertical;
	font-family: inherit;
	font-size: 12px;
	line-height: 1.45;
	font-style: italic;
	padding: 6px 8px;
	border-radius: 6px;
	border: 1px solid rgba( 0, 0, 0, 0.15 );
	background: #fff;
	color: inherit;
}

/* ==================================================================
   [text2image]
   ================================================================== */

.elw-t2i {
	border: 1px solid rgba( 0, 0, 0, 0.12 );
	border-radius: 10px;
	padding: 14px;
	background: #fff;
}

.elw-t2i-bar {
	display: flex;
	gap: 14px;
	margin-bottom: 8px;
}

.elw-t2i-meta {
	font-size: 11px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	opacity: 0.6;
}

.elw-t2i textarea {
	width: 100%;
	resize: vertical;
	padding: 10px;
	border-radius: 8px;
	border: 1px solid rgba( 0, 0, 0, 0.18 );
	font-family: inherit;
	font-size: 14px;
}

.elw-t2i-controls {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 10px;
	flex-wrap: wrap;
	font-size: 13px;
}

.elw-t2i-controls select {
	margin-left: 6px;
	padding: 4px 6px;
}

.elw-t2i-btn {
	background: #2a5bd7;
	color: #fff;
	border: 0;
	border-radius: 6px;
	padding: 9px 18px;
	font-weight: 600;
	font-size: 13px;
	cursor: pointer;
}

.elw-t2i-btn:hover:not( :disabled ) { background: #1f47ab; }
.elw-t2i-btn:disabled { opacity: 0.55; cursor: progress; }

.elw-t2i-status {
	font-size: 12px;
	opacity: 0.7;
}

.elw-t2i-status.is-error {
	color: #b32d2e;
	opacity: 1;
}

.elw-t2i-result {
	margin-top: 14px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.elw-t2i-figure {
	margin: 0;
}

.elw-t2i-figure img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 8px;
}

.elw-t2i-figure figcaption {
	font-size: 11.5px;
	opacity: 0.6;
	margin-top: 5px;
	font-style: italic;
}

/* ---- Conversation list housekeeping ---- */

.elw-conversation-list-row {
	position: relative;
	display: flex;
	align-items: center;
}

.elw-conversation-list-row .elw-conversation-list-item {
	flex: 1 1 auto;
	min-width: 0;
}

.elw-conversation-list-name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.elw-conversation-row-actions {
	display: none;
	gap: 2px;
	padding-right: 4px;
}

.elw-conversation-list-row:hover .elw-conversation-row-actions,
.elw-conversation-list-row:focus-within .elw-conversation-row-actions {
	display: flex;
}

.elw-conversation-row-actions button {
	background: transparent;
	border: 0;
	cursor: pointer;
	font-size: 12px;
	line-height: 1;
	padding: 4px;
	border-radius: 4px;
	opacity: 0.55;
}

.elw-conversation-row-actions button:hover {
	opacity: 1;
	background: rgba( 0, 0, 0, 0.07 );
}

.elw-conversation-list-row.is-pinned {
	background: rgba( 42, 91, 215, 0.05 );
	border-radius: 6px;
}

.elw-conversation-pin-mark {
	font-size: 10px;
}

.elw-conversation-library {
	margin-top: 10px;
}

.elw-conversation-library > summary {
	cursor: pointer;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	opacity: 0.55;
	padding: 4px 0;
}

/* Touch devices have no hover, so actions stay visible there. */
@media ( hover: none ) {
	.elw-conversation-row-actions { display: flex; }
}

/* ==================================================================
   [arena]
   ================================================================== */

.elw-arena {
	border: 1px solid rgba( 0, 0, 0, 0.12 );
	border-radius: 10px;
	padding: 18px;
	background: #fff;
	/* Explicit, not inherited: themes with a light body colour were
	   bleeding into this panel and washing the text out. */
	color: #1d2129;
}

.elw-arena-title {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	/* Was opacity:0.6, which disappeared against a cream page
	   background. A fixed grey keeps contrast wherever it lands. */
	color: #55606e;
	margin: 20px 0 10px;
}

.elw-arena-digest {
	background: #12151c;
	color: #f4f6fb;
	border-radius: 8px;
	padding: 14px 16px;
}

.elw-arena-digest-head {
	display: flex;
	justify-content: space-between;
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #9aa4b2;
	margin-bottom: 8px;
}

.elw-arena-digest-body p {
	margin: 0 0 8px;
	line-height: 1.55;
	font-size: 14px;
}

.elw-arena-board {
	list-style: none;
	margin: 0;
	padding: 0;
	counter-reset: arena;
}

.elw-arena-row {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 8px;
	border-bottom: 1px solid rgba( 0, 0, 0, 0.07 );
}

.elw-arena-row.is-me {
	background: rgba( 42, 91, 215, 0.07 );
	border-radius: 6px;
}

.elw-arena-rank {
	flex: 0 0 26px;
	font-weight: 700;
	/* 4.74:1 on white — rank numbers are content, not decoration, so
	   they need to clear AA rather than sit at UI-only contrast. */
	color: #6b7480;
	text-align: right;
}

.elw-arena-agent {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.elw-arena-for,
.elw-arena-sub {
	font-size: 11px;
	color: #626c7a;
}

.elw-arena-points {
	text-align: right;
	display: flex;
	flex-direction: column;
}

.elw-arena-points strong { font-size: 17px; }

.elw-arena-empty {
	color: #55606e;
	font-size: 13px;
}

.elw-arena-enrol {
	margin-top: 22px;
	border-top: 1px solid rgba( 0, 0, 0, 0.08 );
	padding-top: 14px;
}

.elw-arena-field {
	display: block;
	margin-bottom: 12px;
	font-size: 13px;
}

.elw-arena-field > span {
	display: block;
	font-weight: 600;
	color: #1d2129;
	margin-bottom: 4px;
}

.elw-arena-field select,
.elw-arena-field input {
	width: 100%;
	max-width: 340px;
	padding: 7px 9px;
	border-radius: 6px;
	border: 1px solid rgba( 0, 0, 0, 0.2 );
	font-family: inherit;
	font-size: 14px;
}

.elw-arena-check {
	display: flex;
	gap: 9px;
	align-items: flex-start;
	font-size: 13px;
	line-height: 1.5;
	margin-bottom: 14px;
	max-width: 560px;
}

.elw-arena-check em {
	display: block;
	font-size: 11.5px;
	color: #626c7a;
	margin-top: 3px;
	font-style: normal;
}

.elw-arena-actions {
	display: flex;
	align-items: center;
	gap: 10px;
}

.elw-arena-btn {
	background: #2a5bd7;
	color: #fff;
	border: 0;
	border-radius: 6px;
	padding: 9px 18px;
	font-weight: 600;
	font-size: 13px;
	cursor: pointer;
}

.elw-arena-btn:disabled { opacity: 0.55; cursor: progress; }

.elw-arena-btn-ghost {
	background: transparent;
	color: inherit;
	border: 1px solid rgba( 0, 0, 0, 0.2 );
}

.elw-arena-status { font-size: 12px; color: #55606e; }

/* Form controls inside the arena: themes often style inputs with a
   tinted background and pale text. Pin both so the panel stays legible
   regardless of the surrounding theme. */
.elw-arena-field input,
.elw-arena-field select,
.elw-arena-check {
	color: #1d2129;
}

.elw-arena-field input,
.elw-arena-field select {
	background: #fff;
}

.elw-arena-field input::placeholder {
	color: #8a929e;
	opacity: 1; /* Firefox dims placeholders by default. */
}

/* ---- Arena roster ---- */

.elw-arena-roster {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
	color: #1d2129;
}

.elw-arena-roster th {
	text-align: left;
	font-size: 11px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #55606e;
	border-bottom: 1px solid rgba( 0, 0, 0, 0.12 );
	padding: 6px 8px;
}

.elw-arena-roster td {
	padding: 8px;
	border-bottom: 1px solid rgba( 0, 0, 0, 0.06 );
	vertical-align: middle;
}

.elw-arena-roster tr.is-out td {
	color: #6b7480;
}

.elw-arena-roster .elw-arena-sub {
	display: block;
}

.elw-arena-roster-agent {
	display: inline-flex;
	align-items: center;
	gap: 7px;
}

.elw-arena-roster-agent img {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	object-fit: cover;
}

.elw-arena-live {
	color: #1a7f37;
	font-weight: 600;
}

/* ==================================================================
   Conversation export
   ================================================================== */

.elw-conversation-export-btn {
	margin-left: 8px;
	background: none;
	border: 1px solid rgba( 0, 0, 0, 0.18 );
	border-radius: 5px;
	padding: 3px 10px;
	font-size: 11.5px;
	font-family: inherit;
	color: inherit;
	cursor: pointer;
	white-space: nowrap;
}

.elw-conversation-export-btn:hover:not( :disabled ) { border-color: rgba( 0, 0, 0, 0.45 ); }
.elw-conversation-export-btn:disabled { opacity: 0.4; cursor: default; }

.elw-conversation-export {
	padding: 12px 16px;
	border-bottom: 1px solid rgba( 0, 0, 0, 0.08 );
	background: rgba( 0, 0, 0, 0.02 );
}

.elw-conversation-export-controls {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	font-size: 12.5px;
	margin-bottom: 8px;
}

.elw-conversation-export-controls label {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.elw-conversation-export-controls select { padding: 3px 6px; }

.elw-conversation-export-close {
	margin-left: auto;
	background: none;
	border: 0;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	opacity: 0.5;
	color: inherit;
}

.elw-conversation-export-close:hover { opacity: 1; }

.elw-conversation-export-text {
	width: 100%;
	resize: vertical;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 12px;
	line-height: 1.5;
	padding: 10px;
	border: 1px solid rgba( 0, 0, 0, 0.18 );
	border-radius: 6px;
	background: #fff;
	/* Wrapping is deliberate: this is a preview to eyeball before
	   copying, not an editor where horizontal scroll would be useful. */
	white-space: pre-wrap;
}

.elw-conversation-export-note {
	font-size: 11.5px;
	opacity: 0.65;
	margin: 6px 0 0;
	min-height: 14px;
}

.elw-conversation-export-controls label.is-disabled {
	opacity: 0.4;
	cursor: default;
}

.elw-conversation-truncated {
	font-size: 11.5px;
	opacity: 0.6;
	font-style: italic;
	text-align: center;
	margin: 0 0 10px;
	padding: 7px 10px;
	border-bottom: 1px dashed rgba( 0, 0, 0, 0.12 );
}

.elw-conversation-repair {
	border: 1px solid rgba( 200, 120, 0, 0.35 );
	background: rgba( 240, 180, 41, 0.08 );
	border-radius: 8px;
	padding: 12px 14px;
	margin: 12px 0;
	font-size: 12.5px;
}

.elw-conversation-repair p { margin: 0 0 7px; }
.elw-conversation-repair-hint { opacity: 0.75; font-size: 11.5px; }
