/* Empyreon: paginación visual de capítulos de texto (sin alterar su HTML guardado).
   El navegador fragmenta líneas automáticamente en columnas; ni palabras ni párrafos se
   guardan partidos en la base de datos. Se ajusta al tamaño de letra/pantalla. */
.ed-reader-navigation[data-ed-reader-nav] {margin:14px 0 20px;padding:13px 0;border-block:1px solid #345268;gap:12px}
.ed-reader-navigation[data-ed-reader-nav] .ed-control {font-size:15px}
.ed-reader-navigation[data-ed-reader-nav] > span {color:#d3eaf2;text-align:center;font-size:14px;min-width:140px}
.ed-reader-navigation[data-ed-reader-nav] button:disabled {opacity:.42;cursor:not-allowed;transform:none}
.ed-reader[data-ed-formato=texto][data-ed-presentacion=pagina] .ed-page-stack,
.ed-reader[data-ed-formato=texto][data-ed-presentacion=doble] .ed-page-stack {display:flex;justify-content:center;gap:0;min-width:0}
.ed-reader[data-ed-formato=texto][data-ed-presentacion=pagina] .ed-page-stack .ed-paper {width:100%;max-width:900px;min-width:0;align-self:start}
.ed-reader[data-ed-formato=texto][data-ed-presentacion=doble] .ed-page-stack .ed-paper {width:100%;max-width:none;min-width:0;align-self:start}
.ed-reader[data-ed-formato=texto][data-ed-presentacion=pagina] .ed-prose,
.ed-reader[data-ed-formato=texto][data-ed-presentacion=doble] .ed-prose {
    --ed-column-gap:30px;
    display:block;
    box-sizing:border-box;
    width:100%;
    max-width:none;
    min-width:0;
    height:clamp(390px,68dvh,850px);
    min-height:0;
    margin:0;
    padding:32px clamp(22px,3vw,40px);
    overflow-x:auto;
    overflow-y:hidden;
    column-count:auto;
    column-width:var(--ed-column-width,640px);
    column-gap:var(--ed-column-gap);
    column-fill:auto;
    scroll-behavior:smooth;
    scrollbar-width:thin;
    scrollbar-color:#5b8fa4 transparent;
    overflow-wrap:break-word;
    overscroll-behavior-x:contain;
    widows:2;
    orphans:2;
}
.ed-reader[data-ed-formato=texto][data-ed-presentacion=pagina] .ed-prose > :is(h1,h2,h3,h4,h5,h6),
.ed-reader[data-ed-formato=texto][data-ed-presentacion=doble] .ed-prose > :is(h1,h2,h3,h4,h5,h6) {break-after:avoid-column}
.ed-reader[data-ed-formato=texto][data-ed-presentacion=pagina] .ed-prose > :is(img,figure,table),
.ed-reader[data-ed-formato=texto][data-ed-presentacion=doble] .ed-prose > :is(img,figure,table) {max-width:100%!important;break-inside:avoid}
.ed-reader[data-ed-formato=texto][data-ed-presentacion=vertical] .ed-page-stack {display:block}
.ed-reader[data-ed-formato=texto][data-ed-presentacion=vertical] .ed-page-stack .ed-paper {max-width:900px;width:100%;margin:auto}
.ed-reader[data-ed-formato=texto][data-ed-presentacion=vertical] .ed-prose {
    width:100%;max-width:68ch;height:auto;min-height:300px;overflow:visible;
    column-width:auto;column-count:1;column-gap:normal;padding:clamp(24px,4vw,56px);
}
.ed-reader .ed-image-notes {padding:18px clamp(20px,3vw,36px);font:16px/1.6 system-ui,sans-serif;color:var(--ed-ink);border-top:1px solid #80808050}
.ed-reader .ed-image-notes p:last-child {margin-bottom:0}

/* Sin JavaScript o antes de calcular el ancho, mostrar siempre todo el capítulo. */
.ed-reader[data-ed-formato=texto]:not([data-ed-paginado="1"]) .ed-prose {
    height:auto!important;max-width:68ch!important;min-height:340px!important;
    overflow:visible!important;column-count:1!important;column-width:auto!important;
    margin:auto!important;padding:clamp(22px,4vw,56px)!important
}
@media(max-width:850px){
    .ed-reader[data-ed-formato=texto][data-ed-presentacion=doble] .ed-page-stack .ed-paper {max-width:900px}
}
@media(max-width:600px){
    .ed-reader-navigation[data-ed-reader-nav] > span {min-width:0;font-size:13px}
    .ed-reader[data-ed-formato=texto][data-ed-presentacion=pagina] .ed-prose,
    .ed-reader[data-ed-formato=texto][data-ed-presentacion=doble] .ed-prose {padding:20px 18px;height:clamp(330px,65dvh,630px)}
}
/* Índice con partes y subcapítulos sin alterar el orden ni las URLs. */
.ed-reader-index .ed-part-group{list-style:none;margin:14px 0 4px;padding:9px 12px;background:#193950;border-left:3px solid #9ccad8;border-radius:0 7px 7px 0;color:#dff3f8;font:750 14px/1.45 system-ui,sans-serif;overflow-wrap:anywhere}
.ed-reader-index .ed-reader-subchapter>a{margin-left:14px;padding-left:16px;border-left:2px solid #527b91;font-size:15px}
.ed-reader-index .ed-reader-subchapter>a::before{content:'↳ ';color:#a8dce7}
/* Composición de diario: varios relatos en una sola secuencia tipográfica. */
.ed-page-stack-stories .ed-paper {width:100%;min-width:0}
.ed-story-entry{display:block;break-inside:auto;overflow-wrap:break-word}
.ed-story-entry + .ed-story-entry{margin-top:2.4em;padding-top:1.6em;border-top:1px solid color-mix(in srgb,var(--ed-ink) 24%,transparent)}
.ed-story-entry-header{break-inside:avoid-column;break-after:avoid-column;margin:0 0 1em}
.ed-reader .ed-prose .ed-story-entry-header h2{
  margin:.3em 0 .45em!important;font:700 1.35em/1.35 Georgia,serif!important;
  color:var(--ed-ink)!important;background:none!important;box-shadow:none!important;
}
.ed-reader .ed-prose .ed-story-part{font:700 1.35em/1.4 Georgia,serif!important;margin:1.8em 0 .9em!important;padding:.7em 0 .35em!important;border-bottom:1px solid color-mix(in srgb,var(--ed-ink) 32%,transparent)!important;break-after:avoid-column;color:var(--ed-ink)!important}
.ed-reader .ed-prose .ed-story-entry[data-ed-nivel=subcapitulo] .ed-story-entry-header h2{font-size:1.12em!important}
.ed-story-date{font:700 .72em/1.5 system-ui,sans-serif;letter-spacing:.07em;text-transform:uppercase;color:var(--ed-ink);opacity:.75}
.ed-reader .ed-story-body>p:last-child{margin-bottom:0!important}
.ed-reader-index .ed-year-group{grid-column:1/-1;margin:12px 0 4px;padding:8px 12px;border-bottom:1px solid #466378;color:#9fe8f2;font:700 15px/1.4 system-ui,sans-serif}
.ed-reader-index .ed-year-group strong{color:inherit}
.ed-stream-load-more{margin:20px auto 10px;padding:18px 20px;border:1px solid #456782;border-radius:12px;background:#102a3d;max-width:900px;text-align:center}
.ed-stream-load-more a{display:inline-flex;justify-content:center;font-weight:800}
.ed-stream-load-more p{font:13px/1.5 system-ui;color:#a8c6d7;margin:8px 0 0}
.ed-stream-load-more [hidden]{display:none!important}
.ed-reader[data-ed-presentacion=vertical] .ed-page-stack-stories .ed-story-entry+ .ed-story-entry{padding-top:2em}

