/* ------------------------------------------------------------------
 * 水墨 · Sistema visual de tinta de Guía Zhong Kui (18-11-2026). Se carga después de zk.css y zk-fondos.css.
 * Todo hecho a mano: CSS + SVG en línea (data-URI) y escenas SVG generadas por zk-fondos.js; ninguna imagen de terceros.
 * Paleta del logo (marca/logo.svg): bermellón #b3201b y papel #ece6da sobre tinta #0b0b0b; oro viejo #c9a96a en hilos.
 * Rendimiento: animaciones solo con transform/opacity (y clip-path una vez al revelar); capas fijas sin filtros en vivo.
 * Movimiento reducido: sin animaciones ni transiciones (al final). Clases y data-* documentados en README.md.
 * ------------------------------------------------------------------ */
:root {
	/* Grano de papel de arroz: ruido fractal (feTurbulence) teñido de papel, casi transparente. */
	--zk-grano: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .93 0 0 0 0 .9 0 0 0 0 .85 0 0 0 .11 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
	/* Pincelada: entra gruesa, se afila y deja un hilo seco. */
	--zk-pincel: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 14' preserveAspectRatio='none'%3E%3Cpath d='M1 8.6C16 3.6 58 2.6 118 3.8s93 2 121 3.6c-33 2.4-86 3.6-139 3.4C54 10.6 21 10.3 1 8.6z' fill='%23b3201b'/%3E%3Cpath d='M26 11.6c42-1 112-1.4 176-.4' stroke='%23b3201b' stroke-width='.9' stroke-linecap='round' opacity='.55' fill='none'/%3E%3C/svg%3E");
	/* Separador: dos trazos que se cruzan, de lado a lado, afilados en las puntas. */
	--zk-pincel-ancho: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 16' preserveAspectRatio='none'%3E%3Cpath d='M2 9C80 5 200 4 300 5.6S520 8 598 7.4C520 9.6 400 11 300 10.6S90 10.4 2 9z' fill='%23b3201b' opacity='.9'/%3E%3Cpath d='M60 12.6c120-2 300-2.4 470-1' stroke='%23c9a96a' stroke-width='.8' stroke-linecap='round' opacity='.5' fill='none'/%3E%3C/svg%3E");
	/* Borde irregular de sello de piedra. */
	--zk-sello: polygon(2% 4%, 20% 1%, 42% 3%, 61% 0, 83% 2%, 98% 1%, 100% 22%, 97% 45%, 100% 68%, 98% 97%, 76% 100%, 54% 97%, 31% 100%, 9% 98%, 1% 99%, 3% 74%, 0 51%, 2% 27%);
	--zk-laca: linear-gradient(165deg, #1c1814 0%, #120f0d 55%, #0d0b0a 100%);
	--zk-hilo: rgba(201, 169, 106, .28);
	--zk-cali: "ZK Palabra", "Noto Serif TC", "Noto Serif CJK TC", "Source Han Serif TC", "PMingLiU", "Songti TC", serif;
}

/* 1. Papel de arroz sobre tinta: grano fijo y viñeta (una capa compuesta, no se repinta al hacer scroll). */
body.zk::after {
	content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
	background: var(--zk-grano), radial-gradient(130% 100% at 50% 38%, transparent 52%, rgba(0, 0, 0, .58));
	background-size: 220px 220px, 100% 100%;
}

/* Tipografía: Noto Serif TC 900/700 en títulos; texto en Noto Serif 18px / 1.7. */
.zk h1, .zk .entry-title, .zk .zk-hero h1 { font-weight: 900; letter-spacing: .01em; }
.zk h2, .zk h3 { font-weight: 700; }
.zk .entry-content p, .zk .entry-content li { line-height: 1.7; }

/* 3. Pinceladas: subrayado de los H2 y separadores. */
.zk .entry-content h2 { padding-bottom: .55em; }
.zk .entry-content h2::after {
	width: min(240px, 70%); height: 10px; bottom: -4px; border-radius: 0; box-shadow: none;
	background: var(--zk-pincel) 0 0 / 100% 100% no-repeat;
}
.zk .entry-content h2::before { left: min(244px, calc(70% + 4px)); bottom: -5px; width: 11px; height: 11px; transform: none; box-shadow: none; clip-path: var(--zk-sello); }
.zk hr, .zk-orn, .zk-pincel {
	height: 16px; border: 0; margin: 2.6em auto; position: relative; overflow: visible;
	background: var(--zk-pincel-ancho) center / min(560px, 92%) 16px no-repeat;
}
.zk hr::after, .zk-orn::after, .zk-pincel::after {
	content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px;
	background: var(--zk-red-bg); border: 0; transform: none; box-shadow: 0 0 0 4px var(--zk-bg); clip-path: none;
}

/* 4. Sellos de bermellón (borde irregular): kickers, etiquetas y la respuesta rápida. */
.zk-kicker::before { width: .95em; height: .95em; background: var(--zk-red-bg); clip-path: var(--zk-sello); }
.zk-sello, .zk-card__tag, .zk-resp__k { clip-path: var(--zk-sello); }
.zk-sello { display: inline-block; background: var(--zk-red-bg); color: var(--zk-t0); font-family: var(--zk-head); font-weight: 700; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; padding: 4px 10px 3px; }
.zk-resp {
	position: relative; border: 1px solid var(--zk-hilo); border-left: 1px solid var(--zk-hilo);
	background: var(--zk-grano), linear-gradient(135deg, rgba(179, 32, 27, .12), rgba(20, 18, 16, .92) 55%);
	padding: 18px 58px 18px 18px;
}
.zk-resp__k { display: inline-block; background: var(--zk-red-bg); color: var(--zk-t0); padding: 4px 10px 3px; margin-bottom: 10px; }
.zk-resp::after {
	content: ""; position: absolute; top: 14px; right: 14px; width: 28px; height: 28px; clip-path: var(--zk-sello);
	background: radial-gradient(circle at 32% 30%, #c8352e, #9a1a16 70%);
	box-shadow: inset 0 0 0 3px rgba(244, 239, 230, .22);
}

/* 5. Columna de caligrafía vertical (鍾馗 / 黑神話) a un lado de la cabecera y de las secciones [data-vertical]. */
.zk-vert {
	position: absolute !important; top: 7%; right: max(10px, 3vw); z-index: 1 !important;
	writing-mode: vertical-rl; text-orientation: upright;
	font-family: var(--zk-cali); font-weight: 900; font-size: clamp(64px, 11vw, 190px); line-height: 1; letter-spacing: .1em;
	color: var(--zk-t1); opacity: .075; pointer-events: none; user-select: none; white-space: nowrap;
}
.zk-hero > .zk-vert { z-index: -1 !important; }
.zk-vert--izq, [data-vertical-lado="izq"] > .zk-vert { right: auto; left: max(10px, 3vw); }

/* 2. Escenas de tinta generadas (montañas en tres planos, nubes auspiciosas, bambú) y niebla a la deriva. */
.zk-fondo[data-tinta] { background: radial-gradient(90% 70% at 50% 25%, #1a1714, var(--zk-bg) 72%); }
.zk-escena { position: absolute !important; inset: 0; z-index: 0 !important; overflow: hidden; pointer-events: none; }
.zk-hero > .zk-escena { z-index: -2 !important; } /* encima del degradado ::before de la cabecera */
.zk-escena__capa { position: absolute; left: -4%; width: 108%; bottom: -8%; height: 74%; }
.zk-escena--nubes .zk-escena__capa { top: 0; bottom: auto; height: 100%; }
.zk-escena--bambu .zk-escena__capa { bottom: -6%; height: 112%; }
/* Luna pálida tras las montañas. */
.zk-escena--montanas::before {
	content: ""; position: absolute; top: 11%; left: 12%; width: clamp(64px, 9vw, 132px); aspect-ratio: 1; border-radius: 50%;
	background: radial-gradient(circle, rgba(236, 230, 218, .16) 0, rgba(236, 230, 218, .1) 30%, rgba(236, 230, 218, .03) 52%, transparent 70%);
}
.zk-niebla {
	position: absolute; left: -50%; width: 200%; height: 38%; bottom: 10%; opacity: .9;
	background: radial-gradient(38% 50% at 22% 50%, rgba(236, 230, 218, .075), transparent 70%),
		radial-gradient(34% 44% at 64% 58%, rgba(236, 230, 218, .055), transparent 70%),
		radial-gradient(26% 40% at 88% 40%, rgba(236, 230, 218, .05), transparent 70%);
	animation: zk-niebla 70s linear infinite alternate;
}
.zk-niebla--2 { bottom: 34%; height: 30%; opacity: .6; animation-duration: 110s; animation-direction: alternate-reverse; }
@keyframes zk-niebla { from { transform: translate3d(-12%, 0, 0); } to { transform: translate3d(12%, 0, 0); } }

/* 6. Revelado de tinta (zk-tinta.js pone .zk-sangra a lo que está fuera de la primera pantalla) y onda de tinta. */
.zk-js .zk-sangra { opacity: 0; transform: translateY(14px); clip-path: circle(0% at 50% 72%); }
.zk-js .zk-sangra.is-tinta {
	opacity: 1; transform: none; clip-path: circle(150% at 50% 72%);
	transition: opacity .7s ease, transform .9s cubic-bezier(.2, .7, .2, 1), clip-path 1s cubic-bezier(.3, .6, .2, 1);
}
.zk-js .zk-rev { clip-path: circle(0% at 50% 72%); transition: opacity .7s ease, transform .9s cubic-bezier(.2, .7, .2, 1), clip-path 1s cubic-bezier(.3, .6, .2, 1), border-color .25s, box-shadow .25s; }
.zk-js .zk-rev.is-in { clip-path: circle(150% at 50% 72%); }
.zk-btn, .zk-card, .zk-tool, .zk-card__links a { position: relative; overflow: hidden; isolation: isolate; }
.zk-onda {
	position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; transform: scale(0);
	background: radial-gradient(circle, rgba(179, 32, 27, .34) 0, rgba(179, 32, 27, .16) 38%, rgba(179, 32, 27, 0) 66%);
	animation: zk-onda .75s cubic-bezier(.2, .7, .2, 1) forwards;
}
.zk-btn--oro .zk-onda, .zk-btn--sangre .zk-onda { background: radial-gradient(circle, rgba(11, 11, 11, .4) 0, rgba(11, 11, 11, .14) 40%, transparent 66%); }
@keyframes zk-onda { to { transform: scale(1); opacity: 0; } }

/* 7. Tarjetas de laca: panel oscuro, hilo de oro, sello en la esquina y charco de tinta al pasar. */
.zk-card, .zk-tool {
	background: var(--zk-grano), var(--zk-laca);
	border: 1px solid var(--zk-hilo);
	box-shadow: inset 0 1px 0 rgba(201, 169, 106, .1), 0 10px 26px rgba(0, 0, 0, .35);
}
.zk-card:hover, .zk-card:focus-visible, a.zk-tool:hover, a.zk-tool:focus-visible { border-color: rgba(201, 169, 106, .6); box-shadow: inset 0 1px 0 rgba(201, 169, 106, .16), 0 18px 40px rgba(0, 0, 0, .6); }
.zk-card::after {
	content: ""; position: absolute; top: 10px; right: 10px; z-index: 3; width: 14px; height: 14px; pointer-events: none;
	background: var(--zk-red-bg); clip-path: var(--zk-sello); opacity: .9;
}
.zk-card::before, .zk-tool::after {
	content: ""; position: absolute; left: -20%; right: -20%; bottom: -70%; height: 130%; z-index: -1; pointer-events: none;
	background: radial-gradient(closest-side, rgba(179, 32, 27, .2), rgba(179, 32, 27, .06) 55%, transparent);
	transform: scale(.25); opacity: 0; transition: transform .7s cubic-bezier(.2, .7, .2, 1), opacity .7s;
}
.zk-card:hover::before, .zk-card:focus-visible::before, a.zk-tool:hover::after, a.zk-tool:focus-visible::after { transform: scale(1); opacity: 1; }
.zk-tool::before { background: linear-gradient(90deg, transparent, rgba(201, 169, 106, .7) 50%, transparent); }
.zk-tool__ico { border-color: var(--zk-hilo); background: rgba(179, 32, 27, .1); }

/* 8. Linterna roja que sigue al puntero en la cabecera (zk-tinta.js; solo con ratón). */
.zk-linterna {
	position: absolute !important; left: calc(50% - 360px); top: calc(50% - 360px); width: 720px; height: 720px;
	z-index: -1 !important; border-radius: 50%; pointer-events: none; will-change: transform;
	background: radial-gradient(closest-side, rgba(179, 32, 27, .24), rgba(179, 32, 27, .08) 52%, transparent 74%);
}
.zk-fondo > .zk-linterna { z-index: 1 !important; }
/* Sin JS o en móvil: un halo quieto en la cabecera. */
.zk-hero::after { background: radial-gradient(55% 50% at 30% 60%, rgba(179, 32, 27, .12), transparent 70%), var(--zk-ash); }

/* Móvil primero: escenas más bajas y caligrafía discreta. */
@media (max-width: 768px) {
	.zk-escena__capa { height: 58%; }
	.zk-vert { font-size: 60px; opacity: .06; right: 6px; top: 4%; }
	.zk-resp { padding-right: 48px; }
}

/* Movimiento reducido: nada se mueve; todo visible desde el principio. */
@media (prefers-reduced-motion: reduce) {
	.zk-niebla { animation: none; }
	.zk-escena__capa { transform: none !important; }
	.zk-js .zk-sangra, .zk-js .zk-rev { opacity: 1 !important; transform: none !important; clip-path: none !important; transition: none !important; }
	.zk-onda, .zk-linterna { display: none !important; }
	.zk-card::before, .zk-tool::after { transition: none; }
}

/* ------------------------------------------------------------------
 * Pulido en vivo (18-11-2026, «un diseño asombroso»):
 * - el trazo de pincel bajo el H2 de las secciones de portada estaba oculto por una regla heredada (solo quedaba el sello);
 * - cabecera: sol bermellón tras las montañas (a la derecha, lejos del texto), montañas más altas y niebla más visible.
 * ------------------------------------------------------------------ */
.zk-sec__h h2::after { display: block !important; }
.zk-hero .zk-escena--montanas::before {
	left: auto; right: 14%; top: 14%; width: clamp(120px, 17vw, 250px);
	background: radial-gradient(circle, rgba(179, 32, 27, .62) 0, rgba(179, 32, 27, .5) 54%, rgba(179, 32, 27, .16) 61%, rgba(179, 32, 27, .05) 68%, transparent 74%);
}
.zk-hero .zk-escena__capa { height: 86%; bottom: -6%; }
.zk-niebla {
	background: radial-gradient(38% 50% at 22% 50%, rgba(236, 230, 218, .11), transparent 70%),
		radial-gradient(34% 44% at 64% 58%, rgba(236, 230, 218, .085), transparent 70%),
		radial-gradient(26% 40% at 88% 40%, rgba(236, 230, 218, .07), transparent 70%);
}
@media (max-width: 768px) {
	.zk-hero .zk-escena--montanas::before { right: 6%; top: 8%; width: 96px; }
}/* Legibilidad del texto de la cabecera sobre la cordillera clara. */
.zk-hero__in h1, .zk-hero__in p, .zk-hero__in .zk-kicker { text-shadow: 0 2px 14px rgba(11, 11, 11, .85), 0 0 2px rgba(11, 11, 11, .6); }/* Etiquetas de fiabilidad de cada dato (oficial / prensa / tentativo / rumor), como pequeños sellos de tinta. */
.zk-et { display: inline-block; vertical-align: .1em; margin: 0 .35em 0 .1em; padding: .12em .5em .1em; font-family: var(--zk-head, serif);
	font-size: .66em; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; line-height: 1.35; border: 1px solid; white-space: nowrap; }
.zk-et--oficial { color: #ece6da; background: #8a1612; border-color: #b3201b; }
.zk-et--prensa { color: #e0d3b4; background: rgba(201, 169, 106, .1); border-color: rgba(201, 169, 106, .55); }
.zk-et--tentativo { color: #e8c98a; background: rgba(232, 201, 138, .08); border-color: rgba(232, 201, 138, .5); border-style: dashed; }
.zk-et--rumor { color: #eb655b; background: transparent; border-color: rgba(235, 101, 91, .6); border-style: dotted; }
/* ------------------------------------------------------------------
 * Patrones de Subtle Patterns (Toptal, CC BY-SA 3.0; sugerencia de Carlos, 18-11-2026), adaptados al tema de tinta con
 * herramientas/gen_patrones.py: papel negro (fondo), olas seigaiha (pie y secciones alternas) y fibras de papel (paneles).
 * ------------------------------------------------------------------ */
body.zk {
	background-color: #0b0b0b;
	background-image: linear-gradient(rgba(11, 11, 11, .55), rgba(11, 11, 11, .55)), url(../img/patrones/zk-pat-papel.png);
	background-repeat: repeat;
}
.site-footer, .zk-sec--alt {
	background-image: linear-gradient(rgba(11, 11, 11, .86), rgba(11, 11, 11, .86)), url(../img/patrones/zk-pat-olas.png);
	background-size: auto, 180px 180px;
	background-repeat: repeat;
}
.zk-tabla, .widget {
	background-image: url(../img/patrones/zk-pat-fibras.png);
	background-repeat: repeat;
	background-size: 260px 260px;
}
/* Fibras como capa extra sobre el grano y la aguada que ya tenían. */
.zk-resp { background: url(../img/patrones/zk-pat-fibras.png) 0 0 / 260px 260px repeat, var(--zk-grano), linear-gradient(135deg, rgba(179, 32, 27, .12), rgba(20, 18, 16, .92) 55%); }
.zk-card, .zk-tool { background: url(../img/patrones/zk-pat-fibras.png) 0 0 / 260px 260px repeat, var(--zk-grano), var(--zk-laca); }
.zk-ig {
	background-image: url(../img/patrones/zk-pat-fibras.png), linear-gradient(160deg, rgba(179, 32, 27, .1), #141210 45%);
	background-size: 260px 260px, auto;
}