:root {
  color-scheme: light;
  --ink: #263d36;
  --subtle: #506158;
  --accent: #a16e55;
  --paper: #f6f0e6;
}

* { box-sizing: border-box; }

html, body { width: 100%; height: 100%; margin: 0; }

body { height: 100vh; height: 100dvh; display: flex; flex-direction: column; background: var(--paper); color: var(--ink); overflow: hidden; }

.presentation { flex: 1 1 auto; min-height: 0; }
.reveal { width: 100%; height: 100%; color: var(--ink); font-family: 'Segoe UI', Arial, sans-serif; }
.reveal .slides { text-align: left; }
.reveal .slides section { padding: 0; }
.reveal .slides section.meditation-slide { height: 100%; overflow: hidden; background: var(--paper); }
.reveal .slides section.meditation-slide .art,
.reveal .slides section.meditation-slide .slide-wash,
.reveal .slides section.meditation-slide .slide-content { position: absolute; inset: 0; }
.reveal .slides section.meditation-slide .art { background-position: center; background-size: cover; }
.slide-one .art { background-image: url('../assets/meditaciones/ventana.png'); }
.slide-two .art { background-image: url('../assets/meditaciones/ramas.png'); }
.slide-three .art { background-image: url('../assets/meditaciones/ramas.png'); background-position: 72% center; }
.slide-four .art { background-image: url('../assets/meditaciones/cebolla.png'); }
.slide-five .art { background-image: url('../assets/meditaciones/compasion-propia.png'); }
.slide-six .art { background-image: url('../assets/meditaciones/respiracion.png'); }
.slide-seven .art { background-image: url('../assets/meditaciones/cuerpo.png'); }
.slide-eight .art { background-image: url('../assets/meditaciones/habito-cotidiano.png'); }
.slide-nine .art { background-image: url('../assets/meditaciones/primera-practica.png'); }
.slide-ten .art { background-image: url('../assets/meditaciones/regreso-camino.png'); }
.slide-eleven .art { background-image: url('../assets/meditaciones/pensamiento-hoja.png'); }
.slide-twelve .art { background-image: url('../assets/meditaciones/terminar-sin-prisa.png'); }
.slide-thirteen .art { background-image: url('../assets/meditaciones/atencion-concentracion-v2.png'); }
.slide-fourteen .art { background-image: url('../assets/meditaciones/sueno-inquietud.png'); }
.slide-fifteen .art { background-image: url('../assets/meditaciones/aburrimiento-incomodidad.png'); }
.slide-sixteen .art { background-image: url('../assets/meditaciones/juicios-expectativas.png'); }
.slide-seventeen .art { background-image: url('../assets/meditaciones/emocion-desborda.png'); }
.slide-eighteen .art { background-image: url('../assets/meditaciones/senales-aprendizaje.png'); }
.slide-nineteen .art { background-image: url('../assets/meditaciones/mas-formas-practicar.png'); }
.slide-twenty .art { background-image: url('../assets/meditaciones/sentir-cuerpo.png'); }
.slide-twentyone .art { background-image: url('../assets/meditaciones/observar-aparece.png'); }
.slide-twentytwo .art { background-image: url('../assets/meditaciones/curiosidad-cuerpo.png'); }
.slide-twentythree .art { background-image: url('../assets/meditaciones/emocion-historia.png'); }
.slide-twentyfour .art { background-image: url('../assets/meditaciones/emociones-conviven.png'); }
.slide-twentyfive .art { background-image: url('../assets/meditaciones/hecho-historia.png'); }
.slide-twentysix .art { background-image: url('../assets/meditaciones/pensamiento-nube.png'); }
.slide-twentyseven .art { background-image: url('../assets/meditaciones/pensar-tambien-ayuda.png'); }
.slide-twentyeight .art { background-image: url('../assets/meditaciones/preparar-sin-anticipar.png'); }
.slide-three .slide-topline span:last-child,
.slide-three .slide-footer span:last-child,
.slide-four .slide-topline span:last-child,
.slide-four .slide-footer span:last-child,
.slide-five .slide-topline span:last-child,
.slide-five .slide-footer span:last-child,
.slide-six .slide-topline span:last-child,
.slide-six .slide-footer span:last-child,
.slide-seven .slide-topline span:last-child,
.slide-seven .slide-footer span:last-child,
.slide-eight .slide-topline span:last-child,
.slide-eight .slide-footer span:last-child,
.slide-nine .slide-topline span:last-child,
.slide-nine .slide-footer span:last-child,
.slide-ten .slide-topline span:last-child,
.slide-ten .slide-footer span:last-child,
.slide-eleven .slide-topline span:last-child,
.slide-eleven .slide-footer span:last-child,
.slide-twelve .slide-topline span:last-child,
.slide-twelve .slide-footer span:last-child,
.slide-thirteen .slide-topline span:last-child,
.slide-thirteen .slide-footer span:last-child,
.slide-fourteen .slide-topline span:last-child,
.slide-fourteen .slide-footer span:last-child,
.slide-fifteen .slide-topline span:last-child,
.slide-fifteen .slide-footer span:last-child,
.slide-sixteen .slide-topline span:last-child,
.slide-sixteen .slide-footer span:last-child,
.slide-seventeen .slide-topline span:last-child,
.slide-seventeen .slide-footer span:last-child,
.slide-eighteen .slide-topline span:last-child,
.slide-eighteen .slide-footer span:last-child,
.slide-nineteen .slide-topline span:last-child,
.slide-nineteen .slide-footer span:last-child,
.slide-twenty .slide-topline span:last-child,
.slide-twenty .slide-footer span:last-child,
.slide-twentyone .slide-topline span:last-child,
.slide-twentyone .slide-footer span:last-child,
.slide-twentytwo .slide-topline span:last-child,
.slide-twentytwo .slide-footer span:last-child,
.slide-twentythree .slide-topline span:last-child,
.slide-twentythree .slide-footer span:last-child,
.slide-twentyfour .slide-topline span:last-child,
.slide-twentyfour .slide-footer span:last-child,
.slide-twentyfive .slide-topline span:last-child,
.slide-twentyfive .slide-footer span:last-child,
.slide-twentysix .slide-topline span:last-child,
.slide-twentysix .slide-footer span:last-child,
.slide-twentyseven .slide-topline span:last-child,
.slide-twentyseven .slide-footer span:last-child,
.slide-twentyeight .slide-topline span:last-child,
.slide-twentyeight .slide-footer span:last-child { padding: 8px 12px; border-radius: 4px; background: rgba(250, 246, 237, .84); }
.slide-wash { background: linear-gradient(90deg, rgba(250, 246, 237, .77) 0%, rgba(250, 246, 237, .26) 44%, rgba(250, 246, 237, 0) 70%); }
.slide-content { display: flex; flex-direction: column; padding: 56px 74px 48px 94px; }
.slide-topline, .slide-footer { display: flex; align-items: center; justify-content: space-between; width: 100%; font-family: 'Segoe UI', Arial, sans-serif; font-size: 17px; font-weight: 600; line-height: 1.2; letter-spacing: .16em; text-transform: uppercase; color: var(--subtle); }
.slide-topline span:last-child { color: var(--accent); }
.slide-main { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; max-width: 805px; padding-bottom: 16px; }
.reveal .eyebrow { margin: 0 0 18px; color: var(--accent); font-family: 'Segoe UI', Arial, sans-serif; font-size: 20px; font-weight: 700; line-height: 1.2; letter-spacing: .19em; text-transform: uppercase; }
.reveal h1, .reveal h2 { margin: 0; color: var(--ink); font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 500; letter-spacing: -.027em; text-transform: none; text-shadow: none; }
.reveal h1 { max-width: 790px; font-size: 93px; line-height: .99; }
.reveal h2 { max-width: 755px; font-size: 72px; line-height: 1.06; }
.reveal h1 em, .reveal h2 em { color: var(--accent); font-weight: 500; }
.reveal h2 span { color: var(--ink); }
.reveal .slide-aside { max-width: 760px; margin: 24px 0 0; color: var(--ink); font-family: 'Cormorant Garamond', Georgia, serif; font-size: 35px; line-height: 1.1; }
.rule { width: 82px; height: 3px; margin-top: 36px; background: var(--accent); }
.slide-footer { color: var(--subtle); font-size: 15px; letter-spacing: .18em; }

.controls { position: relative; z-index: 5; flex: 0 0 82px; display: flex; align-items: center; justify-content: center; gap: 16px; padding: 10px 18px; background: #ede5d9; border-top: 1px solid rgba(38, 61, 54, .16); }
.control-button { min-height: 50px; padding: 10px 19px; border: 1px solid rgba(38, 61, 54, .25); border-radius: 999px; background: #fbf8f2; color: var(--ink); font-family: 'Segoe UI', Arial, sans-serif; font-size: 16px; font-weight: 650; cursor: pointer; transition: background .2s, transform .2s, border-color .2s; }
.control-button:hover:not(:disabled) { background: #fff; border-color: var(--accent); transform: translateY(-1px); }
.control-button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.control-button:disabled { opacity: .42; cursor: not-allowed; }
.control-play { min-width: 190px; background: var(--ink); border-color: var(--ink); color: white; }
.control-play:hover:not(:disabled) { background: #36564b; color: white; }
.control-play[aria-pressed='true'] { background: #744f3b; border-color: #744f3b; }
.control-play #play-icon { margin-right: 6px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 700px) {
  .controls { flex-basis: 74px; gap: 8px; padding: 8px; }
  .control-button { min-height: 46px; padding: 8px 12px; font-size: 13px; }
  .control-play { min-width: 128px; }
}

@media (orientation: portrait) and (max-width: 900px) {
  .reveal .slides section.meditation-slide .art { background-position: 68% center; }
  .reveal .slides section.slide-four .art { background-position: 74% center; }
  .reveal .slides section.slide-thirteen .art { background-position: 82% center; }
  .reveal .slides section.slide-fourteen .art { background-position: 79% center; }
  .reveal .slides section.slide-fifteen .art { background-position: 58% center; }
  .reveal .slides section.slide-sixteen .art { background-position: 92% center; }
  .reveal .slides section.slide-twenty .art { background-position: 86% center; }
  .reveal .slides section.slide-twentyone .art { background-position: 83% center; }
  .reveal .slides section.slide-twentytwo .art { background-position: 80% center; }
  .reveal .slides section.slide-twentythree .art { background-position: 82% center; }
  .reveal .slides section.slide-twentyfour .art { background-position: 79% center; }
  .reveal .slides section.slide-twentyfive .art { background-position: 82% center; }
  .reveal .slides section.slide-twentysix .art { background-position: 83% center; }
  .reveal .slides section.slide-twentyseven .art { background-position: 83% center; }
  .reveal .slides section.slide-twentyeight .art { background-position: 83% center; }
  .reveal .slides section.meditation-slide .slide-wash { background: linear-gradient(180deg, rgba(250, 246, 237, .98) 0%, rgba(250, 246, 237, .92) 32%, rgba(250, 246, 237, .72) 57%, rgba(250, 246, 237, .08) 88%); }
  .reveal .slides section.slide-thirteen .slide-wash { background: linear-gradient(180deg, rgba(250, 246, 237, .98) 0%, rgba(250, 246, 237, .86) 32%, rgba(250, 246, 237, .45) 58%, rgba(250, 246, 237, .06) 88%); }
  .reveal .slides section.slide-fifteen .slide-wash { background: linear-gradient(180deg, rgba(250, 246, 237, .98) 0%, rgba(250, 246, 237, .9) 32%, rgba(250, 246, 237, .46) 58%, rgba(250, 246, 237, .06) 88%); }
  .slide-content { padding: 22px 22px 20px; }
  .slide-topline, .slide-footer { font-size: clamp(9px, 2.3vw, 14px); letter-spacing: .12em; }
  .slide-topline span:last-child, .slide-footer span:last-child { padding: 5px 7px; }
  .slide-footer span:last-child { border-radius: 4px; background: rgba(250, 246, 237, .86); }
  .slide-main { max-width: 100%; justify-content: flex-start; padding-top: clamp(54px, 13dvh, 120px); padding-bottom: 0; }
  .reveal .eyebrow { margin-bottom: 12px; font-size: clamp(11px, 2.7vw, 16px); letter-spacing: .15em; }
  .reveal h1 { max-width: 100%; font-size: clamp(37px, 10vw, 68px); line-height: 1.02; }
  .reveal h2 { max-width: 100%; font-size: clamp(34px, 9vw, 62px); line-height: 1.05; }
  .reveal .slide-aside { margin-top: 22px; font-size: clamp(22px, 5.6vw, 34px); }
  .rule { width: 56px; margin-top: 22px; }
  .slide-footer span:first-child { padding: 5px 7px; margin-left: -7px; border-radius: 4px; background: rgba(250, 246, 237, .84); }
}

@media (orientation: landscape) and (max-height: 500px) {
  .controls { flex-basis: 58px; gap: 10px; padding: 5px max(8px, env(safe-area-inset-right)) 5px max(8px, env(safe-area-inset-left)); }
  .control-button { min-height: 42px; padding: 6px 14px; font-size: 14px; }
  .control-play { min-width: 160px; }
  .slide-content { padding: 16px 36px 13px; }
  .slide-topline, .slide-footer { font-size: 10px; letter-spacing: .12em; }
  .slide-topline span:last-child, .slide-footer span:last-child { padding: 4px 6px; }
  .slide-main { max-width: 58%; padding-bottom: 0; }
  .reveal .eyebrow { margin-bottom: 7px; font-size: 12px; letter-spacing: .15em; }
  .reveal h1 { font-size: clamp(29px, 7.3dvh, 50px); line-height: 1; }
  .reveal h2 { font-size: clamp(27px, 6.7dvh, 46px); line-height: 1.04; }
  .reveal .slide-aside { margin-top: 8px; font-size: clamp(17px, 4.2dvh, 25px); line-height: 1.04; }
  .rule { width: 44px; height: 2px; margin-top: 12px; }
  .slide-wash { background: linear-gradient(90deg, rgba(250, 246, 237, .94) 0%, rgba(250, 246, 237, .67) 39%, rgba(250, 246, 237, 0) 76%); }
}

@media (orientation: landscape) and (max-height: 320px) {
  .slide-seven .slide-main { justify-content: flex-start; padding-top: 7px; }
  .reveal .slide-seven .eyebrow { margin-bottom: 3px; font-size: 10px; }
  .reveal .slide-seven h2 { font-size: 22px; line-height: 1; }
  .reveal .slide-seven .slide-aside { margin-top: 5px; font-size: 15px; }
  .slide-seven .rule { margin-top: 5px; }
  .slide-nine .slide-main { justify-content: flex-start; padding-top: 7px; }
  .reveal .slide-nine .eyebrow { margin-bottom: 3px; font-size: 10px; }
  .reveal .slide-nine h2 { font-size: 22px; line-height: 1; }
  .slide-nine .rule { margin-top: 5px; }
  .slide-eighteen .rule { margin-top: 5px; }
  .reveal .slide-nineteen .eyebrow { margin-bottom: 3px; font-size: 10px; }
  .reveal .slide-nineteen h2 { font-size: 22px; line-height: 1; }
  .slide-nineteen .rule { margin-top: 5px; }
  .slide-twenty .rule { margin-top: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  .control-button { transition: none; }
}

/* La narración aprobada de cada diapositiva sigue a los controles en el flujo de la página. */
.transcript-panel[hidden] { display: none; }
.transcript-panel { flex: 0 0 auto; background: #f8f4ec; border-top: 1px solid rgba(38, 61, 54, .16); color: var(--ink); }
html.transcript-active { height: auto; min-height: 100%; overflow-y: auto !important; overflow-x: hidden; }
.transcript-active { height: auto; min-height: 100dvh; overflow-y: auto; }
.transcript-active .reveal { touch-action: pan-y pinch-zoom; }
.transcript-active .presentation { flex: none; height: calc(100dvh - 82px); }
.transcript-active .controls { flex: none; height: 82px; }
.transcript-active .transcript-panel { max-height: none; overflow: visible; }
.transcript-inner { max-width: 1040px; margin: 0 auto; padding: 15px 30px 21px; border-left: 3px solid var(--accent); }
.transcript-label { margin: 0 0 7px; font-family: 'Segoe UI', Arial, sans-serif; font-size: 11px; font-weight: 700; line-height: 1.25; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
.transcript-copy { margin: 0; font-family: 'Cormorant Garamond', Georgia, serif; font-size: clamp(20px, 2.1vw, 25px); line-height: 1.25; font-weight: 500; color: var(--ink); }
@media (max-width: 700px) {
  .transcript-inner { padding: 13px 18px 18px; margin: 0 12px; }
  .transcript-copy { font-size: 21px; line-height: 1.23; }
}
@media (orientation: landscape) and (max-height: 500px) {
  .transcript-active .presentation { height: calc(100dvh - 58px); }
  .transcript-active .controls { height: 58px; }
}
@media (orientation: landscape) and (max-height: 320px) {
  .transcript-inner { padding-top: 7px; padding-bottom: 10px; }
  .transcript-label { margin-bottom: 4px; font-size: 9px; }
  .transcript-copy { font-size: 17px; line-height: 1.15; }
}
