/* cronica.css - estilos propios de este grupo de paginas (AGENTS.md). Solo ASCII. Usa las variables --k-* y los componentes de koe.css.
   El libro del diario tiene su hoja propia (www/diario.css); aqui van los iconos comunes y la cronologia. */

/* ---------- 1. Iconos de trazo (misma rejilla y grosor que .k-ico): <i class=kc-i data-i=nombre aria-hidden=true></i> ---------- */
.kc-i { display: inline-block; flex: none; width: 1.15em; height: 1.15em; vertical-align: -0.2em; font-style: normal; background-color: currentColor;
   -webkit-mask: var(--kc-i) center / contain no-repeat; mask: var(--kc-i) center / contain no-repeat; }
.kc-i[data-i=pluma] { --kc-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20l4-1L19.5 7.5a2.1 2.1 0 0 0-3-3L5 16l-1 4zM14 7l3 3'/%3E%3C/svg%3E"); }
.kc-i[data-i=nota] { --kc-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 4h14v10l-5 6H5zM19 14h-5v6M9 9h6'/%3E%3C/svg%3E"); }
.kc-i[data-i=compartir] { --kc-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 11a3.2 3.2 0 1 0 0-6.4A3.2 3.2 0 0 0 9 11zM3 20c0-3.3 2.6-5.2 6-5.2s6 1.9 6 5.2M18 8v6M15 11h6'/%3E%3C/svg%3E"); }
.kc-i[data-i=libros] { --kc-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h4v16H4zM8 6h4v14H8zM13.5 7.2l3.6-1 3.4 12.8-3.6 1z'/%3E%3C/svg%3E"); }
.kc-i[data-i=libro] { --kc-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 6.5C10 5 7 4.6 4 5v13c3-.4 6 0 8 1.5 2-1.5 5-1.9 8-1.5V5c-3-.4-6 0-8 1.5zM12 6.5v13'/%3E%3C/svg%3E"); }
.kc-i[data-i=lista] { --kc-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 4h6v3H9zM9 5.5H5.5V20h13V5.5H15M9 12h6M9 16h6'/%3E%3C/svg%3E"); }
.kc-i[data-i=nuevo] { --kc-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l1.9 5.6L19.5 10.5l-5.6 1.9L12 18l-1.9-5.6L4.5 10.5l5.6-1.9zM19 16v4M17 18h4'/%3E%3C/svg%3E"); }
.kc-i[data-i=volver] { --kc-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l-5 5 5 5M4 11h10a6 6 0 0 1 6 6v2'/%3E%3C/svg%3E"); }
.kc-i[data-i=pergamino] { --kc-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 4h11v12M8 4a2.5 2.5 0 0 0-2.5 2.5V17M5.5 17H16v1a2.5 2.5 0 0 0 5 0v-2h-2M5.5 17a2.5 2.5 0 0 0 0 5h13M10 9h5M10 13h5'/%3E%3C/svg%3E"); }
.kc-i[data-i=candado] { --kc-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 11h12v9H6zM9 11V8a3 3 0 0 1 6 0v3M12 14.5v2'/%3E%3C/svg%3E"); }
.kc-i[data-i=imagen] { --kc-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16v14H4zM4 16l4.5-4.5 4 4 3-3L20 17M15.5 9.2v.1'/%3E%3C/svg%3E"); }
.kc-i[data-i=vela] { --kc-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 12h6v9H9zM12 12V9M12 3.2c1.6 1.9 1.6 3.6 0 5.3-1.6-1.7-1.6-3.4 0-5.3z'/%3E%3C/svg%3E"); }
.kc-i[data-i=ojo] { --kc-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 12S6 5.5 12 5.5 21.5 12 21.5 12 18 18.5 12 18.5 2.5 12 2.5 12zM12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6z'/%3E%3C/svg%3E"); }
.kc-i[data-i=lupa] { --kc-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 18a7 7 0 1 0 0-14 7 7 0 0 0 0 14zM16.2 16.2 21 21'/%3E%3C/svg%3E"); }
.kc-i[data-i=ok] { --kc-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E"); }
.kc-i[data-i=camara] { --kc-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8h3.2l1.8-2.8h6L16.8 8H20v11H4zM12 16.5a3.3 3.3 0 1 0 0-6.6 3.3 3.3 0 0 0 0 6.6z'/%3E%3C/svg%3E"); }
.kc-i[data-i=balanza] { --kc-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v16M7.5 20h9M5 7h14M5 7l-2.8 6.5a3 3 0 0 0 5.6 0zM19 7l-2.8 6.5a3 3 0 0 0 5.6 0z'/%3E%3C/svg%3E"); }
.kc-i[data-i=robot] { --kc-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9h12v10H6zM12 9V5.5M12 4.6v.1M9.5 13.4v.2M14.5 13.4v.2M9.5 16.3h5M3.5 12.5v3M20.5 12.5v3'/%3E%3C/svg%3E"); }
.kc-i[data-i=aviso] { --kc-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 2.5 20h19L12 3zM12 10v4.5M12 17.2v.3'/%3E%3C/svg%3E"); }
.kc-i[data-i=estrella] { --kc-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.6l2.6 5.3 5.8.8-4.2 4.1 1 5.8-5.2-2.7-5.2 2.7 1-5.8L3.6 9.7l5.8-.8z'/%3E%3C/svg%3E"); }
.kc-i[data-i=cerrar] { --kc-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E"); }
.kc-i[data-i=ant] { --kc-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 5l-7 7 7 7'/%3E%3C/svg%3E"); }
.kc-i[data-i=sig] { --kc-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 5l7 7-7 7'/%3E%3C/svg%3E"); }

/* ---------- 2. Cronologia: lectura ---------- */
/* numeros romanos y titulos de suceso en la letra de texto: la gotica no se lee en "XII" ni en frases */
.k .cron-rail a, .k .cron-rail span { font-family: var(--k-letra); font-weight: 700; font-size: var(--k-t0); min-height: 40px; }
.k .cron-detail-head h2.cron-titulo { font-family: var(--k-letra); font-weight: 800; font-size: var(--k-t3); line-height: 1.15; letter-spacing: -0.01em; text-align: left; margin: 0 0 var(--k-e2); color: var(--k-texto); text-wrap: balance; overflow-wrap: anywhere; }
.k h2.cron-mundo { text-align: center; }
/* el hexagono de los h3 del sistema sobra junto al punto de la linea, en el dialogo y junto al icono del panel */
.k .k-legado h3.cron-title::before, .k .k-legado .cron-modal-box h3::before, .k .k-legado .cron-gmpanel h3::before { display: none; }
.k .k-legado h3.cron-title, .k .k-legado .cron-modal-box h3, .k .k-legado .cron-gmpanel h3 { padding-left: 0; }
.k .k-legado h3.cron-title { margin-top: 0; }
.k .cron-gmpanel h3 { margin-top: 0; display: flex; align-items: center; gap: var(--k-e2); }
/* nada por debajo de --k-t-1 */
.k .cron-date, .k .cron-tag, .k .cron-chip, .k .cron-iachk, .k .cron-foot, .k .cron-realm, .k .cron-hero figcaption, .k .cron-sugcard .meta, .k .cron-sugcard .campo, .k .cron-photoadm, .k .cron-meta, .k .cron-lb-cap, .k .cron-focus-hint, .k .cron-help, .k .cron-add label, .k .cron-ia { font-size: var(--k-t-1); }
.k .cron-photos { display: inline-flex; align-items: center; gap: 4px; }
.k .cron-pend .kc-i, .k .cron-sugok .kc-i, .k .cron-ia .kc-i { margin-right: 4px; }
.k a.cron-suglink { gap: var(--k-e2); }

/* la foto de cabecera entera (16:9, con el encuadre elegido) y sin repetirla debajo cuando es la unica */
.k .cron-hero img { height: auto; aspect-ratio: 16 / 9; max-height: 70vh; }
.cron-gallery:has(.cron-gitem:only-child):not(:has(.cron-photoadm)) { display: none; }

/* ---------- 3. Cronologia: panel de administracion y dialogo ---------- */
.k .cron-gmpanel hr.cron-sep { height: 1px; border: 0; background: var(--k-borde); margin: var(--k-e4) 0; opacity: 1; }
.k .cron-gmpanel form p, .k .cron-suggest form p { margin: var(--k-e3) 0; }
.k .cron-gmpanel input[name=texto], .k .cron-gmpanel textarea, .k .cron-suggest textarea { width: 100%; }
.k label.cron-iachk { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; min-height: 24px; }
.k .cron-add label.cron-iachk, .k .cron-suggest label.cron-iachk { white-space: normal; }
.k .cron-fecha { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-right: var(--k-e3); }
.k .cron-fecha input { width: 4.2em; text-align: center; }
.k .cron-fecha input[name=anio] { width: 5.6em; }
.k .cron-gmpanel input[type=file], .k .cron-add input[type=file], .k .cron-suggest input[type=file] { max-width: 100%; color: var(--k-suave); font: inherit; font-size: var(--k-t-1); }
.k .cron-gmpanel input[type=file]::file-selector-button, .k .cron-add input[type=file]::file-selector-button, .k .cron-suggest input[type=file]::file-selector-button { font: 600 var(--k-t-1) var(--k-letra); min-height: 36px; margin-right: var(--k-e3); padding: 4px 14px; color: var(--k-texto); background: var(--k-panel-2); border: 1px solid var(--k-borde-campo); border-radius: var(--k-r-control); cursor: pointer; }
.k .cron-gmpanel input[type=file]::file-selector-button:hover, .k .cron-add input[type=file]::file-selector-button:hover, .k .cron-suggest input[type=file]::file-selector-button:hover { border-color: var(--k-acento); }
.k .cron-modal-x { display: grid; place-items: center; font-size: 22px; }
.k .cron-sugcard .cron-campo-ia { background: color-mix(in srgb, #B49CFF 32%, var(--k-panel-2)); color: var(--k-texto); }
.k img.cron-sugimg { max-width: 160px; height: auto; border-radius: 8px; border: 1px solid var(--k-borde); }
.k .cron-sugcard blockquote { white-space: pre-line; max-width: 68ch; }

/* fichas de mundo: son botones (cronica.js les da papel y teclado) */
.k .cron-chip[aria-pressed=false] { opacity: 0.6; text-decoration: line-through; }
.k .cron-chip.off { opacity: 0.6; }

/* visor de fotos: botones de verdad */
.k button.cron-lb-x, .k button.cron-lb-nav { display: grid; place-items: center; width: 48px; height: 48px; min-height: 0; padding: 0; border: 0; border-radius: 999px; background: rgba(3, 5, 18, 0.55); color: #EEF1FF; font-size: 26px; line-height: 1; cursor: pointer; }
.k button.cron-lb-x { top: 14px; right: 18px; }
.k button.cron-lb-x:hover, .k button.cron-lb-nav:hover { background: rgba(238, 241, 255, 0.18); color: #fff; }
.k .cron-hero:focus-visible, .k .cron-gallery img:focus-visible { box-shadow: var(--k-foco); outline: none; }

/* ---------- 4. Cronologia: movimiento (la linea se recorre al bajar) ---------- */
.cron-fig { position: relative; }
.k .cron-fig img { transition: transform 600ms cubic-bezier(.2, .7, .2, 1); }
.k a.cron-entry:hover .cron-fig img, .k a.cron-entry:focus-visible .cron-fig img { transform: scale(1.035); }
.k .cron-dot { transition: transform 200ms cubic-bezier(.2, .7, .2, 1); }
.k a.cron-entry:hover .cron-dot, .k a.cron-entry:focus-visible .cron-dot { transform: scale(1.35); }
@media (prefers-reduced-motion: no-preference) {
   .cron-tl.kc-anim .cron-yearblock { opacity: 0; transform: translateY(12px); transition: opacity 320ms ease-out, transform 320ms cubic-bezier(.2, .7, .2, 1); }
   .cron-tl.kc-anim .cron-yearblock.kc-visto { opacity: 1; transform: none; }
   .cron-tl.kc-anim::before { transform-origin: top; transform: scaleY(var(--kc-avance, 1)); transition: transform 180ms linear; }
   .cron-modal.open .cron-modal-box { animation: kcSube 200ms cubic-bezier(.2, .7, .2, 1); }
   .cron-lb.open .cron-lb-img { animation: kcSube 200ms cubic-bezier(.2, .7, .2, 1); }
}
@keyframes kcSube { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
   .k .cron-fig img, .k .cron-dot { transition: none; }
   .k a.cron-entry:hover .cron-fig img, .k a.cron-entry:hover .cron-dot { transform: none; }
}

@media (max-width: 600px) {
   .k .cron-detail-head h2.cron-titulo { font-size: var(--k-t2); }
   .k .cron-gmpanel input[type=text]:not([size="2"]):not([size="4"]), .k .cron-gmpanel select { max-width: 100%; }
   .k .cron-gmpanel input[name=pie] { width: 100%; }
   .k .cron-fecha input { width: 3.4em; padding-left: 4px; padding-right: 4px; }
   .k .cron-fecha input[name=anio] { width: 4.6em; }
}

/* botones del sistema puestos en <input>: .k input[type=button] pesa mas que .k .k-btn--principal / --peligro (peticion a koe.css) */
.k input.k-btn--principal { background: var(--k-acento); border-color: var(--k-acento); color: var(--k-acento-tinta); }
.k input.k-btn--principal:hover { background: color-mix(in srgb, var(--k-acento) 82%, #fff); border-color: color-mix(in srgb, var(--k-acento) 82%, #fff); color: var(--k-acento-tinta); }
.k input.k-btn--peligro { border-color: var(--k-peligro); color: var(--k-peligro); background: transparent; }
.k input.k-btn--peligro:hover { background: var(--k-peligro); color: var(--k-fondo); border-color: var(--k-peligro); }
.k .cron-gmpanel form[enctype] p { display: flex; flex-wrap: wrap; align-items: center; gap: var(--k-e2) var(--k-e3); }
.k .cron-sugcard p:last-child, .k .cron-gmpanel > p { display: flex; flex-wrap: wrap; gap: var(--k-e2); margin-bottom: 0; }

/* ---------- 5. Cierre de la revision (ronda 2) ---------- */
/* el visor centra la foto en la pantalla */
.k .cron-lb.open { display: grid; place-items: center; }
.k .cron-lb .cron-lb-img { margin-top: 0; max-height: 82vh; }
.k .cron-text p:empty { display: none; }
/* nada coincide con la busqueda o con los mundos elegidos */
.k .cron-nada { max-width: 560px; margin: var(--k-e6) auto; padding: var(--k-e5); text-align: center; background: var(--k-panel); border-radius: var(--k-r-panel); }
.k .cron-nada .kc-i { display: block; width: 40px; height: 40px; margin: 0 auto var(--k-e3); color: var(--k-area); }
.k .cron-nada p { margin: 0 0 var(--k-e4); text-align: center; color: var(--k-texto); }
.k .cron-nada[hidden] { display: none; }
