:root {
  color-scheme: dark;
  --bg: #0d0f12;
  --surface: #171a1f;
  --surface-2: #22262d;
  --surface-3: #2c3139;
  --text: #f6f3ec;
  --muted: #aaa8a3;
  --line: #30343b;
  --accent: #d28a2e;
  --accent-bright: #f1ba63;
  --deep: #101916;
  --danger: #ff5d55;
  --safe-bottom: max(12px, env(safe-area-inset-bottom));
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
.app-shell { min-height: 100dvh; max-width: 1120px; margin: 0 auto; background: var(--bg); }
.topbar { position: sticky; top: 0; z-index: 20; min-height: 72px; padding: max(12px, env(safe-area-inset-top)) 18px 12px; display: flex; align-items: center; justify-content: space-between; background: color-mix(in srgb, var(--bg) 90%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--line) 50%, transparent); backdrop-filter: blur(18px); }
.brand { display: flex; align-items: center; gap: 11px; }
.brand img { width: 42px; height: 42px; border-radius: 13px; }
.brand strong { display: block; font: 600 20px/1.05 Georgia, "Times New Roman", serif; }
.brand small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.topbar-actions { display: flex; gap: 8px; }
.icon-button { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); font-size: 14px; font-weight: 800; }
#searchButton { font-size: 23px; font-weight: 400; }
#app { padding: 0 18px calc(102px + var(--safe-bottom)); }
.screen { display: none; animation: reveal .22s ease; }
.screen.active { display: block; }
@keyframes reveal { from { opacity: .4; transform: translateY(5px); } }
.screen-title { padding: 20px 2px 16px; }
.screen-title h1 { margin: 2px 0 0; font: 600 clamp(32px, 7vw, 48px)/1.05 Georgia, "Times New Roman", serif; }
.eyebrow { margin: 0; color: var(--accent-bright); font-size: 11px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.live-hero { min-height: clamp(300px, 54vw, 430px); margin: 4px 0 0; padding: clamp(18px, 4vw, 32px); position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; border-radius: 26px; color: #fffaf0; background: radial-gradient(circle at 80% 12%, rgba(231,167,74,.53), transparent 31%), linear-gradient(140deg, rgba(7,14,14,.12), rgba(7,14,14,.88)), linear-gradient(135deg,#55706a,#172724 68%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.live-hero::after, .live-stage-preview::after { content: ""; position: absolute; inset: 0; opacity: .22; pointer-events: none; background-image: repeating-linear-gradient(115deg,transparent 0 26px,rgba(255,255,255,.08) 27px 28px); }
.live-hero-top, .live-hero-copy { position: relative; z-index: 1; }
.live-hero-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.live-badge { width: fit-content; display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 999px; background: rgba(14,17,18,.65); color: white; font-size: 10px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.live-badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 4px rgba(170,168,163,.14); }
.live-badge.is-live i { background: var(--danger); box-shadow: 0 0 0 4px rgba(255,93,85,.16); animation: livePulse 1.8s ease-out infinite; }
.live-badge.is-checking i { background: var(--accent-bright); box-shadow: 0 0 0 4px rgba(241,186,99,.14); }
.live-badge.is-offline { color: rgba(255,255,255,.72); }
@keyframes livePulse { 50% { box-shadow: 0 0 0 8px rgba(255,93,85,0); } }
.live-schedule { color: rgba(255,255,255,.76); font-size: 12px; }
.live-hero-copy h1 { max-width: 720px; margin: 8px 0 8px; font: 600 clamp(34px, 8vw, 64px)/1.01 Georgia, "Times New Roman", serif; }
.live-hero-copy > p:not(.eyebrow) { margin: 0 0 18px; color: rgba(255,255,255,.75); font-size: 14px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.primary-button, .glass-button { min-height: 44px; padding: 0 16px; border: 0; border-radius: 14px; font-weight: 800; }
.primary-button { background: var(--accent); color: #17110a; }
.glass-button { border: 1px solid rgba(255,255,255,.32); background: rgba(12,16,16,.35); color: white; }
.primary-button:disabled, .stage-play:disabled { cursor: not-allowed; opacity: .5; filter: grayscale(.35); }
.content-section { margin-top: 28px; }
.section-heading { min-height: 32px; margin: 0 2px 11px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-heading h2 { margin: 0; font: 600 21px/1.1 Georgia, "Times New Roman", serif; }
.section-heading button { border: 0; background: transparent; color: var(--accent-bright); font-size: 12px; font-weight: 800; }
.continue-card { display: grid; grid-template-columns: 88px 1fr auto; gap: 12px; align-items: center; padding: 11px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.continue-art { width: 88px; height: 64px; display: grid; place-items: center; border-radius: 13px; color: white; font: 600 23px Georgia, serif; }
.continue-copy { min-width: 0; }
.continue-copy strong, .media-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.continue-copy small, .media-copy small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.progress { height: 3px; margin-top: 9px; overflow: hidden; border-radius: 4px; background: var(--surface-2); }
.progress span { display: block; height: 100%; background: var(--accent); }
.round-play { width: 42px; height: 42px; border: 0; border-radius: 50%; background: transparent; color: var(--accent-bright); font-size: 22px; }
.featured-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.featured-grid > .empty-state, .program-grid > .empty-state { grid-column: 1 / -1; }
.featured-card { min-width: 0; cursor: pointer; }
.featured-art { aspect-ratio: 1/.78; padding: 13px; display: flex; align-items: flex-end; position: relative; overflow: hidden; border-radius: 17px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.featured-art::before { content:""; position:absolute; inset:0; background:linear-gradient(15deg,rgba(0,0,0,.55),transparent 64%); }
.featured-art strong { position: relative; z-index: 1; color: white; font: 600 clamp(14px, 3vw, 21px)/1.03 Georgia, serif; }
.featured-card small { display: block; margin: 7px 2px 0; color: var(--muted); font-size: 10px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.art-forest { background: linear-gradient(145deg,#78855e,#26312a); }
.art-ember { background: linear-gradient(145deg,#ae7045,#40271f); }
.art-ocean { background: linear-gradient(145deg,#65818f,#212c37); }
.art-sunrise { background: linear-gradient(145deg,#d49442,#513126); }
.art-burgundy { background: linear-gradient(145deg,#88475a,#2d1a25); }
.art-violet { background: linear-gradient(145deg,#735b8f,#292238); }
.schedule-list { display: grid; gap: 9px; }
.schedule-item { display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); }
.schedule-day { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: var(--surface-2); color: var(--accent-bright); font-size: 10px; font-weight: 850; text-transform: uppercase; }
.schedule-item strong { display:block; font-size: 13px; }
.schedule-item small { color: var(--muted); font-size: 11px; }
.schedule-item > time { color: var(--muted); font-size: 11px; white-space: nowrap; }
.filter-row { display: flex; gap: 8px; padding-bottom: 15px; overflow-x: auto; scrollbar-width: none; }
.filter-row::-webkit-scrollbar { display:none; }
.filter-row button, .library-tabs button { flex: 0 0 auto; min-height: 36px; padding: 0 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 12px; font-weight: 750; }
.filter-row button.active, .library-tabs button.active { border-color: var(--accent); background: color-mix(in srgb,var(--accent) 17%,var(--surface)); color: var(--accent-bright); }
.media-list { display: grid; gap: 10px; }
.media-card { min-width: 0; display: grid; grid-template-columns: 105px 1fr auto; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.media-art { width: 105px; height: 76px; padding: 10px; display:flex; align-items:flex-end; border-radius: 13px; color:white; font:600 14px/1.05 Georgia,serif; }
.media-copy { min-width: 0; }
.media-copy p { margin: 6px 0 0; color: var(--muted); font-size: 10px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.card-action { width: 40px; height: 40px; border: 0; background: transparent; color: var(--accent-bright); font-size: 20px; }
.live-stage { padding: 12px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); }
.live-stage-preview { aspect-ratio: 16/9; position: relative; overflow: hidden; display: grid; place-items: center; border-radius: 16px; background: radial-gradient(circle at 78% 12%,rgba(231,167,74,.48),transparent 32%),linear-gradient(145deg,#47655e,#121c19); }
.live-stage-preview .live-badge { position: absolute; left: 13px; top: 13px; z-index: 2; }
.stage-play { position: relative; z-index:2; width: 64px; height: 64px; border: 1px solid rgba(255,255,255,.3); border-radius: 50%; background:rgba(7,10,10,.56); color:white; font-size:25px; }
.live-stage h2 { margin: 15px 3px 5px; font:600 25px Georgia,serif; }
.live-stage > p { margin: 0 3px 14px; color:var(--muted); font-size:12px; }
.mode-switch { display:grid; grid-template-columns:1fr 1fr; padding:4px; border-radius:14px; background:var(--surface-2); }
.mode-switch button { min-height:38px; border:0; border-radius:11px; background:transparent; color:var(--muted); font-size:12px; font-weight:800; }
.mode-switch button.active { background:var(--surface-3); color:var(--text); }
.broadcast-details { min-height:58px; display:flex; align-items:center; gap:13px; padding:11px 13px; border-radius:15px; background:var(--surface-2); }
.broadcast-details > span:last-child { min-width:0; }
.broadcast-details strong, .broadcast-details small { display:block; }
.broadcast-details strong { font-size:13px; }
.broadcast-details small { margin-top:4px; color:var(--muted); font-size:11px; line-height:1.35; }
.signal-bars { width:40px; height:32px; flex:0 0 auto; display:flex; align-items:center; justify-content:center; gap:3px; color:var(--accent-bright); }
.signal-bars i { width:4px; border-radius:4px; background:currentColor; animation:signal 1.05s ease-in-out infinite alternate; }
.signal-bars i:nth-child(1) { height:9px; animation-delay:-.45s; }
.signal-bars i:nth-child(2) { height:23px; animation-delay:-.2s; }
.signal-bars i:nth-child(3) { height:30px; }
.signal-bars i:nth-child(4) { height:15px; animation-delay:-.65s; }
@keyframes signal { to { transform:scaleY(.45); opacity:.58; } }
.callout-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:12px; }
.callout { min-height:108px; padding:16px; text-align:left; display:flex; flex-direction:column; align-items:flex-start; border:1px solid var(--line); border-radius:18px; background:var(--surface); }
.callout > span { color:var(--accent-bright); font-size:23px; }
.callout strong { margin-top:8px; font-size:13px; }
.callout small { margin-top:3px; color:var(--muted); font-size:10px; }
.program-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:11px; }
.program-card { min-width:0; overflow:hidden; border:1px solid var(--line); border-radius:20px; background:var(--surface); cursor:pointer; }
.program-card .featured-art { border-radius:0; aspect-ratio:16/10; }
.program-card-copy { padding:13px; }
.program-card-copy strong { display:block; font:600 17px Georgia,serif; }
.program-card-copy small { display:block; margin-top:5px; color:var(--muted); font-size:10px; }
.library-tabs { display:flex; gap:8px; margin:0 0 15px; }
.empty-state { padding:42px 24px; text-align:center; border:1px dashed var(--line); border-radius:20px; color:var(--muted); }
.empty-state span { display:block; margin-bottom:10px; color:var(--accent); font-size:30px; }
.mini-player { position:fixed; left:50%; bottom:calc(76px + var(--safe-bottom)); z-index:24; width:min(680px,calc(100% - 24px)); min-height:58px; transform:translateX(-50%); display:flex; align-items:center; gap:7px; padding:7px; border:1px solid var(--line); border-radius:17px; background:color-mix(in srgb,var(--surface) 92%,transparent); box-shadow:0 14px 36px rgba(0,0,0,.42); backdrop-filter:blur(15px); }
.mini-main { min-width:0; flex:1; display:flex; align-items:center; gap:10px; text-align:left; border:0; background:transparent; }
.mini-art { width:42px; height:42px; flex:0 0 auto; display:grid; place-items:center; border-radius:11px; background:var(--deep); color:var(--accent-bright); font:600 22px Georgia,serif; }
.mini-art img { width:100%; height:100%; display:block; border-radius:11px; object-fit:cover; }
.mini-copy { min-width:0; }
.mini-copy strong, .mini-copy small { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mini-copy strong { font-size:12px; }
.mini-copy small { margin-top:3px; color:var(--muted); font-size:9px; }
.mini-control { width:38px; height:38px; flex:0 0 auto; border:0; background:transparent; color:var(--accent-bright); font-size:19px; }
.bottom-nav { position:fixed; left:50%; bottom:0; z-index:25; width:min(1120px,100%); min-height:calc(68px + var(--safe-bottom)); transform:translateX(-50%); padding-bottom:var(--safe-bottom); display:grid; grid-template-columns:repeat(5,1fr); border-top:1px solid var(--line); background:color-mix(in srgb,var(--surface) 94%,transparent); backdrop-filter:blur(18px); }
.bottom-nav a { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px; color:var(--muted); }
.bottom-nav a > span { font-size:20px; line-height:1; }
.bottom-nav a small { font-size:9px; }
.bottom-nav a.active { color:var(--accent-bright); font-weight:850; }
.live-nav-dot { color:#f07068; }
dialog { border:0; padding:0; color:var(--text); background:transparent; }
dialog::backdrop { background:rgba(0,0,0,.72); backdrop-filter:blur(8px); }
.player-dialog { width:min(720px,100%); max-width:none; height:min(920px,100dvh); max-height:none; margin:auto auto 0; }
.player-dialog-shell { min-height:100%; position:relative; overflow:hidden; border:1px solid var(--line); border-bottom:0; border-radius:28px 28px 0 0; background:var(--bg); }
.dialog-close { position:absolute; right:13px; top:13px; z-index:3; width:39px; height:39px; border:1px solid rgba(255,255,255,.18); border-radius:50%; background:rgba(8,10,11,.58); color:white; font-size:24px; }
.player-surface { aspect-ratio:16/10; display:grid; place-items:center; background:radial-gradient(circle at 75% 12%,rgba(231,167,74,.45),transparent 31%),linear-gradient(145deg,#435f59,#121b18); }
.player-surface iframe, .player-surface video { width:100%; height:100%; border:0; object-fit:contain; background:#000; }
.audio-visual { width:150px; height:150px; display:grid; place-items:center; border-radius:50%; background:rgba(8,12,11,.42); box-shadow:0 0 0 18px rgba(255,255,255,.035),0 0 0 38px rgba(255,255,255,.02); }
.audio-visual img { width:92px; height:92px; border-radius:27px; filter:drop-shadow(0 12px 24px rgba(0,0,0,.35)); }
.stream-message { max-width:320px; padding:24px; display:grid; justify-items:center; gap:9px; text-align:center; }
.stream-message img { width:82px; height:82px; margin-bottom:5px; border-radius:24px; }
.stream-message strong { font:600 24px Georgia,serif; }
.stream-message span { color:rgba(255,255,255,.72); font-size:13px; line-height:1.45; }
.player-details { padding:20px 22px calc(30px + env(safe-area-inset-bottom)); }
.player-details h2 { margin:5px 0 6px; font:600 30px/1.06 Georgia,serif; }
.player-details > p:not(.eyebrow) { margin:0; color:var(--muted); font-size:12px; }
.player-progress { height:4px; margin:22px 0 13px; overflow:hidden; border-radius:6px; background:var(--surface-2); }
.player-progress span { display:block; width:4%; height:100%; background:var(--accent); }
.player-controls { display:flex; align-items:center; justify-content:center; gap:30px; }
.player-controls button { width:46px; height:46px; border:0; background:transparent; font-size:24px; }
.player-controls button small { font-size:9px; }
.player-controls .main-play { width:58px; height:58px; border-radius:50%; background:var(--accent); color:#17110a; }
.player-actions { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-top:18px; }
.player-actions button, .player-actions a { min-height:48px; padding:8px; display:flex; align-items:center; justify-content:center; gap:6px; border:1px solid var(--line); border-radius:14px; background:var(--surface); color:var(--text); font-size:11px; font-weight:750; }
.player-actions .saved { color:var(--accent-bright); border-color:var(--accent); }
.scripture-card { margin-top:16px; padding:14px; border-left:4px solid var(--accent); border-radius:13px; background:var(--surface); }
.scripture-card small, .scripture-card strong { display:block; }
.scripture-card small { color:var(--muted); font-size:9px; text-transform:uppercase; letter-spacing:.12em; }
.scripture-card strong { margin-top:4px; font:600 17px Georgia,serif; }
.search-dialog { width:min(680px,calc(100% - 20px)); height:min(760px,calc(100dvh - 30px)); max-height:none; }
.search-shell { height:100%; padding:18px; overflow:auto; border:1px solid var(--line); border-radius:24px; background:var(--bg); }
.search-head { display:flex; align-items:center; justify-content:space-between; }
.search-head label { font:600 27px Georgia,serif; }
.search-head button { width:40px; height:40px; border:0; background:transparent; color:var(--muted); font-size:25px; }
#searchInput { width:100%; margin:15px 0; padding:14px 16px; border:1px solid var(--line); border-radius:15px; outline:0; background:var(--surface); color:var(--text); }
#searchInput:focus { border-color:var(--accent); }
.prayer-dialog { width:min(540px,calc(100% - 20px)); }
.prayer-dialog form { position:relative; padding:26px; border:1px solid var(--line); border-radius:24px; background:var(--bg); }
.prayer-dialog h2 { margin:5px 0 8px; font:600 30px Georgia,serif; }
.prayer-dialog p:not(.eyebrow) { color:var(--muted); font-size:13px; line-height:1.5; }
.prayer-dialog label { display:block; margin-top:14px; color:var(--muted); font-size:11px; font-weight:700; }
.prayer-dialog input, .prayer-dialog textarea { width:100%; margin-top:6px; padding:12px; border:1px solid var(--line); border-radius:13px; outline:0; background:var(--surface); color:var(--text); }
.prayer-dialog textarea { min-height:120px; resize:vertical; }
.prayer-dialog .primary-button { width:100%; margin-top:16px; }
.form-note { display:block; margin-top:12px; color:var(--muted); font-size:9px; line-height:1.45; }
.toast { position:fixed; left:50%; bottom:calc(86px + var(--safe-bottom)); z-index:50; max-width:calc(100% - 32px); padding:11px 15px; transform:translate(-50%,16px); border-radius:12px; background:#f2eee4; color:#1a1c1f; box-shadow:0 12px 30px rgba(0,0,0,.35); font-size:12px; font-weight:750; opacity:0; pointer-events:none; transition:.2s ease; }
.toast.show { opacity:1; transform:translate(-50%,0); }
@media (min-width:760px) {
  #app { padding-left:30px; padding-right:30px; }
  .topbar { padding-left:30px; padding-right:30px; }
  .live-hero { min-height:440px; }
  .media-list { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .program-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .schedule-list { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:430px) {
  .featured-grid { margin-right:-18px; padding-right:18px; grid-template-columns:repeat(3,142px); overflow-x:auto; scrollbar-width:none; }
  .featured-grid::-webkit-scrollbar { display:none; }
  .media-card { grid-template-columns:90px 1fr auto; }
  .media-art { width:90px; height:68px; }
  .program-grid { grid-template-columns:1fr 1fr; }
  .program-card-copy strong { font-size:15px; }
}
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto!important; animation:none!important; transition:none!important; } }
