/* Sala de lectura conectada al Supabase de Jessica: selector de capítulo, separadores, láminas y comentarios */
.rcap select { min-height: 44px; max-width: min(92vw, 420px); padding: 8px 36px 8px 12px; border: 1px solid var(--gold, #c9a86a); border-radius: 6px;
  background: #0b0a0d url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23c9a86a' stroke-width='2'/%3E%3C/svg%3E") right 12px center no-repeat;
  color: #f1e6cc; font: 500 1rem/1.3 Spectral, Georgia, serif; appearance: none; -webkit-appearance: none; cursor: pointer; }
.rcap select:focus-visible { outline: 2px solid #f3e2b6; outline-offset: 2px; }
.rcap select[hidden] { display: none; }
.rbook__flow .text p.sep { text-align: center; text-indent: 0; letter-spacing: .5em; margin: .8em 0; opacity: .7; }
.rbook__flow .text p.lamref { text-indent: 0; text-align: center; margin: 1em 0; break-inside: avoid; }
.rbook__flow .text p.lamref .btn { font-size: .9rem; }
.rlam { width: min(960px, 96vw); height: min(90vh, 1000px); padding: 0; border: 1px solid #c9a86a; border-radius: 10px; background: #0a0806; color: #f1e6cc; }
.rlam::backdrop { background: rgba(0, 0, 0, .78); }
.rlam[open] { display: flex; flex-direction: column; }
.rlam__bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid rgba(201,168,106,.35); font-family: Cinzel, serif; letter-spacing: .08em; }
.rlam iframe { flex: 1; width: 100%; border: 0; background: #0a0806; }
.rcom { max-width: 760px; margin: 40px auto 30px; padding: 26px clamp(16px, 4vw, 30px); border: 1px solid rgba(201,168,106,.4); border-radius: 10px; background: rgba(8,6,9,.86); color: #f1e6cc; }
.rcom[hidden] { display: none; }
.rcom__t { margin: 0 0 8px; font: 600 1.35rem/1.2 Cinzel, serif; color: #e3c886; letter-spacing: .04em; }
.rcom__nota { margin: 0 0 16px; padding: 10px 12px; border-left: 3px solid #c9a86a; background: rgba(201,168,106,.08); font-size: .95rem; }
.rcom__form { display: grid; gap: 12px; margin-bottom: 22px; }
.rcom__form label { display: grid; gap: 6px; font-size: .95rem; color: #d9cbaa; }
.rcom__form input, .rcom__form textarea { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid rgba(201,168,106,.45); border-radius: 6px; background: #0b0a0d; color: #f5ede0; font: 400 1rem/1.5 Spectral, Georgia, serif; }
.rcom__form input:focus-visible, .rcom__form textarea:focus-visible { outline: 2px solid #f3e2b6; outline-offset: 1px; }
.rcom__form .btn { justify-self: start; }
.rcom__trampa { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.rcom__legal { margin: 0; font-size: .85rem; color: #b5a888; }
.rcom__legal a { color: #e3c886; }
.rcom__estat { margin: 0; min-height: 1.4em; color: #e3c886; }
.rcom__llista { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.rcom__c { padding: 12px 14px; border: 1px solid rgba(201,168,106,.22); border-radius: 8px; background: rgba(255,255,255,.02); }
.rcom__qui { margin: 0 0 4px; font-size: .9rem; color: #b5a888; } .rcom__qui b { color: #e3c886; }
.rcom__txt { margin: 0; overflow-wrap: anywhere; }
.rcom__buit { color: #b5a888; text-align: center; padding: 10px; }
body.is-perg .rcom { background: rgba(14,10,8,.9); }
/* m199: cada libro con sus capítulos debajo */
.rtext { align-items: stretch; }
.rtext__col { display: flex; flex-direction: column; flex: 1 1 0; min-width: 0; }
.rtext__col + .rtext__col { border-left: 1px solid var(--line); }
.rtext__col > button { width: 100%; }
.rcaps { list-style: none; margin: 0; padding: 4px 0; max-height: 11.5em; overflow-y: auto; border-top: 1px solid var(--line); text-align: left; scrollbar-width: thin; overscroll-behavior: contain; }
.rcaps:empty { display: none; }
.rcaps a { display: flex; gap: .55em; align-items: baseline; padding: .42rem .9rem; min-height: 36px; color: var(--ink-2); text-decoration: none; font: 400 .98rem/1.25 Spectral, Georgia, serif; }
.rcaps a span { flex: none; min-width: 2.2em; font: 500 .78rem/1 "Spectral SC", Spectral, serif; letter-spacing: .06em; color: var(--ink-3); }
.rcaps a:hover { background: rgba(214,178,106,.1); color: var(--gold-hi); }
.rcaps a:focus-visible { outline: 2px solid #f3e2b6; outline-offset: -2px; }
.rcaps a[aria-current] { color: var(--gold-hi); background: rgba(214,178,106,.16); box-shadow: inset 2px 0 0 var(--gold-leaf); }
.rcaps a[aria-current] span { color: var(--gold-hi); }
@media (max-width: 560px) { .rcaps a { padding: .45rem .6rem; font-size: .92rem; } .rcaps a span { min-width: 1.8em; } }
/* m199: respuestas en hilo */
.rcom__resp { margin-top: 6px; padding: 4px 0; min-height: 32px; background: none; border: 0; color: #e3c886; font: 500 .88rem Spectral, Georgia, serif; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.rcom__resp:focus-visible { outline: 2px solid #f3e2b6; outline-offset: 2px; }
.rcom__fils { list-style: none; margin: 10px 0 0; padding: 0 0 0 clamp(10px, 3vw, 22px); border-left: 2px solid rgba(201,168,106,.3); display: grid; gap: 10px; }
.rcom__fils .rcom__c { background: rgba(255,255,255,.015); }
.rcom__form--resp { margin: 10px 0 0; padding: 12px; border: 1px dashed rgba(201,168,106,.4); border-radius: 8px; }
.rcom__a { margin: 0; font-size: .9rem; color: #c9bb9a; } .rcom__a b { color: #e3c886; }
.rcom__botons { display: flex; flex-wrap: wrap; gap: 10px; }
/* tanda 5: nota de la autora (al final del capítulo) y su pregunta (encima de los comentarios) */
.rbook__flow .nota-autora { margin: 1.4em 0 .6em; padding: .9em 1em; border: 1px solid rgba(201,168,106,.5); border-left: 3px solid #c9a86a; border-radius: 4px; background: rgba(201,168,106,.07); break-inside: avoid; }
.rbook__flow .nota-autora p { text-indent: 0; margin: 0 0 .5em; font-style: italic; }
.rbook__flow .nota-autora p:last-child { margin-bottom: 0; }
.rbook__flow .nota-autora .nota-autora__t { font: 600 .78rem/1.2 "Spectral SC", Spectral, serif; letter-spacing: .14em; text-transform: uppercase; font-style: normal; color: var(--gold-hi, #e3c886); }
.rcom__preg { margin: 0 0 14px; padding: 14px 16px; border: 1px solid #c9a86a; border-radius: 8px; background: rgba(201,168,106,.12); }
.rcom__preg p { margin: 0; font-size: 1.05rem; } .rcom__preg .rcom__preg-t { margin-bottom: 4px; font: 600 .78rem/1.2 Cinzel, serif; letter-spacing: .16em; text-transform: uppercase; color: #e3c886; }
.rcom__soc { margin: 0 0 10px; font-size: .92rem; color: #c9bb9a; } .rcom__soc a { color: #e3c886; }
.rcom__soc--gran { padding: 14px 16px; border: 1px dashed rgba(201,168,106,.5); border-radius: 8px; font-size: 1rem; text-align: center; }
/* t6-7: distintivo de factio junto al nick (círculo con la inicial) */
.rcom__fx { display: inline-grid; place-items: center; width: 1.45em; height: 1.45em; margin-left: 3px; border-radius: 50%; border: 1px solid #c9a86a; font: 600 .72rem/1 Cinzel, serif; color: #120c06; background: #c9a86a; vertical-align: 1px; }
.rcom__fx--adriano { background: #8b2a33; color: #f3e2b6; } .rcom__fx--casio { background: #c9a86a; } .rcom__fx--marco { background: #2c3e5c; color: #f3e2b6; } .rcom__fx--libre { background: transparent; color: #e3c886; }
/* t6-10: Lapso con adorno griego (greca) en la portadilla */
body[data-text="lapso"] .rbook__flow .tp { position: relative; padding-top: 22px; }
body[data-text="lapso"] .rbook__flow .tp::before, body[data-text="lapso"] .rbook__flow .tp::after { content: ""; display: block; height: 12px; margin: 0 auto 10px; max-width: 280px; opacity: .85;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='12' viewBox='0 0 24 12'%3E%3Cpath d='M0 11h4V1h12v8h-6V5h2v2h2V3H6v8h12V1h6' fill='none' stroke='%23c9a86a' stroke-width='1.4'/%3E%3C/svg%3E") repeat-x left center / 24px 12px; }
body[data-text="lapso"] .rbook__flow .tp::after { margin: 14px auto 0; transform: scaleY(-1); }
body[data-text="lapso"] .rbook__flow .tp .tp__orn { display: none; }
/* t7: al final del capítulo, recuadro discreto de libros y botones para compartir */
.endp .endp__libros { display: flex; align-items: center; gap: 12px; max-width: 360px; margin: .5rem auto 0; padding: 10px 12px; border: 1px solid rgba(201,168,106,.35); border-radius: 6px; background: rgba(201,168,106,.05); text-align: left; }
.endp__cvs { display: flex; flex: none; gap: 5px; }
.endp__cvs a { display: block; line-height: 0; border-radius: 2px; }
.endp .endp__cvs img { width: 38px; height: 57px; margin: 0; object-fit: cover; border-radius: 2px; box-shadow: 0 4px 10px -4px rgba(0,0,0,.7); }
.endp__ltxt { min-width: 0; font-size: .86rem; line-height: 1.35; }
.endp .endp__ltxt p { margin: 0; text-align: left; }
.endp .endp__ltxt .endp__lt { font: 600 .7rem/1.3 "Spectral SC", Spectral, serif; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-hi, #e3c886); margin-bottom: 2px; }
.endp .endp__ltxt .endp__lnk { margin-top: 3px; font-size: .82rem; }
.endp__ltxt a { color: inherit; text-decoration: underline; text-decoration-color: rgba(201,168,106,.7); text-underline-offset: 2px; }
.endp__share { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin-top: .3rem; font-size: .78rem; }
.endp__st { font: 600 .68rem/1 "Spectral SC", Spectral, serif; letter-spacing: .12em; text-transform: uppercase; opacity: .75; }
.endp__sb { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 4px 10px; border: 1px solid rgba(201,168,106,.4); border-radius: 999px; background: transparent; color: inherit; font: inherit; text-decoration: none; cursor: pointer; }
.endp__sb svg { width: 14px; height: 14px; flex: none; }
.endp__sb:hover { border-color: #c9a86a; background: rgba(201,168,106,.1); }
.endp__sb:focus-visible, .endp__cvs a:focus-visible, .endp__ltxt a:focus-visible { outline: 2px solid #e3c886; outline-offset: 2px; }
.endp__ok { flex-basis: 100%; min-height: 1em; font-size: .78rem; word-break: break-all; }
.rbook.lux .endp__ltxt .endp__lt { color: #6b4510; }
.rbook.lux .endp__sb, .rbook.lux .endp .endp__libros { border-color: rgba(110,80,30,.4); }
@media (max-width: 560px) { .endp .endp__libros { padding: 8px 10px; gap: 10px; } .endp__sb { padding: 4px 8px; } }
/* t7: en el móvil, botones de compartir solo con icono (el nombre va en aria-label); si la página se queda corta, el recuadro se encoge */
@media (max-width: 560px) { .endp__sb { width: 34px; height: 34px; min-height: 0; padding: 0; justify-content: center; } .endp__sb span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } .endp__sb svg { width: 16px; height: 16px; } }
.endp--c1 .endp__ltxt p:not(.endp__lt):not(.endp__lnk) { display: none; }
.endp--c1 .endp__ok:empty { display: none; }
.endp--c2 .endp__cvs { display: none; }
.endp--c2 .endp__libros { padding: 6px 10px; }
/* t8-4: spoilers en los comentarios */
.rcom__spoiler { background: #2a2420; color: transparent; border-radius: 3px; padding: 0 3px; cursor: pointer; text-shadow: none; user-select: none; box-shadow: inset 0 0 0 1px rgba(201,168,106,.35); }
.rcom__spoiler::before { content: "spoiler · "; color: #c9a86a; font-size: .8em; }
.rcom__spoiler.is-visto { background: transparent; color: inherit; cursor: auto; user-select: auto; box-shadow: none; }
.rcom__spoiler.is-visto::before { content: none; }
.rcom__spoiler:focus-visible { outline: 2px solid #f3e2b6; outline-offset: 1px; }
.rcom__ayuda { margin: -4px 0 0; font-size: .85rem; color: #b5a888; } .rcom__ayuda code { color: #e3c886; }
/* t8-1: hasta 4 portadas en el recuadro */
.endp__libros .endp__cvs { flex-wrap: nowrap; }
.endp--c3 .endp__libros { display: none !important; }   /* t8: si ni encogido cabe, fuera el recuadro (mejor que partir la última página) */
/* m347/m354: imágenes y vídeo dentro del capítulo (caben siempre en una página: nunca se parten entre columnas) */
.rbook__flow .text .cfig { margin: 1.1em 0; text-align: center; break-inside: avoid; page-break-inside: avoid; }
.cfig__b { display: inline-block; position: relative; padding: 0; border: 0; background: none; cursor: zoom-in; max-width: 100%; color: inherit; text-decoration: none; }
.cfig__b img { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(var(--H, 600px) * .66); border: 1px solid rgba(201,168,106,.35); border-radius: 4px; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.cfig--vid .cfig__b { cursor: pointer; }
.cfig--vid .cfig__b img { max-height: calc(var(--H, 600px) * .58); filter: brightness(.82); }
.cfig__play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -62%); width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(10,8,6,.72); border: 1px solid #c9a86a; color: #e3c886; font-size: 26px; padding-left: 5px; box-sizing: border-box; }
.cfig__lbl { position: absolute; left: 0; right: 0; bottom: 0; padding: .7em .6em; background: linear-gradient(transparent, rgba(0,0,0,.85)); color: #f1e6cc;
  font-family: Cinzel, serif; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; border-radius: 0 0 4px 4px; }
.cfig__b:hover img, .cfig__b:focus-visible img { border-color: #c9a86a; }
.cfig__b:focus-visible { outline: 2px solid #e3c886; outline-offset: 3px; }
.rbook__flow .text .cfig figcaption { margin: .5em auto 0; max-width: 34em; font-style: italic; font-size: .88em; line-height: 1.45; opacity: .8; text-indent: 0; }
.rimg { max-width: 96vw; max-height: 96vh; padding: 0; border: 0; background: transparent; overflow: visible; }
.rimg::backdrop { background: rgba(0,0,0,.9); }
.rimg[open] { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.rimg img { max-width: 96vw; max-height: calc(96vh - 90px); object-fit: contain; border-radius: 4px; }
.rimg__x { align-self: flex-end; }
.rimg__pie { margin: 0; color: #f1e6cc; font-style: italic; text-align: center; max-width: 40em; padding: 0 12px; }
.rimg__pie:empty { display: none; }
/* t14-1: «Próximo capítulo: …» al final del último capítulo publicado */
.endp .endp__prox { font: 600 .8rem/1.4 "Spectral SC", Spectral, serif; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-hi, #e3c886); }
