#ib64App {
	--ib64-ink: #0f172a;
	--ib64-muted: #475569;
	--ib64-line: #e2e8f0;
	--ib64-primary: #3b82f6;
	--ib64-primary-hover: #2563eb;
	--ib64-soft: #eff6ff;
	--ib64-accent: #1d4ed8;
	--ib64-radius: 0.375rem;
	--ib64-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
	--ib64-font-display: system-ui, -apple-system, "Segoe UI", sans-serif;
	--ib64-font-body: system-ui, -apple-system, "Segoe UI", sans-serif;
	--ib64-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-family: var(--ib64-font-body);
	color: var(--ib64-ink);
}

#ib64App .ib64-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(--ib64-line);
	border-radius: var(--ib64-radius);
	box-shadow: var(--ib64-shadow);
	overflow: hidden;
}

#ib64App .ib64-shell-form {
	height: auto;
	align-self: start;
}

#ib64App .ib64-shell-result {
	height: 100%;
	min-height: 22rem;
}

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

#ib64App .ib64-shell-result .ib64-panel {
	min-height: 100%;
}

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

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

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

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

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

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

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

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

#ib64App .ib64-preview-wrap {
	min-width: 0;
}

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

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

#ib64App .ib64-options {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
}

#ib64App .ib64-check {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.875rem;
	color: #1e293b;
	cursor: pointer;
}

#ib64App .ib64-check input {
	width: 1rem;
	height: 1rem;
	accent-color: var(--ib64-primary);
	cursor: pointer;
}

#ib64App .ib64-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;
}

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

#ib64App .ib64-btn-primary {
	background: var(--ib64-primary);
	color: #fff;
}

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

#ib64App .ib64-btn-primary:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

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

#ib64App .ib64-btn-muted:hover {
	background: #f1f5f9;
}

#ib64App .ib64-textarea {
	width: 100%;
	min-height: 14rem;
	padding: 0.9rem 1rem;
	border: 1px solid var(--ib64-line);
	border-radius: 0.5rem;
	background: #f8fafc;
	color: var(--ib64-ink);
	font-size: 0.8125rem;
	line-height: 1.55;
	resize: vertical;
	font-family: var(--ib64-font-mono);
	word-break: break-all;
}

#ib64App .ib64-textarea:focus {
	outline: none;
	border-color: #93c5fd;
	box-shadow: none;
}

#ib64App .ib64-copy {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 1.75rem;
	padding: 0 0.65rem;
	border: 1px solid #d1d5db;
	border-radius: 0.4rem;
	background: #fff;
	color: #374151;
	font-size: 0.75rem;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

#ib64App .ib64-copy:hover,
#ib64App .ib64-copy.is-done {
	background: var(--ib64-soft);
	border-color: #93c5fd;
	color: var(--ib64-accent);
}

#ib64App .ib64-copy:focus-visible {
	outline: 2px solid var(--ib64-primary);
	outline-offset: 2px;
}

#ib64App .ib64-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;
}

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

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

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

#ib64App .ib64-notes a {
	color: #2563eb;
}

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

@media (prefers-reduced-motion: reduce) {
	#ib64App .ib64-drop,
	#ib64App .ib64-btn,
	#ib64App .ib64-copy {
		transition: none !important;
	}
}
