/* Wiki de Block Horde: se apoya en los colores y piezas de site.css. Móvil primero. */

.wk { background: var(--night); }
.wk-ico, .wk-walk, .wk-tile, .wk-art img { image-rendering: pixelated; image-rendering: crisp-edges; }
.wk-ico { display: inline-block; flex: none; background-repeat: no-repeat; vertical-align: middle; object-fit: contain; }
.wk-walk { display: inline-block; background-repeat: no-repeat; animation: walk .7s steps(4, jump-none) infinite; }

/* ---- barra de arriba: en la wiki los idiomas son enlaces */
.lang a {
	display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
	background: #2a1d3c; color: var(--muted); font-family: var(--head); font-size: 9px;
	padding: 9px 8px 8px; min-width: 36px; min-height: 36px;
}
.lang a[aria-pressed="true"] { background: var(--gold); color: var(--ink); }
.wk-nav a.on { color: var(--ink); background: var(--gold); }

/* ---- esqueleto */
.wk-wrap { max-width: 1180px; margin: 0 auto; padding: 76px 16px 32px; display: grid; gap: 16px; }
.wk-main { min-width: 0; }
.wk-side { min-width: 0; display: grid; gap: 12px; align-content: start; }

/* ---- buscador */
.wk-search { position: relative; margin: 0; }
.wk-search input {
	width: 100%; min-height: 46px; padding: 10px 12px; border: 0; font-family: var(--body); font-size: 18px;
	color: var(--ink); background: #f4ead8; box-shadow: 0 0 0 3px #000, 0 0 0 5px var(--gold-lo);
}
.wk-res {
	position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 8px); max-height: 60vh; overflow: auto;
	background: #1d1124; box-shadow: 0 0 0 3px #000, 0 0 0 5px var(--gold-lo), 0 10px 20px rgba(0, 0, 0, .5);
}
.wk-res a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; color: var(--text); text-decoration: none; border-bottom: 2px solid #000; }
.wk-res a:hover, .wk-res a.on { background: var(--purple); }
.wk-res a small { margin-left: auto; color: var(--muted); font-size: 14px; white-space: nowrap; }
.wk-res p { margin: 0; padding: 10px; color: var(--muted); }

/* ---- árbol de categorías (plegado en el móvil) */
.wk-tree { background: #1a0f2a; box-shadow: 0 0 0 3px #000; }
.wk-tree > summary {
	cursor: pointer; list-style: none; padding: 12px; font-family: var(--head); font-size: 10px; color: var(--gold-hi);
	background: #24153a; border-bottom: 3px solid #000;
}
.wk-tree > summary::after { content: "▼"; float: right; font-size: 8px; }
.wk-tree:not([open]) > summary::after { content: "▶"; }
.wk-tree > summary::-webkit-details-marker, .wk-tree-d > summary::-webkit-details-marker { display: none; }
.wk-tree nav { padding: 6px 0; }
.wk-tree-d > summary { list-style: none; cursor: pointer; }
.wk-tree-cat {
	display: flex; align-items: center; gap: 8px; padding: 7px 12px; color: var(--text); text-decoration: none;
	font-family: var(--head); font-size: 9px; line-height: 1.5;
}
.wk-tree-cat:hover, .wk-tree-cat.on { color: var(--gold-hi); background: #2a1940; }
.wk-tree-d[open] > summary .wk-tree-cat { color: var(--gold-hi); }
.wk-tree-items { padding: 2px 0 8px 22px; }
.wk-tree-items a {
	display: flex; align-items: center; gap: 6px; padding: 4px 8px; color: #e4d8c8; text-decoration: none; font-size: 16px; line-height: 1.25;
}
.wk-tree-items a:hover { color: var(--gold-hi); }
.wk-tree-items a[aria-current] { color: var(--ink); background: var(--gold); }
.wk-tree-items a[aria-current] .glyph { fill: var(--ink); }
.wk-tree-g { margin: 8px 8px 2px; font-family: var(--head); font-size: 7px; color: var(--muted); text-transform: uppercase; }

/* ---- migas */
.wk-crumbs { font-size: 15px; color: var(--muted); margin: 0 0 12px; }
.wk-crumbs a { color: var(--muted); }
.wk-crumbs span { color: var(--text); }

/* ---- cabecera de página */
.wk-head, .wk-hero { --bg: #241538; display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; padding: 16px; margin: 0 0 20px; }
.wk-hero { display: block; --bg: #1d1124; }
.wk-head h1, .wk-hero h1 {
	margin: 0; font-family: var(--head); font-weight: 400; font-size: 15px; line-height: 1.5; color: var(--gold-hi);
	text-shadow: 3px 3px 0 #000; overflow-wrap: anywhere;
}
.wk-hero h1 { font-size: 17px; }
.wk-head h1 .glyph { width: auto; height: 16px; }
.wk-lead { margin: 8px 0 0; color: #e4d8c8; font-size: 18px; }
.wk-ask { margin: 10px 0 0; color: var(--muted); font-size: 16px; }
.wk-kicker { margin: 0 0 6px; font-family: var(--head); font-size: 8px; color: var(--muted); text-transform: uppercase; }
.wk-kicker a { color: var(--muted); text-decoration: none; }
.wk-art { display: grid; place-items: center; min-width: 80px; min-height: 80px; }
.wk-art .wk-walk { max-width: 30vw; }
.wk-tile { display: block; width: 80px; height: 80px; background-size: 240px 80px; background-repeat: no-repeat; box-shadow: 0 0 0 3px #000; }
.wk-ico-big { width: 80px; height: 80px; }
.wk-art img { width: 80px; height: auto; }

/* ---- cuerpo */
.wk-body { font-size: 18px; }
.wk-body p { margin: 0 0 12px; }
.wk-body ul { margin: 0 0 14px; padding-left: 22px; }
.wk-body li { margin: 4px 0; }
.wk-body h3 { font-family: var(--head); font-weight: 400; font-size: 10px; line-height: 1.6; color: var(--gold); margin: 22px 0 10px; }
.wk-body small, .wk-main > p small { color: var(--muted); font-size: 15px; }
.wk-sec { margin: 22px 0; }
.wk-sec h2, .wk-main > h2 {
	font-family: var(--head); font-weight: 400; font-size: 11px; line-height: 1.6; color: var(--gold-hi);
	margin: 0 0 10px; padding: 0 0 6px; border-bottom: 3px solid var(--purple);
}
.wk-main > h2 { margin-top: 26px; }

/* tablas */
.wk-stats { width: 100%; border-collapse: collapse; background: #1a0f2a; box-shadow: 0 0 0 3px #000; }
.wk-stats th, .wk-stats td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 2px solid #0d0716; }
.wk-stats th { width: 38%; font-weight: 400; color: var(--muted); font-size: 16px; }
.wk-scroll { overflow-x: auto; box-shadow: 0 0 0 3px #000; background: #1a0f2a; }
.wk-grid { width: 100%; border-collapse: collapse; }
.wk-grid th { font-family: var(--head); font-weight: 400; font-size: 8px; line-height: 1.5; color: var(--gold); text-align: left; padding: 10px; background: #24153a; white-space: nowrap; }
.wk-grid td { padding: 7px 10px; border-top: 2px solid #0d0716; white-space: nowrap; }
.wk-grid tr:nth-child(even) td { background: rgba(255, 255, 255, .03); }

/* enlaces a otras páginas, con su icono */
a.wl { display: inline-flex; align-items: center; gap: 5px; vertical-align: middle; color: var(--gold-hi); text-decoration: none; border-bottom: 2px solid rgba(240, 180, 60, .35); line-height: 1.2; }
a.wl:hover { border-bottom-color: var(--gold-hi); }
.wk-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.wk-chips a.wl { padding: 6px 10px 6px 6px; background: #241538; border: 0; box-shadow: 0 0 0 3px #000; }
.wk-chips a.wl:hover { background: var(--purple); }

/* evolución */
.wk-evo { display: grid; grid-template-columns: 48px 1fr; gap: 12px; padding: 12px; background: #2a1a10; box-shadow: 0 0 0 3px #000, inset 0 0 0 2px var(--gold-lo); }
.wk-evo p { margin: 0 0 6px; }
.wk-evo-n { font-family: var(--head); font-size: 10px; line-height: 1.6; color: var(--gold-hi); }
.wk-evo-r { color: var(--muted); font-size: 16px; }

/* ---- tarjetas de categoría */
.wk-cards { display: grid; gap: 12px; }
.wk-card { --bg: #241538; display: flex; gap: 12px; align-items: center; padding: 12px; text-decoration: none; color: var(--text); }
.wk-card:hover { --bg: #2f1c48; }
.wk-card span { display: grid; gap: 4px; min-width: 0; }
.wk-card b { font-family: var(--head); font-weight: 400; font-size: 9px; line-height: 1.6; }
.wk-card small { color: #d8cbe6; font-size: 15px; line-height: 1.3; }
.wk-tiles { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.wk-tile-c { --bg: #241538; display: grid; justify-items: center; text-align: center; gap: 8px; padding: 16px 10px; text-decoration: none; color: var(--text); }
.wk-tile-c:hover { --bg: #2f1c48; }
.wk-tile-c b { font-family: var(--head); font-weight: 400; font-size: 9px; line-height: 1.6; color: var(--gold-hi); }
.wk-tile-c small { font-size: 14px; line-height: 1.3; color: #d8cbe6; }
.wk-tile-c i { font-style: normal; font-family: var(--head); font-size: 7px; color: var(--muted); }

/* novedades */
.wk-note { --bg: #1d1124; padding: 14px 16px; margin: 0 0 18px; }
.wk-note header { font-family: var(--head); font-size: 11px; color: var(--gold-hi); margin: 0 0 6px; }
.wk-note header span { font-size: 8px; color: var(--muted); margin-left: 8px; }
.wk-note h3 { font-family: var(--head); font-weight: 400; font-size: 9px; line-height: 1.6; color: var(--gold); margin: 14px 0 6px; }
.wk-note ul { margin: 0; padding-left: 20px; }

.wk-foot-note { margin: 28px 0 0; font-size: 14px; color: var(--muted); }

/* ---- chat: los nombres que dice Aldo enlazan a la wiki */
.msg a.wl { color: var(--gold-hi); }
.msg a.wl .wk-ico { width: 18px; height: 18px; }

@media (min-width: 600px) {
	.wk-cards { grid-template-columns: 1fr 1fr; }
	.wk-tiles { grid-template-columns: repeat(3, 1fr); }
	.wk-head h1 { font-size: 18px; }
}
@media (min-width: 960px) {
	.wk-wrap { grid-template-columns: 290px 1fr; gap: 28px; padding-top: 84px; }
	.wk-side { position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow: auto; padding: 4px; }
	.wk-tree > summary { pointer-events: none; }
	.wk-tree > summary::after { content: none; }
	.wk-tiles { grid-template-columns: repeat(4, 1fr); }
	.wk-cards { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
	.wk-walk { animation: none; }
}
