/*!
 * Accesibilidad Inclusiva — estilos públicos
 * Todo lo que pertenece al widget vive dentro de #ainc-root, que el script
 * mueve fuera de <body> para que los filtros de color no lo afecten.
 */

/* ==========================================================================
   1. Base del widget
   ========================================================================== */

#ainc-root,
#ainc-root * {
	box-sizing: border-box;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	letter-spacing: normal;
	word-spacing: normal;
	line-height: 1.4;
	text-align: left;
	filter: none;
	animation: none;
}

/*
 * Los valores configurables viven en :root, NO en #ainc-root.
 * El plugin los reescribe con un <style> en línea que se añade después de esta
 * hoja; si estuvieran declarados en #ainc-root, ese selector (con ID) ganaría
 * por especificidad y los colores elegidos en los ajustes nunca se aplicarían
 * dentro del widget.
 */
:root {
	--ainc-primary: #920036;
	--ainc-on-primary: #ffffff;
	--ainc-accent: #d09959;
	--ainc-btn-size: 56px;
	--ainc-offset-x: 20px;
	--ainc-offset-y: 20px;
}

#ainc-root {
	--ainc-surface: #ffffff;
	--ainc-surface-2: #f6f2f3;
	--ainc-ink: #1b1114;
	--ainc-ink-soft: #5c4a4f;
	--ainc-line: #e0d4d7;
	--ainc-radius: 16px;
	--ainc-shadow: 0 14px 40px rgba(40, 5, 18, .26), 0 2px 8px rgba(40, 5, 18, .14);
	/* Márgenes seguros de los teléfonos con muesca o barra de gestos. */
	--ainc-safe-b: env(safe-area-inset-bottom, 0px);
	--ainc-safe-t: env(safe-area-inset-top, 0px);
	--ainc-safe-l: env(safe-area-inset-left, 0px);
	--ainc-safe-r: env(safe-area-inset-right, 0px);
	position: static;
	font-size: 16px;
	color: var(--ainc-ink);
	direction: ltr;
}

.ainc-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* ==========================================================================
   2. Enlace «saltar al contenido»
   ========================================================================== */

.ainc-skip-link {
	position: fixed;
	top: -80px;
	left: 12px;
	z-index: 2147483647;
	padding: 12px 20px;
	background: var(--ainc-primary, #920036);
	color: #fff !important;
	font: 600 16px/1.2 system-ui, sans-serif;
	text-decoration: underline;
	border-radius: 0 0 10px 10px;
	transition: top .18s ease;
}

.ainc-skip-link:focus {
	top: 0;
	outline: 3px solid #ffd400;
	outline-offset: 2px;
}

/* ==========================================================================
   3. Botón flotante
   ========================================================================== */

.ainc-launcher {
	position: fixed;
	z-index: 2147483000;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-width: var(--ainc-btn-size);
	min-height: var(--ainc-btn-size);
	padding: 0;
	margin: 0;
	background: var(--ainc-primary);
	color: var(--ainc-on-primary);
	/* Aro blanco interior y filete dorado exterior: separa el botón de
	   cualquier fondo y lo liga a los colores del escudo. */
	border: 3px solid rgba(255, 255, 255, .92);
	border-radius: 50%;
	box-shadow: 0 0 0 2px var(--ainc-accent), var(--ainc-shadow);
	cursor: pointer;
	transition: transform .16s ease, box-shadow .16s ease;
}

.ainc-launcher--with-text {
	border-radius: 999px;
	padding: 0 20px 0 14px;
}

/*
 * Con el escudo del Ayuntamiento el botón se pinta en blanco con un aro
 * guinda: el logo lleva tonos vino oscuro que se perderían sobre un fondo
 * del mismo color.
 */
.ainc-launcher--logo {
	background: #fff;
	border: 3px solid var(--ainc-primary);
	box-shadow: 0 0 0 2px rgba(255, 255, 255, .9), var(--ainc-shadow);
}

.ainc-launcher-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.ainc-launcher-icon svg {
	width: 64%;
	min-width: 28px;
	height: auto;
	stroke-width: 2.1;
}

.ainc-launcher--with-text .ainc-launcher-icon svg {
	width: 26px;
	min-width: 26px;
}

.ainc-launcher-logo {
	display: block;
	width: auto;
	height: calc(var(--ainc-btn-size) * .66);
	max-width: none;
	object-fit: contain;
}

.ainc-launcher--with-text .ainc-launcher-logo {
	height: 30px;
}

.ainc-launcher--logo .ainc-launcher-text {
	color: var(--ainc-primary);
}

.ainc-launcher-text {
	font-size: 15px;
	font-weight: 600;
	white-space: nowrap;
}

.ainc-launcher:hover {
	transform: scale(1.06);
}

.ainc-launcher:focus-visible {
	outline: 4px solid #ffd400;
	outline-offset: 3px;
}

/* Posiciones */
.ainc-pos-bottom-right .ainc-launcher { right: var(--ainc-offset-x); bottom: var(--ainc-offset-y); }
.ainc-pos-bottom-left  .ainc-launcher { left: var(--ainc-offset-x);  bottom: var(--ainc-offset-y); }
.ainc-pos-top-right    .ainc-launcher { right: var(--ainc-offset-x); top: var(--ainc-offset-y); }
.ainc-pos-top-left     .ainc-launcher { left: var(--ainc-offset-x);  top: var(--ainc-offset-y); }
.ainc-pos-middle-right .ainc-launcher { right: var(--ainc-offset-x); top: 50%; transform: translateY(-50%); }
.ainc-pos-middle-left  .ainc-launcher { left: var(--ainc-offset-x);  top: 50%; transform: translateY(-50%); }
.ainc-pos-middle-right .ainc-launcher:hover,
.ainc-pos-middle-left  .ainc-launcher:hover { transform: translateY(-50%) scale(1.06); }

/* Botón que inserta el shortcode */
.ainc-inline-trigger {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	min-height: 44px;
	background: var(--ainc-primary, #920036);
	color: var(--ainc-on-primary, #fff);
	border: 0;
	border-radius: 999px;
	font: 600 15px/1.2 system-ui, sans-serif;
	cursor: pointer;
}

.ainc-inline-trigger:focus-visible {
	outline: 3px solid #ffd400;
	outline-offset: 2px;
}

/* ==========================================================================
   4. Panel
   ========================================================================== */

.ainc-panel {
	position: fixed;
	z-index: 2147483001;
	width: 370px;
	max-width: calc(100vw - 24px);
	max-height: min(80vh, 720px);
	display: flex;
	flex-direction: column;
	background: var(--ainc-surface);
	color: var(--ainc-ink);
	border: 1px solid var(--ainc-line);
	border-radius: var(--ainc-radius);
	box-shadow: var(--ainc-shadow);
	overflow: hidden;
}

.ainc-panel[hidden] {
	display: none;
}

.ainc-pos-bottom-right .ainc-panel { right: var(--ainc-offset-x); bottom: calc(var(--ainc-offset-y) + var(--ainc-btn-size) + 14px); }
.ainc-pos-bottom-left  .ainc-panel { left: var(--ainc-offset-x);  bottom: calc(var(--ainc-offset-y) + var(--ainc-btn-size) + 14px); }
.ainc-pos-top-right    .ainc-panel { right: var(--ainc-offset-x); top: calc(var(--ainc-offset-y) + var(--ainc-btn-size) + 14px); }
.ainc-pos-top-left     .ainc-panel { left: var(--ainc-offset-x);  top: calc(var(--ainc-offset-y) + var(--ainc-btn-size) + 14px); }
.ainc-pos-middle-right .ainc-panel { right: calc(var(--ainc-offset-x) + var(--ainc-btn-size) + 14px); top: 50%; transform: translateY(-50%); }
.ainc-pos-middle-left  .ainc-panel { left: calc(var(--ainc-offset-x) + var(--ainc-btn-size) + 14px);  top: 50%; transform: translateY(-50%); }

.ainc-panel-head {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 10px 12px 14px;
	background: var(--ainc-primary);
	color: var(--ainc-on-primary);
	flex: 0 0 auto;
	border-bottom: 4px solid var(--ainc-accent);
}

.ainc-panel-head h2 {
	flex: 1 1 auto;
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	color: inherit;
	line-height: 1.3;
	text-wrap: balance;
}

/* El escudo va sobre una pastilla blanca: sus tonos vino se confundirían
   con el fondo guinda de la cabecera. */
.ainc-panel-logo {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	padding: 4px;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}

.ainc-panel-logo img {
	display: block;
	width: auto;
	height: 100%;
	max-width: 100%;
	object-fit: contain;
}

/* Asa superior: solo visible en móvil, donde el panel es una hoja inferior. */
.ainc-grabber {
	display: none;
	width: 100%;
	padding: 10px 0 4px;
	background: var(--ainc-primary);
	border: 0;
	cursor: pointer;
}

.ainc-grabber span {
	display: block;
	width: 44px;
	height: 5px;
	margin: 0 auto;
	background: rgba(255, 255, 255, .55);
	border-radius: 999px;
}

.ainc-grabber:focus-visible {
	outline: 3px solid var(--ainc-accent);
	outline-offset: -4px;
}

/* Fondo oscurecido tras la hoja inferior en móvil. */
.ainc-backdrop {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	background: rgba(27, 17, 20, .5);
	-webkit-backdrop-filter: blur(2px);
	backdrop-filter: blur(2px);
	border: 0;
	display: none;
}

.ainc-backdrop[hidden] {
	display: none;
}

.ainc-close {
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 26px;
	line-height: 1;
	background: rgba(255, 255, 255, .16);
	color: inherit;
	border: 0;
	border-radius: 10px;
	cursor: pointer;
}

.ainc-close:hover {
	background: rgba(255, 255, 255, .3);
}

.ainc-close:focus-visible {
	outline: 3px solid #ffd400;
	outline-offset: 2px;
}

.ainc-panel-body {
	padding: 6px 16px 16px;
	overflow-y: auto;
	overscroll-behavior: contain;
	flex: 1 1 auto;
}

.ainc-section {
	padding-top: 14px;
}

.ainc-section + .ainc-section {
	margin-top: 4px;
	border-top: 1px solid var(--ainc-line);
}

.ainc-section h3 {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 10px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--ainc-primary);
}

.ainc-section h3::after {
	content: "";
	flex: 1 1 auto;
	height: 2px;
	background: var(--ainc-accent);
	opacity: .55;
	border-radius: 2px;
}

.ainc-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
}

/* ==========================================================================
   5. Controles del panel
   ========================================================================== */

.ainc-tool {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 78px;
	padding: 10px 6px;
	background: var(--ainc-surface-2);
	color: var(--ainc-ink);
	border: 2px solid transparent;
	border-radius: 12px;
	font-size: 12.5px;
	font-weight: 600;
	text-align: center;
	cursor: pointer;
	transition: background .14s ease, border-color .14s ease, color .14s ease;
}

.ainc-tool--wide {
	flex-direction: row;
	justify-content: flex-start;
	min-height: 52px;
	width: 100%;
	padding: 10px 14px;
	margin-bottom: 12px;
	font-size: 14px;
	text-align: left;
}

.ainc-tool:hover {
	background: #efe6e8;
	border-color: var(--ainc-accent);
}

.ainc-tool:focus-visible {
	outline: 3px solid var(--ainc-primary);
	outline-offset: 2px;
}

/*
 * Estado activo: relleno guinda con texto blanco (contraste 9.7:1) y un
 * remate dorado. El dorado se usa solo como adorno, nunca como fondo de un
 * texto, porque sobre blanco no llega al mínimo de contraste de WCAG.
 */
.ainc-tool[aria-pressed="true"] {
	background: var(--ainc-primary);
	border-color: var(--ainc-accent);
	color: var(--ainc-on-primary);
	box-shadow: inset 0 -3px 0 var(--ainc-accent);
}

.ainc-tool-icon {
	display: inline-flex;
}

.ainc-tool-label {
	display: block;
	line-height: 1.25;
}

.ainc-stepper {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 8px 10px 8px 12px;
	margin-bottom: 8px;
	background: var(--ainc-surface-2);
	border-radius: 12px;
}

.ainc-stepper-title {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 13.5px;
	font-weight: 600;
}

.ainc-stepper-controls {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	flex: 0 0 auto;
}

.ainc-step-btn {
	width: 36px;
	height: 36px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	font-weight: 700;
	line-height: 1;
	background: var(--ainc-surface);
	color: var(--ainc-ink);
	border: 1px solid var(--ainc-line);
	border-radius: 9px;
	cursor: pointer;
}

.ainc-step-btn:hover {
	background: var(--ainc-primary);
	border-color: var(--ainc-primary);
	color: var(--ainc-on-primary);
}

.ainc-step-btn:focus-visible {
	outline: 3px solid var(--ainc-primary);
	outline-offset: 2px;
}

.ainc-step-value {
	min-width: 52px;
	text-align: center;
	font-size: 13px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.ainc-tts-controls {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 12px;
}

.ainc-btn {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	min-height: 44px;
	padding: 10px 14px;
	background: var(--ainc-surface-2);
	color: var(--ainc-ink);
	border: 1px solid var(--ainc-line);
	border-radius: 10px;
	font-size: 13.5px;
	font-weight: 600;
	cursor: pointer;
}

.ainc-btn svg {
	width: 18px;
	height: 18px;
}

.ainc-tts-controls .ainc-btn {
	flex: 1 1 calc(50% - 4px);
	justify-content: center;
}

.ainc-tts-controls .ainc-btn--primary {
	flex: 1 1 100%;
}

.ainc-btn--primary {
	background: var(--ainc-primary);
	border-color: var(--ainc-primary);
	color: var(--ainc-on-primary);
	justify-content: center;
}

.ainc-btn--ghost {
	background: transparent;
	border-color: var(--ainc-line);
}

.ainc-btn:hover:not(:disabled) {
	filter: brightness(.95);
}

.ainc-btn:disabled {
	opacity: .45;
	cursor: not-allowed;
}

.ainc-btn:focus-visible {
	outline: 3px solid var(--ainc-primary);
	outline-offset: 2px;
}

.ainc-field {
	margin-bottom: 12px;
}

.ainc-field label {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 5px;
	font-size: 13px;
	font-weight: 600;
	color: var(--ainc-ink);
}

.ainc-field select {
	width: 100%;
	min-height: 42px;
	padding: 8px 10px;
	background: var(--ainc-surface);
	color: var(--ainc-ink);
	border: 1px solid var(--ainc-line);
	border-radius: 10px;
	font-size: 13.5px;
}

.ainc-field input[type="range"] {
	width: 100%;
	height: 26px;
	accent-color: var(--ainc-primary);
	cursor: pointer;
}

.ainc-field select:focus-visible,
.ainc-field input[type="range"]:focus-visible {
	outline: 3px solid var(--ainc-primary);
	outline-offset: 2px;
}

.ainc-hint {
	margin: 0;
	font-size: 12px;
	line-height: 1.45;
	color: var(--ainc-ink-soft);
}

.ainc-panel-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 12px 16px;
	background: var(--ainc-surface-2);
	border-top: 1px solid var(--ainc-line);
	flex: 0 0 auto;
}

.ainc-statement {
	font-size: 12.5px;
	color: var(--ainc-ink-soft) !important;
	text-decoration: underline;
}

/* ==========================================================================
   5b. Tablet: aprovecha el ancho con tres columnas
   ========================================================================== */

@media (min-width: 601px) and (max-width: 1024px) {
	.ainc-panel {
		width: 420px;
	}

	.ainc-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* ==========================================================================
   5c. Móvil: el panel se convierte en una hoja inferior a pantalla completa
   ========================================================================== */

@media (max-width: 600px) {
	/* El botón respeta la barra de gestos y la muesca del teléfono. */
	.ainc-pos-bottom-right .ainc-launcher,
	.ainc-pos-bottom-left .ainc-launcher,
	.ainc-pos-middle-right .ainc-launcher,
	.ainc-pos-middle-left .ainc-launcher {
		bottom: calc(var(--ainc-offset-y) + var(--ainc-safe-b));
		top: auto;
		transform: none;
	}

	.ainc-pos-middle-right .ainc-launcher:hover,
	.ainc-pos-middle-left .ainc-launcher:hover {
		transform: scale(1.06);
	}

	.ainc-pos-bottom-right .ainc-launcher,
	.ainc-pos-top-right .ainc-launcher,
	.ainc-pos-middle-right .ainc-launcher {
		right: calc(var(--ainc-offset-x) + var(--ainc-safe-r));
	}

	.ainc-pos-bottom-left .ainc-launcher,
	.ainc-pos-top-left .ainc-launcher,
	.ainc-pos-middle-left .ainc-launcher {
		left: calc(var(--ainc-offset-x) + var(--ainc-safe-l));
	}

	.ainc-pos-top-right .ainc-launcher,
	.ainc-pos-top-left .ainc-launcher {
		top: calc(var(--ainc-offset-y) + var(--ainc-safe-t));
	}

	/* Nunca más ancho que la pantalla, aunque lleve texto. */
	.ainc-launcher--with-text {
		max-width: calc(100vw - 24px);
	}

	.ainc-launcher-text {
		overflow: hidden;
		text-overflow: ellipsis;
	}

	/* Hoja inferior: ocupa todo el ancho y sube desde abajo. */
	.ainc-panel,
	.ainc-pos-bottom-right .ainc-panel,
	.ainc-pos-bottom-left .ainc-panel,
	.ainc-pos-top-right .ainc-panel,
	.ainc-pos-top-left .ainc-panel,
	.ainc-pos-middle-right .ainc-panel,
	.ainc-pos-middle-left .ainc-panel {
		left: 0;
		right: 0;
		bottom: 0;
		top: auto;
		width: 100%;
		max-width: 100%;
		max-height: 88vh;
		max-height: 88dvh;
		transform: none;
		border: 0;
		border-radius: 20px 20px 0 0;
		box-shadow: 0 -10px 40px rgba(40, 5, 18, .35);
	}

	.ainc-backdrop:not([hidden]) {
		display: block;
	}

	.ainc-grabber {
		display: block;
	}

	.ainc-panel-head {
		padding: 8px 10px 12px 16px;
	}

	.ainc-panel-body {
		padding: 4px 16px 20px;
		-webkit-overflow-scrolling: touch;
	}

	/* Zonas táctiles cómodas: por encima del mínimo de 44 px de WCAG 2.5.5. */
	.ainc-tool {
		min-height: 92px;
		font-size: 13px;
		padding: 12px 8px;
	}

	.ainc-tool--wide {
		min-height: 56px;
	}

	.ainc-close {
		width: 48px;
		height: 48px;
	}

	.ainc-step-btn {
		width: 48px;
		height: 48px;
		font-size: 24px;
	}

	.ainc-stepper {
		padding: 10px 10px 10px 14px;
	}

	.ainc-stepper-title {
		font-size: 14px;
	}

	.ainc-btn {
		min-height: 50px;
		font-size: 15px;
	}

	.ainc-field select {
		min-height: 50px;
		font-size: 16px; /* evita que iOS haga zoom al enfocar el campo */
	}

	.ainc-field input[type="range"] {
		height: 40px;
	}

	/* La barra inferior se separa de la barra de gestos del sistema. */
	.ainc-panel-foot {
		padding: 12px 16px calc(12px + var(--ainc-safe-b));
	}

	.ainc-panel-foot .ainc-btn {
		flex: 1 1 auto;
	}

	.ainc-toast {
		bottom: calc(16px + var(--ainc-safe-b));
		font-size: 15px;
	}
}

/* Teléfonos pequeños (iPhone SE y similares). */
@media (max-width: 360px) {
	.ainc-grid {
		gap: 6px;
	}

	.ainc-tool {
		min-height: 84px;
		font-size: 12px;
		padding: 10px 4px;
	}

	.ainc-panel-body {
		padding-left: 12px;
		padding-right: 12px;
	}

	.ainc-panel-logo {
		width: 36px;
		height: 36px;
	}

	.ainc-panel-head h2 {
		font-size: 15px;
	}
}

/* Móvil en horizontal: hay poca altura, así que la hoja crece y el
   contenido se reparte en más columnas. */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 480px) {
	.ainc-panel {
		max-height: 94vh;
		max-height: 94dvh;
	}

	.ainc-grid {
		grid-template-columns: repeat(3, 1fr);
	}

	.ainc-tool {
		min-height: 74px;
	}
}

/* Mientras la hoja está abierta, la página de fondo no se desplaza. */
html.ainc-scroll-lock,
html.ainc-scroll-lock body {
	overflow: hidden !important;
	overscroll-behavior: none;
}

/* ==========================================================================
   6. Guía y máscara de lectura
   ========================================================================== */

.ainc-reading-guide {
	position: fixed;
	left: 0;
	top: 0;
	width: 100%;
	height: 0;
	border-top: 3px solid #ff2d55;
	border-bottom: 3px solid #ff2d55;
	background: rgba(255, 45, 85, .12);
	pointer-events: none;
	z-index: 2147482000;
}

.ainc-reading-guide[hidden],
.ainc-reading-mask[hidden] {
	display: none;
}

.ainc-reading-mask {
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 2147482000;
}

.ainc-mask-top,
.ainc-mask-bottom {
	position: absolute;
	left: 0;
	width: 100%;
	background: rgba(0, 0, 0, .72);
}

.ainc-mask-top { top: 0; }
.ainc-mask-bottom { bottom: 0; }

/* ==========================================================================
   7. Modos de color aplicados al sitio
   ========================================================================== */

/* --- Alto contraste: negro sobre amarillo --- */
html.ainc-c-high body,
html.ainc-c-high body * {
	background-color: #000 !important;
	background-image: none !important;
	color: #ffe000 !important;
	border-color: #ffe000 !important;
	box-shadow: none !important;
	text-shadow: none !important;
}

html.ainc-c-high body a,
html.ainc-c-high body a * {
	color: #4fd2ff !important;
	text-decoration: underline !important;
}

html.ainc-c-high body button,
html.ainc-c-high body input,
html.ainc-c-high body select,
html.ainc-c-high body textarea {
	border: 2px solid #ffe000 !important;
}

html.ainc-c-high body img,
html.ainc-c-high body video,
html.ainc-c-high body iframe {
	filter: grayscale(1) contrast(1.15) !important;
	background: #000 !important;
}

html.ainc-c-high body *:focus {
	outline: 3px solid #4fd2ff !important;
	outline-offset: 2px !important;
}

/* --- Modo oscuro --- */
html.ainc-c-dark body,
html.ainc-c-dark body * {
	background-color: #12161d !important;
	background-image: none !important;
	color: #e8ecf3 !important;
	border-color: #39414f !important;
}

html.ainc-c-dark body a,
html.ainc-c-dark body a * {
	color: #79c0ff !important;
}

html.ainc-c-dark body img,
html.ainc-c-dark body video {
	filter: brightness(.88) !important;
}

/* --- Modo claro reforzado --- */
html.ainc-c-light body,
html.ainc-c-light body * {
	background-color: #fff !important;
	background-image: none !important;
	color: #000 !important;
	border-color: #000 !important;
	text-shadow: none !important;
}

html.ainc-c-light body a,
html.ainc-c-light body a * {
	color: #00348f !important;
	text-decoration: underline !important;
}

/* --- Filtros (se aplican a <body> para no tocar el widget) --- */
html.ainc-c-invert body { filter: invert(1) hue-rotate(180deg) !important; }
html.ainc-c-invert body img,
html.ainc-c-invert body video,
html.ainc-c-invert body picture { filter: invert(1) hue-rotate(180deg) !important; }

html.ainc-f-grayscale body { filter: grayscale(100%) !important; }
html.ainc-f-saturation body { filter: saturate(45%) !important; }
html.ainc-c-invert.ainc-f-grayscale body { filter: invert(1) hue-rotate(180deg) grayscale(100%) !important; }

/* ==========================================================================
   8. Ayudas de lectura aplicadas al sitio
   ========================================================================== */

html.ainc-readable-font body,
html.ainc-readable-font body *:not(i):not(em):not(.fa):not([class*="icon"]):not([class*="dashicon"]) {
	font-family: Verdana, Tahoma, "Trebuchet MS", "Segoe UI", sans-serif !important;
}

html.ainc-align-left body,
html.ainc-align-left body p,
html.ainc-align-left body li,
html.ainc-align-left body td,
html.ainc-align-left body h1,
html.ainc-align-left body h2,
html.ainc-align-left body h3,
html.ainc-align-left body h4,
html.ainc-align-left body h5,
html.ainc-align-left body h6,
html.ainc-align-left body div {
	text-align: left !important;
	hyphens: none !important;
}

html.ainc-hl-links body a {
	text-decoration: underline !important;
	text-underline-offset: 3px !important;
	text-decoration-thickness: 2px !important;
	outline: 2px dashed currentColor !important;
	outline-offset: 2px !important;
	font-weight: 700 !important;
}

html.ainc-hl-titles body h1,
html.ainc-hl-titles body h2,
html.ainc-hl-titles body h3,
html.ainc-hl-titles body h4,
html.ainc-hl-titles body h5,
html.ainc-hl-titles body h6 {
	background: #fff2a8 !important;
	color: #1a1400 !important;
	border-left: 6px solid #d99f00 !important;
	padding-left: 10px !important;
}

html.ainc-focus body *:focus,
html.ainc-focus body *:focus-visible {
	outline: 4px solid #ff2d55 !important;
	outline-offset: 3px !important;
	border-radius: 3px !important;
}

html.ainc-big-cursor body,
html.ainc-big-cursor body * {
	cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'><path d='M9 4 41 23 26 26 19 41Z' fill='white' stroke='black' stroke-width='3' stroke-linejoin='round'/></svg>") 6 4, auto !important;
}

html.ainc-big-cursor body a,
html.ainc-big-cursor body button,
html.ainc-big-cursor body [role="button"],
html.ainc-big-cursor body input[type="submit"] {
	cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'><path d='M17 4c-2 0-3 1.4-3 3v18l-4-4c-1.5-1.5-4-1.4-5.4 0-1.4 1.5-1.3 3.8 0 5.2L15 39c1.4 1.6 3 2.9 6 2.9h9c4.4 0 8-3.6 8-8V22c0-1.7-1.3-3-3-3s-3 1.3-3 3v-1c0-1.7-1.3-3-3-3s-3 1.3-3 3v-1c0-1.7-1.3-3-3-3s-3 1.3-3 3V7c0-1.6-1-3-3-3z' fill='white' stroke='black' stroke-width='2.5' stroke-linejoin='round'/></svg>") 12 4, pointer !important;
}

html.ainc-no-anim body,
html.ainc-no-anim body *,
html.ainc-no-anim body *::before,
html.ainc-no-anim body *::after {
	animation-duration: .001ms !important;
	animation-iteration-count: 1 !important;
	transition-duration: .001ms !important;
	scroll-behavior: auto !important;
}

html.ainc-hide-images body img,
html.ainc-hide-images body picture,
html.ainc-hide-images body svg:not(.ainc-keep),
html.ainc-hide-images body video {
	visibility: hidden !important;
	position: relative !important;
}

html.ainc-hide-images body [style*="background-image"] {
	background-image: none !important;
}

/* ==========================================================================
   9. Estado de lectura en voz
   ========================================================================== */

/* Se escriben los selectores uno a uno en lugar de usar :is(), que los
   navegadores anteriores a 2021 descartan junto con toda la regla. */
html.ainc-tts-click body p:hover,
html.ainc-tts-click body li:hover,
html.ainc-tts-click body h1:hover,
html.ainc-tts-click body h2:hover,
html.ainc-tts-click body h3:hover,
html.ainc-tts-click body h4:hover,
html.ainc-tts-click body h5:hover,
html.ainc-tts-click body h6:hover,
html.ainc-tts-click body blockquote:hover,
html.ainc-tts-click body td:hover,
html.ainc-tts-click body dd:hover,
html.ainc-tts-click body figcaption:hover {
	outline: 2px dashed var(--ainc-primary, #920036) !important;
	outline-offset: 3px !important;
	cursor: pointer !important;
}

.ainc-tts-highlight,
html body .ainc-tts-highlight {
	background: #ffe57a !important;
	color: #1a1400 !important;
	outline: 3px solid #e0a800 !important;
	outline-offset: 2px !important;
	border-radius: 3px !important;
	scroll-margin: 120px;
}

/* Aviso flotante para mensajes cortos */
.ainc-toast {
	position: fixed;
	left: 50%;
	bottom: 24px;
	transform: translateX(-50%);
	z-index: 2147483002;
	max-width: min(92vw, 460px);
	padding: 12px 18px;
	background: #10151f;
	color: #fff;
	border-radius: 10px;
	font: 500 14px/1.4 system-ui, sans-serif;
	text-align: center;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
}

/* Respeta la preferencia del sistema de reducir movimiento. */
@media (prefers-reduced-motion: reduce) {
	#ainc-root .ainc-launcher,
	#ainc-root .ainc-tool,
	#ainc-root .ainc-skip-link {
		transition: none !important;
	}
}

@media print {
	#ainc-root,
	.ainc-skip-link {
		display: none !important;
	}
}
