/* ChurchBright Church TV: the programme guide (EPG), the detail dialog and the compact card. The TV frame itself is in tv.css. */
/* Programme guide */
.mx-epg { margin-top: 26px; }
.mx-epg[hidden] { display: none; }
.mx-epg-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.mx-epg-head .mx-h2 { margin: 0; }
.mx-epg-tz { margin: 2px 0 0; font-size: 12.5px; color: var(--muted, #64748b); }
.mx-epg-jump { flex: 0 0 auto; }
.mx-epg-jump[hidden] { display: none; }
.mx-epg-empty { padding: 18px; border: 1px dashed var(--border, #e5e7eb); border-radius: 10px; color: var(--muted, #64748b); text-align: center; margin: 0; }
.mx-epg-wrap { position: relative; --epg-row: 90px; --epg-ruler: 30px; --epg-gap: 3px; --epg-bed: color-mix(in srgb, var(--ink, #0f172a) 7%, var(--surface, #fff)); --epg-line: color-mix(in srgb, var(--ink, #0f172a) 10%, transparent); --epg-edge: color-mix(in srgb, var(--ink, #0f172a) 16%, var(--surface, #fff)); }
/* One frame holds the fixed channel column on the left and the scrolling guide. */
.mx-epg-frame { display: flex; align-items: flex-start; border: 1px solid var(--border, #e5e7eb); border-radius: 10px; overflow: hidden; background: var(--surface, #fff); }
.mx-epg-body { flex: 1 1 0; min-width: 0; }
.mx-epg-side { flex: none; box-sizing: border-box; padding: 0 12px 8px; background: var(--surface-2, #f8fafc); border-right: 1px solid var(--border, #e5e7eb); align-self: stretch; }
.mx-epg-side[hidden] { display: none; }
.mx-epg-corner { box-sizing: border-box; height: var(--epg-ruler); margin: 0 -12px var(--epg-gap); padding: 0 12px; display: flex; align-items: flex-end; font-size: 10.5px; line-height: 1; padding-bottom: 5px; color: var(--muted, #64748b); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx-epg-logo { box-sizing: border-box; width: calc(var(--epg-row) * 16 / 9); height: var(--epg-row); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 8px 10px; border: 1px solid var(--border, #e5e7eb); border-radius: 6px; background: var(--surface, #fff); color: var(--ink, #0f172a); text-align: center; overflow: hidden; }
.mx-epg-logo img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.mx-epg-logo-mark { display: grid; place-items: center; color: var(--mx-accent, #2563eb); }
.mx-epg-logo-name { font-size: 14px; font-weight: 800; line-height: 1.2; max-width: 100%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
/* The scrollbar is hidden on purpose: drag, trackpad / shift+wheel, touch, the arrow keys on a block and the round arrows all scroll the guide. */
.mx-epg-scroll { position: relative; overflow-x: auto; overflow-y: hidden; background: var(--surface, #fff); cursor: grab; scrollbar-width: none; -ms-overflow-style: none; overscroll-behavior-x: contain; }
.mx-epg-scroll::-webkit-scrollbar { display: none; width: 0; height: 0; }
.mx-epg-scroll.is-dragging { cursor: grabbing; user-select: none; }
.mx-epg-track { position: relative; background: var(--epg-bed); }
.mx-epg-grid { position: absolute; inset: 0; pointer-events: none; }
.mx-epg-gline { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--epg-line); opacity: .55; }
.mx-epg-gline.is-half { opacity: .8; }
.mx-epg-gline.is-hour { opacity: 1; background: color-mix(in srgb, var(--ink, #0f172a) 18%, transparent); }
.mx-epg-gline.is-quarter { opacity: .4; }
/* The ruler scrolls with the track (same x as the tiles) and stays pinned to the top of the guide. */
.mx-epg-ticks { position: sticky; top: 0; z-index: 2; box-sizing: border-box; height: var(--epg-ruler); margin-bottom: var(--epg-gap); background: var(--surface-2, #f8fafc); overflow: hidden; }
.mx-epg-tick { position: absolute; bottom: 0; width: 1px; background: var(--border-strong, #cbd5e1); }
.mx-epg-tick.is-quarter { height: 5px; }
.mx-epg-tick.is-half { height: 9px; }
.mx-epg-tick.is-hour { height: 15px; background: var(--muted, #64748b); }
.mx-epg-tick-label { position: absolute; left: 0; bottom: 16px; padding-left: 5px; font-size: 11.5px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; color: var(--ink, #0f172a); white-space: nowrap; }
.mx-epg-row { position: relative; height: var(--epg-row); margin-bottom: 8px; }
.mx-epg-block { position: absolute; top: 0; height: var(--epg-row); box-sizing: border-box; display: flex; align-items: center; padding: 0; border-radius: 6px; border: 1px solid var(--epg-edge); box-shadow: 0 1px 2px rgba(15, 23, 42, .10), 0 1px 0 rgba(255, 255, 255, .6) inset; background: var(--surface, #fff); color: var(--ink, #0f172a) !important; text-align: left; font: inherit; text-decoration: none !important; cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s; }
.mx-epg-block:hover { transform: translateY(-2px); border-color: var(--mx-accent); box-shadow: 0 6px 14px rgba(15, 23, 42, .12); }
.mx-epg-block:focus-visible { outline: 3px solid var(--mx-accent); outline-offset: 2px; z-index: 2; transform: translateY(-2px); }
.mx-epg-bg { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; }
.mx-epg-block .mx-epg-pic { flex: none; box-sizing: border-box; display: block; aspect-ratio: 16 / 9; height: calc(var(--epg-row) - 18px); width: auto; min-height: 0; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 4px; object-fit: cover; object-position: center; background: var(--surface-2, #e2e8f0); }
.mx-epg-block.has-pic .mx-epg-text { margin-left: 8px; }
/* The label is sticky: when the block is partly scrolled out at the left, the title stays inside the visible part. */
.mx-epg-text { position: sticky; left: 10px; z-index: 1; box-sizing: border-box; display: flex; align-items: center; gap: 12px; min-width: 0; max-width: var(--lw, calc(100% - 20px)); width: max-content; margin: 0 10px; padding-right: 2px; }
.mx-epg-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mx-epg-nowtag { align-self: flex-start; margin-bottom: 2px; padding: 0 7px; border-radius: 999px; background: var(--tv-line); color: #fff; font: 800 10px/1.6 var(--font, system-ui, sans-serif); letter-spacing: .08em; text-transform: uppercase; text-shadow: none; display: none !important; }
.mx-epg-time { font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--mx-accent, #2563eb); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx-epg-title { font-size: 14.5px; font-weight: 800; line-height: 1.22; color: var(--ink, #0f172a); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.mx-epg-dur { font-size: 12px; color: var(--muted, #64748b); white-space: nowrap; }
.mx-epg-fill { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: color-mix(in srgb, var(--mx-accent, #2563eb) 55%, transparent); }
.mx-epg-block.is-past { opacity: .72; background: color-mix(in srgb, var(--surface, #fff) 70%, var(--epg-bed)); box-shadow: none; }
.mx-epg-block.is-past:hover, .mx-epg-block.is-past:focus-visible { opacity: .95; }
.mx-epg-block.pic-off .mx-epg-pic { display: none; }
.mx-epg-block.has-pic.pic-off .mx-epg-text { margin-left: 10px; }
.mx-epg-block.is-past .mx-epg-pic { filter: grayscale(.7); }
.mx-epg-block.is-past .mx-epg-fill { display: none; }
.mx-epg-block.is-now { border-color: var(--mx-accent); box-shadow: 0 0 0 2px var(--mx-accent); }
.mx-epg-block.is-now .mx-epg-nowtag { display: inline-block; }
.mx-epg-block.is-now .mx-epg-dur { display: none; }
.mx-epg-block.is-now .mx-epg-fill { height: 4px; background: var(--mx-accent); }
.mx-epg-block.is-future .mx-epg-fill { display: none; }
.mx-epg-block.is-tiny .mx-epg-dur { display: none; }
.mx-epg-block.is-tiny .mx-epg-title { font-size: 12.5px; }
/* Narrow tiles (a short programme is drawn short): start time and one line of title, then nothing but the tooltip. */
.mx-epg-block.is-slim { border-radius: 4px; }
.mx-epg-block.is-slim .mx-epg-text { margin: 0 5px; left: 5px; }
.mx-epg-block.is-slim .mx-epg-nowtag { display: none; }
.mx-epg-block.is-slim .mx-epg-time { font-size: 11px; }
.mx-epg-block.is-slim .mx-epg-title { font-size: 11.5px; -webkit-line-clamp: 1; }
/* A 15 minute tile (the minimum) is about 52 px of room: the start time alone, wrapping before it would be cut. */
.mx-epg-block.is-xs .mx-epg-text { margin: 0 4px; left: 4px; }
.mx-epg-block.is-xs .mx-epg-info { align-items: flex-start; }
.mx-epg-block.is-xs .mx-epg-time { white-space: normal; overflow: visible; text-overflow: clip; font-size: 10.5px; line-height: 1.2; }
.mx-epg-block.is-xs .mx-epg-title, .mx-epg-block.is-xs .mx-epg-dur { display: none; }
.mx-epg-block.is-micro .mx-epg-text { display: none; }
.mx-epg-now { position: absolute; top: 0; bottom: 0; left: 0; width: 0; z-index: 3; pointer-events: none; will-change: transform; }
.mx-epg-now::before { content: ""; position: absolute; top: 0; bottom: 0; left: -1px; width: 2px; background: var(--tv-line); box-shadow: 0 0 6px rgba(239, 68, 68, .5); }
.mx-epg-now-pill { position: absolute; top: 3px; left: 0; transform: translateX(-50%); padding: 0 8px; border-radius: 999px; background: var(--tv-line); color: #fff; font: 800 11.5px/20px var(--font, system-ui, sans-serif); font-variant-numeric: tabular-nums; white-space: nowrap; box-shadow: 0 2px 6px rgba(15, 23, 42, .25); }
.mx-epg-arrow { position: absolute; top: 50%; z-index: 4; width: 36px; height: 36px; margin-top: -1px; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1px solid var(--border-strong, #cbd5e1); background: var(--surface, #fff); color: var(--ink, #0f172a); box-shadow: 0 6px 18px rgba(15, 23, 42, .25); cursor: pointer; transition: transform .15s, border-color .15s; }
.mx-epg-arrow[hidden] { display: none; }
.mx-epg-arrow:hover { border-color: var(--mx-accent); transform: scale(1.06); }
.mx-epg-arrow:focus-visible { outline: 3px solid var(--mx-accent); outline-offset: 2px; }
.mx-epg-prev { left: -10px; }
.mx-epg-next { right: -10px; }
@media (max-width: 1023.98px) { .mx-epg-wrap { --epg-row: 63px; } .mx-epg-block.is-now .mx-epg-dur, .mx-epg-dur { display: none; } .mx-epg-side { padding: 0 8px 8px; } .mx-epg-corner { margin: 0 -8px var(--epg-gap); padding: 0 8px 5px; } .mx-epg-logo { padding: 4px 6px; } .mx-epg-logo-mark svg { width: 16px; height: 16px; } .mx-epg-logo-name { font-size: 12px; } }
@media (max-width: 639.98px) { .mx-epg-arrow, .mx-epg-side { display: none; } }

/* Detail dialog */
.mx-epg-dialog { border: 0; padding: 0; border-radius: 18px; width: min(460px, calc(100vw - 32px)); background: var(--surface, #fff); color: var(--ink, #0f172a); box-shadow: 0 30px 80px rgba(2, 6, 23, .45); overflow: hidden; }
.mx-epg-dialog::backdrop { background: rgba(2, 6, 23, .6); backdrop-filter: blur(2px); }
.mx-epg-dialog-x { position: absolute; top: 10px; right: 10px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(15, 23, 42, .6); color: #fff; font: 22px/1 system-ui, sans-serif; cursor: pointer; }
.mx-epg-dialog-thumb { aspect-ratio: 16 / 9; background: linear-gradient(160deg, #0b1020, var(--mx-accent)); }
.mx-epg-dialog-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mx-epg-dialog-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; }
.mx-epg-dialog-status { align-self: flex-start; font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--mx-accent); }
.mx-epg-dialog-status.is-now { color: #dc2626; }
.mx-epg-dialog-status.is-past { color: var(--muted, #64748b); }
.mx-epg-dialog-title { margin: 0; font-size: 20px; line-height: 1.25; }
.mx-epg-dialog-meta { margin: 0; color: var(--muted, #64748b); font-size: 14px; }
.mx-epg-dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* Phones: Now / Next / Later */
.mx-epg-group { margin-bottom: 16px; }
.mx-epg-group-h { margin: 0 0 8px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted, #64748b); }
.mx-epg-group.is-now .mx-epg-group-h { color: #dc2626; }
.mx-epg-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mx-epg-item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; border: 1px solid var(--border, #e5e7eb); background: var(--surface, #fff); color: var(--ink, #0f172a); text-align: left; font: inherit; cursor: pointer; min-height: 64px; }
.mx-epg-item:focus-visible { outline: 3px solid var(--mx-accent); outline-offset: 2px; }
.mx-epg-group.is-now .mx-epg-item { border-color: var(--mx-accent); background: linear-gradient(135deg, color-mix(in srgb, var(--mx-accent) 14%, var(--surface, #fff)), var(--surface, #fff)); }
.mx-epg-item img, .mx-epg-item-ph { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex: 0 0 56px; background: var(--surface-3, #f1f5f9); }
.mx-epg-item-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mx-epg-item-time { font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--mx-accent); }
.mx-epg-item-title { font-size: 15px; font-weight: 700; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mx-epg-item-dur { font-size: 12.5px; color: var(--muted, #64748b); }

/* Compact "On air now / Up next" card (website block, home pages) */
.mx-tvcard { max-width: 760px; margin: 0 auto; }
.mx-tvcard-link { display: grid; grid-template-columns: 180px 1fr auto; align-items: center; gap: 16px; padding: 12px; border-radius: 20px; text-decoration: none !important; color: #fff !important;
  background: linear-gradient(160deg, #0b1020, #161a36 55%, color-mix(in srgb, var(--mx-accent) 55%, #0b1020)); box-shadow: 0 14px 36px rgba(15, 23, 42, .25); border: 1px solid rgba(255, 255, 255, .08); }
.mx-tvcard-link:hover { filter: brightness(1.06); }
.mx-tvcard-link:focus-visible { outline: 3px solid var(--mx-accent); outline-offset: 3px; }
.mx-tvcard-thumb { aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; display: grid; place-items: center; color: rgba(255, 255, 255, .7); }
.mx-tvcard-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mx-tvcard-body { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.mx-tvcard-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mx-tvcard-title { font-size: 18px; line-height: 1.25; color: #fff; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mx-tvcard .mx-progress { background: rgba(255, 255, 255, .18); }
.mx-tvcard-next { font-size: 13px; color: rgba(255, 255, 255, .72); min-height: 1.3em; }
.mx-tvcard-go { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 999px; background: rgba(255, 255, 255, .14); font-weight: 700; font-size: 14px; white-space: nowrap; }

@media (max-width: 760px) {
  .mx-tvcard-link { grid-template-columns: 112px 1fr; }
  .mx-tvcard-go { grid-column: 1 / -1; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .mx-epg-block, .mx-epg-arrow { transition: none; }
  .mx-epg-block:hover, .mx-epg-block:focus-visible, .mx-epg-arrow:hover { transform: none; }
}

/* ── Dark TV band ──────────────────────────────────────────────────────────────
   The whole Church TV section sits on a dark band. The variables below are scoped to the band, and they also replace the site's
   surface / ink / border tokens inside it, so every rule above (guide, dialog, buttons, empty state) turns dark without new markup.
   .mx-tvband--bleed = edge to edge between the site header and footer (the /channel page); --box = its own rounded dark container
   (the website builder block and the member app). */
.mx-tvband { --tv-bg: #070a12; --tv-bg-2: #0d1322; --tv-bed: #0b0f1a; --tv-surface: #151b2b; --tv-border: rgba(255, 255, 255, .12); --tv-text: #f1f5f9; --tv-muted: #94a3b8;
  --tv-accent-text: color-mix(in srgb, var(--mx-accent, #4f46e5) 45%, #fff); --tv-accent-edge: color-mix(in srgb, var(--mx-accent, #4f46e5) 70%, #fff);
  --surface: var(--tv-surface); --surface-2: #0f1524; --surface-3: #1b2236; --border: var(--tv-border); --border-strong: rgba(255, 255, 255, .24); --ink: var(--tv-text); --muted: var(--tv-muted);
  position: relative; isolation: isolate; color: var(--tv-text); color-scheme: dark;
  background: radial-gradient(760px 340px at 32% 150px, color-mix(in srgb, var(--mx-accent, #4f46e5) 24%, transparent), transparent 70%), linear-gradient(180deg, var(--tv-bg), var(--tv-bg-2)); }
.mx-tvband-in { box-sizing: border-box; max-width: 1128px; margin: 0 auto; padding: 0 16px; }
.mx-tvband--bleed { box-sizing: border-box; width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); padding: 34px 0 54px; }
.mx-tvband--box { border-radius: 16px; padding: 18px 0; overflow: clip; --mx-accent: var(--church, var(--primary, #4f46e5)); }
.mx-tvband--box .mx-tvband-in { padding: 0 18px; }
/* The full-width band must not give the page a sideways scrollbar (100vw includes the scrollbar on some browsers). */
main:has(.mx-tvband--bleed) { overflow-x: clip; }
/* No light strip between the header / footer and the band. */
.ws-wrap:has(.mx-tvband--bleed) { padding-top: 0; padding-bottom: 0; }
.mx-tvband .mx-h1, .mx-tvband .mx-h2, .mx-tvband h1, .mx-tvband h2 { color: var(--tv-text); }
.mx-tvband .mx-tv-h1 { margin-bottom: 18px; }
.mx-tvband a:not(.mx-btn):not(.mx-epg-block) { color: var(--tv-accent-text); }
/* TV frame: blends into the band (soft shadow, small radius) */
.mx-tvband .mx-tv-frame { border-radius: 10px; box-shadow: 0 10px 28px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .1); }
.mx-tvband .mx-tv-screen { border-radius: 6px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 8px 20px rgba(0, 0, 0, .45); }
/* Next up: dark glass */
.mx-tvband .mx-nextup { border-radius: 10px; background: rgba(255, 255, 255, .055); border: 1px solid rgba(255, 255, 255, .1); box-shadow: none; }
.mx-tvband .mx-tv .mx-nextup-kicker, .mx-tvband .mx-nextup-kicker { color: var(--tv-accent-text); }
.mx-tvband .mx-nextup-thumb { border-radius: 8px; box-shadow: 0 6px 18px rgba(0, 0, 0, .4); }
.mx-tvband .mx-nextup-count { background: color-mix(in srgb, var(--mx-accent, #4f46e5) 30%, transparent); color: #fff; border: 1px solid color-mix(in srgb, var(--mx-accent, #4f46e5) 60%, #fff); }
.mx-tvband .mx-nextup-count.is-now { background: #b91c1c; border-color: #ef4444; color: #fff; }
.mx-tvband .mx-nextup-later { border-top-color: rgba(255, 255, 255, .1); }
/* Programme guide */
.mx-tvband .mx-epg-wrap { --epg-bed: var(--tv-bed); --epg-line: rgba(255, 255, 255, .07); --epg-edge: rgba(255, 255, 255, .12); }
.mx-tvband .mx-epg-frame { background: var(--tv-bed); border-color: var(--tv-border); }
.mx-tvband .mx-epg-scroll { background: var(--tv-bed); }
.mx-tvband .mx-epg-side { background: #0e1424; border-right-color: var(--tv-border); }
.mx-tvband .mx-epg-corner { color: var(--tv-muted); }
.mx-tvband .mx-epg-logo { background: var(--tv-surface); border-color: rgba(255, 255, 255, .22); }
.mx-tvband .mx-epg-logo-mark { color: var(--tv-accent-text); }
.mx-tvband .mx-epg-ticks { background: #0e1424; }
.mx-tvband .mx-epg-tick { background: rgba(255, 255, 255, .3); }
.mx-tvband .mx-epg-tick.is-hour { background: rgba(255, 255, 255, .75); }
.mx-tvband .mx-epg-tick-label { color: #fff; }
.mx-tvband .mx-epg-gline.is-hour { background: rgba(255, 255, 255, .16); }
.mx-tvband .mx-epg-block { background: var(--tv-surface); border-color: var(--epg-edge); box-shadow: none; }
.mx-tvband .mx-epg-block:hover { border-color: var(--tv-accent-edge); box-shadow: 0 8px 18px rgba(0, 0, 0, .55); }
.mx-tvband .mx-epg-block:focus-visible { outline-color: var(--tv-accent-edge); }
.mx-tvband .mx-epg-time { color: var(--tv-accent-text); }
.mx-tvband .mx-epg-title { color: #fff; }
.mx-tvband .mx-epg-dur { color: var(--tv-muted); }
.mx-tvband .mx-epg-block.is-past { opacity: .72; background: #10162a; }
.mx-tvband .mx-epg-block.is-now { border-color: var(--tv-accent-edge); box-shadow: 0 0 0 2px var(--tv-accent-edge), 0 0 22px color-mix(in srgb, var(--mx-accent, #4f46e5) 55%, transparent); }
.mx-tvband .mx-epg-fill { background: color-mix(in srgb, var(--tv-accent-edge) 55%, transparent); }
.mx-tvband .mx-epg-block.is-now .mx-epg-fill { background: var(--tv-accent-edge); }
.mx-tvband .mx-epg-arrow { background: #121829; border-color: rgba(255, 255, 255, .28); color: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .55); }
.mx-tvband .mx-epg-arrow:hover { border-color: var(--tv-accent-edge); }
.mx-tvband .mx-btn:not(.mx-btn-primary) { background: #121829; border-color: rgba(255, 255, 255, .28); color: #fff !important; }
.mx-tvband .mx-btn:not(.mx-btn-primary):hover { border-color: var(--tv-accent-edge); }
/* Phone list, dialog and the no-script list */
.mx-tvband .mx-epg-group.is-now .mx-epg-group-h, .mx-tvband .mx-epg-dialog-status.is-now { color: #f87171; }
.mx-tvband .mx-epg-item-time, .mx-tvband .mx-epg-dialog-status, .mx-tvband .mx-guide-time { color: var(--tv-accent-text); }
.mx-tvband .mx-epg-item { border-radius: 10px; }
.mx-tvband .mx-epg-dialog { background: #121829; color: var(--tv-text); border: 1px solid rgba(255, 255, 255, .14); border-radius: 12px; }
.mx-tvband .mx-epg-dialog-title { color: #fff; }
.mx-tvband .mx-guide-list { border-radius: 10px; }
.mx-tvband .mx-empty { border-radius: 10px; background: rgba(255, 255, 255, .05); }
@media (max-width: 639.98px) {
  .mx-tvband--bleed { padding: 22px 0 36px; }
  .mx-tvband--box .mx-tvband-in { padding: 0 12px; }
}

/* ══ Church TV upgrade: start overlay, category tags and chips, day tabs, remind me, share, calls to action, live takeover, mini player ══
   Everything below lives inside the dark band, so it uses the --tv-* variables (with fallbacks). Entrance animations only touch opacity or the
   transform of elements that never contain the player, because a transformed ancestor would trap the docked (position: fixed) mini player. */
.mx-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.mx-tv [hidden] { display: none !important; }
.mx-tvband :focus-visible { outline: 3px solid var(--tv-accent-edge, #a5b4fc); outline-offset: 2px; }
.mx-tvband .mx-btn { transition: border-color .15s, background .15s, transform .12s; }
.mx-tvband .mx-btn:active { transform: translateY(1px) scale(.99); }
.mx-btn-ghost { background: transparent !important; }
.mx-tv .mx-btn .mx-ico, .mx-remind .mx-ico, .mx-sharemenu-item .mx-ico { display: inline-flex; flex: none; }
@keyframes mx-rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes mx-fade { from { opacity: 0; } }
@keyframes mx-ring { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .5), 0 12px 32px rgba(0, 0, 0, .5); } 70%, 100% { box-shadow: 0 0 0 20px rgba(255, 255, 255, 0), 0 12px 32px rgba(0, 0, 0, .5); } }
@keyframes mx-shimmer { to { background-position: -200% 0; } }
@keyframes mx-focus-pulse { 0%, 100% { box-shadow: 0 0 0 0 transparent, 0 0 0 2px var(--tv-accent-edge, #a5b4fc); } 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--tv-accent-edge, #a5b4fc) 45%, transparent), 0 0 0 2px #fff; } }
@keyframes mx-dock { from { opacity: 0; transform: translateY(14px) scale(.96); } }
.mx-tvband .mx-nextup, .mx-tvband .mx-epg { animation: mx-rise .55s cubic-bezier(.2, .7, .2, 1) both; }
.mx-tvband .mx-epg { animation-delay: .08s; }
.mx-tvband .mx-cta, .mx-tvband .mx-cchip { animation: mx-rise .5s cubic-bezier(.2, .7, .2, 1) both; }
.mx-tvband .mx-cta:nth-child(2), .mx-tvband .mx-cchip:nth-child(2) { animation-delay: .05s; }
.mx-tvband .mx-cta:nth-child(3), .mx-tvband .mx-cchip:nth-child(3) { animation-delay: .1s; }
.mx-tvband .mx-cta:nth-child(n+4), .mx-tvband .mx-cchip:nth-child(n+4) { animation-delay: .15s; }

/* Category tag: a coloured pill (label in a neutral colour, the colour on the dot and the border so contrast stays high) */
.mx-tag { --cat: #4f7df3; display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 1px 9px 1px 7px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--cat) 62%, transparent);
  background: color-mix(in srgb, var(--cat) 20%, #0b0f1a); color: #f8fafc; font: 800 10.5px/1.6 var(--font, system-ui, sans-serif); letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; vertical-align: middle; }
.mx-tag-label { overflow: hidden; text-overflow: ellipsis; }
.mx-tag-dot, .mx-cchip-dot { display: inline-block; flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--cat, #4f7df3); }
.mx-tag--sm { padding: 0 7px 0 6px; font-size: 9.5px; line-height: 1.55; }
.mx-tag.is-live { --cat: #ef4444; background: #7f1d1d; border-color: #f87171; }
.mx-tag.is-live .mx-tag-dot { background: #fff; animation: mx-pulse 1.4s ease-in-out infinite; }

/* Guide tiles: a coloured top edge, the tag next to the start time, the show name beside the length */
.mx-tvband .mx-epg-block, .mx-tvband .mx-epg-block:hover, .mx-tvband .mx-epg-block.is-now { border-top-color: var(--cat, #4f7df3); border-top-width: 3px; }
.mx-epg-meta { display: flex; align-items: center; gap: 7px; min-width: 0; }
.mx-epg-meta .mx-epg-time { flex: 0 1 auto; min-width: 0; }
.mx-epg-show { font-weight: 700; color: #e2e8f0; }
.mx-epg-show::after { content: " · "; font-weight: 400; color: var(--tv-muted, #94a3b8); }
.mx-epg-dur { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.mx-epg-block.has-bell .mx-epg-text { padding-right: 34px; }
.mx-epg-block.is-compact .mx-tag { padding: 0; border: 0; background: none; }
.mx-epg-block.is-compact .mx-tag-label { display: none; }
.mx-epg-block.is-slim .mx-tag, .mx-epg-block.is-xs .mx-tag-label { display: none; }
.mx-epg-block.is-xs .mx-epg-meta { display: block; }
.mx-epg-block.is-slim .mx-epg-show, .mx-epg-block.is-tiny .mx-epg-show { display: none; }
.mx-epg-block.is-live { --cat: #ef4444 !important; background: linear-gradient(135deg, rgba(239, 68, 68, .28), var(--tv-surface, #151b2b) 70%); }
.mx-tvband .mx-epg-block.is-live.is-now { box-shadow: 0 0 0 2px #ef4444, 0 0 24px rgba(239, 68, 68, .5); border-color: #ef4444; border-top-color: #ef4444; }
.mx-epg-block, .mx-bell { transition: transform .15s, box-shadow .15s, border-color .15s, opacity .25s, filter .25s; }
.mx-epg-block.is-dim, .mx-bell.is-dim { opacity: .2; filter: saturate(.35); }
.mx-epg-block.is-dim:hover, .mx-epg-block.is-dim:focus-visible, .mx-bell.is-dim:hover, .mx-bell.is-dim:focus-visible { opacity: .75; filter: none; }
.mx-epg-block.is-pulse, .mx-epg-li.is-pulse { animation: mx-focus-pulse 1.1s ease-in-out 4; }

/* Filter chips and day tabs */
.mx-epg-tools { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
.mx-epg-tabs { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, .07); border: 1px solid var(--tv-border, rgba(255, 255, 255, .12)); }
.mx-epg-tab, .mx-tvband a.mx-epg-tab:not(.mx-btn):not(.mx-epg-block) { display: inline-flex; align-items: center; gap: 5px; min-height: 34px; padding: 0 15px; border: 0; border-radius: 999px; background: transparent; color: #cbd5e1 !important; font: 700 13.5px var(--font, system-ui, sans-serif); text-decoration: none; cursor: pointer; transition: background .15s, color .15s; }
.mx-epg-tab:hover, .mx-tvband a.mx-epg-tab:not(.mx-btn):not(.mx-epg-block):hover { background: rgba(255, 255, 255, .12); color: #fff !important; }
.mx-epg-tab.is-active, .mx-epg-tab.is-active:hover, .mx-tvband a.mx-epg-tab.is-active:not(.mx-btn):not(.mx-epg-block) { background: #fff; color: #0b1020 !important; }
.mx-epg-tab[hidden] { display: none; }
.mx-epg-chips { display: flex; gap: 8px; margin: 0 0 12px; padding: 2px 2px 4px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.mx-epg-chips::-webkit-scrollbar { display: none; }
.mx-cchip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 15px 0 12px; border-radius: 999px; border: 1px solid var(--tv-border, rgba(255, 255, 255, .12)); background: rgba(255, 255, 255, .05); color: #e2e8f0; font: 700 13px var(--font, system-ui, sans-serif); cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.mx-cchip:first-child { padding-left: 15px; }
.mx-cchip:hover { border-color: var(--tv-accent-edge, #a5b4fc); background: rgba(255, 255, 255, .1); }
.mx-cchip.is-active { background: #fff; border-color: #fff; color: #0b1020; }

/* Remind me: a round bell on tiles and list rows, a pill with a label elsewhere */
.mx-bell { position: absolute; top: 7px; z-index: 2; width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .3); background: rgba(8, 12, 28, .78); color: #fff; cursor: pointer; backdrop-filter: blur(4px); }
.mx-bell::after { content: ""; position: absolute; inset: -6px; }
.mx-bell:hover { border-color: var(--tv-accent-edge, #a5b4fc); background: rgba(8, 12, 28, .95); }
.mx-bell.is-on, .mx-remind.is-on { background: var(--mx-accent, #4f46e5); border-color: #fff; color: #fff; }
.mx-bell[aria-busy="true"], .mx-remind[aria-busy="true"] { opacity: .6; pointer-events: none; }
.mx-remind { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .3); background: #121829; color: #fff; font: 700 13.5px var(--font, system-ui, sans-serif); cursor: pointer; transition: border-color .15s, background .15s; }
.mx-remind:hover { border-color: var(--tv-accent-edge, #a5b4fc); }
.mx-remind.is-on:hover { filter: brightness(1.08); }
.mx-nextup-act .mx-remind { margin-top: 6px; min-height: 36px; }
.mx-remind-dialog { border: 1px solid rgba(255, 255, 255, .16); border-radius: 14px; padding: 0; width: min(430px, calc(100vw - 32px)); background: #121829; color: var(--tv-text, #f1f5f9); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); overflow: visible; }
.mx-remind-dialog::backdrop { background: rgba(2, 6, 23, .68); backdrop-filter: blur(3px); }
.mx-remind-form { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 22px 20px 20px; }
.mx-remind-form .mx-remind-h { margin: 0 34px 0 0; font-size: 19px; color: #fff; }
.mx-remind-intro { margin: 0 0 6px; color: #cbd5e1; font-size: 14.5px; line-height: 1.45; }
.mx-remind-label { font-size: 13px; font-weight: 700; color: #e2e8f0; }
.mx-remind-input { box-sizing: border-box; width: 100%; min-height: 46px; padding: 0 14px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .3); background: #0b0f1a; color: #fff; font: 16px var(--font, system-ui, sans-serif); }
.mx-remind-input[aria-invalid="true"] { border-color: #f87171; }
.mx-remind-note { margin: 0; color: var(--tv-muted, #94a3b8); font-size: 12.5px; }
.mx-remind-err { margin: 0; color: #fca5a5; font-size: 13.5px; font-weight: 600; }
.mx-remind-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.mx-hp { position: absolute !important; left: -9999px; top: auto; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.mx-remind-dialog .mx-epg-dialog-x { top: 12px; right: 12px; }

/* Share menu and the toast */
.mx-sharemenu { position: fixed; z-index: 200; min-width: 214px; display: flex; flex-direction: column; padding: 6px; border-radius: 12px; background: #121829; border: 1px solid rgba(255, 255, 255, .2); box-shadow: 0 18px 44px rgba(0, 0, 0, .6); animation: mx-fade .12s both; }
.mx-sharemenu-item, .mx-tvband a.mx-sharemenu-item:not(.mx-btn):not(.mx-epg-block) { display: flex; align-items: center; gap: 11px; min-height: 44px; padding: 0 12px; border-radius: 8px; border: 0; background: none; color: #fff !important; font: 600 14.5px var(--font, system-ui, sans-serif); text-align: left; text-decoration: none; cursor: pointer; }
.mx-sharemenu-item:hover, .mx-tvband a.mx-sharemenu-item:not(.mx-btn):not(.mx-epg-block):hover { background: rgba(255, 255, 255, .12); }
.mx-sharemenu-item:focus-visible { outline-offset: -3px; background: rgba(255, 255, 255, .12); }
.mx-tvtoast { position: fixed; inset: auto auto calc(26px + env(safe-area-inset-bottom, 0px)) 50%; margin: 0; width: max-content; max-width: min(92vw, 460px); padding: 11px 20px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .28);
  background: #0b1020; color: #fff; font: 600 14px/1.4 var(--font, system-ui, sans-serif); text-align: center; box-shadow: 0 14px 36px rgba(0, 0, 0, .55); opacity: 0; transform: translate(-50%, 14px); pointer-events: none; transition: opacity .25s, transform .25s; overflow: visible; }
.mx-tvtoast.show { opacity: 1; transform: translate(-50%, 0); }
.mx-tvtoast[data-kind="error"] { background: #450a0a; border-color: #f87171; }
.mx-tvtoast[data-kind="ok"] { border-color: #4ade80; }

/* Top bar: the badge, the watching count, share and mini player */
.mx-tv-top { flex-wrap: wrap; }
.mx-tv-top .mx-onair:not(.is-live) { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22); box-shadow: none; }
.mx-tv-top .mx-onair:not(.is-live) .mx-onair-dot { background: #ef4444; }
.mx-onair.is-live { background: #ef4444; box-shadow: 0 0 0 0 rgba(239, 68, 68, .6), 0 2px 12px rgba(239, 68, 68, .55); animation: mx-glow 2s ease-out infinite; }
@keyframes mx-glow { 70%, 100% { box-shadow: 0 0 0 9px rgba(239, 68, 68, 0), 0 2px 12px rgba(239, 68, 68, .55); } }
.mx-watching { display: inline-flex; align-items: center; gap: 7px; padding: 3px 11px 3px 9px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .08); color: #f1f5f9; font: 700 12px/1.5 var(--font, system-ui, sans-serif); white-space: nowrap; font-variant-numeric: tabular-nums; }
.mx-watching-dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; animation: mx-pulse 1.8s ease-in-out infinite; }
.mx-tv-iconbtn { width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer; transition: background .15s, border-color .15s; }
.mx-tv-iconbtn:hover { background: rgba(255, 255, 255, .18); }
.mx-tv-iconbtn[aria-pressed="true"], .mx-tv-btn--mini.is-on { background: color-mix(in srgb, var(--mx-accent, #4f46e5) 70%, #0b1020); border-color: rgba(255, 255, 255, .5); }
.mx-tv-btn--mini.is-on:hover { background: var(--mx-accent, #4f46e5); }
.mx-tv-top-right { flex-wrap: wrap; justify-content: flex-end; }

/* Live takeover: banner, badge, lower third */
.mx-live-banner { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin: 0 0 10px; padding: 9px 14px; border-radius: 10px; border: 1px solid rgba(248, 113, 113, .55); background: linear-gradient(90deg, rgba(220, 38, 38, .32), rgba(220, 38, 38, .1)); color: #fff; font-weight: 700; font-size: 14.5px; animation: mx-fade .3s both; }
.mx-live-banner-dot { width: 9px; height: 9px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, .35); animation: mx-pulse 1.4s ease-in-out infinite; }
.mx-live-banner-text { flex: 1 1 200px; min-width: 0; }
.mx-tvband a.mx-live-banner-link:not(.mx-btn):not(.mx-epg-block) { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; color: #fff !important; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.mx-tv-screen.is-live { box-shadow: 0 0 0 2px rgba(239, 68, 68, .85), 0 12px 30px rgba(0, 0, 0, .5); }
.mx-tv-livepill { display: inline-flex; align-items: center; align-self: flex-start; gap: 8px; padding: 3px 12px 3px 10px; border-radius: 999px; background: rgba(239, 68, 68, .2); border: 1px solid rgba(248, 113, 113, .6); color: #fff; font: 800 12px/1.5 var(--font, system-ui, sans-serif); letter-spacing: .08em; text-transform: uppercase; }
.mx-tv-livepill .mx-onair-dot { background: #ef4444; }
.mx-tv-kickerrow { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; }
.mx-tv-show { font-size: 12.5px; font-weight: 700; color: #cbd5e1; }
.mx-tv-sharerow { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.mx-tv-info { padding-bottom: 14px; }
.mx-tv-kicker { color: rgba(255, 255, 255, .72); }

/* Calls to action under the player */
.mx-ctas { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 8px 16px; }
.mx-cta, .mx-tvband a.mx-cta:not(.mx-btn):not(.mx-epg-block) { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 17px 0 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .24); background: rgba(255, 255, 255, .08); color: #fff !important; font: 700 14px var(--font, system-ui, sans-serif); text-decoration: none; transition: background .15s, border-color .15s, transform .15s; }
.mx-cta:hover, .mx-tvband a.mx-cta:not(.mx-btn):not(.mx-epg-block):hover { background: rgba(255, 255, 255, .17); border-color: rgba(255, 255, 255, .45); transform: translateY(-1px); }
.mx-cta.is-primary, .mx-tvband a.mx-cta.is-primary:not(.mx-btn):not(.mx-epg-block) { background: color-mix(in srgb, var(--mx-accent, #4f46e5) 78%, #000); border-color: var(--tv-accent-edge, #a5b4fc); }
.mx-cta .icon { flex: none; }

/* Start overlay */
.mx-tv-slot { position: relative; }
.mx-start { position: absolute; inset: 0; z-index: 8; display: grid; place-items: center; padding: 16px; background: radial-gradient(60% 70% at 50% 45%, rgba(5, 7, 15, .45), rgba(5, 7, 15, .78)); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: mx-fade .35s both; }
.mx-start-card { display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: min(560px, 94%); text-align: center; color: #fff; }
.mx-start-card .mx-tv-bug { font-size: 15px; }
.mx-start-kicker { display: inline-flex; align-items: center; gap: 8px; padding: 3px 12px 3px 10px; border-radius: 999px; background: rgba(0, 0, 0, .45); border: 1px solid rgba(255, 255, 255, .25); font: 800 11.5px/1.5 var(--font, system-ui, sans-serif); letter-spacing: .11em; text-transform: uppercase; }
.mx-start-kicker-dot { width: 8px; height: 8px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 4px rgba(239, 68, 68, .3); animation: mx-pulse 1.5s ease-in-out infinite; }
.mx-start.is-live .mx-start-kicker { background: #b91c1c; border-color: #f87171; }
.mx-start-title { max-width: 100%; font-size: clamp(18px, 3.4vw, 30px); line-height: 1.2; letter-spacing: -.01em; text-shadow: 0 2px 14px rgba(0, 0, 0, .6); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
/* In the member app the tap-to-watch screen is just the play button: no "On air now" pill and no title over the video. */
.member-app .mx-start-kicker, .member-app .mx-start-title, .member-app .mx-tv-bug, .member-app .mx-onnow { display: none !important; }
.mx-start-btn { width: 84px; height: 84px; display: grid; place-items: center; margin-top: 4px; padding: 0; border: 0; border-radius: 50%; background: #fff; color: #0b1020; cursor: pointer; box-shadow: 0 12px 32px rgba(0, 0, 0, .5); animation: mx-ring 2.2s ease-out infinite; transition: transform .15s; }
.mx-start-btn:hover { transform: scale(1.07); }
.mx-start-btn:active { transform: scale(.97); }
.mx-start-btn:focus-visible { outline: 4px solid var(--tv-accent-edge, #a5b4fc); outline-offset: 5px; }
.mx-start-btn .icon { margin-left: 4px; }
.mx-start-hint { font-weight: 800; font-size: 15px; letter-spacing: .02em; text-shadow: 0 2px 10px rgba(0, 0, 0, .6); }

/* Mini player: the same screen element, docked with position: fixed (so the iframe or video never reloads) */
.mx-mini-bar { display: none; }
.mx-tv-screen.is-mini { position: fixed; z-index: 90; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: min(340px, 42vw); border-radius: 12px; box-shadow: 0 18px 50px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .24); animation: mx-dock .28s cubic-bezier(.2, .7, .2, 1) both; }
.mx-tv-screen.is-mini .mx-start { display: none; }
.mx-tv-screen.is-mini .mx-mini-bar { display: flex; position: absolute; top: 0; left: 0; right: 0; z-index: 9; align-items: center; justify-content: space-between; gap: 6px; padding: 6px; background: linear-gradient(180deg, rgba(0, 0, 0, .78), rgba(0, 0, 0, 0)); }
.mx-mini-back, .mx-mini-x { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 30px; border: 1px solid rgba(255, 255, 255, .3); border-radius: 999px; background: rgba(8, 12, 28, .75); color: #fff; font: 700 12px var(--font, system-ui, sans-serif); cursor: pointer; }
.mx-mini-back { padding: 0 11px; }
.mx-mini-x { width: 30px; padding: 0; }
.mx-mini-back:hover, .mx-mini-x:hover { background: rgba(8, 12, 28, .95); border-color: #fff; }
.mx-tv-screen.is-mini .mx-tv-ctrl { right: 6px; bottom: 6px; gap: 5px; opacity: 1; transform: none; }
.mx-tv-screen.is-mini .mx-tv-btn { width: 32px; height: 32px; }
.mx-tv-screen.is-mini .mx-tv-btn--mini, .mx-tv-screen.is-mini .mx-tv-btn--pip { display: none; }
.mx-tv-screen.is-mini .mx-unmute { display: none; }

/* Detail dialog (polish) */
.mx-epg-dialog { width: min(480px, calc(100vw - 32px)); }
.mx-epg-dialog-x { display: grid; place-items: center; padding: 0; }
.mx-epg-dialog-thumb { position: relative; display: grid; place-items: center; color: rgba(255, 255, 255, .55); }
.mx-epg-dialog-thumb.is-empty { background: linear-gradient(160deg, #0b1020, color-mix(in srgb, var(--mx-accent, #4f46e5) 55%, #0b1020)); }
.mx-epg-dialog-thumb img { position: absolute; inset: 0; }
.mx-epg-dialog-body { gap: 8px; padding: 18px 20px 20px; }
.mx-epg-dialog-title { font-size: 21px; letter-spacing: -.01em; }
.mx-epg-dialog-sub { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.mx-epg-dialog-show { font-weight: 700; font-size: 13.5px; color: #e2e8f0; }
.mx-epg-dialog-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: #cbd5e1; font-size: 14px; }
.mx-epg-dialog-meta .mx-ico { color: var(--tv-muted, #94a3b8); }
.mx-epg-dialog-dot { color: var(--tv-muted, #94a3b8); }
.mx-epg-dialog-actions .mx-btn, .mx-epg-dialog-actions .mx-remind { min-height: 42px; }
.mx-epg-dialog-actions .mx-remind { padding: 0 18px; }
.mx-epg-dialog[open] { animation: mx-fade .2s both; }

/* Loading, empty and error states of the guide */
.mx-epg-skel { display: grid; gap: 10px; padding: 14px; }
.mx-epg-skel-row { display: flex; gap: 8px; }
.mx-epg-skel-b { flex: 1 1 auto; height: 78px; border-radius: 6px; background: linear-gradient(90deg, rgba(255, 255, 255, .05) 25%, rgba(255, 255, 255, .13) 50%, rgba(255, 255, 255, .05) 75%); background-size: 200% 100%; animation: mx-shimmer 1.4s linear infinite; }
.mx-epg-state { display: grid; justify-items: center; gap: 10px; padding: 38px 16px; text-align: center; color: #cbd5e1; }
.mx-epg-state p { margin: 0; max-width: 40ch; }
.mx-epg-state.is-error .icon { color: #f87171; }
.mx-tvband .mx-epg-empty { border-color: rgba(255, 255, 255, .22); color: #cbd5e1; margin: 14px; }

/* Phones: the Now / Next / Later list */
.mx-epg-li { display: flex; align-items: center; gap: 8px; }
.mx-epg-li .mx-epg-item { flex: 1 1 auto; min-width: 0; border-left: 4px solid var(--cat, #4f7df3); }
.mx-epg-li .mx-bell { position: static; flex: 0 0 44px; width: 44px; height: 44px; }
.mx-epg-li .mx-bell::after { display: none; }
.mx-epg-item-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.mx-epg-item-dur .mx-epg-show { color: #e2e8f0; }
.mx-epg-group.is-day .mx-epg-group-h { color: var(--tv-accent-text, #c7d2fe); }
.mx-epg-list { padding: 0; }
.mx-nextup-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; }
.mx-nextup-meta:empty, .mx-nextup-act:empty { display: none; }
.mx-nextup-show { font-size: 12.5px; font-weight: 700; color: var(--tv-muted, #94a3b8); }
.mx-nextup-item-time .mx-tag-dot { width: 7px; height: 7px; flex-basis: 7px; margin-right: 6px; }
.mx-nextup-at { color: #cbd5e1; }

@media (max-width: 1023.98px) {
  .mx-epg-block.is-narrow .mx-epg-show { display: none; }
}
@media (max-width: 639.98px) {
  .mx-epg-head { flex-direction: column; align-items: stretch; }
  .mx-epg-tools { justify-content: space-between; }
  .mx-epg-tabs { flex: 1 1 auto; }
  .mx-epg-tab, .mx-tvband a.mx-epg-tab:not(.mx-btn):not(.mx-epg-block) { flex: 1 1 0; justify-content: center; min-height: 44px; }
  .mx-cchip { min-height: 44px; }
  .mx-cta, .mx-tvband a.mx-cta:not(.mx-btn):not(.mx-epg-block) { flex: 1 1 auto; justify-content: center; min-height: 44px; }
  .mx-ctas { padding-bottom: 12px; }
  .mx-tv-top { gap: 8px; }
  .mx-tv-top-right { gap: 8px; }
  .mx-tv-iconbtn--mini { display: none; }
  .mx-tv-iconbtn { width: 38px; height: 38px; }
  .mx-remind { min-height: 44px; }
  .mx-nextup-act .mx-remind { min-height: 44px; }
  .mx-start-btn { width: 68px; height: 68px; }
  .mx-start-btn .icon { width: 28px; height: 28px; }
  .mx-start-card { gap: 7px; }
  .mx-start-card .mx-tv-bug-name { max-width: 60vw; }
  .mx-tv-sharerow { justify-content: flex-start; }
  .mx-tv-sharerow .mx-btn, .mx-tv-info-side .mx-btn { min-height: 44px; }
  .mx-tv-screen.is-mini { right: auto; left: 10px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); width: min(224px, 56vw); }
  .mx-tvband.has-mini { padding-bottom: 170px; }
  .mx-live-banner { font-size: 14px; }
}
@media (pointer: coarse) {
  .mx-tv-btn { width: 44px; height: 44px; }
  .mx-tv-screen.is-mini .mx-tv-btn { width: 36px; height: 36px; }
  .mx-mini-back, .mx-mini-x { min-height: 36px; }
  .mx-mini-x { width: 36px; }
  .mx-epg-dialog-x { width: 40px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .mx-tvband .mx-nextup, .mx-tvband .mx-epg, .mx-tvband .mx-cta, .mx-tvband .mx-cchip, .mx-start, .mx-live-banner, .mx-sharemenu, .mx-epg-dialog[open], .mx-tv-screen.is-mini { animation: none; }
  .mx-start-btn, .mx-onair.is-live, .mx-epg-skel-b, .mx-watching-dot, .mx-live-banner-dot, .mx-start-kicker-dot, .mx-tag.is-live .mx-tag-dot { animation: none; }
  .mx-epg-block.is-pulse, .mx-epg-li.is-pulse { animation: none; outline: 3px solid #fff; outline-offset: 3px; }
  .mx-tvtoast, .mx-cta, .mx-cchip, .mx-tab, .mx-epg-tab, .mx-bell, .mx-remind { transition: none; }
  .mx-start-btn:hover { transform: none; }
}
.mx-epg-frame .mx-epg-group { padding: 0 12px; }
.mx-epg-frame .mx-epg-group:first-child { padding-top: 12px; }
.mx-epg-frame .mx-epg-group:last-child { padding-bottom: 4px; }

/* ── Channel switcher: pill tabs shown only when the church has more than one channel (server-rendered links, no JavaScript needed) ── */
.mx-chsw { margin: 0 0 16px; }
.mx-chsw-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 2px 0 6px; list-style: none; }
.mx-chsw-list > li { flex: 0 1 auto; min-width: 0; margin: 0; }
.mx-chsw-a { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 16px; border-radius: 999px; font-size: 14px; font-weight: 700; line-height: 1; max-width: 100%; text-decoration: none;
  color: var(--tv-text, #f1f5f9); background: rgba(255, 255, 255, .06); border: 1px solid var(--tv-border, rgba(255, 255, 255, .16)); transition: background .15s, border-color .15s; }
.mx-chsw-a .icon { flex: none; opacity: .85; }
.mx-chsw-a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx-chsw-a:hover { background: rgba(255, 255, 255, .12); border-color: var(--tv-accent-edge, rgba(255, 255, 255, .4)); }
.mx-chsw-a:focus-visible { outline: 3px solid var(--tv-accent-edge, #fff); outline-offset: 2px; }
.mx-chsw-a.is-active { background: color-mix(in srgb, var(--mx-accent, #4f46e5) 55%, #0b1020); border-color: var(--tv-accent-edge, #fff); color: #fff; box-shadow: 0 0 0 1px var(--tv-accent-edge, #fff) inset; }
/* The page-wide ".mx-page a:not(...)" accent link colour is more specific than a pill class, so the pill text colour is forced. */
.mx-chsw a.mx-chsw-a { color: var(--tv-text, #f1f5f9) !important; }
.mx-chsw a.mx-chsw-a.is-active { color: #fff !important; }
@media (max-width: 480px) { .mx-chsw-a { min-height: 44px; padding: 0 14px; } }
@media (prefers-reduced-motion: reduce) { .mx-chsw-a { transition: none; } }
@media print { .mx-chsw { display: none !important; } }

/* Phone-only pieces are hidden here; mobile.css shows them. A "Later today" row is a button (it opens the details dialog). */
.mx-m-only { display: none; }
.mx-nextup-row { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0; margin: 0; padding: 0; border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.mx-nextup-row:focus-visible { outline: 3px solid var(--tv-accent-edge, #a5b4fc); outline-offset: 2px; }
