:root{--bg:#0a0f17;--bg2:#0e1622;--card:#151f2d;--card2:#1a2636;--line:#2b394c;--text:#f7f8fa;--muted:#aab5c4;--blue:#173cc5;--blue2:#0b245d;--red:#ea2428;--gold:#e8ad2f;--gold2:#ffcf5b;--shadow:0 18px 50px rgba(0,0,0,.28)}
*{box-sizing:border-box}html{scroll-behavior:smooth;background:#0a0f17}body{margin:0;background:radial-gradient(circle at 50% -10%,#152642 0,#0b111b 34%,var(--bg) 72%);color:var(--text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;min-height:100vh;padding-bottom:90px}a{color:inherit;text-decoration:none}button,input{font:inherit}.topbar{min-height:74px;display:flex;align-items:center;justify-content:space-between;gap:20px;padding-left:max(20px,calc((100vw - 1120px)/2));padding-right:max(20px,calc((100vw - 1120px)/2));background:rgba(8,13,21,.88);border-bottom:1px solid rgba(255,255,255,.07);backdrop-filter:blur(18px);position:sticky;top:0;z-index:20}.brand{display:flex;align-items:center;gap:10px;min-width:210px}.brand img{width:40px;height:40px;border-radius:10px;object-fit:cover}.brand span{display:flex;flex-direction:column}.brand strong{font-size:14px;letter-spacing:.1px}.brand small{font-size:8px;letter-spacing:2px;color:var(--muted);margin-top:2px}.desktop-nav{display:flex;gap:8px;align-items:center}.desktop-nav a{font-size:13px;color:var(--muted);padding:9px 13px;border-radius:999px}.desktop-nav a:hover,.desktop-nav a.active{background:#1a285e;color:white}.install-btn,.primary,.secondary{border-radius:999px;border:1px solid transparent;padding:11px 16px;font-weight:700;cursor:pointer}.install-btn,.primary{background:linear-gradient(135deg,var(--gold2),var(--gold));color:#111827}.secondary{border-color:#41506a;background:rgba(255,255,255,.03);color:var(--text);display:inline-flex;align-items:center;justify-content:center}.install-btn{padding:9px 13px;font-size:12px}main{width:min(1120px,calc(100% - 32px));margin:32px auto 0}.panel{border:1px solid rgba(255,255,255,.09);box-shadow:var(--shadow)}.hero{min-height:320px;border-radius:26px;padding:42px 46px;display:grid;grid-template-columns:1.25fr .75fr;align-items:center;gap:36px;background:radial-gradient(circle at 85% 18%,rgba(232,173,47,.18),transparent 28%),linear-gradient(135deg,#192b6e 0%,#17295a 46%,#111a2a 100%);overflow:hidden;position:relative}.hero:before{content:"";position:absolute;inset:auto -80px -140px auto;width:360px;height:360px;border:1px solid rgba(232,173,47,.14);border-radius:50%;box-shadow:0 0 0 45px rgba(232,173,47,.04),0 0 0 90px rgba(232,173,47,.025)}.eyebrow{font-size:10px;letter-spacing:2.1px;color:var(--gold2);font-weight:800;margin-bottom:13px}.hero h1{font-family:Georgia,"Times New Roman",serif;font-size:clamp(36px,5vw,58px);line-height:.98;margin:0 0 16px;max-width:720px}.hero p{color:#d7deea;line-height:1.6;max-width:650px}.hero-actions{display:flex;gap:12px;margin-top:22px;flex-wrap:wrap}.hero-logo{width:min(100%,260px);aspect-ratio:1;object-fit:cover;border-radius:26px;justify-self:end;box-shadow:0 24px 50px rgba(0,0,0,.4);position:relative;z-index:1}.now-card{margin-top:24px;border-radius:22px;padding:18px;display:grid;grid-template-columns:92px 1fr auto;gap:18px;align-items:center;background:linear-gradient(180deg,#172230,#121b27)}.now-card>img{width:92px;height:92px;border-radius:18px;object-fit:cover}.now-info h2{margin:4px 0 6px;font-family:Georgia,"Times New Roman",serif;font-size:25px}.now-info p{margin:2px 0}.muted{color:var(--muted);font-size:13px}.live-pill{display:inline-flex;gap:6px;align-items:center;background:rgba(234,36,40,.12);border:1px solid rgba(234,36,40,.25);color:#ff777a;padding:4px 8px;border-radius:999px;font-size:9px;font-weight:800;letter-spacing:1px}.live-pill span{width:6px;height:6px;background:#ff4b4e;border-radius:50%;box-shadow:0 0 0 4px rgba(255,75,78,.13)}.round-play{width:54px;height:54px;border-radius:50%;border:1px solid #45536b;background:#1b2b63;color:white;font-size:18px;cursor:pointer}.content-section{margin:34px 0}.section-head{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:16px}.section-head h2{font-family:Georgia,"Times New Roman",serif;font-size:28px;margin:0 0 5px}.section-head p{margin:0;color:var(--muted);font-size:13px}.text-button{border:none;background:none;color:var(--gold2);font:inherit;font-size:13px;cursor:pointer;padding:4px 0}.text-button:hover{color:#fff}.sermon-tools{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:0 0 16px}.sermon-tools[hidden]{display:none}.search-box{flex:1;max-width:620px;display:flex;align-items:center;gap:10px;padding:11px 14px;border:1px solid rgba(255,255,255,.12);background:#101925;border-radius:14px}.search-box span{font-size:19px;color:var(--gold2)}.search-box input{width:100%;border:none;outline:none;background:transparent;color:var(--text);font-size:14px}.search-box input::placeholder{color:#77849a}.sermon-count{color:var(--muted);font-size:12px;white-space:nowrap}.sermons-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}.sermon-card{display:grid;grid-template-columns:76px 1fr;gap:14px;align-items:center;padding:12px;border-radius:18px;background:var(--card);border:1px solid rgba(255,255,255,.08);min-height:102px}.sermon-card img{width:76px;height:76px;object-fit:cover;border-radius:13px;background:#071326}.sermon-card .tag{font-size:8px;letter-spacing:1.2px;color:#ff777a;font-weight:800}.sermon-card h3{font-family:Georgia,"Times New Roman",serif;font-size:17px;line-height:1.18;margin:6px 0 5px}.sermon-card p{font-size:11px;color:var(--muted);margin:0}.sermon-copy{min-width:0}.episode-play-btn{margin-top:10px;border:1px solid #46546c;background:#1a2b63;color:#fff;border-radius:999px;padding:8px 13px;font-weight:750;font-size:12px;cursor:pointer}.episode-play-btn:hover{background:#22387e}.episode-play-btn.active{border-color:var(--gold);box-shadow:0 0 0 2px rgba(232,173,47,.12)}.sermon-card.is-active{border-color:rgba(232,173,47,.45);box-shadow:0 0 0 1px rgba(232,173,47,.08) inset}.load-more-wrap{text-align:center;margin-top:18px}.load-more{min-width:190px}.skeleton{height:102px;border-radius:18px;background:linear-gradient(90deg,#151f2d,#1d2938,#151f2d);background-size:200% 100%;animation:shimmer 1.4s infinite}@keyframes shimmer{to{background-position:-200% 0}}.church-card{margin-top:26px;border-radius:22px;padding:26px 30px;display:flex;align-items:center;justify-content:space-between;gap:24px;background:linear-gradient(135deg,#182332,#111926)}.church-card h2{font-family:Georgia,"Times New Roman",serif;margin:0 0 8px;font-size:26px}.church-card p{color:var(--muted);margin:0;max-width:720px;line-height:1.55}footer{width:min(1120px,calc(100% - 32px));margin:32px auto 10px;padding:24px 4px 10px;border-top:1px solid rgba(255,255,255,.07);display:flex;justify-content:space-between;gap:20px;color:var(--muted)}.socials{display:flex;gap:16px;flex-wrap:wrap}.socials a:hover{color:white}.player-bar{position:fixed;left:50%;transform:translateX(-50%);bottom:18px;width:min(520px,calc(100% - 28px));z-index:40;background:rgba(18,27,39,.96);border:1px solid rgba(255,255,255,.12);border-radius:18px;box-shadow:0 18px 45px rgba(0,0,0,.42);padding:9px 11px;display:grid;grid-template-columns:44px 1fr 44px;gap:10px;align-items:center;backdrop-filter:blur(16px)}.player-bar[hidden]{display:none}.player-bar img{width:44px;height:44px;border-radius:10px;object-fit:cover}.mini-meta{min-width:0;display:flex;flex-direction:column}.mini-meta strong,.mini-meta span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mini-meta strong{font-size:12px}.mini-meta span{font-size:10px;color:var(--muted);margin-top:2px}.player-bar button{width:40px;height:40px;border-radius:50%;border:none;background:#1b2b63;color:#fff}.mobile-nav{display:none}.install-sheet{position:fixed;inset:0;background:rgba(0,0,0,.62);z-index:80;align-items:end;justify-content:center}.install-sheet[hidden]{display:none}.sheet-card{width:min(520px,100%);background:#162231;border:1px solid #34445c;border-radius:24px 24px 0 0;padding:28px;position:relative}.sheet-card button{position:absolute;right:16px;top:12px;border:none;background:none;color:#fff;font-size:28px}.sheet-card h3{margin:0 0 8px}.sheet-card p{color:var(--muted);line-height:1.55}.error-card{grid-column:1/-1;padding:22px;border:1px dashed #48566d;border-radius:16px;color:var(--muted);text-align:center}.error-card a{color:var(--gold2)}

@media(max-width:760px){
  body{padding-bottom:calc(176px + env(safe-area-inset-bottom));}
  .topbar{min-height:calc(82px + env(safe-area-inset-top));padding-top:env(safe-area-inset-top);padding-left:16px;padding-right:16px;gap:12px;}
  .brand{min-width:0;gap:12px;}
  .brand img{width:50px;height:50px;border-radius:13px;flex:0 0 auto;}
  .brand strong{font-size:16px;line-height:1.05;}
  .brand small{font-size:9px;letter-spacing:1.6px;margin-top:4px;}
  .desktop-nav{display:none}
  .install-btn{display:block;padding:10px 13px;font-size:12px;white-space:nowrap}
  .install-btn[hidden]{display:none}
  main{width:min(100% - 24px,680px);margin-top:16px}
  .hero{grid-template-columns:1fr;padding:28px 22px;border-radius:22px;min-height:0}
  .hero-copy{order:2}.hero-logo{order:1;width:118px;border-radius:20px;justify-self:start}
  .hero h1{font-size:38px}.hero p{font-size:14px}.hero-actions>*{flex:1;min-width:150px;min-height:46px}
  .now-card{grid-template-columns:74px 1fr auto;padding:13px;gap:12px}.now-card>img{width:74px;height:74px;border-radius:15px}.now-info h2{font-size:19px}.now-info p{font-size:12px;max-width:205px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.round-play{width:48px;height:48px;font-size:20px}
  .section-head{align-items:flex-start}.section-head h2{font-size:26px}.section-head p{font-size:13px}.text-button{font-size:13px;line-height:1.3;text-align:right;max-width:138px}
  .sermon-tools{align-items:stretch;flex-direction:column;gap:8px}.search-box{max-width:none;padding:13px 14px}.search-box input{font-size:16px}.sermon-count{padding-left:2px}
  .sermons-grid{grid-template-columns:1fr}.sermon-card{grid-template-columns:72px 1fr;min-height:100px;padding:13px}.sermon-card img{width:72px;height:72px}.sermon-card h3{font-size:17px}.episode-play-btn{min-height:38px;font-size:13px;padding:9px 14px}
  .church-card{align-items:flex-start;flex-direction:column;padding:22px}
  .mobile-nav{position:fixed;bottom:0;left:0;right:0;z-index:35;min-height:calc(88px + env(safe-area-inset-bottom));padding:7px 6px max(8px,env(safe-area-inset-bottom));display:grid;grid-template-columns:repeat(4,1fr);background:rgba(8,13,21,.97);border-top:1px solid rgba(255,255,255,.09);backdrop-filter:blur(20px)}
  .mobile-nav a{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:5px;font-size:12px;font-weight:650;color:#c5ceda;min-width:0;line-height:1.05}
  .mobile-nav span{font-size:26px;line-height:1;color:var(--gold2)}
  .player-bar{bottom:calc(98px + env(safe-area-inset-bottom));width:calc(100% - 22px);grid-template-columns:50px 1fr 48px;padding:10px 12px}.player-bar img{width:50px;height:50px}.mini-meta strong{font-size:13px}.mini-meta span{font-size:11px}.player-bar button{width:44px;height:44px;font-size:17px}
  footer{flex-direction:column;padding-bottom:10px}.install-sheet{display:flex}
}

@media(max-width:390px){
  .topbar{padding-left:12px;padding-right:12px}.brand img{width:46px;height:46px}.brand strong{font-size:15px}.install-btn{padding:9px 10px;font-size:11px}.now-info p{max-width:165px}.mobile-nav a{font-size:11px}.mobile-nav span{font-size:24px}
}


/* App v7 */
.episode-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:10px}
.episode-actions .episode-play-btn{margin-top:0}
.episode-share-btn{border:1px solid rgba(232,173,47,.45);background:rgba(232,173,47,.08);color:var(--gold2);border-radius:999px;padding:8px 13px;font-weight:750;font-size:12px;cursor:pointer}
.episode-share-btn:hover{background:rgba(232,173,47,.16);color:#fff}
.sermon-card.shared-target{border-color:var(--gold);box-shadow:0 0 0 2px rgba(232,173,47,.18)}
.social-menu-trigger{display:none}
.social-sheet-links{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-top:18px}
.social-sheet-links a{display:flex;align-items:center;justify-content:center;min-height:48px;border:1px solid rgba(255,255,255,.12);border-radius:14px;background:#101925;font-weight:700}
.social-sheet-links a:hover{border-color:rgba(232,173,47,.45);color:var(--gold2)}
.toast{position:fixed;left:50%;transform:translateX(-50%);bottom:120px;z-index:120;background:#1b2635;color:#fff;border:1px solid rgba(232,173,47,.35);box-shadow:0 14px 36px rgba(0,0,0,.4);border-radius:999px;padding:10px 15px;font-size:12px;font-weight:700;white-space:nowrap;max-width:calc(100% - 28px);overflow:hidden;text-overflow:ellipsis}
.toast[hidden]{display:none}

@media(max-width:760px){
  .footer-socials{display:none}
  .social-menu-trigger{display:inline-flex;align-items:center;justify-content:center;min-height:44px;width:max-content}
  footer{align-items:flex-start}
  .episode-actions{gap:7px}
  .episode-share-btn,.episode-play-btn{min-height:40px;font-size:13px;padding:9px 13px}
  .toast{bottom:calc(160px + env(safe-area-inset-bottom))}
}

/* App v8: church information and expanded navigation */
.brand strong{font-size:18px;line-height:1.15}.brand small{font-size:10px}
.desktop-nav button{font:inherit;font-size:13px;color:var(--muted);padding:9px 13px;border:0;background:transparent;border-radius:999px;cursor:pointer}
.desktop-nav button:hover{background:#1a285e;color:white}
.desktop-nav{gap:2px}.desktop-nav a,.desktop-nav button{padding:9px 10px}
.church-dialog{color:var(--text);width:min(520px,calc(100% - 24px));max-height:calc(100dvh - 40px);padding:0;background:linear-gradient(145deg,#1a2940,#101925);border:1px solid #34445c;border-radius:24px;box-shadow:var(--shadow)}
.church-dialog::backdrop{background:rgba(0,0,0,.72);backdrop-filter:blur(5px)}
.church-dialog-content{padding:32px 26px;position:relative}.dialog-close{position:absolute;right:12px;top:10px;width:44px;height:44px;border:0;border-radius:50%;background:rgba(255,255,255,.06);color:white;font-size:28px;cursor:pointer}
.church-dialog .eyebrow{display:block;padding-right:40px}.church-dialog h2{font-family:Georgia,serif;font-size:30px;line-height:1.1;margin:14px 0}.church-intro{color:var(--muted);line-height:1.6}
.info-block{border-top:1px solid var(--line);padding:18px 0}.info-block h3{font-size:14px;color:var(--gold2);margin:0 0 12px}.church-schedule{margin:0}.church-schedule div{display:flex;justify-content:space-between;gap:12px;padding:7px 0}.church-schedule dd{margin:0;text-align:right;color:#d7deea}.church-phone{font-size:21px;font-weight:700}.info-block address{font-style:normal;line-height:1.6;color:#d7deea}.gps-link{display:inline-flex;margin-top:16px;min-height:44px;align-items:center}
:focus-visible{outline:2px solid var(--gold2);outline-offset:4px}
@media(min-width:761px) and (max-width:1050px){.topbar{flex-wrap:wrap;padding-top:12px;padding-bottom:12px;gap:12px}.desktop-nav{order:3;width:100%;justify-content:center}}
@media(max-width:760px){
 .brand strong{font-size:20px;line-height:1.15}.brand small{font-size:11px;letter-spacing:1.5px}.topbar{flex-wrap:wrap;padding-top:calc(10px + env(safe-area-inset-top));padding-bottom:10px;gap:8px}.install-btn{margin-left:auto}
 .mobile-nav{grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(2,56px);min-height:calc(128px + env(safe-area-inset-bottom));gap:3px;padding:7px 6px calc(6px + env(safe-area-inset-bottom))}
 .mobile-nav a,.mobile-nav button{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:4px;font:inherit;font-size:12px;font-weight:650;color:#c5ceda;min-width:0;line-height:1.05;border:0;background:transparent;cursor:pointer;border-radius:10px}
 .mobile-nav span{font-size:23px;color:var(--gold2)}.mobile-nav a:hover,.mobile-nav button:hover{background:rgba(232,173,47,.08)}
 .player-bar{bottom:calc(140px + env(safe-area-inset-bottom))}body{padding-bottom:calc(220px + env(safe-area-inset-bottom))}.toast{bottom:calc(210px + env(safe-area-inset-bottom))}
}
@media(max-width:390px){.brand strong{font-size:19px}.brand small{font-size:10px}.church-dialog-content{padding:28px 20px}.church-dialog h2{font-size:27px}}

/* App v9: Facebook timeline */
#eventos{scroll-margin-top:120px}.facebook-section .eyebrow{display:block;margin-bottom:8px}.facebook-section .section-head{align-items:center}.facebook-section .section-head .secondary{flex-shrink:0;min-height:44px;font-size:13px}.facebook-panel{padding:24px;border-radius:22px;background:linear-gradient(145deg,#19283b,#101925)}.facebook-heading{display:flex;align-items:center;gap:12px;margin-bottom:20px}.facebook-heading img{width:48px;height:48px;border-radius:12px}.facebook-heading div{display:flex;flex-direction:column;gap:5px}.facebook-heading strong{font-size:16px}.facebook-heading span{color:var(--muted);font-size:12px}.facebook-feed{width:min(500px,100%);margin:auto;min-height:180px;border-radius:14px;overflow:hidden;background:#101925}.facebook-feed iframe{display:block;border:0;width:100%;height:620px;background:#fff}.facebook-status{color:var(--muted);font-size:12px;text-align:center;line-height:1.5}.facebook-help{display:flex;align-items:center;justify-content:space-between;gap:20px;border-top:1px solid var(--line);margin-top:18px;padding-top:18px}.facebook-help p{color:var(--muted);font-size:13px;line-height:1.6;margin:0;max-width:560px}.facebook-help a{flex-shrink:0;font-size:13px}
@media(max-width:760px){.facebook-panel{padding:16px}.facebook-help{flex-direction:column;align-items:flex-start;gap:12px}.facebook-section .section-head{gap:10px}.facebook-section .section-head h2{font-size:24px}.facebook-section .section-head .secondary{padding:10px 12px;font-size:12px}.facebook-heading strong{font-size:14px}}

/* App v10: events popup and touch controls */
.events-dialog{color:var(--text);width:min(620px,calc(100% - 24px));max-height:calc(100dvh - 32px);padding:56px 20px 20px;border:1px solid #34445c;border-radius:24px;background:linear-gradient(145deg,#19283b,#101925);box-shadow:var(--shadow)}
.events-dialog::backdrop{background:rgba(0,0,0,.72);backdrop-filter:blur(5px)}.events-dialog .facebook-panel{padding:16px;box-shadow:none}.events-dialog .section-head{align-items:flex-start}.events-dialog .section-head h2{font-size:28px}.events-dialog .facebook-section{margin:0}
button,a{touch-action:manipulation}button{cursor:pointer}.hero-actions{position:relative;z-index:2}.hero-actions>*{min-height:48px}.dialog-close{min-width:44px;min-height:44px;z-index:2}.desktop-nav a,.desktop-nav button{min-height:44px;display:inline-flex;align-items:center}.church-dialog .text-button{display:inline-flex;align-items:center;min-height:44px}.church-phone{display:inline-flex;align-items:center;min-height:44px}
@media(max-width:760px){.hero-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.hero-actions>[data-play]{grid-column:1/-1}.hero-actions>*{min-width:0;text-align:center;font-size:13px;padding:12px 10px;line-height:1.35}.events-dialog{padding:58px 12px 16px}.events-dialog .facebook-panel{padding:12px}.events-dialog .section-head h2{font-size:23px}.events-dialog .section-head{gap:8px}.events-dialog .facebook-section .eyebrow{font-size:9px;letter-spacing:1.2px}}

/* App v11: compact, edge-to-edge Facebook popup, always visible close */
.events-dialog{width:min(502px,calc(100% - 20px));max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));padding:0;overflow:hidden;border-radius:20px}
.events-dialog[open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto}
.events-header{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;border-bottom:1px solid var(--line)}
.events-header h2{font-family:Georgia,serif;font-size:22px;line-height:1.2;margin:0}.events-header .dialog-close{position:static;flex-shrink:0;width:44px;height:44px}
.events-body{min-height:0;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}.events-dialog .facebook-feed{width:100%;max-width:none;margin:0;border-radius:0;min-height:0}.events-dialog .facebook-feed iframe{width:100%;border-radius:0}.events-dialog .facebook-status{margin:0;padding:8px 12px;font-size:11px}
.events-footer{padding:10px 12px;background:#142033;border-top:1px solid var(--line)}.events-tools{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:8px}.events-tools>*{min-height:44px;font-size:12px;padding:8px}.events-close-bottom{display:block;width:100%;min-height:46px;font-size:15px}
@media(max-width:390px){.events-header h2{font-size:20px}.events-footer{padding:8px 10px}}

/* App v13 photo-only feed */
.events-dialog .events-body{max-height:52dvh}.facebook-photo-card{background:#142033;border-bottom:1px solid var(--line)}.facebook-photo-card img{display:block;width:100%;height:auto;max-height:440px;object-fit:contain;background:#0b111b}.facebook-photo-info{padding:16px}.facebook-photo-info time{font-size:11px;color:var(--gold2)}.facebook-photo-info p{font-size:14px;line-height:1.65;white-space:pre-wrap;overflow-wrap:anywhere;margin:10px 0 0}.facebook-empty{padding:24px 16px;text-align:center;color:var(--muted)}.events-tools button:disabled{opacity:.5;cursor:wait}
/* App v17 */
.channel-row{display:flex;gap:16px;overflow-x:auto;scroll-snap-type:x proximity;padding-bottom:12px}.channel-row .sermon-card{flex:0 0 min(290px,80vw);scroll-snap-align:start}.channel-directory{display:flex;flex-wrap:wrap;gap:8px;margin:20px 0}.youtube-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px;border:1px solid #26364d;border-radius:16px;margin:24px 0;background:#101e30}.youtube-bar[hidden]{display:none}.v17-dialog{width:min(920px,94vw);max-height:88dvh;background:#0d1524;color:#f5f6fa;border:1px solid #26364d;border-radius:20px;padding:22px;overflow:auto}.v17-dialog::backdrop{background:#000b}.v17-dialog header{display:flex;justify-content:space-between;align-items:center;gap:16px}.v17-dialog iframe{width:100%;aspect-ratio:16/9;border:0;margin:16px 0}.v17-dialog input{width:100%;padding:12px;border-radius:10px;background:#17253b;color:white;border:1px solid #30435e;margin:12px 0}.v17-dialog .sermon-card{margin:12px 0}.footer-actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}#notificationStatus{font-size:13px;color:#a7b3c8;text-align:center}

/* Tarjeta visible de la transmisión, debajo del reproductor. */
.youtube-bar{display:grid;grid-template-columns:minmax(120px,36%) 1fr;gap:20px;padding:16px;background:linear-gradient(120deg,#142740,#101b2d);border:1px solid #355779;box-shadow:0 8px 24px #0003}
.youtube-thumbnail{width:100%;aspect-ratio:16/9;object-fit:cover;border-radius:10px;align-self:center}
.youtube-details{min-width:0;align-self:center}.youtube-status{display:inline-block;color:#a9cfff;font-size:12px;letter-spacing:.05em;text-transform:uppercase}
.youtube-details h2{font-size:clamp(17px,2.4vw,23px);line-height:1.35;margin:8px 0 14px;color:#f5f6fa;overflow-wrap:anywhere}
.youtube-watch{background:#276bd5;color:#fff;border:0;border-radius:10px;padding:11px 16px;font-weight:700;cursor:pointer}.youtube-watch:focus-visible{outline:3px solid #fff;outline-offset:3px}
.youtube-bar.is-live{border-color:#df5666}.is-live .youtube-status{background:#a71e32;color:#fff;border-radius:6px;padding:5px 9px}
@media(max-width:480px){.youtube-bar{gap:12px;padding:12px;grid-template-columns:34% 1fr}.youtube-details h2{font-size:16px;margin:7px 0 10px}.youtube-watch{padding:10px 12px;font-size:13px}.youtube-status{font-size:11px}}

/* Banner centrado exclusivamente en pantallas móviles. */
@media(max-width:760px){
 .hero{grid-template-columns:minmax(0,1fr);text-align:center;gap:20px}
 .hero-logo{justify-self:center;margin-inline:auto;width:118px}
 .hero-copy{width:100%;min-width:0;text-align:center}
 .hero .eyebrow,.hero h1,.hero p{margin-left:auto;margin-right:auto;text-align:center}
 .hero h1{font-size:clamp(30px,8.7vw,38px);line-height:1.08}
 .hero-actions{width:100%;justify-content:center;margin-left:auto;margin-right:auto}
}

/* v17.4: lista desplazable con cabecera y búsqueda siempre disponibles. */
#channelDialog{padding:0;overflow:hidden;max-height:88dvh;border-radius:20px}
#channelDialog[open]{display:flex;flex-direction:column}
#channelDialog>header{flex:0 0 auto;padding:16px 18px;background:#0d1524;border-bottom:1px solid #26364d}
#channelDialog>header h2{min-width:0;overflow-wrap:anywhere;margin:0;font-size:22px}
#closeChannel{flex:0 0 auto;min-height:44px;min-width:78px}
#channelDialog>#channelSearch{flex:0 0 auto;width:calc(100% - 36px);margin:12px 18px}
#channelList{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:0 18px 18px;-webkit-overflow-scrolling:touch}
.channel-more,#showAllBtn{display:inline-flex;align-items:center;justify-content:center;background:#21376d;border:1px solid #6277a4;border-radius:999px;padding:10px 16px;min-height:44px;font-weight:700;color:#fff;white-space:nowrap;flex-shrink:0}
.channel-more:hover,#showAllBtn:hover{background:#2a478e}
@media(max-width:760px){
 .hero h1{font-size:clamp(24px,6.5vw,30px);line-height:1.15}
 .channel-row+.section-head{align-items:center}
 #channelArea .section-head{align-items:center;gap:12px}
 #channelArea .section-head h2{font-size:24px;overflow-wrap:anywhere}
 .channel-more{font-size:12px;padding:10px 13px}
 #channelDialog>header h2{font-size:20px}
}
#showAllBtn[hidden]{display:none}
.sermon-card .episode-author{font-weight:700;color:#dbe6fa;font-size:12px;margin:6px 0 3px;overflow-wrap:anywhere}
.sermon-card .episode-date{font-size:11px;color:var(--muted);margin:3px 0}
.sermon-card .episode-description,.episode-description-full p{font-size:12px;line-height:1.5;margin-top:7px;color:#c5cfdf;overflow-wrap:anywhere}
.episode-description-full summary{color:var(--gold2);cursor:pointer;font-size:12px;padding:8px 0;min-height:36px}
.episode-description-full[open] p{white-space:normal}
.episode-restart-btn{border:1px solid #596888;background:#17253b;color:#f5f6fa;border-radius:12px;padding:9px 12px;font-size:12px;min-height:44px;cursor:pointer}
.episode-restart-btn[hidden],.episode-transport[hidden]{display:none}
.episode-transport{grid-column:1/-1;border-top:1px solid #34445c;padding-top:10px;min-width:0}
.episode-transport label{font-size:11px;color:#c5cfdf}
#episodeSeek{display:block;width:100%;height:30px;margin:0;accent-color:var(--gold)}
.episode-timing{display:flex;justify-content:space-between;font-size:11px;color:#c5cfdf;font-variant-numeric:tabular-nums}
.player-bar #restartCurrentEpisode{width:auto;height:auto;min-height:40px;border-radius:10px;font-size:12px;padding:8px 12px;margin-top:6px;border:1px solid #596888}
.player-bar.has-episode-transport{max-height:45dvh;overflow-y:auto}
@media(max-width:760px){body:has(.player-bar.has-episode-transport:not([hidden])){padding-bottom:calc(350px + env(safe-area-inset-bottom))}}

/* v17.6: stable player rows and restart controls on narrow cards. */
.player-bar{grid-template-columns:44px minmax(0,1fr) 44px;grid-template-areas:"art meta play" "transport transport transport"}
.player-bar>img{grid-area:art}
.player-bar>.mini-meta{grid-area:meta}
.player-bar>#miniPlayBtn{grid-area:play}
.player-bar>.episode-transport{grid-area:transport;width:100%;min-width:0}
.episode-transport label{display:block;margin-bottom:4px}
.player-bar #restartCurrentEpisode{display:block;max-width:100%;white-space:normal;line-height:1.35}
.sermon-card .episode-restart-btn{display:block;max-width:100%;margin-top:8px;white-space:normal;overflow-wrap:break-word;line-height:1.35}
.sermon-card .episode-restart-btn[hidden]{display:none}
@media(max-width:760px){.player-bar{grid-template-columns:50px minmax(0,1fr) 48px}}

/* v17.7: compact restart beside seek; balanced card actions. */
.player-bar>.episode-transport{display:grid;grid-template-columns:44px minmax(0,1fr);grid-template-rows:30px auto;column-gap:10px;row-gap:0;align-items:center;padding-top:8px}
.player-bar>.episode-transport[hidden]{display:none}
.episode-transport>label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.player-bar #restartCurrentEpisode{grid-column:1;grid-row:1/3;display:flex;align-items:center;justify-content:center;width:44px;height:44px;min-height:44px;margin:0;padding:0;border-radius:50%;cursor:pointer}
#episodeSeek{grid-column:2;grid-row:1;min-width:0}
.episode-timing{grid-column:2;grid-row:2}
.sermon-card .episode-actions{display:flex;flex-direction:column;align-items:center;gap:7px}
.sermon-card .episode-actions>button{display:flex;align-items:center;justify-content:center;width:100%;max-width:190px;min-height:36px;margin:0;padding:7px 10px;border-radius:999px;font-size:12px;font-weight:700;line-height:1.3;text-align:center;white-space:normal}
.sermon-card .episode-actions>button[hidden]{display:none}
#restartCurrentEpisode:focus-visible{outline:2px solid var(--gold);outline-offset:3px}

#audioRecovery{position:fixed;left:12px;right:12px;bottom:120px;z-index:2000;background:#17223b;color:white;padding:14px;border:1px solid #b99852;border-radius:12px;display:flex;gap:12px;align-items:center;justify-content:center;flex-wrap:wrap}#audioRecovery[hidden]{display:none}#audioRecovery button{padding:10px 16px;border-radius:8px;border:0;background:#e8c77d;color:#111;cursor:pointer}

/* Compact mobile welcome: identity beside the logo, listening action below. */
@media(max-width:760px){
 #inicio.hero{display:grid;grid-template-columns:64px minmax(0,1fr);gap:6px 14px;padding:18px;border-radius:20px;min-height:0;text-align:left}
 #inicio .hero-copy{display:contents}
 #inicio .hero-logo{grid-column:1;grid-row:1/3;order:0;width:64px;height:64px;align-self:center;justify-self:start;margin:0;border-radius:14px}
 #inicio .eyebrow{grid-column:2;grid-row:1;margin:0;text-align:left;align-self:end;font-size:12px;letter-spacing:.7px;line-height:1.4}
 #inicio h1{grid-column:2;grid-row:2;margin:0;text-align:left;align-self:start;font-family:inherit;font-size:14px;font-weight:500;line-height:1.4;color:#d7deea}
 #inicio .hero-copy>p{display:none}
 #inicio .hero-actions{grid-column:1/-1;grid-row:3;margin:10px 0 0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:100%}
 #inicio .hero-actions>[data-play]{grid-column:1/-1;min-height:48px;font-size:15px;padding:11px 12px}
 #inicio .hero-actions>.secondary{min-height:44px;padding:8px 6px;font-size:12px}
 #inicio .hero-actions #openEvents{font-size:0}
 #inicio .hero-actions #openEvents::after{content:'Eventos ↗';font-size:12px}
 main{margin-top:16px}
}

.welcome-mobile{display:none}@media(max-width:760px){#inicio .welcome-desktop{display:none}#inicio .welcome-mobile{display:inline}}

/* Independent views keep the audio players mounted throughout navigation. */
body [data-screen]{display:none!important}
body[data-view="radio"] [data-screen="radio"]:not([hidden]),body[data-view="predicas"] [data-screen="predicas"]:not([hidden]),body[data-view="mas"] [data-screen="mas"]:not([hidden]){display:block!important}
body[data-view="radio"] #radio.now-card{display:flex!important;flex-direction:column;justify-content:center;align-items:center;text-align:center;gap:18px;width:min(100%,560px);min-height:480px;margin:16px auto 24px;padding:36px 24px;border-radius:28px;background:radial-gradient(circle at 50% 10%,#263d69,#111c2d 75%)}
#radio.now-card>img{width:clamp(140px,38vw,210px);height:auto;aspect-ratio:1;border-radius:24px;object-fit:cover;box-shadow:0 12px 36px #0005}
#radio .now-info{min-width:0;width:100%}#radio .live-pill{display:inline-flex;margin-bottom:10px}#radio h2{font-size:clamp(23px,5vw,30px);margin:0 0 12px}#radio #nowTitle{font-size:16px;line-height:1.5;white-space:normal;overflow-wrap:anywhere;margin:6px 0}#radio #nowArtist{font-size:13px;margin:6px 0}
#radio #mainPlayBtn{width:78px;height:78px;flex-shrink:0;font-size:29px;background:linear-gradient(135deg,#ffcf5b,#e8ad2f);color:#111827;border:0;box-shadow:0 8px 24px #e8ad2f25}
.more-view{padding:28px;border-radius:22px;max-width:760px;margin:20px auto}.more-view h1{margin:8px 0}.more-view p{color:var(--muted);line-height:1.6}.more-actions{display:grid;gap:12px;margin-top:24px}.more-actions>*{min-height:48px}
.mobile-nav a.active{color:var(--gold2);background:#e8ad2f12;border-radius:12px}.desktop-nav a.active{color:var(--gold2)}
@media(max-width:760px){.mobile-nav{grid-template-columns:repeat(3,1fr)!important;justify-content:space-around}.mobile-nav a{flex:1;min-height:48px}body[data-view="radio"] #radio.now-card{min-height:0;margin-top:8px;padding:26px 20px;gap:16px}#radio.now-card>img{width:clamp(132px,40vw,180px)}.more-view{padding:22px 18px}.more-view h1{font-size:27px}}

/* Desktop radio view: compact player with room for the latest broadcast. */
@media (min-width: 761px) {
  body[data-view="radio"] main {
    display: grid;
    grid-template-columns: minmax(0, 460px);
    justify-content: center;
    align-items: start;
    gap: 20px;
  }
  body[data-view="radio"] #radio.now-card {
    min-height: 0;
    width: 100%;
    margin: 0;
    padding: 24px;
    gap: 12px;
  }
  #radio.now-card > img { width: 128px; }
  #radio #mainPlayBtn { width: 60px; height: 60px; font-size: 22px; }
  body[data-view="radio"] #youtubeBar:not([hidden]) {
    display: grid !important;
    margin: 0;
  }
}
@media (max-width: 760px) { .mobile-nav { grid-template-columns: repeat(2,1fr); } }
.more-view li { margin-block: .5rem; }

/* Keep anchor targets below the sticky header. */
#radio, #mas { scroll-margin-top: calc(100px + env(safe-area-inset-top, 0px)); }
#mas.more-view { width: min(100%, 560px); margin: 8px auto 28px; }
#radio .now-info p { max-width: none; white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 760px) { .mobile-nav { grid-template-columns: repeat(2,1fr) !important; } }

#predicas { width:min(100%,560px); margin:16px auto 28px; scroll-margin-top:100px; }
@media (max-width:760px) { .mobile-nav { grid-template-columns:repeat(3,1fr) !important; } }

#sermonBar:not([hidden]) {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}
#sermonNow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#sermonAudio { width: 100%; height: 40px; }
body:has(#sermonBar:not([hidden])) #playerBar { display: none; }
body:has(#sermonBar:not([hidden])) main { padding-bottom: 112px; }

#resumeSermon[hidden] { display: none; }
body[data-view="radio"] #sermonBar:not([hidden]) {
  position: sticky;
  left: auto;
  transform: none;
  margin: 0 auto;
}

#shareApp { margin-top: 8px; }
#sermonList { list-style: none; padding: 0; }
#sermonList > li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 8px 10px;
  border: 1px solid #34445c;
  border-radius: 14px;
  background: #172230;
}
.sermon-title-button {
  border: 0;
  background: transparent;
  color: var(--text);
  font-weight: 700;
  text-align: left;
  overflow-wrap: anywhere;
  min-height: 44px;
  cursor: pointer;
}
.sermon-share-button {
  border: 1px solid #4779a9;
  border-radius: 10px;
  background: #1a3c5e;
  color: #d6ebff;
  font-size: 12px;
  padding: 6px 9px;
  min-height: 44px;
  cursor: pointer;
}
.sermon-share-button:hover { background: #24547e; }
#installBtn[hidden] { display: none; }

.app-version { text-align: center; margin: 16px 0; }
