#exApp {
	--ex-ink: #0f172a;
	--ex-muted: #475569;
	--ex-line: #e2e8f0;
	--ex-primary: #3b82f6;
	--ex-primary-hover: #2563eb;
	--ex-soft: #eff6ff;
	--ex-accent: #1d4ed8;
	--ex-warn: #b45309;
	--ex-ok: #047857;
	--ex-ok-bg: #ecfdf5;
	--ex-radius: 0.375rem;
	--ex-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
	--ex-font-display: system-ui, -apple-system, "Segoe UI", sans-serif;
	--ex-font-body: system-ui, -apple-system, "Segoe UI", sans-serif;
	font-family: var(--ex-font-body);
	color: var(--ex-ink);
}

#exApp .ex-shell {
	background:
		radial-gradient(1100px 400px at 8% -12%, rgba(59, 130, 246, 0.14), transparent 55%),
		radial-gradient(900px 360px at 100% 0%, rgba(37, 99, 235, 0.07), transparent 50%),
		linear-gradient(180deg, #f8fafc 0%, #ffffff 48%);
	border: 1px solid var(--ex-line);
	border-radius: var(--ex-radius);
	box-shadow: var(--ex-shadow);
	overflow: hidden;
}

#exApp .ex-panel {
	background: rgba(255, 255, 255, 0.94);
	backdrop-filter: blur(6px);
}

#exApp .ex-label {
	display: block;
	margin-bottom: 0.5rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: #334155;
	font-family: var(--ex-font-display);
}

#exApp .ex-field-label {
	display: block;
	margin-bottom: 0.35rem;
	font-size: 0.75rem;
	color: #64748b;
}

#exApp .ex-drop {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	min-height: 9.5rem;
	padding: 1.25rem;
	border: 1.5px dashed #93c5fd;
	border-radius: 0.65rem;
	background: linear-gradient(180deg, var(--ex-soft), #fff 70%);
	cursor: pointer;
	text-align: center;
	transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

#exApp .ex-drop:hover,
#exApp .ex-drop.is-drag {
	border-color: var(--ex-primary);
	background: #dbeafe;
	box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.12);
}

#exApp .ex-drop:focus-visible {
	outline: 2px solid var(--ex-primary);
	outline-offset: 2px;
}

#exApp .ex-drop-icon {
	width: 2rem;
	height: 2rem;
	color: var(--ex-primary);
	margin-bottom: 0.25rem;
}

#exApp .ex-drop-title {
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--ex-ink);
	font-family: var(--ex-font-display);
	word-break: break-all;
}

#exApp .ex-drop-sub {
	font-size: 0.75rem;
	color: #64748b;
}

#exApp .ex-meta {
	margin: 0.45rem 0 0;
	font-size: 0.75rem;
	color: #64748b;
	font-variant-numeric: tabular-nums;
}

#exApp .ex-select {
	display: block;
	width: 100%;
	min-height: 2.5rem;
	padding: 0.5rem 0.75rem;
	border: 1px solid var(--ex-line);
	border-radius: 0.5rem;
	background: #fff;
	color: var(--ex-ink);
	font-size: 0.875rem;
	cursor: pointer;
	transition: border-color 0.2s ease;
}

#exApp .ex-select:focus {
	outline: none;
	border-color: #93c5fd;
}

#exApp .ex-adj-row {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.75rem;
	color: #4b5563;
}

#exApp .ex-adj-row label {
	min-width: 6.5rem;
	flex-shrink: 0;
}

#exApp .ex-adj-row input[type="range"] {
	flex: 1;
	min-width: 0;
	cursor: pointer;
}

#exApp .ex-adj-val {
	min-width: 2rem;
	text-align: right;
	font-variant-numeric: tabular-nums;
	color: var(--ex-primary);
	font-weight: 600;
	font-size: 0.6875rem;
}

#exApp .ex-check {
	display: inline-flex;
	align-items: flex-start;
	gap: 0.5rem;
	font-size: 0.8125rem;
	color: #1e293b;
	cursor: pointer;
	line-height: 1.4;
}

#exApp .ex-check input {
	width: 1rem;
	height: 1rem;
	margin-top: 0.1rem;
	accent-color: var(--ex-primary);
	cursor: pointer;
	flex-shrink: 0;
}

#exApp .ex-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	min-height: 2.75rem;
	padding: 0 1.15rem;
	border-radius: 0.5rem;
	font-size: 0.875rem;
	font-weight: 600;
	border: 1px solid transparent;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

#exApp .ex-btn:focus-visible {
	outline: 2px solid var(--ex-primary);
	outline-offset: 2px;
}

#exApp .ex-btn-primary {
	background: var(--ex-primary);
	color: #fff;
}

#exApp .ex-btn-primary:hover:not(:disabled) {
	background: var(--ex-primary-hover);
}

#exApp .ex-btn-primary:disabled,
#exApp .ex-btn-muted:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

#exApp .ex-btn-primary.is-busy,
#exApp .ex-btn-primary.is-busy:hover {
	background: #9ca3af;
	cursor: wait;
	opacity: 1;
}

#exApp .ex-btn-muted {
	background: #f8fafc;
	color: #1e293b;
	border-color: #e2e8f0;
}

#exApp .ex-btn-muted:hover:not(:disabled) {
	background: #f1f5f9;
}

#exApp .ex-error {
	padding: 0.75rem 0.95rem;
	border: 1px solid #fecaca;
	border-radius: 0.5rem;
	background: #fef2f2;
	color: #991b1b;
	font-size: 0.875rem;
	line-height: 1.5;
}

#exApp .ex-empty {
	border: 1px dashed #e5e7eb;
	background: #f9fafb;
	border-radius: var(--ex-radius);
	color: #9ca3af;
}

#exApp .ex-preview-wrap {
	min-width: 0;
}

#exApp .ex-preview {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 8rem;
	max-height: 16rem;
	padding: 0.75rem;
	border: 1px solid var(--ex-line);
	border-radius: 0.5rem;
	background: #f8fafc;
	overflow: hidden;
}

#exApp .ex-preview-result {
	max-height: 18rem;
	margin: 0.25rem 0 0.25rem;
}

#exApp .ex-preview img {
	max-width: 100%;
	max-height: 14rem;
	object-fit: contain;
}

#exApp .ex-preview-result img {
	max-height: 16rem;
}

#exApp .ex-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.3rem;
}

#exApp .ex-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.2rem;
	padding: 0.12rem 0.45rem;
	border-radius: 999px;
	font-size: 0.6875rem;
	font-weight: 600;
	line-height: 1.4;
	border: 1px solid transparent;
}

#exApp .ex-badge-warn {
	color: var(--ex-warn);
	background: #fef3c7;
	border-color: #fde68a;
}

#exApp .ex-badge-info {
	color: var(--ex-accent);
	background: var(--ex-soft);
	border-color: #bfdbfe;
}

#exApp .ex-badge-ok {
	color: var(--ex-ok);
	background: var(--ex-ok-bg);
	border-color: #a7f3d0;
}

#exApp .ex-badge-muted {
	color: #64748b;
	background: #f8fafc;
	border-color: #e2e8f0;
}

#exApp .ex-tags-details {
	margin-top: 0.75rem;
	border: 1px solid var(--ex-line);
	border-radius: 0.5rem;
	background: #fff;
	padding: 0.55rem 0.75rem;
}

#exApp .ex-tags-details summary {
	cursor: pointer;
	font-size: 0.75rem;
	font-weight: 600;
	color: #334155;
	list-style: none;
}

#exApp .ex-tags-details summary::-webkit-details-marker {
	display: none;
}

#exApp .ex-tags-body {
	margin-top: 0.45rem;
	max-height: 12rem;
	overflow: auto;
}

#exApp .ex-tags-body table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.6875rem;
	color: #475569;
}

#exApp .ex-tags-body th,
#exApp .ex-tags-body td {
	padding: 0.35rem 0.45rem;
	border-top: 1px solid #f1f5f9;
	text-align: left;
	vertical-align: top;
}

#exApp .ex-tags-body th {
	width: 38%;
	color: #64748b;
	font-weight: 500;
}

#exApp .ex-notes {
	background: #fff;
	border-radius: var(--ex-radius);
	box-shadow: var(--ex-shadow);
	border: 1px solid var(--ex-line);
}

#exApp .ex-notes a {
	color: #2563eb;
}

#exApp .ex-notes code {
	font-size: 0.85em;
	background: #f1f5f9;
	padding: 0.05em 0.3em;
	border-radius: 0.25rem;
}

#exApp .hidden {
	display: none !important;
}

@media (prefers-reduced-motion: reduce) {
	#exApp .ex-drop,
	#exApp .ex-btn,
	#exApp .ex-select {
		transition: none !important;
	}
}
