.pfb-form {
	/* 100% statt 100vw: vw ignoriert Parent-Padding und erzeugt oft Horizontal-Scroll. */
	max-width: min(1400px, 100%);
	width: 100%;
	margin: 0 auto;
	box-sizing: border-box;
	/*
	 * Kein overflow-x am Formular ODER Viewer: sticky der Toolbar braucht
	 * Overflow-visible bis zum Viewport-Scroll. Horizontal-Clip nur an der Stage.
	 */
	--pfb-sticky-offset: 4.75rem; /* Fallback unter sticky #site-header; JS setzt exakt */
}

/* Go Theme u. a.: enge Content-Spalte nur Desktop (100vw); mobil nie. */
@media (min-width: 783px) {
	.entry-content > .pfb-form,
	.content-area > .pfb-form,
	.entry-content > .pfb-form.alignwide,
	.content-area > .pfb-form.alignwide {
		max-width: min(1400px, calc(100vw - 2rem)) !important;
		width: min(1400px, calc(100vw - 2rem)) !important;
	}
}

.pfb-form--blank .pfb-viewer-stage {
	background: #e8e8e8;
}

.pfb-form--blank .pfb-pdf-frame {
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

/* Blanko: klassisches gestapeltes Formular */
.pfb-stacked-form {
	max-width: 40rem;
	margin: 0 auto;
	padding: 0.25rem 0 0.5rem;
}

.pfb-stacked-title {
	margin: 0 0 1.25rem;
	font-size: clamp(1.35rem, 2.2vw, 1.75rem);
	font-weight: 600;
	line-height: 1.25;
	color: #1a1a1a;
}

.pfb-stacked-field {
	margin: 0 0 1.1rem;
}

.pfb-stacked-label {
	display: block;
	margin: 0 0 0.35rem;
}

.pfb-stacked-label-text {
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.35;
	color: #222;
}

.pfb-stacked-field .pfb-required {
	color: #b32d2e;
	margin-left: 0.15rem;
}

.pfb-stacked-control {
	width: 100%;
}

.pfb-stacked-control input[type='text'],
.pfb-stacked-control input[type='email'],
.pfb-stacked-control input[type='tel'],
.pfb-stacked-control input[type='number'],
.pfb-stacked-control input[type='date'],
.pfb-stacked-control textarea,
.pfb-stacked-control select {
	display: block;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	min-height: 2.6rem;
	padding: 0.55rem 0.7rem;
	border: 1px solid #c4c4c4;
	border-radius: 4px;
	background: #fff;
	font: inherit;
	font-size: 1rem;
	line-height: 1.4;
	color: #111;
}

.pfb-stacked-control textarea {
	min-height: 6rem;
	resize: vertical;
}

.pfb-stacked-control input:focus,
.pfb-stacked-control textarea:focus,
.pfb-stacked-control select:focus {
	outline: 2px solid #2271b1;
	outline-offset: 1px;
	border-color: #2271b1;
}

.pfb-stacked-control .pfb-choice-group {
	height: auto;
	min-height: 0;
	padding: 0.65rem 0.75rem;
	gap: 0.45rem;
	background: #fff;
	border-color: #c4c4c4;
}

.pfb-stacked-control .pfb-choice-option {
	font-size: 1rem;
	line-height: 1.4;
	gap: 0.5rem;
}

.pfb-stacked-control .pfb-signature-pad {
	height: 9rem;
	min-height: 9rem;
	background: #fff;
	border-color: #a0a0a0;
}

.pfb-stacked-check {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 0.65rem;
	cursor: pointer;
	margin: 0;
}

.pfb-stacked-check .pfb-checkbox-input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.pfb-stacked-check .pfb-checkbox-box {
	flex: 0 0 auto;
	width: 1.25rem;
	height: 1.25rem;
	margin-top: 0.1rem;
	border: 2px solid #555;
	border-radius: 3px;
	background: #fff;
	box-sizing: border-box;
}

.pfb-stacked-check .pfb-checkbox-input:checked + .pfb-checkbox-box {
	background: #2271b1;
	border-color: #2271b1;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.2' d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 0.85rem;
}

.pfb-stacked-check .pfb-checkbox-input:checked + .pfb-checkbox-box::after {
	content: none;
}

.pfb-stacked-check .pfb-checkbox-input:focus-visible + .pfb-checkbox-box {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

.pfb-form--stacked .pfb-form-actions {
	max-width: 40rem;
	margin-left: auto;
	margin-right: auto;
}

.pfb-viewer {
	max-width: 100%;
	box-sizing: border-box;
	/* Kein overflow hier — sonst klebt .pfb-viewer-toolbar nicht am Seiten-Scroll. */
}

.pfb-viewer-toolbar {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 0.65rem 1rem;
	margin: 0 0 0.5rem;
	/*
	 * Sticky am Viewport-Scroll, unter sticky #site-header (Theme z-index 9500).
	 * Offset via --pfb-sticky-offset (Header-Höhe); Aa-Toolbar bleibt darüber (9999).
	 */
	position: sticky;
	top: calc(var(--pfb-sticky-offset, 4.75rem) + env(safe-area-inset-top, 0px));
	z-index: 9600;
	padding: 0.4rem 0.55rem;
	background: #fff;
	border: 1px solid #e2d6c8;
	border-radius: 4px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
	box-sizing: border-box;
}

/* WP Admin-Leiste: Header sitzt bereits bei top:32/46px — Offset addieren. */
body.admin-bar .pfb-viewer-toolbar {
	top: calc(var(--pfb-sticky-offset, 4.75rem) + 32px + env(safe-area-inset-top, 0px));
}

@media screen and (max-width: 782px) {
	body.admin-bar .pfb-viewer-toolbar {
		top: calc(var(--pfb-sticky-offset, 4.75rem) + 46px + env(safe-area-inset-top, 0px));
	}
}

.pfb-zoom {
	display: flex;
	align-items: center;
	gap: 6px;
}

.pfb-zoom-level {
	min-width: 3.5rem;
	padding: 0.35rem 0.5rem;
	border: 1px solid #c3c4c7;
	border-radius: 3px;
	background: #fff;
	font: inherit;
	font-size: 0.85rem;
	font-variant-numeric: tabular-nums;
	line-height: 1.2;
	color: #1d2327;
	cursor: pointer;
}

.pfb-zoom-level:hover {
	border-color: #2271b1;
	color: #2271b1;
}

.pfb-viewer-stage {
	position: relative;
	width: 100%;
	max-width: 100%;
	border: 1px solid #ddd;
	background: #f5f5f5;
	overflow: hidden;
	display: flex;
	justify-content: center;
	box-sizing: border-box;
}

/* Zoom > 100 %: in der Stage pan/scrollen, nicht die ganze Seite. */
.pfb-viewer-stage.is-zoomed {
	overflow: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	justify-content: flex-start;
}

.pfb-viewer-stage.is-zoomed .pfb-pdf-frame {
	max-width: none;
}

.pfb-pdf-frame {
	position: relative;
	display: inline-block;
	line-height: 0;
	max-width: 100%;
	box-sizing: border-box;
}

.pfb-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 12px;
}

.pfb-page-indicator {
	min-width: 3.5rem;
	text-align: center;
	font-size: 0.9rem;
}

.pfb-pdf-canvas {
	display: block;
}

.pfb-fields-layer {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.pfb-overlay-field {
	position: absolute;
	box-sizing: border-box;
	pointer-events: auto;
	display: flex;
	align-items: stretch;
}

.pfb-overlay-field input:not([type="checkbox"]):not([type="radio"]),
.pfb-overlay-field textarea,
.pfb-overlay-field select {
	width: 100%;
	height: 100%;
	margin: 0;
	border: 1px solid rgba(34, 113, 177, 0.45);
	background: rgba(255, 255, 255, 0.88);
	box-sizing: border-box;
	padding: 0 4px;
	font: inherit;
	font-size: clamp(10px, 1.4vw, 14px);
	line-height: 1.2;
	resize: none;
	border-radius: 2px;
}

.pfb-overlay-field input:not([type="checkbox"]):not([type="radio"]):focus,
.pfb-overlay-field textarea:focus,
.pfb-overlay-field select:focus {
	outline: 2px solid #2271b1;
	background: rgba(255, 255, 255, 0.96);
}

.pfb-overlay-field--radio,
.pfb-overlay-field--checklist {
	align-items: stretch;
}

.pfb-choice-group {
	margin: 0;
	padding: 4px 6px;
	border: 1px solid rgba(34, 113, 177, 0.45);
	border-radius: 2px;
	background: rgba(255, 255, 255, 0.92);
	width: 100%;
	height: 100%;
	box-sizing: border-box;
	overflow: auto;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.pfb-choice-option {
	display: flex;
	align-items: flex-start;
	gap: 6px;
	margin: 0;
	font-size: clamp(10px, 1.3vw, 13px);
	line-height: 1.25;
	cursor: pointer;
	color: #111;
}

.pfb-choice-input {
	margin: 2px 0 0;
	flex: 0 0 auto;
}

.pfb-choice-label {
	flex: 1 1 auto;
}

.pfb-overlay-field--checkbox {
	align-items: center;
	justify-content: center;
}

.pfb-overlay-field--signature {
	align-items: stretch;
	z-index: 2;
}

.pfb-signature-pad {
	position: relative;
	width: 100%;
	height: 100%;
	min-height: 0;
	background: rgba(255, 255, 255, 0.92);
	border: 1px dashed rgba(34, 113, 177, 0.55);
	border-radius: 2px;
	box-sizing: border-box;
	overflow: hidden;
}

.pfb-signature-canvas {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	touch-action: none;
	cursor: crosshair;
	background: transparent;
}

.pfb-signature-clear {
	position: absolute;
	right: 2px;
	bottom: 2px;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	margin: 0;
	padding: 0;
	border: 1px solid rgba(0, 0, 0, 0.25);
	border-radius: 2px;
	background: rgba(255, 255, 255, 0.95);
	color: #444;
	cursor: pointer;
	line-height: 0;
}

.pfb-signature-clear:hover,
.pfb-signature-clear:focus-visible {
	color: #b32d2e;
	border-color: rgba(179, 45, 46, 0.45);
	outline: none;
}

.pfb-signature-clear-icon {
	width: 14px;
	height: 14px;
	display: block;
}

.pfb-signature-image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	background: rgba(255, 255, 255, 0.9);
}

.pfb-checkbox-control {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	margin: 0;
	cursor: pointer;
	position: relative;
}

.pfb-checkbox-input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
	padding: 0;
	pointer-events: none;
}

.pfb-checkbox-box {
	display: block;
	width: 100%;
	height: 100%;
	border: 1px solid #333;
	background: rgba(255, 255, 255, 0.95);
	box-sizing: border-box;
	position: relative;
}

.pfb-checkbox-input:checked + .pfb-checkbox-box::after {
	content: '✕';
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 90%;
	font-weight: 700;
	line-height: 1;
	color: #111;
}

.pfb-checkbox-input:focus-visible + .pfb-checkbox-box {
	outline: 2px solid #2271b1;
	outline-offset: 1px;
}

.pfb-checkbox-mark {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	font-size: clamp(11px, 1.6vw, 16px);
	font-weight: 700;
	color: #111;
	line-height: 1;
}

.pfb-overlay-field.is-hidden {
	display: none;
}

.pfb-no-fields {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 1rem;
	text-align: center;
	color: #646970;
	background: rgba(255, 255, 255, 0.9);
}

.pfb-page-btn {
	padding: 0.35rem 0.75rem;
	cursor: pointer;
}

.pfb-page-btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.pfb-form-actions {
	display: grid;
	gap: 0.75rem;
	margin-top: 1rem;
}

.pfb-privacy,
.pfb-privacy-control {
	display: flex;
	gap: 0.65rem;
	align-items: flex-start;
	cursor: pointer;
	line-height: 1.4;
}

.pfb-form .pfb-privacy-checkbox {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
	padding: 0;
	pointer-events: none;
}

.pfb-privacy-box {
	display: block;
	flex: 0 0 20px;
	width: 20px;
	height: 20px;
	min-width: 20px;
	min-height: 20px;
	margin-top: 0.15rem;
	border: 2px solid #8b5a2b;
	background: #fff;
	box-sizing: border-box;
	position: relative;
}

.pfb-privacy-checkbox:checked + .pfb-privacy-box::after {
	content: '✓';
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	color: #8b5a2b;
}

.pfb-privacy-checkbox:focus-visible + .pfb-privacy-box {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

.pfb-privacy-text {
	display: block;
	flex: 1 1 auto;
}

.pfb-honeypot {
	position: absolute !important;
	left: -10000px !important;
	top: auto !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

.pfb-submit-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

/*
 * Footer-Credit = PROD Terminplaner effective (.terminplaner-footer-copyright + inline).
 * !important + höhere Spezifität: Theme-Regel
 * body.page-inner .content-area.entry-content a { color: var(--sb-blue) }
 * überschreibt sonst den Link (blau statt #a5a5a5) – Timeline setzt dasselbe per Inline-!important.
 */
.pfb-footer-credit,
body.page-inner .content-area.entry-content .pfb-footer-credit {
	max-width: 900px;
	margin: 2em auto 1em;
	padding: 0 1em;
	text-align: center;
	font-size: 0.6em !important;
	font-weight: 400;
	line-height: normal;
	color: #a5a5a5 !important;
}

.pfb-footer-credit a,
body.page-inner .content-area.entry-content .pfb-footer-credit a {
	color: #a5a5a5 !important;
	font-weight: 600;
	text-decoration: none !important;
}

.pfb-footer-credit a:hover,
.pfb-footer-credit a:focus-visible,
body.page-inner .content-area.entry-content .pfb-footer-credit a:hover,
body.page-inner .content-area.entry-content .pfb-footer-credit a:focus-visible {
	color: #a5a5a5 !important;
	text-decoration: none !important;
}

.pfb-form .pfb-action-draft {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: auto;
	max-width: max-content;
	min-height: 2rem;
	margin: 0;
	padding: 0.35rem 0.75rem;
	border: 1px solid #8b5a2b;
	border-radius: 4px;
	background: #fff;
	color: #8b5a2b !important;
	font: inherit;
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1.3;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	box-shadow: none;
}

.pfb-form .pfb-action-draft:hover,
.pfb-form .pfb-action-draft:focus-visible {
	background: #f7f1ea;
	border-color: #8b5a2b;
	color: #6e4722 !important;
}

.pfb-form .pfb-draft-hint {
	margin: 0.35rem 0 0.75rem;
	font-size: 0.8rem;
	line-height: 1.35;
	color: #666;
}

.pfb-form button.pfb-submit,
.pfb-form .pfb-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0.75rem 1.25rem;
	border: 2px solid #8b5a2b;
	border-radius: 4px;
	background: #a66d35;
	color: #fff !important;
	font: inherit;
	font-size: 1rem;
	line-height: 1.35;
	text-align: center;
	text-decoration: none;
	white-space: normal;
	overflow: visible;
	text-overflow: unset;
	hyphens: auto;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	box-shadow: none;
}

.pfb-form button.pfb-submit:hover,
.pfb-form button.pfb-submit:focus-visible,
.pfb-form .pfb-submit:hover,
.pfb-form .pfb-submit:focus-visible {
	background: #8b5a2b;
	border-color: #8b5a2b;
	color: #fff !important;
}

.pfb-form button.pfb-submit.pfb-submit-secondary,
.pfb-form .pfb-submit.pfb-submit-secondary {
	background: #fff;
	color: #8b5a2b !important;
}

.pfb-form button.pfb-submit.pfb-submit-secondary:hover,
.pfb-form button.pfb-submit.pfb-submit-secondary:focus-visible,
.pfb-form .pfb-submit.pfb-submit-secondary:hover,
.pfb-form .pfb-submit.pfb-submit-secondary:focus-visible {
	background: #f7f1ea;
	border-color: #8b5a2b;
	color: #6e4722 !important;
}

.pfb-form button.pfb-submit:disabled,
.pfb-form .pfb-submit:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.pfb-form-intro {
	margin: 0 0 1.25rem;
	padding: 1rem 1.15rem;
	border: 1px solid #e2d6c8;
	border-radius: 6px;
	background: #faf7f3;
	color: #333;
	max-width: 100%;
	box-sizing: border-box;
}

.pfb-form-intro__lead {
	margin: 0 0 0.5rem;
	font-weight: 600;
	font-size: 1rem;
	line-height: 1.4;
}

.pfb-form-intro__steps {
	margin: 0 0 0.65rem;
	padding-left: 1.25rem;
	font-size: 0.95rem;
	line-height: 1.45;
}

.pfb-form-intro__steps li + li {
	margin-top: 0.35rem;
}

.pfb-form-intro__note--emphasis {
	font-weight: 600;
	margin-top: 0.75rem;
}

.pfb-form-intro__note {
	margin: 0;
	font-size: 0.875rem;
	line-height: 1.4;
	color: #555;
}

.pfb-form .pfb-review-edit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2rem;
	padding: 0.35rem 0.75rem;
	border: 1px solid #8b5a2b;
	border-radius: 4px;
	background: #fff;
	color: #8b5a2b !important;
	font: inherit;
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1.3;
	cursor: pointer;
	box-shadow: none;
}

.pfb-form-errors {
	margin: 0 0 1rem;
	padding: 0.75rem 1rem;
	border: 1px solid #b32d2e;
	background: #fcf0f1;
	color: #8a2424;
	border-radius: 4px;
}

.pfb-form-errors ul {
	margin: 0.35rem 0 0;
	padding-left: 1.2rem;
}

.pfb-field-error {
	margin: 0.35rem 0 0;
	color: #b32d2e;
	font-size: 0.9rem;
}

.pfb-field-help {
	margin: 0.35rem 0 0;
	color: #555;
	font-size: 0.9rem;
}

.pfb-field--hidden,
.pfb-stacked-field.pfb-field--hidden {
	display: none !important;
}

.pfb-stacked-field.has-error input,
.pfb-stacked-field.has-error textarea,
.pfb-stacked-field.has-error select {
	border-color: #b32d2e;
}

.pfb-progress {
	margin: 0 0 1rem;
	font-weight: 600;
}

.pfb-wizard-nav {
	display: flex;
	gap: 0.75rem;
	margin: 1rem 0;
}

.pfb-wizard-nav .pfb-page-btn {
	min-height: 44px;
	min-width: 7rem;
	padding: 0.6rem 1rem;
	cursor: pointer;
}

.pfb-review-step {
	margin: 1rem 0 1.5rem;
	padding: 1rem;
	border: 1px solid #cfcfcf;
	border-radius: 4px;
	background: #fafafa;
}

.pfb-review-row {
	margin: 0.35rem 0;
}

.pfb-section {
	margin: 1.25rem 0 0.75rem;
}

.pfb-section-title {
	margin: 0 0 0.35rem;
	font-size: 1.15rem;
}

.pfb-section-desc {
	margin: 0;
	color: #555;
}

.pfb-pagebreak {
	display: none;
}

.pfb-confirm-label {
	display: block;
	margin-top: 0.5rem;
	font-weight: 600;
}

.pfb-signature-disclaimer,
.pfb-draft-hint {
	font-size: 0.9rem;
	color: #555;
}

.pfb-stacked-control .pfb-signature-pad,
.pfb-stacked-field--signature .pfb-signature-pad {
	min-height: 9rem;
}

.pfb-form-message.is-success {
	color: #1e7a34;
}

.pfb-form-message.is-error {
	color: #b32d2e;
}

.pfb-captcha {
	margin: 1rem 0;
}

.pfb-captcha.has-error {
	padding: 0.75rem;
	border-left: 4px solid #b32d2e;
	background: #fcf0f1;
}

.pfb-captcha-error {
	margin: 0.5rem 0 0;
	color: #b32d2e;
	font-weight: 600;
}

.pfb-privacy-details {
	margin: 0.75rem 0 1rem;
	padding: 0.75rem 1rem;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	background: #f6f7f7;
}

.pfb-privacy-details summary {
	cursor: pointer;
	font-weight: 600;
}

.pfb-privacy-details p {
	margin: 0.6rem 0 0;
}

.pfb-error {
	color: #b32d2e;
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

/* Datumsfelder im Overlay: gleiche Lesbarkeit wie Textfelder */
.pfb-overlay-field input[type="date"],
.pfb-overlay-field input[type="text"][placeholder="tt.mm.jjjj"] {
	font-size: clamp(14px, 2.1vw, 18px);
	line-height: 1.15;
	padding: 0 4px;
	min-width: 0;
}

/* —— Mobile / schmale Viewports —— */
@media (max-width: 782px) {
	.pfb-form,
	.entry-content > .pfb-form,
	.content-area > .pfb-form,
	.entry-content > .pfb-form.alignwide,
	.content-area > .pfb-form.alignwide {
		max-width: 100% !important;
		width: 100% !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
		padding-left: 0;
		padding-right: 0;
		box-sizing: border-box;
	}

	.pfb-form-intro {
		padding: 0.85rem 0.9rem;
		margin-bottom: 1rem;
		font-size: 0.95rem;
	}

	.pfb-form-intro__lead {
		font-size: 0.95rem;
	}

	.pfb-form-intro__steps {
		padding-left: 1.1rem;
		font-size: 0.9rem;
	}

	.pfb-viewer {
		display: flex;
		flex-direction: column;
		width: 100%;
		max-width: 100%;
	}

	.pfb-viewer-toolbar {
		order: 1;
		margin: 0 0 0.5rem;
		padding: 0.45rem 0.5rem;
		gap: 0.5rem 0.75rem;
		/* sticky/Hintergrund kommen aus den Basis-Styles (auch ≤480px). */
	}

	.pfb-zoom-level {
		min-width: 3.75rem;
		min-height: 44px;
		font-size: 0.95rem;
		font-weight: 600;
		touch-action: manipulation;
	}

	.pfb-viewer-stage {
		width: 100%;
		max-width: 100%;
		/* Ohne Zoom: kein overflow-x:auto — iOS „Schwimmen“ bei 1–2px Overflow. */
		overflow-x: hidden;
		overflow-y: hidden;
		justify-content: flex-start;
		border-radius: 0;
		order: 2;
		box-sizing: border-box;
	}

	.pfb-viewer-stage.is-zoomed {
		overflow: auto;
		max-height: min(75vh, 720px);
	}

	.pfb-pdf-frame {
		max-width: 100%;
		/* Frame-Breite setzt JS passend zur Stage; kein erzwungenes Stretching. */
	}

	.pfb-viewer-stage.is-zoomed .pfb-pdf-frame {
		max-width: none;
	}

	.pfb-pagination,
	.pfb-form-actions,
	.pfb-privacy,
	.pfb-captcha {
		max-width: 100%;
		box-sizing: border-box;
	}

	.pfb-pagination {
		gap: 10px;
		margin: 0;
		padding: 0;
		background: transparent;
		border: 0;
		border-radius: 0;
		box-shadow: none;
		position: static;
	}

	.pfb-page-btn {
		min-width: 44px;
		min-height: 44px;
		padding: 0.5rem 0.85rem;
		font-size: 1rem;
		touch-action: manipulation;
	}

	.pfb-page-indicator {
		min-width: 4.5rem;
		font-size: 0.95rem;
		font-weight: 600;
	}

	/* Overlay-Felder: etwas lesbarer und besser tippbar auf schmalen PDFs */
	.pfb-overlay-field input:not([type="checkbox"]):not([type="radio"]),
	.pfb-overlay-field textarea,
	.pfb-overlay-field select {
		font-size: clamp(11px, 3.1vw, 15px);
		padding: 0 3px;
	}

	.pfb-overlay-field input[type="date"],
	.pfb-overlay-field input[type="text"][placeholder="tt.mm.jjjj"] {
		font-size: clamp(12px, 3.2vw, 16px);
	}

	.pfb-choice-option {
		font-size: clamp(11px, 3vw, 14px);
		gap: 5px;
	}

	.pfb-choice-input {
		width: 1rem;
		height: 1rem;
		min-width: 1rem;
		min-height: 1rem;
	}

	.pfb-signature-clear {
		width: 28px;
		height: 28px;
	}

	.pfb-signature-clear-icon {
		width: 16px;
		height: 16px;
	}

	/*
	 * Aktionsbuttons: sticky/fixed unten für lange Mehrseiten-PDFs,
	 * aber mit Seiten-Insets, damit Theme-Floats (Aa / Angebote)
	 * die Buttons nicht überdecken. Labels dürfen umbrechen.
	 */
	.pfb-form-interactive {
		padding-bottom: calc(9.5rem + env(safe-area-inset-bottom, 0px));
	}

	.pfb-form-actions {
		margin-top: 0.75rem;
		padding: 0.5rem 0.15rem 0;
	}

	.pfb-submit-actions {
		position: fixed;
		/* ~72–88px Freiraum für typische Theme-Floats links/rechts */
		left: max(4.5rem, calc(env(safe-area-inset-left, 0px) + 0.5rem));
		right: max(5.25rem, calc(env(safe-area-inset-right, 0px) + 0.5rem));
		bottom: max(0.5rem, env(safe-area-inset-bottom, 0px));
		z-index: 40;
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 0.45rem;
		margin: 0;
		padding: 0.55rem 0.55rem;
		width: auto;
		background: rgba(255, 255, 255, 0.97);
		border: 1px solid #e2d6c8;
		border-radius: 8px;
		box-shadow: 0 4px 18px rgba(0, 0, 0, 0.14);
		box-sizing: border-box;
	}

	.pfb-form button.pfb-submit,
	.pfb-form .pfb-submit {
		width: 100%;
		max-width: 100%;
		min-height: 48px;
		padding: 0.7rem 0.65rem;
		font-size: 0.95rem;
		line-height: 1.25;
		white-space: normal;
		overflow: visible;
		text-overflow: unset;
		touch-action: manipulation;
	}

	.pfb-form .pfb-action-draft {
		min-height: 44px;
		width: 100%;
		max-width: 100%;
		justify-content: center;
		touch-action: manipulation;
	}

	.pfb-privacy,
	.pfb-privacy-control {
		gap: 0.75rem;
		font-size: 0.95rem;
	}

	.pfb-privacy-box {
		flex: 0 0 24px;
		width: 24px;
		height: 24px;
		min-width: 24px;
		min-height: 24px;
	}

	.pfb-wizard-nav {
		flex-wrap: wrap;
	}

	.pfb-wizard-nav .pfb-page-btn {
		flex: 1 1 auto;
		min-width: calc(50% - 0.4rem);
	}

	.pfb-stacked-form {
		padding-left: 0.15rem;
		padding-right: 0.15rem;
	}

	/* reCAPTCHA / CAPTCHA nicht abschneiden */
	.pfb-captcha {
		overflow-x: auto;
		max-width: 100%;
	}
}

@media (max-width: 480px) {
	.pfb-form-intro__note {
		font-size: 0.8rem;
	}

	/*
	 * Sehr schmale Viewports (iPhone): Sticky-Leiste oft mehr Schaden
	 * als Nutzen wegen Theme-Floats + Safari-Chrome → Buttons im Fluss.
	 */
	.pfb-form-interactive {
		padding-bottom: 0.5rem;
	}

	.pfb-submit-actions {
		position: static;
		left: auto;
		right: auto;
		bottom: auto;
		z-index: auto;
		max-width: none;
		width: 100%;
		margin: 0;
		padding: 0.35rem 0.35rem 0.15rem;
		border: none;
		border-radius: 0;
		box-shadow: none;
		background: transparent;
	}

	.pfb-form button.pfb-submit,
	.pfb-form .pfb-submit {
		font-size: 0.9375rem;
		padding: 0.75rem 0.85rem;
	}
}
