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

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

#ccApp .cc-shell-form {
	height: auto;
	align-self: start;
}

#ccApp .cc-shell-result {
	height: 100%;
	min-height: 22rem;
}

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

#ccApp .cc-shell-result .cc-panel {
	min-height: 100%;
}

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

#ccApp .cc-mode-block {
	margin: 1.25rem 0 0;
}

#ccApp .cc-modes {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.35rem;
}

#ccApp .cc-mode {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 1.9rem;
	padding: 0.2rem 0.2rem;
	border: 1px solid transparent;
	border-radius: 0.375rem;
	background: #fff;
	color: #64748b;
	font-size: 0.6875rem;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	cursor: pointer;
	box-shadow: inset 0 0 0 1px #e2e8f0;
	transition: background-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

#ccApp .cc-mode:hover {
	color: #1d4ed8;
	box-shadow: inset 0 0 0 1px #93c5fd;
}

#ccApp .cc-mode.is-active {
	background: var(--cc-primary);
	color: #fff;
	box-shadow: none;
}

#ccApp .cc-mode:focus-visible {
	outline: 2px solid var(--cc-primary);
	outline-offset: 1px;
}

#ccApp .cc-field {
	position: relative;
	overflow: hidden;
	border: 1px solid var(--cc-line);
	border-radius: 0.5rem;
	background: #fff;
}

#ccApp .cc-field:focus-within {
	border-color: #93c5fd;
}

#ccApp .cc-textarea {
	display: block;
	width: 100%;
	min-height: 12rem;
	padding: 0.9rem 1rem 1.85rem;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var(--cc-ink);
	font-size: 0.9375rem;
	line-height: 1.55;
	resize: vertical;
	font-family: var(--cc-font-mono);
	transition: none;
}

#ccApp .cc-field-result,
#ccApp .cc-field-result .cc-textarea-result {
	background: #f8fafc;
}

#ccApp .cc-textarea-result {
	min-height: 14rem;
}

#ccApp .cc-textarea:focus {
	outline: none;
	box-shadow: none;
}

#ccApp .cc-meta {
	position: absolute;
	right: 0.65rem;
	bottom: 0.65rem;
	z-index: 1;
	margin: 0;
	padding: 0;
	font-size: 0.6875rem;
	line-height: 1;
	color: #94a3b8;
	font-variant-numeric: tabular-nums;
	pointer-events: none;
	user-select: none;
}

#ccApp .cc-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;
}

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

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

#ccApp .cc-btn-muted:hover {
	background: #f1f5f9;
}

#ccApp .cc-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;
}

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

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

#ccApp .cc-hint {
	margin: 0.5rem 0 0;
	font-size: 0.75rem;
	line-height: 1.55;
	color: #94a3b8;
}

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

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

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

#ccApp .cc-notes a {
	color: #2563eb;
}

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

@media (prefers-reduced-motion: reduce) {
	#ccApp .cc-mode,
	#ccApp .cc-btn,
	#ccApp .cc-copy,
	#ccApp .cc-textarea {
		transition: none !important;
	}
}
