/* Shared phone/tablet refinements. Loaded after the editorial styles. */
:root { --mobile-bar-height:calc(86px + env(safe-area-inset-bottom,0px)); }
html { scroll-padding-bottom:24px; }
body.scroll-locked { position:fixed; left:0; right:0; top:var(--locked-scroll-top,0px); width:100%; }
body.menu-open .site-header { position:fixed; top:0; }
.page-width { max-width:1380px; }
.page-hero-grid>*,.journey-layout>*,.about-layout>*,.speaking-layout>*,.request-layout>*,.voices-layout>*,.faq-layout>*,.book-grid>*,.seo-book-grid>*,.related-grid>* { min-width:0; }
.page-hero h1,.article-section h2,.article-section h3,.related-grid strong,.faq-list summary,.topics h3,.request-intro h2,.quick-summary li,.intent-answer,.book-info p { overflow-wrap:anywhere; }
.button,.text-link { max-width:100%; }
.text-link { white-space:normal; }
.field input,.field select,.field textarea { min-width:0; scroll-margin:110px 0 120px; }
.field input[type=date] { display:block; min-inline-size:0; }
.field input[type=date]::-webkit-date-and-time-value { text-align:left; }
.form-progress>span { min-width:0; overflow-wrap:anywhere; }
.form-controls .button { text-align:left; }
.table-scroll { overscroll-behavior-x:contain; -webkit-overflow-scrolling:touch; }
.table-scroll:focus-visible { outline:3px solid var(--gold-ink); outline-offset:4px; }
.mobile-nav { overflow-y:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; }
.mobile-nav a { min-width:0; overflow-wrap:anywhere; }
.mobile-primary-cta { min-width:0; text-align:center; }
.mobile-contact-bar>button { min-width:44px; flex-shrink:0; }
.is-editing .mobile-contact-bar { visibility:hidden; }
.editorial-footer nav a,.editorial-footer nav button,.footer-bottom a { display:inline-flex; align-items:center; min-height:44px; }
/* Keep the close control reachable when a long book or guide dialog scrolls. */
dialog { max-width:calc(100% - 24px); max-height:calc(100svh - 24px); max-height:calc(var(--visual-viewport-height,100dvh) - 24px); scroll-padding-block:70px 24px; }
.dialog-close-row { position:sticky; top:0; height:0; z-index:10; pointer-events:none; }
.dialog-close-row>button { pointer-events:auto; position:absolute; top:12px; right:12px; width:48px; height:48px; margin:0; }
.book-dialog-layout { grid-template-columns:minmax(0,.85fr) minmax(0,1fr); }
.finder-dialog { padding-top:0; }
.finder-dialog>.eyebrow { padding-top:70px; }
.finder-options>button>div { min-width:0; overflow-wrap:anywhere; }
.video-dialog { padding-top:0; }
.video-dialog>h2 { padding-top:28px; padding-right:65px; }
.share-dialog { padding-top:0; }
.share-dialog>h2 { padding-top:70px; }
.share-close { background:var(--paper); border:1px solid #c3c9b8; border-radius:50%; }
.gallery-dialog>img { max-height:calc(var(--visual-viewport-height,100dvh) - 90px); }
#gallery-full { touch-action:pan-y pinch-zoom; user-select:none; -webkit-user-select:none; }
.journey-touch-hint { display:none; }

/* The CSS query matches compactJourney in app.js. No fixed text height here:
   large fonts, translated browser UI and landscape must never crop a chapter. */
@media (max-width:760px), (max-width:1080px) and (pointer:coarse) {
  .journey { height:auto; }
  .journey-sticky { position:relative; height:auto; min-height:0; border-radius:0!important; }
  .journey-inner { height:auto; padding-top:75px; padding-bottom:45px; }
  .journey-inner>.eyebrow { order:0; }
  .journey-layout { order:3; grid-template-rows:auto; flex:none; gap:35px; align-items:center; }
  .journey-copy { height:auto; }
  .journey-chapter { display:none; position:relative; inset:auto; height:auto; padding-top:10px; }
  .journey-chapter.is-active { display:flex; animation:chapter-touch-in .45s var(--ease); }
  .journey-chapter p { max-width:100%; font-size:18px; }
  .journey-stage { height:360px; min-height:0; max-height:none; touch-action:pan-y pinch-zoom; }
  .journey-book { height:280px; transition:transform .7s var(--ease),opacity .5s ease; }
  .chapter-nav { order:1; margin:28px 0 0; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; }
  .chapter-nav button { min-width:0; min-height:64px; font-size:16px; line-height:1.5; flex-wrap:wrap; gap:4px 10px; overflow-wrap:anywhere; }
  .journey-touch-hint { order:2; display:block; color:#c0cede; font-size:15px; line-height:1.7; margin:14px 0 28px; }
}
@keyframes chapter-touch-in { from {opacity:0;transform:translateY(12px)} to {opacity:1;transform:none} }
/* Keep the pinned composition on ordinary laptop displays too. */
@media (min-width:761px) and (hover:hover) and (pointer:fine) {
  .journey-sticky { min-height:0; height:100svh; }
  .journey-copy { height:100%; min-height:0; }
  .journey-stage { height:100%; min-height:0; }
}
@media (min-width:761px) and (max-height:800px) and (hover:hover) and (pointer:fine) {
  .journey-inner { padding-top:100px; padding-bottom:20px; }
  .journey-layout { gap:32px; }
  .journey-chapter h3 { font-size:clamp(52px,5.5vw,70px); }
  .chapter-kicker { margin-bottom:16px; }
  .journey-chapter p { margin-top:18px; line-height:1.65; }
  .journey-chapter .text-link { margin-top:12px; }
  .journey-book { height:clamp(200px,39svh,300px); }
  .chapter-nav button { min-height:54px; padding:14px 0 10px; }
}
@media (hover:none), (pointer:coarse) {
  /* Viewport entry supplies the visual response that hover gives on a mouse. */
  .book-visual.touch-peek .book-3d { transform:translateY(-10px) rotateY(-3deg) rotateZ(0deg); }
  .book-visual.touch-peek:after { transform:translateX(95%); }
  .book-visual.touch-peek .book-scene-word { transform:translateX(12px); }
  .page-art.is-book.is-in-view img,.book-card-art.is-in-view img { transform:rotateY(0deg) rotateZ(0deg); }
  .gallery-item:hover img { transform:none; }
  .button:hover,.related-grid a:hover { transform:none; }
  .hero-light { display:none; }
}
@media (max-width:1080px) {
  .site-header,.site-header.is-fixed { height:calc(78px + env(safe-area-inset-top,0px)); padding-top:env(safe-area-inset-top,0px); }
  .mobile-nav { inset:calc(78px + env(safe-area-inset-top,0px)) 0 0; padding:20px max(24px,env(safe-area-inset-right,0px)) max(30px,env(safe-area-inset-bottom,0px)) max(24px,env(safe-area-inset-left,0px)); }
  .mobile-nav a,.content-page .mobile-nav a { font-size:clamp(36px,6.3vw,60px); min-height:76px; line-height:1.35; gap:18px; padding:16px 0; }
  .page-hero-grid { grid-template-columns:minmax(0,1.4fr) minmax(0,.7fr); }
}
@media (max-width:760px), (max-width:1080px) and (pointer:coarse) {
  body { padding-bottom:var(--mobile-bar-height); }
  html { scroll-padding-bottom:calc(var(--mobile-bar-height) + 16px); }
  .mobile-contact-bar { position:fixed; display:flex; bottom:0; left:0; right:0; z-index:60; padding:10px max(12px,env(safe-area-inset-right,0px)) calc(10px + env(safe-area-inset-bottom,0px)) max(12px,env(safe-area-inset-left,0px)); background:#08182ff5; backdrop-filter:blur(12px); gap:10px; border-top:1px solid #5e6b7e; }
  .mobile-primary-cta { background:var(--gold); color:var(--ink); font:650 16px/1.5 var(--body); flex:1; display:flex; gap:8px; justify-content:center; align-items:center; min-height:52px; padding:10px; }
  .mobile-contact-bar>button { min-height:52px; padding:10px; background:none; border:1px solid #7a8a9e; color:white; font:600 15px/1.5 var(--body); }
  .analytics-choice { left:12px; right:12px; bottom:calc(var(--mobile-bar-height) + 12px); max-width:none; max-height:calc(100svh - var(--mobile-bar-height) - 40px); overflow-y:auto; }
  .is-editing .analytics-choice { visibility:hidden; }
}
@media (max-width:760px) {
  .page-width { width:calc(100% - 40px); }
  .site-header { padding-inline:20px; gap:12px; }
  .site-header .brand-name { display:none; }
  .header-actions { min-width:0; gap:6px; }
  .header-actions .motion-toggle { display:grid; place-items:center; min-width:44px; opacity:1; }
  .header-cta { font-size:14px; min-height:48px; }
  .home-page .hero { min-height:0; }
  .home-page .hero-content { padding-top:140px; padding-bottom:110px; }
  .home-page .hero-image-wrap { top:65px; bottom:auto; height:620px; max-height:100%; }
  .home-page .hero h1 { font-size:clamp(60px,16.6vw,111px); }
  .home-page .hero-bottom-copy>.intent-answer { font-size:19px; }
  .home-page .quick-summary { background:linear-gradient(90deg,#0a1932e6,#0a193200); }
  .hero-buttons .button { max-width:100%; }
  .scroll-cue { flex-wrap:wrap; gap:12px; line-height:1.7; font-size:14px; }
  .scroll-cue>span:first-child { min-width:0; }
  .opening-inner { flex-wrap:wrap; gap:20px; }
  .opening-inner>p { flex:1 1 155px; min-width:0; }
  .book-category { flex-wrap:wrap; }
  .book-category span { text-align:left; }
  .book-actions { flex-wrap:wrap; }
  .book-actions .text-link { width:auto; }
  .journey-layout { grid-template-columns:minmax(0,1fr); gap:18px; }
  .journey-stage { height:300px; }
  .journey-book { height:240px; max-width:53%; }
  .chapter-nav { gap:10px; }
  .chapter-nav button { padding-top:12px; font-size:16px; }
  .chapter-nav button>span { flex-basis:100%; }
  .journey-chapter h3 { font-size:clamp(50px,14vw,68px); }
  .journey-chapter .text-link { margin-top:17px; }
  .orbit { max-width:100%; aspect-ratio:1; height:auto; }
  .about-copy h2 { font-size:clamp(56px,15vw,76px); }
  .about-photo { height:auto; aspect-ratio:4/5; }
  .about-sticker { right:-12px; }
  .signature { flex-wrap:wrap; gap:12px; font-size:clamp(29px,7.5vw,36px); }
  .speaker-visual { height:auto; aspect-ratio:4/5; }
  .speaker-overlay strong { font-size:clamp(54px,14vw,70px); }
  .speaker-overlay strong>span { font-size:42px; }
  .community-heading h2 { font-size:clamp(47px,12vw,59px); }
  .page-hero-grid { grid-template-columns:minmax(0,1fr); }
  .page-hero h1 { font-size:clamp(46px,12vw,75px); }
  .seo-faq h2 { font-size:clamp(44px,12vw,57px); }
  .table-scroll:before { content:'Desliza la tabla para ver más ↔'; display:block; position:sticky; left:0; padding:12px 16px; font-size:15px; background:#e3e8ef; }
  .edition-link { flex-wrap:wrap; gap:10px 20px; }
  .edition-link span { max-width:none; }
  .request-form-wrap { padding:25px 20px; }
  .form-controls { align-items:stretch; }
  .form-controls .button { justify-content:space-between; }
  .consent-field { flex-wrap:wrap; }
  .consent-field>span { flex:1; min-width:0; }
  .consent-field>.field-error { flex-basis:100%; }
  .giant-link { font-size:clamp(48px,13vw,60px); }
  .final-actions { flex-direction:column; gap:17px; }
  .final-actions a { justify-content:space-between; }
  .footer-main { flex-wrap:wrap; }
  .footer-socials { width:100%; justify-content:flex-start; }
  .footer-bottom { flex-direction:column; align-items:flex-start; }
  .book-dialog { width:calc(100% - 24px); }
  .book-dialog-layout { grid-template-columns:minmax(0,1fr); min-height:0; }
  .dialog-book-visual { height:270px; padding:30px; }
  .dialog-book-visual img { height:210px; width:auto; }
  .dialog-book-copy { padding:30px 22px; }
  .finder-dialog { padding:0 22px 30px; }
  .finder-dialog h2 { font-size:clamp(44px,12vw,60px); }
  .finder-options>button { gap:12px; }
  .video-dialog { padding:0 16px 25px; }
  .video-dialog>h2 { min-height:75px; padding-top:24px; padding-right:50px; }
  .share-dialog { padding:0 22px 25px; }
}
@media (max-width:380px) {
  .site-header .header-cta { display:none; }
  .form-controls .button { flex-basis:100%; }
  .mobile-contact-bar { gap:8px; }
  .mobile-contact-bar>button { padding:8px; }
  .chapter-nav { gap:8px; }
  .chapter-nav button { font-size:15px; }
  .request-intro h2 { font-size:52px; }
  .book-visual { height:395px; }
  .book-3d { height:265px; }
}
/* Motion preferences always keep content visible and controls operational. */
body.motion-paused .journey-chapter,body.motion-paused .journey-book { animation:none!important; transition:none!important; }
body.motion-paused .reveal { opacity:1!important; transform:none!important; }
body.motion-paused .book-3d { transform:rotateY(-8deg)!important; transition:none!important; }
body.motion-paused .book-visual:after { display:none; }
@media (prefers-reduced-motion:reduce) {
  html,.gallery-rail { scroll-behavior:auto; }
  .journey-chapter,.journey-book,.book-3d,.book-visual:after,.page-art img,.book-card-art img { animation:none!important; transition:none!important; }
  .js-reveal .reveal { opacity:1!important; transform:none!important; }
  .book-visual:after { display:none; }
}
