/* Study library styles. Same tokens as sitio-web/index.html. Used by /estudios/ pages and the homepage "Latest teaching". */
/* Scoped, so the church app keeps its own colors. */
.est-page,.est-mount,.ult-sec,.est-vdlg{
  --ink:#111214; --stone:#1c1d21; --stone-2:#26282d; --mist:#f5f2ec; --paper:#fffdf8;
  --gold:#d8a144; --flame:#e2652b; --muted:#8b8d93; --line:rgba(255,255,255,.12);
  --display:'Oswald',Impact,'Arial Narrow',sans-serif; --body:'Inter',system-ui,-apple-system,Segoe UI,sans-serif;
  --serif:'Playfair Display',Georgia,serif;
}

/* ---------- shared: YouTube poster / player ---------- */
.est-yt{position:relative;aspect-ratio:16/9;width:100%;background:#000;border-radius:16px;overflow:hidden}
.est-yt iframe,.est-yt>div{position:absolute;inset:0;width:100%;height:100%;border:0}
.est-poster{position:absolute;inset:0;width:100%;border:0;cursor:pointer;background-color:var(--ink);background-image:radial-gradient(circle at 70% 80%,rgba(226,101,43,.45),transparent 60%);background-size:cover;background-position:center;background-repeat:no-repeat;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem;color:#fff}
.est-poster::before{content:"";position:absolute;inset:0;background:linear-gradient(180deg,transparent 40%,rgba(0,0,0,.45))}
.est-play{position:relative;width:76px;height:76px;border-radius:50%;background:var(--gold);box-shadow:0 10px 30px rgba(0,0,0,.45);transition:transform .2s}
.est-play::after{content:"";position:absolute;left:31px;top:24px;border-style:solid;border-width:14px 0 14px 22px;border-color:transparent transparent transparent var(--ink)}
.est-poster:hover .est-play,.est-poster:focus-visible .est-play{transform:scale(1.08)}
.est-poster:focus-visible{outline:3px solid var(--gold);outline-offset:-3px}
.est-poster-t{position:relative;font-family:var(--display);text-transform:uppercase;letter-spacing:.14em;font-size:.85rem;padding:0 1rem;text-align:center}

/* ---------- homepage: Última enseñanza ---------- */
.ult-sec{padding:90px 0 0}
.ult{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:2.6rem;align-items:start;background:var(--ink);color:#fff;border-radius:22px;padding:2.6rem;position:relative;overflow:hidden}
.ult::after{content:"";position:absolute;width:420px;height:420px;left:-160px;top:-200px;border-radius:50%;background:radial-gradient(circle,rgba(216,161,68,.22),transparent 65%);pointer-events:none}
.ult>*{position:relative;z-index:1}
.ult-media{display:flex;flex-direction:column;gap:1rem;min-width:0}
.ult-info{display:flex;flex-direction:column;gap:.9rem;min-width:0}
.ult-title{font-size:clamp(1.8rem,3.4vw,2.7rem)}
.ult-meta{color:var(--gold);font-family:var(--display);letter-spacing:.08em;text-transform:uppercase;font-size:.85rem}
.ult-sum{opacity:.88;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.ult-chapters{display:flex;flex-direction:column;gap:.5rem}
.ult-chapters button{display:flex;gap:.7rem;align-items:baseline;text-align:left;background:rgba(255,255,255,.06);border:1px solid var(--line);color:inherit;border-radius:12px;padding:.65rem .9rem;font:inherit;cursor:pointer;transition:.2s}
.ult-chapters button:hover{border-color:var(--gold);background:rgba(216,161,68,.12)}
.ult-chapters b{font-family:var(--display);color:var(--gold);font-weight:500;letter-spacing:.06em;min-width:3.6em}
.ult-more{align-self:flex-start;margin-top:.4rem}
@media (max-width:900px){.ult{grid-template-columns:1fr;padding:1.4rem;gap:1.6rem}.ult-sec{padding-top:60px}}

/* ---------- /estudios pages ---------- */
.est-page{margin:0;font-family:var(--body);color:var(--ink);background:var(--paper);line-height:1.6;-webkit-font-smoothing:antialiased}
.est-page *{box-sizing:border-box}
.est-page h1,.est-page h2,.est-page h3{font-family:var(--display);text-transform:uppercase;line-height:1.05;font-weight:600;margin:0}
.est-page p{margin:0}
.est-page a{color:inherit}
.est-page button,.est-page select,.est-page input{font:inherit}
.est-wrap{width:min(1180px,92%);margin:0 auto}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.est-top{background:var(--ink);color:#fff;position:sticky;top:0;z-index:20}
.est-nav{display:flex;align-items:center;gap:1.5rem;height:72px}
.est-brand{display:flex;align-items:center;gap:.6rem;text-decoration:none;font-family:'Cinzel',Georgia,serif;font-weight:700;letter-spacing:.04em}
.est-brand i{font-style:normal;color:var(--gold)}
.est-links{display:flex;gap:1.2rem;margin-left:auto;font-family:var(--display);text-transform:uppercase;letter-spacing:.1em;font-size:.8rem}
.est-links a{text-decoration:none;opacity:.85}
.est-links a:hover{opacity:1;color:var(--gold)}
.est-lang{display:flex;border:1px solid rgba(255,255,255,.3);border-radius:999px;padding:3px}
.est-lang button{background:none;border:0;color:#fff;font-family:var(--display);font-size:.75rem;letter-spacing:.1em;padding:.3rem .65rem;border-radius:999px;cursor:pointer}
.est-lang button[aria-pressed="true"]{background:var(--gold);color:var(--ink)}
@media (max-width:560px){.est-brand span{display:none}.est-nav{gap:.8rem}}

.est-main{padding:2.4rem 0 4rem}
.est-eyebrow{font-family:var(--display);letter-spacing:.22em;text-transform:uppercase;font-size:.8rem;color:var(--flame);font-weight:500;margin-bottom:.6rem!important}
.est-back{display:inline-block;margin-bottom:1.2rem;font-family:var(--display);text-transform:uppercase;letter-spacing:.12em;font-size:.78rem;text-decoration:none;color:var(--muted)}
.est-back:hover{color:var(--ink)}
.est-study h1{font-size:clamp(2rem,5vw,3.4rem)}
.est-passage{font-family:var(--serif);font-style:italic;font-size:1.3rem;color:#5a5c62;margin-top:.4rem!important}
.est-hero{margin-top:1.8rem}
.est-media{min-width:0}
.est-tabs{display:flex;gap:.4rem;margin-bottom:.8rem;flex-wrap:wrap}
.est-tabs button{background:none;border:1px solid #d9d4c8;border-radius:999px;padding:.45rem 1rem;cursor:pointer;font-family:var(--display);text-transform:uppercase;letter-spacing:.1em;font-size:.78rem}
.est-tabs button[aria-selected="true"]{background:var(--ink);border-color:var(--ink);color:#fff}
.est-tabs button[hidden]{display:none}
.est-hint{font-size:.88rem;color:#6a6c72;margin-top:.6rem!important}
/* Chapters: a plain list. Phones: under the video. Tablets: two columns. Wide screens: beside the video, as tall as it, scrolling on its own. */
.est-study{container-type:inline-size}
.est-chap{margin-top:1.4rem}
.est-chap[hidden]{display:none}
.est-chap-h{font-family:var(--display);text-transform:uppercase;letter-spacing:.16em;font-size:.78rem;color:#6a6c72;margin:0 0 .3rem!important}
.est-chapters{list-style:none;padding:0;margin:0;color:var(--ink)}
.est-chapters li{border-bottom:1px solid #e9e4d8;break-inside:avoid}
.est-chapters button{display:flex;gap:.8rem;align-items:baseline;width:100%;background:none;border:0;border-radius:8px;padding:.62rem .5rem;margin:1px 0;text-align:left;font:inherit;font-size:.95rem;line-height:1.4;color:inherit;cursor:pointer;transition:background .15s}
.est-chapters button:hover{background:var(--mist)}
.est-chapters button:focus-visible{outline:2px solid var(--gold);outline-offset:-2px}
.est-chapters li.now button{background:#f5ead3}
.est-chapters b{flex:none;min-width:3.9em;font-family:var(--display);font-weight:500;letter-spacing:.05em;color:#a8741f}
@container (min-width:600px) and (max-width:879px){.est-chapters{columns:2;column-gap:2rem}}
@container (min-width:880px){
  .est-hero{display:grid;grid-template-columns:minmax(0,1.8fr) minmax(0,1fr);gap:2rem;align-items:stretch}
  .est-chap{margin-top:0;position:relative;min-height:12rem}
  .est-chap-h{line-height:2.1rem;margin-bottom:.8rem!important}
  .est-chapters{position:absolute;top:2.9rem;left:0;right:0;bottom:0;overflow-y:auto;overscroll-behavior:contain;padding-right:.3rem;scrollbar-width:thin}
}
.est-cols{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);gap:2.4rem;margin-top:2.6rem;align-items:start}
.est-cols h2{font-size:1.25rem;letter-spacing:.06em;margin-bottom:.8rem}
.est-note{font-size:.88rem;color:#6a6c72;margin-bottom:.8rem!important}
.est-transcript{max-height:70vh;overflow-y:auto;border-top:1px solid #e9e4d8;border-bottom:1px solid #e9e4d8;scroll-behavior:smooth;scrollbar-width:thin}
.est-transcript>.est-note{padding:.7rem .5rem;margin:0!important;border-bottom:1px solid #e9e4d8}
.est-piece{display:grid;grid-template-columns:3.9em 1fr;gap:.8rem;width:100%;text-align:left;background:none;border:0;border-bottom:1px solid #e9e4d8;border-left:3px solid transparent;border-radius:0;padding:.85rem .6rem .85rem .7rem;cursor:pointer;color:inherit;font:inherit;line-height:1.65;transition:background .15s}
.est-piece:last-child{border-bottom:0}
.est-piece:hover{background:var(--mist)}
.est-piece:focus-visible{outline:2px solid var(--gold);outline-offset:-2px}
.est-piece:disabled{cursor:default}
.est-piece:disabled:hover{background:none}
.est-piece.now{background:rgba(216,161,68,.08);border-left-color:var(--gold)}
.est-at{font-family:var(--display);font-weight:500;color:#a8741f;letter-spacing:.05em;font-size:.95rem}
.est-side{display:flex;flex-direction:column;gap:2rem;position:sticky;top:96px}
.est-side section[hidden]{display:none}
.est-verses{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:.6rem}
.est-verses li{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center}
.est-verses a{font-weight:600;text-decoration:none;border-bottom:2px solid var(--gold)}
.est-vref{background:none;border:0;padding:0;font:inherit;font-weight:600;color:inherit;cursor:pointer;border-bottom:2px solid var(--gold)}
.est-vref:hover,.est-vref:focus-visible{color:#a8741f}
/* Verse pop-up (centered on wide screens, a sheet from the bottom on phones) */
.est-vdlg{margin:auto;border:0;border-radius:16px;padding:0;width:min(560px,calc(100vw - 32px));max-height:min(80vh,640px);background:var(--paper);color:var(--ink);font-family:var(--body);line-height:1.6;box-shadow:0 24px 60px rgba(0,0,0,.35)}
.est-vdlg::backdrop{background:rgba(8,7,10,.6)}
.est-vdlg[open]{display:flex;flex-direction:column}
.est-vd-h{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;padding:1.2rem 1.4rem .6rem}
.est-vd-h h3{margin:0;font-family:var(--display);text-transform:uppercase;font-weight:600;font-size:1.45rem;line-height:1.1}
.est-vd-ver{margin:.25rem 0 0;font-family:var(--display);text-transform:uppercase;letter-spacing:.14em;font-size:.72rem;color:#a8741f}
.est-vd-x{flex:none;display:grid;place-items:center;width:36px;height:36px;border-radius:50%;border:1px solid #e4dfd3;background:none;color:inherit;cursor:pointer}
.est-vd-x:hover,.est-vd-x:focus-visible{border-color:var(--gold)}
.est-vd-b{padding:.2rem 1.4rem .4rem;overflow-y:auto}
.est-vd-b p{margin:0 0 .7rem;font-size:1.05rem;line-height:1.7}
.est-vd-b sup{font-family:var(--display);color:#a8741f;font-size:.72rem;margin-right:.3rem}
.est-vd-f{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;padding:.8rem 1.4rem 1.2rem;border-top:1px solid #e9e4d8}
.est-vd-link{background:var(--ink);color:#fff!important;text-decoration:none;border-radius:999px;padding:.55rem 1rem;font-family:var(--display);text-transform:uppercase;letter-spacing:.1em;font-size:.76rem}
.est-vd-play{background:var(--mist);border:0;border-radius:999px;padding:.55rem .9rem;font:inherit;font-size:.85rem;cursor:pointer;color:inherit}
.est-vd-play:hover{background:var(--gold)}
@media (max-width:600px){.est-vdlg{width:100%;max-width:100%;margin:auto 0 0;border-radius:16px 16px 0 0;max-height:85vh}}
.est-vtimes{display:flex;gap:.3rem;flex-wrap:wrap}
.est-vtimes button{background:var(--mist);border:0;border-radius:999px;padding:.15rem .6rem;font-size:.8rem;cursor:pointer}
.est-vtimes button:hover{background:var(--gold)}
.est-tags{display:flex;flex-wrap:wrap;gap:.4rem}
.est-tags a{text-decoration:none;background:var(--ink);color:#fff;border-radius:999px;padding:.3rem .85rem;font-size:.85rem}
.est-tags a:hover{background:var(--flame)}
@media (max-width:900px){.est-cols{grid-template-columns:1fr}.est-side{position:static}.est-transcript{max-height:60vh}}

.est-library h1{font-size:clamp(2.2rem,5vw,3.8rem)}
.est-lead{font-size:1.1rem;color:#4b4d52;margin-top:.6rem!important;max-width:60ch}
.est-filters{display:flex;flex-wrap:wrap;gap:.6rem;margin-top:2rem}
.est-filters input,.est-filters select{border:1px solid #d9d4c8;border-radius:999px;padding:.6rem 1rem;background:#fff;color:var(--ink);min-width:0}
.est-search{flex:1 1 260px;display:flex}
.est-search input{width:100%}
.est-filters select{flex:0 1 190px}
.est-count{margin-top:1.2rem!important;color:#6a6c72;font-size:.9rem}
.est-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:1.4rem;margin-top:1rem}
.est-card{display:flex;flex-direction:column;text-decoration:none;background:#fff;border:1px solid #e4dfd3;border-radius:18px;overflow:hidden;transition:.25s}
.est-card:hover{transform:translateY(-3px);box-shadow:0 14px 30px rgba(17,18,20,.1)}
.est-thumb{aspect-ratio:16/9;background:linear-gradient(160deg,#3a2a1c,#111214) center/cover;position:relative}
.est-badge{position:absolute;left:.8rem;top:.8rem;background:var(--gold);color:var(--ink);font-family:var(--display);text-transform:uppercase;letter-spacing:.1em;font-size:.7rem;padding:.25rem .6rem;border-radius:999px}
.est-card-b{padding:1.1rem 1.2rem 1.3rem;display:flex;flex-direction:column;gap:.4rem}
.est-card-m{font-size:.82rem;color:#6a6c72}
.est-card h3{font-size:1.3rem}
.est-card-s{font-size:.92rem;color:#4b4d52;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.est-empty{grid-column:1/-1;max-width:820px}
.est-foot{background:var(--ink);color:rgba(255,255,255,.7);font-size:.82rem;padding:1.6rem 0}

/* Inside the church app (#/mensajes) */
.est-mount{font-family:var(--body);color:var(--ink);line-height:1.6}
.est-mount *{box-sizing:border-box}
.est-mount h1,.est-mount h2,.est-mount h3{font-family:var(--display);text-transform:uppercase;line-height:1.05;font-weight:600;margin:0}
.est-mount p{margin:0}
.est-mount a{color:inherit}
.est-mount button,.est-mount select,.est-mount input{font:inherit}
.est-mount .est-study h1{font-size:clamp(1.7rem,6vw,2.6rem)}
.est-mount .est-library h1{font-size:clamp(1.9rem,6vw,2.8rem)}
.est-mount .est-side{top:80px}
@media (max-width:560px){.est-filters select{flex:1 1 calc(50% - .3rem)}}

/* ---------- Spotify bar (pinned to the bottom; the app sets --sp-bottom above its tabs) ---------- */
.sp-bar{position:fixed;left:0;right:0;bottom:var(--sp-bottom,0px);z-index:40;background:#111214;color:#f5f2ec;border-top:1px solid rgba(216,161,68,.35);box-shadow:0 -10px 30px rgba(0,0,0,.35);padding:.45rem 0 .6rem}
@supports (padding:max(0px)){.sp-bar{padding-bottom:max(.6rem,env(safe-area-inset-bottom))}}
.sp-bar[hidden]{display:none}
.sp-in{width:min(960px,94%);margin:0 auto}
.sp-head{display:flex;align-items:center;justify-content:space-between;gap:.8rem;margin-bottom:.35rem}
.sp-title{margin:0;font-family:'Oswald',Impact,'Arial Narrow',sans-serif;text-transform:uppercase;letter-spacing:.12em;font-size:.74rem;color:#d8a144;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.sp-tt{min-width:0;flex:1}
.sp-note2{margin:.15rem 0 0;font-size:.78rem;line-height:1.35;color:#c9c6be}
.sp-note2[hidden]{display:none}
.sp-ext{flex:none;font-family:'Oswald',Impact,'Arial Narrow',sans-serif;text-transform:uppercase;letter-spacing:.1em;font-size:.72rem;color:#111214;background:#1db954;border-radius:999px;padding:.45rem .8rem;text-decoration:none;white-space:nowrap}
.sp-ext:hover,.sp-ext:focus-visible{background:#3be477}
.sp-flash{animation:spflash .9s ease 2}
@keyframes spflash{50%{box-shadow:0 0 0 6px rgba(29,185,84,.45)}}
@media (prefers-reduced-motion:reduce){.sp-flash{animation:none}}
.sp-close{flex:none;display:grid;place-items:center;width:34px;height:34px;border-radius:50%;border:1px solid rgba(255,255,255,.18);background:none;color:#f5f2ec;cursor:pointer}
.sp-close:hover,.sp-close:focus-visible{border-color:#d8a144;color:#d8a144}
.sp-host iframe{display:block;width:100%;border:0;border-radius:12px;background:#1c1d21}
.sp-wait{margin:0;padding:1.1rem 0;font-size:.85rem;color:#8b8d93}
.sp-spacer{flex:none}
.sp-btn{display:inline-flex;align-items:center;gap:.55rem;align-self:flex-start;background:#1db954;color:#111214;border:0;border-radius:999px;padding:.7rem 1.15rem;font-family:'Oswald',Impact,'Arial Narrow',sans-serif;text-transform:uppercase;letter-spacing:.12em;font-size:.8rem;font-weight:500;cursor:pointer;transition:transform .15s}
.sp-btn:hover,.sp-btn:focus-visible{transform:translateY(-1px)}
.est-spotify{border:1px dashed #d9d4c8;border-radius:16px;padding:1.4rem 1.2rem;text-align:center;color:#5a5c62;font-size:.95rem}
@media (max-width:600px){.sp-in{width:auto;margin:0 10px}}
