.wpem-form-wrap {
	--wpem-text: #111111;
	--wpem-muted: #333333;
	--wpem-input-bg: #f5f5f5;
	--wpem-placeholder: #9a9a9a;
	--wpem-error: #e53935;
	--wpem-success: #008a20;
	--wpem-terms: #91a2ba;
	--wpem-radius: 10px;
	--wpem-accent: #111111;
	box-sizing: border-box;
	width: 100%;
	max-width: 640px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--wpem-text);
	font-family: inherit;
	line-height: 1.5;
}

.wpem-form-wrap *,
.wpem-form-wrap *::before,
.wpem-form-wrap *::after {
	box-sizing: border-box;
}

.wpem-form-header {
	margin-bottom: 28px;
}

.wpem-form-header h2 {
	margin: 0 0 14px;
	color: var(--wpem-text);
	font-size: clamp(1.75rem, 2.5vw, 2.25rem);
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.02em;
}

.wpem-form-header .wpem-form-description {
	margin: 0;
	color: var(--wpem-muted);
	font-size: 0.95rem;
	line-height: 1.7;
}

.wpem-form-header .wpem-form-description p {
	margin: 0;
}

.wpem-fields {
	display: grid;
	gap: 20px;
}

.wpem-field label {
	display: block;
	margin-bottom: 8px;
	color: var(--wpem-text);
	font-size: 0.95rem;
	font-weight: 600;
}

.wpem-field input,
.wpem-field textarea {
	width: 100%;
	min-height: 48px;
	padding: 14px 16px;
	border: 1px solid transparent;
	border-radius: var(--wpem-radius);
	background: var(--wpem-input-bg);
	color: var(--wpem-text);
	font: inherit;
	font-size: 0.95rem;
	transition:
		border-color 0.15s ease,
		box-shadow 0.15s ease,
		background-color 0.15s ease;
}

.wpem-field textarea {
	min-height: 160px;
	resize: vertical;
}

.wpem-field input::placeholder,
.wpem-field textarea::placeholder {
	color: var(--wpem-placeholder);
	opacity: 1;
}

.wpem-field input:focus,
.wpem-field textarea:focus {
	border-color: #cfcfcf;
	outline: none;
	box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
	background: #f0f0f0;
}

.wpem-field input.has-error,
.wpem-field textarea.has-error {
	border-color: var(--wpem-error);
	box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.12);
}

.wpem-required {
	margin-left: 2px;
	color: var(--wpem-error);
	font-weight: 700;
}

.wpem-field-error {
	display: block;
	color: var(--wpem-error);
	font-size: 0.875rem;
	line-height: 1.4;
}

.wpem-field-error:empty {
	display: none;
}

.wpem-field-error:not(:empty) {
	margin-top: 6px;
}

.wpem-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-top: 24px;
	min-width: 140px;
	padding: 14px 28px;
	border: 0;
	border-radius: var(--wpem-radius);
	background: var(--wpem-accent);
	color: #fff;
	font: inherit;
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition:
		filter 0.15s ease,
		opacity 0.15s ease;
}

.wpem-submit:hover {
	filter: brightness(1.12);
}

.wpem-submit:focus-visible {
	outline: 2px solid var(--wpem-accent);
	outline-offset: 3px;
}

.wpem-submit:disabled {
	cursor: wait;
	opacity: 0.65;
}

.wpem-response {
	margin-top: 18px;
	padding: 12px 14px;
	border-radius: var(--wpem-radius);
	font-size: 1rem;
}

.wpem-response.is-success {
	background: #edfaef;
	color: var(--wpem-success);
}

.wpem-response.is-error {
	background: #fcf0f1;
	color: var(--wpem-error);
}

.wpem-recaptcha-terms {
	margin: 18px 0 0;
	color: var(--wpem-terms);
	font-size: 0.75rem;
	line-height: 1.6;
}

.wpem-recaptcha-terms a {
	color: var(--wpem-accent);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.wpem-recaptcha-terms a:hover {
	filter: brightness(1.08);
}

.wpem-honeypot {
	position: absolute !important;
	left: -10000px !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

.grecaptcha-badge {
	visibility: hidden !important;
}

/* —— 卡片模板（参考 006ip 联系我们） —— */
.wpem-form-wrap.wpem-template-card {
	max-width: 880px;
	padding: 24px;
	border: 1px solid #f1f5f9;
	border-radius: 2.5rem;
	background: #fff;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
	--wpem-text: #0f172a;
	--wpem-muted: #64748b;
	--wpem-input-bg: #f8fafc;
	--wpem-placeholder: #94a3b8;
	--wpem-terms: #94a3b8;
	--wpem-radius: 1rem;
}

.wpem-template-card .wpem-form-header {
	margin-bottom: 24px;
}

.wpem-template-card .wpem-form-header h2 {
	font-size: clamp(1.5rem, 2vw, 1.875rem);
}

.wpem-template-card .wpem-form-description {
	margin-top: 16px;
	font-size: 1.05rem;
	line-height: 1.7;
}

.wpem-template-card .wpem-fields {
	gap: 24px;
}

.wpem-template-card .wpem-fields-row {
	display: grid;
	gap: 24px;
}

.wpem-template-card .wpem-field label {
	margin-bottom: 8px;
	color: #334155;
	font-size: 0.875rem;
}

.wpem-template-card .wpem-field input,
.wpem-template-card .wpem-field textarea {
	min-height: 56px;
	padding: 16px 20px;
	border: 1px solid #e2e8f0;
	border-radius: 1rem;
	background: #f8fafc;
}

.wpem-template-card .wpem-field textarea {
	min-height: 140px;
	resize: none;
}

.wpem-template-card .wpem-field input:focus,
.wpem-template-card .wpem-field textarea:focus {
	border-color: transparent;
	background: #fff;
	box-shadow: 0 0 0 2px color-mix(in srgb, var(--wpem-accent) 40%, transparent);
}

.wpem-template-card .wpem-submit-wrap {
	padding-top: 16px;
}

.wpem-template-card .wpem-submit {
	width: 100%;
	min-width: 0;
	margin-top: 0;
	height: 56px;
	padding: 0 28px;
	border-radius: 1rem;
	font-size: 1.125rem;
	font-weight: 700;
	box-shadow: 0 10px 15px -3px color-mix(in srgb, var(--wpem-accent) 25%, transparent);
}

.wpem-template-card .wpem-recaptcha-terms {
	margin-top: 16px;
	line-height: 1.4;
}

@media (min-width: 768px) {
	.wpem-form-wrap.wpem-template-card {
		padding: 48px;
		border: 0;
		box-shadow:
			0 20px 25px -5px rgba(15, 23, 42, 0.08),
			0 8px 10px -6px rgba(15, 23, 42, 0.06);
	}

	.wpem-template-card .wpem-form-header {
		margin-bottom: 40px;
	}

	.wpem-template-card .wpem-fields-row {
		grid-template-columns: 1fr 1fr;
	}

	.wpem-template-card .wpem-submit {
		width: 12rem;
	}
}

@media (max-width: 600px) {
	.wpem-form-header {
		margin-bottom: 22px;
	}

	.wpem-fields {
		gap: 16px;
	}

	.wpem-template-classic .wpem-submit {
		width: 100%;
	}
}
