/* Páginas interiores del códice */

.filet--left { margin: 1rem 0 1.2rem; max-width: 220px; }
.filet--left::before { flex: 0 0 0; display: none; }

.thumbs { display: flex; gap: .6rem; margin-top: 1.4rem; justify-content: center; flex-wrap: wrap; }
.thumbs button { width: 58px; aspect-ratio: 2 / 3; padding: 0; border: 1px solid var(--vellum-3); background: var(--vellum-2); overflow: hidden; opacity: .7; transition: opacity .2s, border-color .2s, transform .2s; }
.thumbs button img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.thumbs button:hover { opacity: 1; }
.thumbs button[aria-pressed="true"] { opacity: 1; border-color: var(--rubric); box-shadow: 0 0 0 2px var(--vellum), 0 0 0 3px var(--rubric); }

/* ───────── Dramatis personae ───────── */
.lead-char { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2.5rem, 6vw, 6rem); align-items: start; }
.lead-char__media { position: sticky; top: 100px; padding: 0 10px; }
.lead-char__plate { margin: 0; aspect-ratio: 2 / 3; border-radius: 999px 999px 0 0; }
.lead-char__plate img { border-radius: 999px 999px 0 0; object-position: 50% 20%; }
.lead-char__text h2 { font-size: clamp(2.8rem, 1.8rem + 4vw, 5.4rem); letter-spacing: -.025em; }
.lead-char__role { font-family: var(--f-display); font-style: italic; font-size: clamp(1.15rem, 1rem + .6vw, 1.45rem); color: var(--rubric); margin: .6rem 0 .2rem; }
.lead-char__meta { color: var(--ink-3); font-style: italic; font-size: .95rem; margin: 0; }
.lead-char__quote { margin: 1.6rem 0 2rem; padding: 0; position: relative; }
.lead-char__quote p { font-family: var(--f-display); font-size: clamp(1.5rem, 1.15rem + 1.4vw, 2.35rem); line-height: 1.18; font-style: italic; margin: 0; text-indent: -.42em; color: var(--ink); }
.lead-char__quote p::before { content: "«"; color: var(--gold); }
.lead-char__quote p::after { content: "»"; color: var(--gold); }
.lead-char__quote footer { margin-top: .8rem; color: var(--ink-3); font-size: .92rem; }
.lead-char__quote footer::before { content: ""; display: inline-block; width: 2rem; height: 1px; background: var(--gold-leaf); vertical-align: middle; margin-right: .6rem; }
.lead-char__text > p { max-width: var(--measure); }
.lead-char__acts { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.8rem 0 .6rem; }
@media (max-width: 860px) { .lead-char { grid-template-columns: 1fr; } .lead-char__media { position: static; max-width: 400px; margin-inline: auto; width: 100%; } }

.roll-tools { display: flex; justify-content: center; margin-bottom: 3rem; }
.roll-group + .roll-group { margin-top: 4.5rem; }
.roll-group__head { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; border-bottom: 1px solid var(--line); box-shadow: 0 3px 0 -2px var(--vellum), 0 4px 0 -2px var(--gold-leaf); padding-bottom: .9rem; margin-bottom: 2.2rem; }
.roll-group__head h3 { font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.8rem); }
.roll-group__head p { margin: 0; font-style: italic; color: var(--ink-3); }
.roll { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.6rem 3.4rem; }
.persona { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1.5rem; align-items: start; scroll-margin-top: 100px; }
.persona__face { background: none; border: 0; padding: 10px; border-radius: 50%; }
.persona__face .cameo { transition: transform .5s var(--ease-out); }
.persona__face:hover .cameo { transform: translateY(-3px) rotate(-1.5deg); }
.persona h4 { font-family: var(--f-display); font-size: clamp(1.45rem, 1.2rem + .8vw, 1.85rem); font-weight: 500; line-height: 1.05; }
.persona h4 button { background: none; border: 0; padding: 0; text-align: left; font: inherit; color: var(--ink); background-image: linear-gradient(var(--rubric), var(--rubric)); background-size: 0 1px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size .4s var(--ease-out), color .2s; }
.persona h4 button:hover { color: var(--rubric); background-size: 100% 1px; }
.persona__meta { font-size: .88rem; color: var(--ink-3); font-style: italic; margin: .3rem 0 .45rem; }
.persona__role { margin: 0 0 .6rem; font-size: .98rem; color: var(--ink-2); }
.persona__quote { font-family: var(--f-display); font-style: italic; font-size: 1.12rem; line-height: 1.3; color: var(--rubric-deep); margin: 0 0 .8rem; }
.persona__books { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.persona__books > span { font-size: .82rem; font-style: italic; color: var(--ink-3); margin-right: .2rem; }
.persona__books .chip { font-size: .8rem; padding: .2em .55em .2em .25em; }
.persona__books .chip img { width: 16px; height: 24px; }
.emblem-big { display: grid; justify-items: center; gap: 1rem; padding: 2rem 0; }
.emblem-big p { font-style: italic; color: var(--ink-3); font-size: .9rem; }
.thumbs--sheet button { width: 52px; }
@media (max-width: 900px) { .roll { grid-template-columns: 1fr; } }
@media (max-width: 480px) {
  .persona { grid-template-columns: 1fr; justify-items: start; gap: .6rem; }
  .persona__face { padding: 8px; }
}

/* ───────── Árbol de la Casa Vakko ───────── */
.prologue { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.prologue__text { max-width: var(--measure); font-size: 1.08em; }
.prologue__fig { margin: 0; text-align: center; }
.prologue__fig img { width: min(100%, 360px); margin: 0 auto -1rem; mix-blend-mode: multiply; filter: sepia(.35) contrast(1.05); }
.prologue__fig figcaption p { font-family: var(--f-display); font-style: italic; font-size: clamp(1.15rem, 1rem + .6vw, 1.45rem); line-height: 1.32; color: var(--ink); margin: 0 auto .7rem; max-width: 30ch; }
.prologue__fig figcaption span { font-size: .9rem; color: var(--rubric); font-style: italic; }
@media (max-width: 820px) { .prologue { grid-template-columns: 1fr; } }

.tree-hint { text-align: center; font-style: italic; color: var(--ink-3); margin-bottom: 2.4rem; }
.tree { position: relative; --trunk: 120px; --cam: 124px; max-width: 1100px; margin-inline: auto; padding-bottom: 60px; }
.tree__ink { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; z-index: 0; }
.tree__ink .trunk-guide { fill: none; stroke: var(--gold-leaf); stroke-width: 1.2; stroke-dasharray: 1 6; stroke-linecap: round; opacity: .8; }
.tree__ink .trunk { fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; }
.tree__ink .branch { fill: none; stroke: var(--ink); stroke-width: 1.3; stroke-linecap: round; }
.tree__ink .branch--usurp { stroke: var(--rubric); stroke-width: 1.6; }
.tree__ink .leaf { color: var(--gold); opacity: .95; }
.tree__ink .knot { fill: var(--vellum-hi); stroke: var(--ink); stroke-width: 1.4; }
.tree__ink .root path { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; }
.tree__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; position: relative; z-index: 1; }
.gen { width: calc(50% - var(--trunk) / 2); scroll-margin-top: 140px; }
.gen--L { align-self: flex-start; }
.gen--R { align-self: flex-end; }
.gen + .gen { margin-top: -64px; }
.gen__btn { display: flex; align-items: center; gap: 1.2rem; background: none; border: 0; padding: 0; text-align: left; width: 100%; }
.gen--L .gen__btn { flex-direction: row-reverse; text-align: right; }
.gen__seal { padding: 10px; flex: none; }
.gen__seal .cameo { transition: transform .5s var(--ease-out), box-shadow .5s; }
.gen__btn:hover .cameo, .gen__btn:focus-visible .cameo { transform: scale(1.04) rotate(-1deg); }
.gen__txt { display: flex; flex-direction: column; gap: .08rem; min-width: 0; }
.gen__ord { font-family: var(--f-display); font-style: italic; color: var(--rubric); font-size: .95rem; }
.gen__name { font-family: var(--f-display); font-size: clamp(1.35rem, 1.1rem + .9vw, 1.9rem); line-height: 1.05; color: var(--ink); }
.gen__btn:hover .gen__name { color: var(--rubric); }
.gen__ep { font-family: var(--f-display); font-style: italic; font-size: 1.08rem; color: var(--rubric-deep); }
.gen__yrs { font-size: .88rem; color: var(--ink-2); font-variant-numeric: lining-nums tabular-nums; margin-top: .2rem; }
.gen__rel { font-size: .82rem; color: var(--ink-3); font-style: italic; }
.gen__kin { margin: .2rem 0 0; font-size: .82rem; color: var(--ink-3); line-height: 1.4; display: flex; flex-direction: column; gap: .1rem; }
.gen--L .gen__kin { text-align: right; padding-right: calc(var(--cam) + 2.45rem); }
.gen--R .gen__kin { padding-left: calc(var(--cam) + 2.45rem); }
.gen__kin b { color: var(--rubric); font-weight: 600; }
.gen--usurp .gen__name { color: var(--rubric-deep); }
.gen.is-target .cameo { box-shadow: 0 0 0 3px var(--vellum-hi), 0 0 0 4.5px var(--rubric), 0 0 0 7px var(--vellum-hi), 0 0 0 8px var(--rubric), 0 10px 22px -8px rgba(0,0,0,.45); }
.era { align-self: center; margin: 3.4rem 0 3rem; position: relative; z-index: 2; }
.era + .gen { margin-top: 0; }
.era__band {
  display: flex; flex-direction: column; align-items: center; gap: .1rem; text-align: center;
  background: var(--vellum-hi); background-image: var(--paper-grain); border: 1px solid var(--line); padding: .6rem 1.6rem .7rem;
  box-shadow: 0 0 0 3px var(--vellum-hi), 0 0 0 4px var(--gold-leaf), var(--shadow-1); position: relative;
}
.era__band::before, .era__band::after { content: ""; position: absolute; top: 50%; width: 18px; height: 18px; background: var(--vellum-hi); border: 1px solid var(--line); transform: translateY(-50%) rotate(45deg); z-index: -1; }
.era__band::before { left: -10px; } .era__band::after { right: -10px; }
.era__band span { font-family: var(--f-display); font-style: italic; font-size: clamp(1.1rem, 1rem + .4vw, 1.35rem); }
.era__band small { font-size: .82rem; color: var(--ink-3); font-variant-numeric: lining-nums; }
.dyn-reign { font-style: italic; color: var(--ink-2); }
@media (max-width: 760px) {
  .tree { --cam: 88px; }
  .gen, .gen--L, .gen--R { width: calc(100% - 58px); align-self: flex-end; }
  .gen + .gen { margin-top: 1.4rem; }
  .gen--L .gen__btn { flex-direction: row; text-align: left; }
  .gen__btn { gap: .7rem; }
  .gen__seal { padding: 9px; }
  .gen--L .gen__kin, .gen--R .gen__kin { text-align: left; padding: 0 0 0 calc(var(--cam) + 1.85rem); }
  .era { align-self: flex-end; width: calc(100% - 40px); margin: 2.4rem 0 1.8rem; }
  .era__band { padding: .5rem 1rem .6rem; }
}

/* ───────── Atlas ───────── */
.mapplate { margin: 0 10px; }
.map { position: relative; aspect-ratio: 3 / 2; overflow: hidden; border: 1px solid rgba(0,0,0,.5); }
.map img { width: 100%; height: 100%; object-fit: cover; border: 0; }
.pin { position: absolute; transform: translate(-50%, -62%); width: clamp(44px, 9vw, 130px); height: clamp(30px, 5vw, 64px); border-radius: 50%; border: 1px solid transparent; background: transparent; padding: 0; transition: border-color .25s, background-color .25s, box-shadow .25s; }
.pin span { position: absolute; left: 50%; bottom: -1.9rem; transform: translateX(-50%) translateY(4px); white-space: nowrap; font-size: .78rem; font-style: italic; background: var(--vellum-hi); color: var(--ink); border: 1px solid var(--line); padding: .1rem .5rem; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; }
.pin:hover, .pin:focus-visible { border-color: var(--gold-hi); background: rgba(233,207,140,.16); box-shadow: 0 0 0 3px rgba(233,207,140,.25); outline: none; }
.pin:hover span, .pin:focus-visible span { opacity: 1; transform: translateX(-50%); }
.mapplate figcaption { max-width: 80ch; margin: 0 auto; }

.atlas { position: relative; outline: none; }
.atlas__tabs { display: flex; gap: .3rem; overflow-x: auto; scrollbar-width: thin; padding: 0 0 .8rem; margin-bottom: 1.2rem; border-bottom: 1px solid var(--line); box-shadow: 0 3px 0 -2px var(--vellum), 0 4px 0 -2px var(--gold-leaf); }
.atlas__tabs button { flex: none; display: flex; align-items: baseline; gap: .4rem; background: none; border: 1px solid transparent; border-radius: 2px; padding: .45rem .7rem; color: var(--ink-2); font-size: .95rem; min-height: 44px; }
.atlas__tabs .n { font-family: var(--f-display); font-style: italic; color: var(--rubric); font-size: .82rem; }
.atlas__tabs button:hover { border-color: var(--vellum-3); color: var(--ink); }
.atlas__tabs button[aria-current="true"] { background: var(--ink); color: var(--vellum-hi); border-color: var(--ink); }
.atlas__tabs button[aria-current="true"] .n { color: var(--gold-hi); }
.atlas__book { position: relative; perspective: 2400px; background: var(--vellum-hi); background-image: var(--paper-grain), linear-gradient(90deg, transparent 46%, rgba(0,0,0,.13) 50%, transparent 54%); border: 1px solid var(--line); box-shadow: 0 0 0 5px var(--vellum-hi), 0 0 0 6px var(--gold-leaf), 0 30px 60px -28px rgba(0,0,0,.55); min-height: 560px; }
.atlas__spread { display: grid; grid-template-columns: 1fr 1fr; }
.pg { padding: clamp(24px, 3.4vw, 52px); min-width: 0; }
.pg--verso { border-right: 1px solid rgba(0,0,0,.08); }
.atlas__plate { margin: 0 10px; aspect-ratio: 2 / 1; }
.atlas__plate--map { aspect-ratio: 4 / 3; }
.mapcrop { width: 100%; height: calc(100% - 2.2rem); background-image: url("../../assets/lore/world/noctia-mapa.jpg"); background-size: 320%; background-repeat: no-repeat; border: 1px solid rgba(0,0,0,.5); }
.atlas__thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: .55rem; margin: 1.5rem 10px 0; }
.atlas__thumbs button { padding: 0; border: 1px solid var(--vellum-3); aspect-ratio: 2 / 1; overflow: hidden; background: var(--vellum-2); opacity: .7; transition: opacity .2s; }
.atlas__thumbs button img { width: 100%; height: 100%; object-fit: cover; }
.atlas__thumbs button:hover { opacity: 1; }
.atlas__thumbs button[aria-pressed="true"] { opacity: 1; box-shadow: 0 0 0 2px var(--vellum-hi), 0 0 0 3px var(--rubric); }
.atlas__head { display: flex; align-items: center; gap: 1.3rem; }
.seal-img { flex: none; width: clamp(78px, 8vw, 108px); aspect-ratio: 1; border-radius: 50%; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 0 0 3px var(--vellum-hi), 0 0 0 4px var(--gold-leaf), var(--shadow-1); background: #111; }
.seal-img img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); }
.seal-img--type { display: grid; place-items: center; background: radial-gradient(circle at 40% 35%, var(--vellum-hi), var(--vellum-2)); }
.seal-img--type b { font-family: var(--f-display); font-style: italic; font-size: 3rem; color: var(--rubric); }
.atlas__head h3 { font-size: clamp(2.6rem, 1.8rem + 3vw, 4.4rem); letter-spacing: -.025em; }
.atlas__throne { font-style: italic; color: var(--rubric); margin: .3rem 0 0; }
.motto { margin: 1.6rem 0 1.4rem; text-align: center; }
.motto span { display: inline-block; position: relative; font-family: var(--f-display); font-style: italic; font-size: clamp(1.15rem, 1rem + .6vw, 1.45rem); padding: .45rem 2.2rem; background: var(--rubric); color: var(--vellum-hi); box-shadow: inset 0 0 0 1px rgba(233,207,140,.6); }
.motto span::before, .motto span::after { content: ""; position: absolute; top: 6px; bottom: -6px; width: 20px; background: var(--rubric-deep); z-index: -1; }
.motto span::before { left: -12px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 40% 50%); }
.motto span::after { right: -12px; clip-path: polygon(0 0, 100% 0, 60% 50%, 100% 100%, 0 100%); }
.atlas__text { font-size: .98rem; }
.atlas__more details { border-top: 1px solid var(--vellum-3); }
.atlas__more details:last-child { border-bottom: 1px solid var(--vellum-3); }
.atlas__more summary { cursor: pointer; padding: .8rem 0; font-family: var(--f-display); font-size: 1.15rem; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 44px; }
.atlas__more summary::-webkit-details-marker { display: none; }
.atlas__more summary::after { content: ""; width: 9px; height: 9px; border-right: 1.5px solid var(--rubric); border-bottom: 1.5px solid var(--rubric); transform: rotate(45deg); transition: transform .3s; flex: none; }
.atlas__more details[open] summary::after { transform: rotate(-135deg); }
.atlas__more summary:hover { color: var(--rubric); }
.atlas__more details p { font-size: .96rem; }
.atlas__foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1.6rem; }
.atlas__folio { font-family: var(--f-display); font-style: italic; color: var(--ink-2); text-align: center; }
.pager { display: inline-flex; align-items: center; gap: .5rem; background: none; border: 1px solid var(--line); border-radius: 2px; padding: .5rem 1rem; min-height: 44px; color: var(--ink); transition: background-color .2s, color .2s; }
.pager:hover { background: var(--ink); color: var(--vellum-hi); }
.pager:disabled { visibility: hidden; }

/* Hoja que gira sobre el lomo */
.leaf { position: absolute; top: 0; bottom: 0; z-index: 5; pointer-events: none; transform-style: preserve-3d; backface-visibility: visible;
  background-color: var(--vellum-hi); background-image: var(--paper-grain), linear-gradient(90deg, rgba(0,0,0,.18), transparent 18%, transparent 80%, rgba(0,0,0,.12)); }
.leaf--next { left: 50%; width: 50%; transform-origin: left center; animation: leafNext .72s var(--ease-book) forwards; }
.leaf--prev { left: 0; width: 50%; transform-origin: right center; animation: leafPrev .72s var(--ease-book) forwards; }
@keyframes leafNext { 0% { transform: rotateY(0); opacity: 1; box-shadow: -10px 0 30px rgba(0,0,0,0); } 50% { box-shadow: -30px 0 50px rgba(0,0,0,.35); } 88% { opacity: 1; } 100% { transform: rotateY(-180deg); opacity: 0; box-shadow: 0 0 0 rgba(0,0,0,0); } }
@keyframes leafPrev { 0% { transform: rotateY(0); opacity: 1; } 50% { box-shadow: 30px 0 50px rgba(0,0,0,.35); } 88% { opacity: 1; } 100% { transform: rotateY(180deg); opacity: 0; } }
@media (max-width: 860px) {
  .atlas__spread { grid-template-columns: 1fr; }
  .atlas__book { background-image: var(--paper-grain); min-height: 0; }
  .pg--verso { border-right: 0; padding-bottom: 0; }
  .leaf--next, .leaf--prev { left: 0; width: 100%; }
  .leaf--next { transform-origin: left center; }
  .leaf--prev { transform-origin: right center; }
  .atlas__head { gap: 1rem; }
}
.verso-in { position: sticky; top: 96px; }
.facts--terra { margin: 1.8rem 10px 0; padding-top: 1.2rem; border-top: 1px solid var(--vellum-3); }
@media (min-width: 861px) { .atlas__tabs { flex-wrap: wrap; overflow: visible; } }
@media (max-width: 860px) { .verso-in { position: static; } }

/* ───────── Glosario ───────── */
.gl-bar { position: sticky; top: 65px; z-index: 30; background: color-mix(in srgb, var(--vellum) 96%, transparent); border-bottom: 1px solid var(--vellum-3); }
.gl-bar__in { display: flex; align-items: center; gap: 1rem 2rem; flex-wrap: wrap; padding-block: .6rem; }
.gl-search { flex: 0 1 300px; }
.az { display: flex; flex-wrap: wrap; gap: .1rem; flex: 1; }
.az a, .az span { width: 1.62rem; height: 2.4rem; display: grid; place-items: center; font-family: var(--f-display); font-size: 1.05rem; text-decoration: none; border-radius: 2px; }
.az a { color: var(--ink); }
.az a:hover { background: var(--ink); color: var(--vellum-hi); }
.az span { color: var(--vellum-3); }
.gl-count { font-style: italic; color: var(--ink-3); min-height: 1.5em; }
.gl-group { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 2.4rem; padding: 2.6rem 0; border-top: 1px solid var(--line); scroll-margin-top: 150px; }
.gl-group:first-child { border-top: 0; padding-top: 0; }
.versal { position: relative; }
.versal span {
  position: sticky; top: 150px; display: grid; place-items: center; width: 7.6rem; aspect-ratio: 1;
  font-family: var(--f-display); font-weight: 700; font-size: 5.2rem; line-height: 1; color: var(--rubric);
  background:
    radial-gradient(circle at 30% 25%, rgba(255,250,225,.7), transparent 50%),
    linear-gradient(135deg, var(--gold-hi), var(--gold-leaf) 45%, var(--gold) 100%);
  border: 1px solid var(--line); box-shadow: inset 0 0 0 4px var(--vellum-hi), inset 0 0 0 5px var(--gold), var(--shadow-1);
  text-shadow: 1px 1px 0 rgba(255,240,200,.6);
}
.gl-entries { columns: 2 22rem; column-gap: 3rem; }
.voz { break-inside: avoid; padding: 0 0 1.6rem; margin-bottom: .4rem; scroll-margin-top: 150px; border-radius: 2px; transition: background-color .6s; }
.voz h2 { font-size: 1.55rem; font-weight: 600; margin-bottom: .35rem; }
.voz p { margin: 0 0 .5rem; font-size: .98rem; line-height: 1.6; }
.voz .see { font-size: .88rem; color: var(--ink-3); }
.voz .see span { font-style: italic; }
.xref { color: var(--rubric); text-decoration: underline dotted; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.xref--personaje { text-decoration-style: solid; }
.xref--terra { text-decoration-style: dashed; }
.voz.is-target { background: linear-gradient(90deg, rgba(214,178,106,.22), transparent); box-shadow: -14px 0 0 rgba(214,178,106,.22); }
@media (max-width: 760px) {
  .gl-group { grid-template-columns: 1fr; gap: 1.2rem; }
  .versal span { position: static; width: 4.6rem; font-size: 3.1rem; }
  .gl-bar { position: static; }
  .gl-bar__in { gap: .6rem; }
  .az a, .az span { width: 1.85rem; height: 2.2rem; }
}

/* ───────── Sala de lectura ───────── */
.reading-room { background-color: var(--vellum-2); background-image: var(--paper-grain), radial-gradient(90% 70% at 50% 40%, var(--vellum) 0%, var(--vellum-2) 70%, #d8c6a0 100%); }
.room { padding: clamp(1.4rem, 3vw, 2.4rem) 0 4rem; }
.room__head { text-align: center; margin-bottom: clamp(1.2rem, 2.4vw, 2rem); }
.room__head h1 { font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.8rem); font-style: italic; font-weight: 400; }
.room__head p { margin: .35rem 0 0; color: var(--ink-2); font-size: .95rem; }
.rbook {
  --pad: 56px; --G: 112px;
  position: relative; margin: 0 auto; padding: calc(var(--pad) * .6) var(--pad) calc(var(--pad) * .7);
  background-color: var(--vellum-hi); background-image: var(--paper-grain);
  border: 1px solid rgba(0,0,0,.55);
  box-shadow: 0 1px 0 #fff inset, 0 2px 0 var(--vellum-3), 0 4px 0 var(--vellum-hi), 0 5px 0 var(--vellum-3), 0 7px 0 var(--vellum-hi), 0 8px 0 var(--vellum-3), 0 30px 60px -24px rgba(50,30,10,.55);
  perspective: 2600px; touch-action: pan-y;
}
.rbook.is-two { background-image: var(--paper-grain), linear-gradient(90deg, rgba(0,0,0,.05), transparent 6%, transparent 44%, rgba(0,0,0,.16) 49.6%, rgba(0,0,0,.28) 50%, rgba(0,0,0,.16) 50.4%, transparent 56%, transparent 94%, rgba(0,0,0,.05)); }
.rbook__win { overflow: hidden; position: relative; }
.rbook__flow {
  column-fill: auto; transition: none;
  font-family: var(--f-text); font-size: clamp(1rem, .94rem + .22vw, 1.08rem); line-height: 1.62; color: var(--ink);
  text-align: justify; hyphens: auto; -webkit-hyphens: auto; font-variant-numeric: oldstyle-nums; orphans: 2; widows: 2;
}
.rbook__flow .text p { margin: 0; text-indent: 1.4em; }
.rbook__flow .text p.first { text-indent: 0; }
.rbook__flow .text p.first::first-letter {
  float: left; font-family: var(--f-display); font-weight: 700; font-size: 4.1em; line-height: .8; padding: .1em .12em .06em; margin: .06em .14em 0 0; color: var(--rubric);
  background: radial-gradient(circle at 30% 25%, rgba(255,250,225,.75), transparent 45%), linear-gradient(135deg, var(--gold-hi), var(--gold-leaf) 45%, var(--gold));
  border: 1px solid var(--line); box-shadow: inset 0 0 0 3px var(--vellum-hi), inset 0 0 0 4px var(--gold);
}
.tp { break-after: column; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .5rem; padding: 0 4%; }
.tp__orn { width: 120px; height: 32px; color: var(--gold); }
.tp__saga { margin: 0; font-style: italic; color: var(--ink-3); }
.tp__book { margin: 0; font-family: var(--f-display); font-size: clamp(2.6rem, 2rem + 2.4vw, 3.8rem); line-height: 1; letter-spacing: -.02em; }
.tp__line { margin: 0; font-style: italic; color: var(--ink-2); font-size: .95rem; }
.tp__fl { margin: 1.4rem 0 1rem; width: 30px; height: 30px; }
.tp__ch { font-family: var(--f-display); font-weight: 500; font-style: italic; font-size: clamp(1.6rem, 1.3rem + 1vw, 2.2rem); color: var(--rubric); line-height: 1.15; }
.tp__ch span { display: block; font-style: normal; font-size: .52em; color: var(--ink-2); margin-bottom: .35rem; }
.tp__by { margin: 1.6rem 0 0; font-family: var(--f-display); font-size: .95rem; letter-spacing: .05em; color: var(--ink-2); }
.endp { break-before: column; break-inside: avoid; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem; height: 100%; padding: 0 3%; hyphens: manual; }
.endp .fleuron { width: 30px; height: 30px; }
.endp__fin { font-family: var(--f-display); font-style: italic; font-size: 1.5rem; margin: 0; }
.endp p { margin: 0; text-align: center; }
.endp img { width: 110px; box-shadow: var(--shadow-2); margin: .8rem 0; }
.endp__buy { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }
.endp__more { font-size: .92rem; margin-top: .4rem !important; }
.rbook__run { display: flex; justify-content: space-between; font-family: var(--f-display); font-style: italic; font-size: .85rem; color: var(--ink-3); margin-bottom: 1rem; }
.rbook__run span:first-child { visibility: visible; }
.rbook:not(.is-two) .rbook__run span:first-child { display: none; }
.rbook:not(.is-two) .rbook__run { justify-content: center; }
.rbook__folios { display: flex; justify-content: space-between; margin-top: 1rem; font-family: var(--f-display); font-style: italic; font-size: .92rem; color: var(--ink-2); min-height: 1.4em; }
.rbook:not(.is-two) .rbook__folios { justify-content: center; }
.rbook__edge { position: absolute; top: 0; bottom: 0; width: 46px; border: 0; background: transparent; z-index: 4; cursor: pointer; }
.rbook__edge--prev { left: 0; cursor: w-resize; }
.rbook__edge--next { right: 0; cursor: e-resize; }
.rbook__edge--next::after { content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 100%; background: linear-gradient(270deg, rgba(0,0,0,.08), transparent); opacity: 0; transition: opacity .3s; }
.rbook__edge--next:hover::after { opacity: 1; }
.rbook__edge:disabled { display: none; }
.rctrl { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 2rem; max-width: 1180px; }
.rctrl__mid { flex: 1; display: grid; gap: .5rem; justify-items: center; font-family: var(--f-display); font-style: italic; color: var(--ink-2); }
.rctrl__bar { width: min(360px, 100%); height: 2px; background: var(--vellum-3); display: block; overflow: hidden; }
.rctrl__bar i { display: block; height: 100%; background: var(--rubric); transform-origin: left; transition: transform .6s var(--ease-out); }
.room__hint { text-align: center; color: var(--ink-3); font-style: italic; font-size: .88rem; margin-top: 1.2rem; }
.rbook .leaf { background-color: var(--vellum-hi); }
.rbook:not(.is-two) .leaf { left: 0; width: 100%; }
@media (max-width: 899px) {
  .rctrl .pager { padding: .5rem .7rem; font-size: .9rem; }
  .room__hint { display: none; }
}
.room__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: .2rem 1rem; }
.room__head p { margin: 0; }
.rside { display: none; position: absolute; top: 50%; transform: translateY(-50%); width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--line); background: var(--vellum-hi); color: var(--ink); place-items: center; box-shadow: var(--shadow-1); transition: background-color .2s, color .2s; z-index: 6; }
.rside .icon { width: 1.4em; height: 1.4em; }
.rside:hover { background: var(--ink); color: var(--vellum-hi); }
.rside:disabled { opacity: .25; pointer-events: none; }
.rside--prev { left: -84px; } .rside--next { right: -84px; }
@media (min-width: 1340px) { .rside { display: grid; } }
.atlas__head + .atlas__text { margin-top: 1.4rem; }
.atlas { scroll-margin-top: 96px; }

/* ═════════ Estética Imperio: ajustes en negro y oro ═════════ */
.lead-char__role, .persona__quote, .prologue__fig figcaption p, .gen__ep, .era__band span, .tp__ch, .endp__fin { font-family: var(--f-display); font-style: normal; }
.lead-char__role { color: var(--gold-hi); }
.persona__quote { color: var(--gold-hi); font-size: 1.15rem; }
.persona h4 { font-weight: 400; }
.persona h4 button { color: var(--ink); background-image: linear-gradient(var(--gold-leaf), var(--gold-leaf)); }
.persona h4 button:hover { color: var(--gold-hi); }
.persona__meta, .persona__books > span, .roll-group__head p { font-style: normal; font-family: var(--f-sc); letter-spacing: .05em; }
.roll-group__head { box-shadow: none; border-bottom-color: var(--line); }
.roll-group__head h3 { color: var(--gold-hi); }
.prologue__fig img { mix-blend-mode: normal; filter: invert(.94) sepia(.6) saturate(1.4) hue-rotate(-8deg) brightness(.95); border-radius: 50%; width: min(100%, 320px); aspect-ratio: 1; object-fit: cover; margin-bottom: 1.4rem; box-shadow: 0 0 0 1px var(--gold-lo), 0 0 0 8px #050407, 0 0 0 9px var(--line), 0 0 80px rgba(214,178,106,.12); }
.prologue__fig figcaption p { color: var(--ink); }
.prologue__fig figcaption span { font-style: normal; font-family: var(--f-sc); letter-spacing: .08em; color: var(--gold-leaf); }
.tree-hint, .dyn-reign { font-style: italic; }

/* Árbol: tinta dorada sobre negro */
.tree__ink .trunk-guide { stroke: var(--gold-lo); opacity: .9; }
.tree__ink .trunk { stroke: var(--gold-leaf); stroke-width: 2.2; filter: drop-shadow(0 0 4px rgba(214,178,106,.35)); }
.tree__ink .branch { stroke: var(--gold-leaf); }
.tree__ink .branch--usurp { stroke: var(--blood); }
.tree__ink .leaf { color: var(--gold-hi); }
.tree__ink .knot { fill: #050407; stroke: var(--gold-hi); }
.tree__ink .root path { stroke: var(--gold-leaf); }
.gen__ord { font-family: var(--f-sc); font-style: normal; letter-spacing: .06em; color: var(--gold-leaf); }
.gen__name { color: var(--ink); }
.gen__btn:hover .gen__name { color: var(--gold-hi); }
.gen__ep { color: var(--gold-hi); font-size: 1.15rem; }
.gen__kin b { color: var(--gold-hi); font-weight: 500; }
.gen--usurp .gen__name { color: #e58a74; }
.gen.is-target .cameo { box-shadow: 0 0 0 3px #08060a, 0 0 0 4.5px var(--gold-hi), 0 0 0 7px #08060a, 0 0 0 8px var(--gold-hi), 0 0 40px rgba(214,178,106,.4); }
.era__band { background: #050407; border-color: var(--gold-leaf); box-shadow: 0 0 0 3px #050407, 0 0 0 4px var(--gold-lo), var(--shadow-1); }
.era__band::before, .era__band::after { background: #050407; border-color: var(--gold-leaf); }
.era__band span { color: var(--gold-hi); }
.era__band small { font-family: var(--f-sc); letter-spacing: .06em; color: var(--ink-3); }
/* Reloj dinástico: el año del reinado, gigante, al fondo */
.dclock { position: sticky; top: 18vh; height: 0; z-index: 0; pointer-events: none; text-align: center; }
.dclock b { display: block; font-family: var(--f-display); font-weight: 400; font-size: clamp(120px, 24vw, 380px); line-height: 1; color: transparent; -webkit-text-stroke: 1px rgba(214,178,106,.16); font-variant-numeric: lining-nums tabular-nums; letter-spacing: -.02em; transition: opacity .6s var(--ease-out); user-select: none; }
.dclock span { display: none; font-family: var(--f-sc); letter-spacing: .14em; font-size: .9rem; color: rgba(214,178,106,.42); margin-top: -.6em; }
.tree { position: relative; }
@media (max-width: 760px) { .dclock b { font-size: 34vw; } .dclock { top: 26vh; } }

/* Atlas: láminas con marco dorado sobre pergamino nocturno */
.pin span { font-style: normal; font-family: var(--f-sc); letter-spacing: .06em; background: #050407; color: var(--gold-hi); border-color: var(--gold-leaf); }
.atlas__tabs { box-shadow: none; border-bottom-color: var(--line); }
.atlas__tabs button { font-family: var(--f-sc); letter-spacing: .04em; color: var(--ink-2); }
.atlas__tabs .n { font-family: var(--f-sc); font-style: normal; color: var(--gold-leaf); }
.atlas__tabs button:hover { border-color: var(--line); color: var(--gold-hi); }
.atlas__tabs button[aria-current="true"] { background: var(--gold-leaf); color: #0b0805; border-color: var(--gold-leaf); }
.atlas__tabs button[aria-current="true"] .n { color: #3a2a10; }
.atlas__book { background: radial-gradient(80% 60% at 75% 0%, rgba(214,178,106,.07), transparent 60%), radial-gradient(70% 60% at 0% 100%, rgba(155,130,224,.07), transparent 60%), linear-gradient(90deg, #0c0a0e 0, #0c0a0e 47%, #050407 50%, #0c0a0e 53%), #0c0a0e; border-color: var(--gold-lo); box-shadow: 0 0 0 5px #050407, 0 0 0 6px var(--line), 0 40px 80px -30px #000; }
.pg--verso { border-right-color: var(--line-soft); }
.atlas__head h3 { color: var(--ink); }
.atlas__throne { font-style: normal; font-family: var(--f-sc); letter-spacing: .05em; color: var(--gold-leaf); }
.seal-img { border-color: var(--gold-hi); box-shadow: 0 0 0 3px #050407, 0 0 0 4px var(--gold-leaf), 0 0 40px rgba(214,178,106,.15); }
.seal-img--type { background: radial-gradient(circle at 40% 35%, #2a2116, #0b0910); }
.seal-img--type b { font-style: normal; color: var(--gold-hi); }
.motto span { font-style: normal; background: linear-gradient(100deg, #9e7d3e, var(--gold-leaf) 50%, var(--gold-hi)); color: #0b0805; box-shadow: inset 0 0 0 1px rgba(255,240,200,.5); }
.motto span::before, .motto span::after { background: #7d6334; }
.atlas__more summary { color: var(--ink); }
.atlas__more summary::after { border-color: var(--gold-leaf); }
.atlas__more summary:hover { color: var(--gold-hi); }
.atlas__more details { border-color: var(--line-soft) !important; }
.atlas__folio { font-family: var(--f-sc); font-style: normal; letter-spacing: .08em; color: var(--gold-leaf); }
.pager { border-color: var(--line); color: var(--gold-hi); font-family: var(--f-sc); letter-spacing: .05em; border-radius: 0; }
.pager:hover { background: var(--gold-leaf); color: #0b0805; border-color: var(--gold-leaf); }
.atlas__thumbs button { border-color: var(--line-soft); }
.atlas__thumbs button[aria-pressed="true"] { box-shadow: 0 0 0 2px #050407, 0 0 0 3px var(--gold-hi); }
.leaf { background-color: #110d14; background-image: linear-gradient(90deg, rgba(0,0,0,.5), transparent 18%, transparent 80%, rgba(214,178,106,.08)); }
.mapcrop { border-color: rgba(0,0,0,.6); }

/* Glosario */
.gl-bar { background: rgba(3,2,5,.92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom-color: var(--line-soft); top: 67px; }
.az a { color: var(--ink-2); font-family: var(--f-display); }
.az a:hover { background: var(--gold-leaf); color: #0b0805; }
.az span { color: #4a4034; }
.gl-group { border-top-color: var(--line); }
.versal span { color: #1a1208; font-weight: 400; border-color: var(--gold-hi); box-shadow: inset 0 0 0 4px rgba(255,240,200,.25), inset 0 0 0 5px #7d6334, 0 0 50px rgba(214,178,106,.14); text-shadow: 0 1px 0 rgba(255,240,200,.55); }
.voz h2 { font-weight: 400; color: var(--gold-hi); }
.voz p { color: #e3d8c0; }
.xref { color: var(--gold-hi); text-decoration-color: var(--gold-lo); }
.xref--personaje { color: #c8b6f2; text-decoration-color: rgba(155,130,224,.6); }
.xref--terra { color: #8fd9bd; text-decoration-color: rgba(79,191,154,.6); }
.voz .see a { color: var(--gold-leaf); }
.voz.is-target { background: linear-gradient(90deg, rgba(214,178,106,.14), transparent); box-shadow: -14px 0 0 rgba(214,178,106,.14); }
.gl-key { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.4rem; margin: 1rem auto 0; font-size: .92rem; color: var(--ink-3); }
.gl-key i { font-style: normal; text-decoration: underline; text-underline-offset: .2em; }

/* Sala de lectura: Noche (por defecto) y Pergamino */
.reading-room { background: radial-gradient(90% 70% at 50% 30%, #120e18 0%, #050407 70%, #000 100%); }
.room__head h1 { font-style: normal; color: var(--gold-hi); }
.room__head p { font-family: var(--f-sc); letter-spacing: .05em; color: var(--ink-3); }
.rbook { background: radial-gradient(70% 50% at 50% 0%, rgba(214,178,106,.05), transparent 70%), #0e0b11; border-color: var(--gold-lo); box-shadow: 0 2px 0 #1b1620, 0 4px 0 #0e0b11, 0 5px 0 #1b1620, 0 7px 0 #0e0b11, 0 8px 0 #2a2230, 0 40px 80px -24px #000; }
.rbook.is-two { background: linear-gradient(90deg, rgba(0,0,0,.25), transparent 6%, transparent 44%, rgba(0,0,0,.45) 49.6%, rgba(0,0,0,.7) 50%, rgba(0,0,0,.45) 50.4%, transparent 56%, transparent 94%, rgba(0,0,0,.25)), #0e0b11; }
.rbook__flow { color: #e9dfc8; font-size: clamp(1.05rem, 1rem + .25vw, 1.15rem); line-height: 1.66; }
.rbook__flow .text p.first::first-letter { font-weight: 400; color: var(--gold-hi); background: none; border: 0; box-shadow: none; padding: .04em .1em 0 0; font-size: 4.4em; text-shadow: 0 1px 0 var(--gold-lo), 0 0 22px rgba(214,178,106,.25); }
.tp__saga, .tp__line { font-style: normal; font-family: var(--f-sc); letter-spacing: .08em; }
.tp__saga { color: var(--gold-leaf); }
.tp__book { color: var(--gold-hi); }
.tp__ch { color: var(--ink); }
.tp__ch span { font-family: var(--f-sc); letter-spacing: .1em; color: var(--gold-leaf); }
.tp__by { font-family: var(--f-sc); letter-spacing: .1em; color: var(--ink-3); }
.tp__orn { color: var(--gold-leaf); }
.rbook__run, .rbook__folios, .rctrl__mid { font-family: var(--f-sc); font-style: normal; letter-spacing: .08em; }
.rbook__run { color: var(--gold-lo); }
.rbook__folios { color: var(--gold-leaf); }
.rbook .leaf { background-color: #120e15; }
.rside { background: #050407; border-color: var(--line); color: var(--gold-hi); }
.rside:hover { background: var(--gold-leaf); color: #0b0805; }
.rctrl__bar { background: var(--line-soft); }
.rctrl__bar i { background: var(--gold-leaf); }
.endp img { box-shadow: 0 20px 40px -12px #000; }
/* Pergamino */
.rbook.lux { background: radial-gradient(80% 60% at 50% 0%, #fbf3df, #efe0bf 70%, #e3cfa2); border-color: #8a6c36; box-shadow: 0 2px 0 #cdb588, 0 4px 0 #efe0bf, 0 5px 0 #cdb588, 0 7px 0 #efe0bf, 0 8px 0 #b89a62, 0 40px 80px -24px #000; }
.rbook.lux.is-two { background: linear-gradient(90deg, rgba(60,40,10,.06), transparent 6%, transparent 44%, rgba(60,40,10,.18) 49.6%, rgba(60,40,10,.3) 50%, rgba(60,40,10,.18) 50.4%, transparent 56%, transparent 94%, rgba(60,40,10,.06)), radial-gradient(80% 60% at 50% 0%, #fbf3df, #efe0bf 70%, #e3cfa2); }
.rbook.lux .rbook__flow { color: #22180c; }
.rbook.lux .rbook__flow .text p.first::first-letter { color: #6b3f0c; text-shadow: none; }
.rbook.lux .tp__book, .rbook.lux .tp__ch { color: #22180c; }
.rbook.lux .tp__saga, .rbook.lux .tp__ch span, .rbook.lux .rbook__folios { color: #6b4a14; }
.rbook.lux .rbook__run, .rbook.lux .tp__by, .rbook.lux .tp__line { color: #5a4626; }
.rbook.lux .tp__orn, .rbook.lux .fleuron { color: #8a6c36; }
.rbook.lux .leaf { background-color: #f3e6c8; }
.rbook.lux .endp__buy .btn--ghost { color: #4f2e08; border-color: #8a6c36; }
.rbook.lux a { color: #6b3f0c; }
.rmode { display: inline-flex; border: 1px solid var(--line); margin-top: .6rem; }
.rmode button { background: none; border: 0; padding: .4rem 1rem; min-height: 44px; font-family: var(--f-sc); letter-spacing: .06em; font-size: .92rem; color: var(--ink-2); }
.rmode button[aria-pressed="true"] { background: var(--gold-leaf); color: #0b0805; }
.room__head { flex-direction: column; align-items: center; gap: .3rem; }

/* Cartel de Resryon «El General» (v2) */
.poster { position: relative; min-height: calc(100svh - 67px); display: grid; overflow: hidden; isolation: isolate; background: #000; border-bottom: 1px solid var(--line-soft); }
.poster__img { position: absolute; inset: 0; z-index: -2; }
.poster__img img { width: 100%; height: 100%; object-fit: cover; object-position: 24% 30%; transform-origin: 24% 40%; animation: kb 26s var(--ease-out) both; }
@keyframes kb { from { transform: scale(1.14); filter: brightness(.4) saturate(.7); } to { transform: scale(1.02); filter: brightness(1) saturate(1); } }
.poster::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(0,0,0,0) 30%, rgba(0,0,0,.55) 62%, rgba(0,0,0,.88)), linear-gradient(180deg, rgba(0,0,0,.5), transparent 22%, transparent 60%, #000 99%); }
.poster__glow { position: absolute; z-index: -1; width: 70vmax; height: 70vmax; right: -20vmax; top: 10%; border-radius: 50%; background: radial-gradient(closest-side, rgba(240,214,149,.16), rgba(200,163,90,.05) 50%, transparent); pointer-events: none; animation: breathe 9s ease-in-out infinite alternate; }
@keyframes breathe { from { opacity: .55; transform: translateY(0); } to { opacity: 1; transform: translateY(-4%); } }
.poster__copy { align-self: center; justify-self: end; width: min(680px, 100%); padding: 48px var(--gutter) 56px 0; text-align: right; }
.poster__credit { font-family: var(--f-sc); letter-spacing: .1em; font-size: .95rem; color: var(--gold-leaf); margin-bottom: 1.4rem; }
.poster__name { font-size: clamp(4rem, 10.5vw, 9.5rem); line-height: .84; color: var(--ink); letter-spacing: -.02em; text-shadow: 0 6px 40px rgba(0,0,0,.6); }
.poster__name .w { display: block; }
.poster__name .ch { display: inline-block; animation: rise 1.6s var(--ease-out) both; animation-delay: calc(.3s + var(--i) * 55ms); }
@keyframes rise { from { opacity: 0; transform: translateY(.35em); filter: blur(12px); } to { opacity: 1; transform: none; filter: blur(0); } }
.poster__ep { display: flex; align-items: center; justify-content: flex-end; gap: 18px; margin: 1.3rem 0 1.8rem; font-family: var(--f-display); font-size: clamp(1.7rem, 2.8vw, 2.6rem); color: var(--gold-hi); animation: fadeUp 1.4s var(--ease-out) 1.3s both; }
.poster__ep::before { content: ""; height: 1px; width: clamp(40px, 8vw, 120px); background: linear-gradient(90deg, transparent, var(--gold-leaf)); }
.poster__quote { margin: 0 0 0 auto; max-width: 31ch; animation: fadeUp 1.4s var(--ease-out) 1.7s both; }
.poster__quote p { font-size: clamp(1.15rem, 1.4vw + .5rem, 1.5rem); line-height: 1.45; font-style: italic; font-weight: 300; color: #ecdfc5; margin: 0; }
.poster__quote cite { display: block; font-style: normal; font-family: var(--f-sc); font-size: .92rem; letter-spacing: .08em; color: var(--ink-3); margin-top: .8rem; }
.poster__acts { display: flex; gap: .75rem; justify-content: flex-end; flex-wrap: wrap; margin-top: 2rem; animation: fadeUp 1.4s var(--ease-out) 2s both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (max-width: 760px) {
  .poster { min-height: calc(100svh - 67px); }
  .poster__img img { object-position: 20% 20%; }
  .poster::before { background: linear-gradient(180deg, rgba(0,0,0,.45), transparent 18%, rgba(0,0,0,.1) 38%, rgba(0,0,0,.9) 66%, #000); }
  .poster__copy { align-self: end; justify-self: start; text-align: left; padding: 38vh var(--gutter) 34px; }
  .poster__name { font-size: clamp(3.8rem, 19vw, 6rem); }
  .poster__ep { justify-content: flex-start; margin: .9rem 0 1.1rem; }
  .poster__ep::before { display: none; }
  .poster__quote { margin: 0; }
  .poster__acts { justify-content: flex-start; margin-top: 1.4rem; }
}
@media (prefers-reduced-motion: reduce) { .poster__img img, .poster__glow, .poster__name .ch, .poster__ep, .poster__quote, .poster__acts { animation: none; } }
@media (max-width: 820px) { .prologue__fig img { width: min(70%, 240px); } }
.atlas__folio, .rctrl__mid span { white-space: nowrap; }
.rbook__run { color: var(--ink-3); }
@media (max-width: 480px) { .atlas__folio { font-size: .85rem; letter-spacing: .04em; } .rctrl__mid { font-size: .9rem; } }
@media (max-width: 520px) {
  .rctrl { gap: .6rem; }
  .rctrl .pager .pl { display: none; }
  .rctrl .pager { min-width: 48px; justify-content: center; padding: .5rem .8rem; }
  .atlas__foot { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
  .atlas__folio { grid-column: 1 / -1; grid-row: 1; }
  .atlas__foot .pager { justify-content: center; min-width: 0; }
  .atlas__foot #next { grid-column: 2; }
}

/* Selector de lectura: Dryadalis / Aeterna */
.rtext { display: inline-flex; gap: 0; border: 1px solid var(--line); margin-top: .9rem; }
.rtext button { display: grid; gap: .1rem; background: none; border: 0; padding: .55rem 1.3rem; min-height: 52px; color: var(--ink-2); text-align: center; }
.rtext button + button { border-left: 1px solid var(--line); }
.rtext b { font-family: var(--f-display); font-weight: 400; font-size: 1.15rem; line-height: 1.1; }
.rtext small { font-family: var(--f-sc); letter-spacing: .06em; font-size: .78rem; color: var(--ink-3); }
.rtext button[aria-pressed="true"] { background: rgba(214,178,106,.14); color: var(--gold-hi); box-shadow: inset 0 -2px 0 var(--gold-leaf); }
body[data-text="aeterna"] .rtext button[aria-pressed="true"] { background: rgba(143,29,44,.35); box-shadow: inset 0 -2px 0 #c43a4b; }
.tp__book--roman { font-family: "Cinzel", var(--f-display); font-weight: 700; letter-spacing: .12em; margin-right: -.12em; font-size: clamp(2.2rem, 1.7rem + 2vw, 3.4rem); }
.tp__epi { margin: .9rem auto 0; max-width: 30ch; font-style: italic; color: var(--ink-2); font-size: .98rem; line-height: 1.45; }
body[data-text="aeterna"] .tp__ch span, body[data-text="aeterna"] .tp__saga { color: #e88c97; }
body[data-text="aeterna"] .rbook__flow .text p.first::first-letter { font-family: "Cinzel", var(--f-display); font-weight: 700; }
body[data-text="aeterna"] .rbook:not(.lux) { box-shadow: 0 2px 0 #1b1620, 0 4px 0 #0e0b11, 0 5px 0 #1b1620, 0 7px 0 #0e0b11, 0 8px 0 #4a0b14, 0 40px 80px -24px #000; border-color: #6e1421; }
.rbook.lux .tp__epi { color: #3b2d18; }
body[data-text="aeterna"] .rbook.lux .tp__ch span, body[data-text="aeterna"] .rbook.lux .tp__saga { color: #7a1a26; }
.room__head .rtext + .rmode { margin-top: .5rem; }
.tp { min-height: 100%; height: auto; }
@media (max-width: 899px) {
  .tp { gap: .25rem; }
  .tp__orn { display: none; }
  .tp__fl { margin: .5rem 0 .4rem; }
  .tp__epi { font-size: .88rem; margin-top: .5rem; }
  .tp__by { margin-top: .8rem; }
  .tp__book--roman { font-size: 2.1rem; }
  .rtext button { padding: .5rem .8rem; }
  .rtext small { font-size: .7rem; letter-spacing: .03em; white-space: nowrap; }
}
.tp, .endp { hyphens: manual; -webkit-hyphens: manual; }

/* ═════ Sala de lectura de Aeterna: dentro de Magna Roma ═════ */
body.reading-room[data-text="aeterna"] { background: transparent; }
body.reading-room[data-text="aeterna"]::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(5,3,6,.55) 0%, rgba(5,3,6,.42) 40%, rgba(5,3,6,.7) 100%), url("../../assets/hdh/lectura-desk.jpg") 50% 50% / cover no-repeat, #050306; transition: opacity .6s; }
@media (max-aspect-ratio: 4/5) {
  body.reading-room[data-text="aeterna"]::before { background: linear-gradient(180deg, rgba(5,3,6,.6) 0%, rgba(5,3,6,.45) 40%, rgba(5,3,6,.75) 100%), url("../../assets/hdh/lectura-mob.jpg") 50% 50% / cover no-repeat, #050306; }
}
body.reading-room[data-text="aeterna"].is-perg::before { opacity: .35; }
body[data-text="aeterna"] .room__head h1, body[data-text="aeterna"] .room__head p, body[data-text="aeterna"] .room__hint, body[data-text="aeterna"] .rctrl__mid { text-shadow: 0 1px 8px rgba(0,0,0,.95); }
body[data-text="aeterna"] .room__head p, body[data-text="aeterna"] .room__hint { color: #e3d8c0; }
body[data-text="aeterna"] .rtext, body[data-text="aeterna"] .rmode, body[data-text="aeterna"] .pager { background: rgba(5,3,6,.72); }
body[data-text="aeterna"] .rbook:not(.lux) { background: rgba(14,11,17,.95); }
body[data-text="aeterna"] .rbook:not(.lux).is-two { background: linear-gradient(90deg, rgba(0,0,0,.25), transparent 6%, transparent 44%, rgba(0,0,0,.45) 49.6%, rgba(0,0,0,.7) 50%, rgba(0,0,0,.45) 50.4%, transparent 56%, transparent 94%, rgba(0,0,0,.25)), rgba(14,11,17,.95); }
body[data-text="aeterna"] .colophon { position: relative; }
.gen__kindle { margin: .5rem 0 0; }
.gen--L .gen__kindle { text-align: right; padding-right: calc(var(--cam) + 2.45rem); }
.gen--R .gen__kindle { padding-left: calc(var(--cam) + 2.45rem); }
.gen__buy { display: inline-flex; align-items: center; gap: .45em; font-family: var(--f-sc); letter-spacing: .05em; font-size: .85rem; color: var(--gold-hi); border: 1px solid var(--gold-lo); padding: .3em .8em; text-decoration: none; min-height: 36px; }
.gen__buy:hover { background: var(--gold-leaf); color: #0b0805; }
.gen__buy .icon { width: 1em; height: 1em; }
@media (max-width: 760px) { .gen--L .gen__kindle, .gen--R .gen__kindle { text-align: left; padding: 0 0 0 calc(var(--cam) + 1.85rem); } }
.gen__buy { white-space: nowrap; }
body[data-text="aeterna"] .rtext button[aria-pressed="true"] { background: rgba(214,178,106,.18); box-shadow: inset 0 -2px 0 var(--gold-leaf); }
body[data-text="aeterna"] .tp__ch span, body[data-text="aeterna"] .tp__saga { color: var(--gold-leaf); }
body[data-text="aeterna"] .rbook:not(.lux) { border-color: var(--gold-lo); }

/* ═════ m66/m67: Lapso y Próximamente en la sala de lectura ═════ */
body.reading-room[data-text="lapso"] { background: transparent; }
body.reading-room[data-text="lapso"]::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(180deg, rgba(5,6,10,.62), rgba(5,6,10,.5) 40%, rgba(5,6,10,.82)), url("../../assets/hdh/hellas-desk.jpg") 50% 40% / cover no-repeat, #050608; }
@media (max-aspect-ratio: 4/5) { body.reading-room[data-text="lapso"]::before { background: linear-gradient(180deg, rgba(5,6,10,.62), rgba(5,6,10,.5) 40%, rgba(5,6,10,.85)), url("../../assets/hdh/hellas-mob.jpg") 50% 40% / cover no-repeat, #050608; } }
body[data-text="lapso"] .room__head p { color: #e8e2d4; text-shadow: 0 1px 8px #000; }
body[data-text="lapso"] .rtext { background: rgba(5,6,10,.75); }
body[data-text="lapso"] #comentarios-capitulo { display: none !important; }
.rlapso { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(1.4rem, 4vw, 3.4rem); align-items: center; max-width: 980px; margin: 1rem auto 0; padding: clamp(1.4rem, 4vw, 3rem);
  background: linear-gradient(180deg, rgba(248,243,232,.9), rgba(244,238,224,.95)), url("../../assets/hdh/hellas-desk.jpg") 50% 30% / cover no-repeat; border: 1px solid #b9a06a; box-shadow: 0 0 0 5px rgba(5,6,10,.6), 0 0 0 6px #b28a2e, 0 40px 80px -30px #000; color: #14283c; }
.rlapso[hidden] { display: none; }
.rlapso__cov { width: clamp(140px, 18vw, 220px); box-shadow: 0 24px 40px -16px rgba(15,42,68,.6); }
.rlapso__num { margin: 0 0 .3rem; font-family: "Cinzel", var(--f-sc); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; font-size: .8rem; color: #6e5310; }
.rlapso__t { font-family: "Cinzel", var(--f-display); font-weight: 700; letter-spacing: .06em; font-size: clamp(2rem, 1.4rem + 2vw, 3.2rem); color: #0f2a44; }
.rlapso__tag { font-family: var(--f-display); font-size: 1.4rem; color: #1b5a86; margin: .5rem 0 .8rem; }
.rlapso__poem { font-style: italic; color: #263a50; line-height: 1.6; }
.rlapso__note { font-weight: 500; color: #14283c; margin: 1.2rem 0 1rem; }
.rlapso .btn { color: #120c04; }
@media (max-width: 640px) { .rlapso { grid-template-columns: 1fr; justify-items: center; text-align: center; } }
.rsoon { max-width: 980px; margin: clamp(3rem, 7vw, 5rem) auto 0; padding: clamp(1.4rem, 3vw, 2.2rem); border: 1px solid var(--line); background: rgba(5,4,7,.86); text-align: center; }
.rsoon h2 { font-family: var(--f-sc); font-weight: 500; letter-spacing: .12em; font-size: clamp(1rem, .9rem + .4vw, 1.25rem); color: var(--gold-hi); margin-bottom: 1.6rem; }
.rsoon__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.6rem 2.6rem; }
.rsoon figure { margin: 0; display: flex; gap: 1rem; align-items: center; text-align: left; max-width: 380px; }
.rsoon img { width: 96px; aspect-ratio: 2 / 3; object-fit: cover; box-shadow: 0 16px 30px -12px #000; outline: 1px solid var(--line); }
.rsoon b { display: block; font-family: var(--f-display); font-weight: 400; font-size: 1.25rem; color: var(--ink); line-height: 1.15; }
.rsoon span { display: block; margin-top: .4rem; font-family: var(--f-sc); letter-spacing: .05em; color: var(--gold-leaf); font-size: .92rem; }

/* ═════ Privacidad, cookies y aviso legal ═════ */
.legal__date { font-family: var(--f-sc); letter-spacing: .06em; color: var(--ink-3); font-size: .92rem; margin: .8rem 0 0; }
.legal__wrap { max-width: 860px; padding-bottom: 5rem; }
.legal__toc { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-bottom: 3rem; }
.legal__toc a { font-family: var(--f-sc); letter-spacing: .05em; color: var(--gold-hi); border: 1px solid var(--line); padding: .5em 1.1em; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.legal__toc a:hover { background: var(--gold-leaf); color: #0b0805; }
.legal__sec { scroll-margin-top: 90px; padding: clamp(1.4rem, 3vw, 2.4rem); margin-bottom: 2.4rem; border: 1px solid var(--line-soft); background: rgba(214,178,106,.03); }
.legal__sec h2 { font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.6rem); color: var(--gold-hi); margin-bottom: 1rem; }
.legal__sec h3 { font-family: var(--f-sc); font-weight: 500; letter-spacing: .06em; font-size: 1.08rem; color: var(--gold-leaf); margin: 1.8rem 0 .6rem; }
.legal__sec p, .legal__sec li { color: #e3d8c0; max-width: 68ch; }
.legal__sec ul { padding-left: 1.2rem; }
.legal__sec li { margin-bottom: .6rem; }
.legal__sec b { color: var(--ink); font-weight: 600; }
.legal__dl { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.4rem; margin: .4rem 0 0; }
.legal__dl dt { font-family: var(--f-sc); letter-spacing: .05em; color: var(--gold-leaf); }
.legal__dl dd { margin: 0; }
.pend { display: inline-block; padding: .05em .5em; border: 1px dashed #e8b45a; color: #f3c977; font-family: var(--f-sc); letter-spacing: .05em; background: rgba(232,180,90,.08); }
@media (max-width: 560px) { .legal__dl { grid-template-columns: 1fr; gap: 0; } .legal__dl dd { margin-bottom: .6rem; } }
.room [hidden], .room__head [hidden] { display: none !important; }
.rsoon img { height: auto; }
.rlapso__cov { height: auto; aspect-ratio: 2 / 3; object-fit: cover; }
/* m68: portadilla de Lapso en negro y dorado */
.rlapso { background: linear-gradient(180deg, rgba(8,9,12,.86), rgba(8,9,12,.93)), url("../../assets/hdh/hellas-desk.jpg") 50% 30% / cover no-repeat, #08090c; border-color: var(--gold-lo); box-shadow: 0 0 0 5px rgba(5,6,10,.6), 0 0 0 6px #4f8fbf, 0 40px 80px -30px #000; color: var(--ink); }
.rlapso__num { color: var(--gold-leaf); }
.rlapso__t { color: var(--ink); }
.rlapso__tag { color: var(--gold-hi); }
.rlapso__poem { color: var(--ink-2); }
.rlapso__note { color: var(--ink); }
/* t13-3 (Jessica, 22-10): el narrador, más grande que el nombre de la autora */
.tp__by { margin-top: 1.4rem; font-size: clamp(1.15rem, 1rem + .5vw, 1.4rem); color: var(--gold-hi); letter-spacing: .08em; }
.tp__autora { margin: .3rem 0 0; font-family: var(--f-sc); font-size: .74rem; letter-spacing: .14em; color: var(--ink-3); }
.rbook.lux .tp__by { color: #6b4a14; }
.rbook.lux .tp__autora { color: #7a6646; }
@media (max-width: 760px) { .tp__by { margin-top: .8rem; } }
