/* RVE WEB 2.0 - Integracion visual V1.2. Home only; loaded after V1.1. */
:root{--rve-chrome:130px;--rve-scene-h:max(320px,calc(100svh - var(--rve-chrome)));--rve-hold:clamp(112.8px,19.2svh,192px);--rve-description:18px;--rve-reflection:calc(var(--rve-description) - 2pt)}
/* Single reading system; the two-point difference is exact in CSS units. */
html body main#contenido :is(.hero-lower p,.mex-writing p,.flor-content p,.espejo-intro,.paint-main-copy,.narrator .paragraph,.rve-library-intro,.rve-library-selected p,.conversation-copy .lead,.conversation-secondary){font-family:var(--type-reading,Onest,system-ui,sans-serif)!important;font-size:var(--rve-description)!important;font-style:normal!important;font-weight:400!important;line-height:1.55!important;letter-spacing:0!important}
html body main#contenido :is(.hero-reflection-feature,.mex-voice p,.super-flor p,.espejo-reflection-text,.paint-reflection p,.super-voz .author-super-text){font-family:var(--type-reading,Onest,system-ui,sans-serif)!important;font-size:var(--rve-reflection)!important;font-style:italic!important;font-weight:400!important;line-height:1.52!important;letter-spacing:0!important;font-synthesis:style}
/* Every encounter uses the clear area beneath the fixed header and discovery rail.
   Natural document flow if the content needs extra room; no scroll hijacking. */
html body main#contenido .chapter-shell{height:auto!important;min-height:0!important;overflow:visible!important;position:relative}
html body main#contenido .chapter-shell>section{box-sizing:border-box;position:relative!important;top:auto!important;height:auto!important;min-height:var(--rve-scene-h)!important;max-height:none!important;padding:clamp(22px,3svh,40px) 0!important;overflow:hidden!important;scroll-margin-top:0;display:flex!important;align-items:center;justify-content:center}
html body main#contenido .chapter-shell>section> :is(.mex-stage,.espejo-layout,.paint-scene-grid,.wrap,.flor-stage){min-width:0;max-height:none}
html{scroll-padding-top:var(--rve-chrome)}

/* Hero is a separate opening without discovery strip; minimum screen height. */
html body main#contenido #inicio{height:auto!important;min-height:100svh!important;overflow:hidden}
/* Mexico: both text columns live in the same scene, with the reflection under the group. */
html body main#contenido .chapter-shell-mexico #mexico .mex-stage{height:auto;min-height:0;padding:0;grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr);grid-template-areas:'heading animals' 'writing animals' 'action reflection';grid-template-rows:auto auto auto;align-items:center;align-content:center;gap:clamp(14px,2vh,23px) clamp(26px,4vw,65px)}
html body main#contenido #mexico .mex-heading{align-self:end}
html body main#contenido #mexico .mex-writing{align-self:start}
html body main#contenido #mexico .mex-end{align-self:center}
html body main#contenido #mexico .mex-voice{align-self:start;max-width:100%}
html body main#contenido #mexico .maqueta-mex-animales{width:100%;height:auto;min-height:0;align-self:center}
html body main#contenido #mexico .maqueta-grupo{max-height:clamp(225px,calc(var(--rve-scene-h) * .62),520px);width:100%;height:auto;object-fit:contain}
/* Flor: left copy; right artwork and author's reflection. Image width .85 of 52% = 44.2% of scene. */
html body main#contenido #flor{padding:0!important;background:#121111}
html body main#contenido #flor .flor-stage{position:relative;top:auto;height:auto;min-height:var(--rve-scene-h);width:100%;display:flex;align-items:center;padding:clamp(22px,3svh,40px) 0;overflow:hidden;isolation:isolate}
html body main#contenido #flor .flor-stage>.wrap{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-areas:'label visual' 'title visual' 'copy visual';grid-template-rows:auto auto auto;align-content:center;align-items:center;gap:14px 5%;padding:0;position:relative;z-index:3;margin:auto}
html body main#contenido #flor .flor-stage>.wrap>.eyebrow{align-self:end;margin:0}
html body main#contenido #flor .flor-name{font-size:clamp(65px,8.5vw,142px);padding:0;line-height:.88;align-self:center}
html body main#contenido #flor .flor-content{align-self:start;max-width:52ch;margin:0;padding:0}
html body main#contenido #flor .flor-right{grid-area:visual;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;min-width:0}
html body main#contenido #flor .flor-right .flor-visual{position:relative;inset:auto;transform:none;order:0;width:93%;max-width:none;max-height:calc(var(--rve-scene-h) * .63);height:auto;aspect-ratio:1322/1190;margin:0;mask-image:none;-webkit-mask-image:none;overflow:visible}
html body main#contenido #flor .flor-right .flor-art{position:relative;inset:auto;transform:none;width:100%;height:100%;max-height:calc(var(--rve-scene-h) * .63);object-fit:contain;mask-image:none;-webkit-mask-image:none}
html body main#contenido #flor .flor-right .super-flor{position:relative;inset:auto;transform:none;margin:0;padding:0;width:93%;max-width:100%;border:0;background:none}
html body main#contenido #flor .super-flor::before{display:none!important}
/* Dark, overlapping wisps rather than symmetric white clouds on four edges. */
html body main#contenido #flor .flor-stage>.flor-fog{z-index:8;pointer-events:none;overflow:hidden}
html body main#contenido #flor .flor-stage>.flor-fog .flor-fog-core{z-index:0;inset:0;background:radial-gradient(ellipse at 30% 40%,#09090b 0%,#111116 42%,#030304 100%)}
html body main#contenido #flor .flor-stage>.flor-fog .flor-cloud{z-index:1;filter:brightness(0) invert(.16) sepia(.10) blur(7px);object-fit:cover;transform-origin:center;mix-blend-mode:screen;will-change:opacity,transform}
html body main#contenido #flor .flor-cloud-left{width:145%;height:115%;left:-45%;top:-5%}
html body main#contenido #flor .flor-cloud-right{width:140%;height:110%;right:-42%;top:5%}
html body main#contenido #flor .flor-cloud-top{width:150%;height:100%;left:-15%;top:-48%}
html body main#contenido #flor .flor-cloud-bottom{width:135%;height:110%;left:-14%;bottom:-53%}
/* Espejo: actual image + reflection form a centered right-hand group. */
html body main#contenido .chapter-shell-espejo #espejo .espejo-layout{height:auto;grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr);grid-template-areas:'editorial visual' 'editorial reflection';grid-template-rows:auto auto;align-content:center;align-items:center;row-gap:16px;margin:auto}
html body main#contenido .chapter-shell-espejo #espejo .espejo-editorial{align-self:center}
html body main#contenido .chapter-shell-espejo #espejo .espejo-layout .espejo-visual{grid-area:visual;align-self:center;justify-self:center;width:100%;max-width:min(650px,calc(var(--rve-scene-h) * .73 * 1.222826));max-height:calc(var(--rve-scene-h) * .73);aspect-ratio:1350/1104;margin:0}
html body main#contenido .chapter-shell-espejo #espejo .espejo-layout .super-espejo{grid-area:reflection;align-self:start;justify-self:center;width:100%;max-width:54ch;position:relative;inset:auto;transform:none;margin:0;padding:0;border:0}
/* Preserve composition and keep all gallery art/voice elements inside the frame. */
html body main#contenido #pintura .paint-scene-grid{height:auto;align-content:center;gap:clamp(10px,1.5vh,18px)}
html body main#contenido #pintura .maqueta-paint-gallery img{height:clamp(115px,calc(var(--rve-scene-h)*.36),300px)}
html body main#contenido #voz>.wrap{height:auto;min-height:0;align-content:center;grid-template-rows:auto auto auto auto}
html body main#contenido #voz .super-voz{border:0!important;padding-top:0!important}
html body main#contenido #voz .maqueta-microfono{max-height:clamp(150px,calc(var(--rve-scene-h)*.40),340px)}
/* Library: unmodified PNG from the ZIP; hotspot coordinates refer to 1774 x 887.
   No separate tabletop or book layer; normalized rectangles do not move on resize. */
html body main#contenido #libros.rve-library{padding:0!important}
html body main#contenido #libros .rve-library-layout{width:min(1400px,calc(100% - clamp(28px,7vw,120px)));height:auto;min-height:var(--rve-scene-h);padding:clamp(22px,3svh,40px) 0;grid-template-rows:auto auto auto;align-content:center;gap:clamp(12px,2vh,22px) clamp(22px,4vw,55px)}
html body main#contenido #libros .rve-library-desk{width:100%;height:auto;min-height:0;aspect-ratio:1774/887;overflow:visible}
html body main#contenido #libros .rve-library-plane{inset:0;left:0;top:0;width:100%;height:100%;aspect-ratio:1774/887;transform:none}
html body main#contenido #libros .rve-library-books-render{inset:0;width:100%;height:100%;object-fit:contain}
#libros .rve-book-ensemble--cimbalo{--hit-x:5.4%;--hit-y:15.2%;--hit-w:15.7%;--hit-h:49.8%}
#libros .rve-book-ensemble--rey{--hit-x:21.1%;--hit-y:19.0%;--hit-w:14.4%;--hit-h:46.4%}
#libros .rve-book-ensemble--hija{--hit-x:35.5%;--hit-y:19.9%;--hit-w:14.8%;--hit-h:45.3%}
#libros .rve-book-ensemble--animales{--hit-x:50.3%;--hit-y:20.0%;--hit-w:14.0%;--hit-h:45.0%}
#libros .rve-book-ensemble--hotel{--hit-x:64.3%;--hit-y:19.1%;--hit-w:14.7%;--hit-h:46.1%}
#libros .rve-book-ensemble--horror{--hit-x:79.0%;--hit-y:15.3%;--hit-w:15.2%;--hit-h:49.9%}
/* Hablemos: complete table within the section; the original steam anchors remain. */
html body main#contenido #contacto.conversation-scene{padding:0!important}
html body main#contenido #contacto .conversation-layout{height:auto;min-height:var(--rve-scene-h);padding:clamp(22px,3svh,40px) 0;align-items:center}
html body main#contenido #contacto .conversation-art{align-self:center;justify-self:center;width:min(100%,calc(var(--rve-scene-h)*.76*1122/1402));height:auto;margin:0;max-width:700px;aspect-ratio:1122/1402}
/* Compact screens: use the same minimum reading frame, never clip prose or force a pause. */
@media(max-width:760px){
 :root{--rve-chrome:117px}
 html body main#contenido .chapter-shell>section{padding:28px 0!important;min-height:var(--rve-scene-h)!important}
 html body main#contenido .chapter-shell-mexico #mexico .mex-stage{grid-template-columns:minmax(0,1fr);grid-template-areas:'heading' 'writing' 'animals' 'reflection' 'action';grid-template-rows:auto;gap:22px}
 html body main#contenido #mexico .maqueta-grupo{max-height:380px}
 html body main#contenido #flor .flor-stage{padding:28px 0;min-height:var(--rve-scene-h)}
 html body main#contenido #flor .flor-stage>.wrap{grid-template-columns:minmax(0,1fr);grid-template-areas:'label' 'title' 'copy' 'visual';grid-template-rows:auto;gap:20px}
 html body main#contenido #flor .flor-name{font-size:clamp(65px,18vw,118px)}
 html body main#contenido #flor .flor-right .flor-visual{width:85%;max-height:380px}
 html body main#contenido #flor .flor-right .flor-art{max-height:380px}
 html body main#contenido #flor .flor-right .super-flor{width:100%}
 html body main#contenido .chapter-shell-espejo #espejo .espejo-layout{grid-template-columns:minmax(0,1fr);grid-template-areas:'editorial' 'visual' 'reflection';grid-template-rows:auto}
 html body main#contenido .chapter-shell-espejo #espejo .espejo-layout .espejo-visual{max-width:490px;max-height:390px}
 html body main#contenido #pintura .maqueta-paint-gallery img{height:auto;max-height:250px}
 html body main#contenido #voz .maqueta-microfono{max-height:250px}
 html body main#contenido #libros .rve-library-layout{grid-template-columns:1fr;grid-template-areas:'heading' 'desk' 'detail' 'hint';width:calc(100% - 24px);padding:28px 0;gap:22px}
 html body main#contenido #contacto .conversation-layout{padding:28px 0;gap:40px}
 html body main#contenido #contacto .conversation-art{width:min(100%,360px);margin:0;align-self:center}
}
@media(prefers-reduced-motion:reduce){html body main#contenido #flor .flor-fog{display:none!important}}
/* Final layout correction: the animal image and its reflection form one indivisible column. */
html body main#contenido .chapter-shell-mexico #mexico .mex-stage{grid-template-areas:'heading right' 'writing right' 'action right';grid-template-rows:auto auto auto}
html body main#contenido #mexico .mex-right{grid-area:right;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:20px;min-width:0}
html body main#contenido #mexico .maqueta-mex-animales{position:relative;display:block;aspect-ratio:auto;height:auto;width:100%}
html body main#contenido #mexico .maqueta-grupo{display:block;width:100%;height:auto;max-height:clamp(210px,calc(var(--rve-scene-h)*.57),480px);object-fit:contain;transform:none}
html body main#contenido #mexico .mex-right .mex-voice{position:relative;inset:auto;width:100%;margin:0;padding:0;align-self:stretch;transform:none}
/* Defeat older 100svh locks on these two scenes, including inherited child layout height. */
html body main#contenido .chapter-shell-library>#libros.rve-library,
html body main#contenido .chapter-shell-contacto>#contacto.conversation-scene{height:auto!important;min-height:var(--rve-scene-h)!important;max-height:none!important;top:auto!important;position:relative!important}
html body main#contenido .chapter-shell-library #libros .rve-library-layout,
html body main#contenido .chapter-shell-contacto #contacto .conversation-layout{height:auto!important;min-height:var(--rve-scene-h)!important}

@media(min-width:761px) and (max-height:820px){html body main#contenido #voz .maqueta-microfono{max-height:clamp(120px,calc(var(--rve-scene-h)*.33),270px)}}
@media(max-width:760px){html body main#contenido .chapter-shell-mexico #mexico .mex-stage{grid-template-areas:'heading' 'writing' 'right' 'action';grid-template-rows:auto}html body main#contenido #mexico .maqueta-grupo{max-height:380px}}
/* The original creature selector was absolute: the grouped art must participate in flow. */
html body main#contenido .chapter-shell-mexico #mexico .maqueta-mex-animales .maqueta-grupo{position:static!important;inset:auto!important;display:block!important;max-width:100%!important}
@media(min-width:761px) and (max-height:820px){
 html body main#contenido #libros .rve-library-desk{width:min(100%,calc(var(--rve-scene-h)*1.10));justify-self:center}
 html body main#contenido #libros .rve-library-layout{gap:12px clamp(22px,4vw,55px)}
}
