/* Bridges Islamic Prayer Time – display styles (v2, minimal) */

.bipt-wrap { container-type: inline-size; width: 100%; }

.bipt {
  --bipt-brand: #334155;
  --bipt-accent: #0f766e;
  --bipt-on-brand: #fff;
  --bipt-on-accent: #fff;
  --bipt-r: 12px;
  --bipt-font: 'Inter', system-ui, sans-serif;
  --bipt-ar-font: 'Amiri', 'Traditional Arabic', serif;

  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  font-family: var(--bipt-font);
  font-size: clamp(14px, 1.35cqi, 30px);
  line-height: 1.4;
  color: var(--bipt-text);
  background: var(--bipt-bg, var(--bipt-surface));
  border: 1px solid var(--bipt-line);
  border-radius: var(--bipt-r);
  padding: 1.25em;
  display: grid;
  gap: 1em;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "banner" "head" "next" "list" "extras" "quote" "ann";
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-align: left;
}
.bipt *, .bipt *::before, .bipt *::after { box-sizing: border-box; }
.bipt [hidden] { display: none !important; }
.bipt p, .bipt h2, .bipt h3, .bipt figure, .bipt blockquote { margin: 0; }

/* ---------- colour schemes ---------- */
.bipt[data-scheme="light"], .bipt-modal[data-scheme="light"] {
  --bipt-surface: #ffffff;
  --bipt-soft: #f8fafc;
  --bipt-line: #e5e7eb;
  --bipt-text: #111827;
  --bipt-card-text: #111827;
  --bipt-muted: #6b7280;
  --bipt-bt: color-mix(in srgb, var(--bipt-brand) 88%, #000);
  --bipt-at: color-mix(in srgb, var(--bipt-accent) 85%, #000);
  --bipt-tint: color-mix(in srgb, var(--bipt-accent) 8%, var(--bipt-surface));
  --bipt-shadow: 0 1px 2px rgba(16, 24, 40, .04);
  color-scheme: light;
}
.bipt[data-scheme="dark"], .bipt-modal[data-scheme="dark"] {
  --bipt-surface: #15191f;
  --bipt-soft: #1b2028;
  --bipt-line: #2a313b;
  --bipt-text: #f3f4f6;
  --bipt-card-text: #f3f4f6;
  --bipt-muted: #9ca3af;
  --bipt-bt: color-mix(in srgb, var(--bipt-brand) 28%, #fff);
  --bipt-at: color-mix(in srgb, var(--bipt-accent) 55%, #fff);
  --bipt-tint: color-mix(in srgb, var(--bipt-accent) 16%, var(--bipt-surface));
  --bipt-shadow: none;
  color-scheme: dark;
}

/* ---------- optional geometric pattern ---------- */
.bipt.has-pattern::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--bipt-brand);
  opacity: .05;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23000' stroke-width='1.3'%3E%3Crect x='22' y='22' width='36' height='36'/%3E%3Crect x='22' y='22' width='36' height='36' transform='rotate(45 40 40)'/%3E%3Ccircle cx='40' cy='40' r='8'/%3E%3Cpath d='M0 0L14.5 14.5M80 0L65.5 14.5M0 80L14.5 65.5M80 80L65.5 65.5M40 0v14.5M40 80V65.5M0 40h14.5M80 40H65.5'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 5.5em 5.5em repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23000' stroke-width='1.3'%3E%3Crect x='22' y='22' width='36' height='36'/%3E%3Crect x='22' y='22' width='36' height='36' transform='rotate(45 40 40)'/%3E%3Ccircle cx='40' cy='40' r='8'/%3E%3Cpath d='M0 0L14.5 14.5M80 0L65.5 14.5M0 80L14.5 65.5M80 80L65.5 65.5M40 0v14.5M40 80V65.5M0 40h14.5M80 40H65.5'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 5.5em 5.5em repeat;
  pointer-events: none;
}
.bipt[data-scheme="dark"].has-pattern::before { opacity: .09; background: var(--bipt-bt); }

/* ---------- icons ---------- */
.bipt-ico { display: inline-flex; width: 1.15em; height: 1.15em; flex: 0 0 auto; }
.bipt-ico svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Arabic ---------- */
.bipt .bipt-ar { font-family: var(--bipt-ar-font); direction: rtl; unicode-bidi: isolate; line-height: 1.4; }

/* ---------- banner ---------- */
.bipt-banner {
  grid-area: banner;
  border-radius: calc(var(--bipt-r) * .6);
  padding: .6em 1em;
  font-weight: 600;
  font-size: .95em;
  text-align: center;
  color: var(--bipt-on-accent);
  background: var(--bipt-accent);
}
.bipt-banner.is-live { background: #b42318; color: #fff; }

/* ---------- header ---------- */
.bipt-head { grid-area: head; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .9em 1.4em; }
.bipt-brand { display: flex; align-items: center; gap: .8em; min-width: 0; }
.bipt-logo { width: 3em; height: 3em; object-fit: contain; border-radius: calc(var(--bipt-r) * .5); flex: 0 0 auto; }
.bipt-name { font-size: 1.3em; font-weight: 700; letter-spacing: -.015em; line-height: 1.2; color: var(--bipt-text); }
.bipt-sub { color: var(--bipt-muted); font-size: .9em; margin-top: .1em; }

.bipt-head-right { display: flex; align-items: center; gap: 1em; margin-left: auto; }
.bipt-clockbox { text-align: right; }
.bipt-clock { font-variant-numeric: tabular-nums; font-weight: 600; line-height: 1; letter-spacing: -.02em; color: var(--bipt-text); white-space: nowrap; }
.bipt-hm { font-size: 1.9em; }
.bipt-sec { font-size: 1.1em; color: var(--bipt-muted); font-weight: 500; }
.bipt-ampm { font-size: .85em; font-weight: 600; color: var(--bipt-muted); margin-left: .25em; text-transform: lowercase; }
.bipt-dates { color: var(--bipt-muted); margin-top: .35em; font-size: .85em; }
.bipt-sep { margin: 0 .45em; opacity: .6; }
.bipt-hijri-ar { display: block; font-size: 1.05em; color: var(--bipt-text); margin-top: .1em; }

.bipt-tools { display: flex; align-items: center; gap: .45em; }
.bipt-iconbtn, .bipt-getbtn {
  font: inherit; font-size: .85em; font-weight: 600; color: var(--bipt-card-text);
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  height: 2.5em; min-width: 2.5em; padding: 0 .75em;
  border: 1px solid var(--bipt-line); border-radius: 999px; background: var(--bipt-surface);
  cursor: pointer; transition: background-color .15s, border-color .15s;
}
.bipt-iconbtn { padding: 0; }
.bipt-iconbtn:hover, .bipt-getbtn:hover { background: var(--bipt-soft); border-color: color-mix(in srgb, var(--bipt-text) 20%, var(--bipt-line)); }
.bipt-getbtn { color: var(--bipt-on-brand); background: var(--bipt-brand); border-color: var(--bipt-brand); }
.bipt-getbtn:hover { background: color-mix(in srgb, var(--bipt-brand) 88%, #000); border-color: transparent; }
.bipt-iconbtn:focus-visible, .bipt-getbtn:focus-visible { outline: 2px solid var(--bipt-accent); outline-offset: 2px; }

/* ---------- next prayer ---------- */
.bipt-next {
  grid-area: next;
  border: 1px solid var(--bipt-line);
  background: var(--bipt-soft);
  border-radius: var(--bipt-r);
  padding: 1em 1.2em 1.1em;
  display: flex; flex-direction: column; justify-content: center; gap: .3em;
}
.bipt-next-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .3em 1em; font-size: .85em; }
.bipt-next-label { text-transform: uppercase; letter-spacing: .08em; font-weight: 600; color: var(--bipt-at); }
.bipt-next-meta { color: var(--bipt-muted); font-variant-numeric: tabular-nums; }
.bipt-next-main { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .2em 1em; }
.bipt-next-namebox { display: flex; flex-direction: column; }
.bipt-next-ar { font-size: 1.2em; }
.bipt-next-name { font-size: 1.6em; font-weight: 700; letter-spacing: -.015em; line-height: 1.2; }
.bipt-count { font-size: 2.3em; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.025em; line-height: 1.1; color: var(--bipt-bt); }
.bipt-progress { margin-top: .5em; height: 4px; border-radius: 99px; background: var(--bipt-line); overflow: hidden; }
.bipt-progress span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--bipt-accent); transition: width 1s linear; }

.bipt.is-filled .bipt-next { background: var(--bipt-brand); border-color: var(--bipt-brand); color: var(--bipt-on-brand); }
.bipt.is-filled .bipt-next-label,
.bipt.is-filled .bipt-next-meta,
.bipt.is-filled .bipt-count { color: inherit; }
.bipt.is-filled .bipt-next-meta { opacity: .8; }
.bipt.is-filled .bipt-progress { background: color-mix(in srgb, var(--bipt-on-brand) 22%, transparent); }
.bipt.is-filled .bipt-progress span { background: var(--bipt-on-brand); }

/* ---------- prayer list (narrow: table rows) ---------- */
.bipt-list { grid-area: list; display: grid; }
.bipt-lhead, .bipt-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: .6em;
  padding: .7em .9em;
}
.bipt-lhead { padding-top: 0; padding-bottom: .45em; font-size: .75em; text-transform: uppercase; letter-spacing: .07em; color: var(--bipt-muted); font-weight: 600; border-bottom: 1px solid var(--bipt-line); }
.bipt-lh-col { text-align: right; display: flex; flex-direction: column; align-items: flex-end; }
.bipt-lh-col .bipt-ar { text-transform: none; letter-spacing: 0; font-size: 1.25em; line-height: 1.2; }
.bipt-row { position: relative; border-bottom: 1px solid var(--bipt-line); border-radius: 0; transition: background-color .5s ease, color .5s ease, box-shadow .5s ease, transform .5s ease, border-color .5s ease; }
.bipt-row:last-child { border-bottom: 0; }
.bipt-pname { display: flex; flex-wrap: wrap; align-items: center; gap: .2em .6em; min-width: 0; }
.bipt-pname .bipt-ar { font-size: 1.15em; color: var(--bipt-muted); order: 2; }
.bipt-en { font-weight: 600; }
.bipt-cell { text-align: right; display: flex; flex-direction: column; align-items: flex-end; }
.bipt-cl { display: none; font-size: .72em; text-transform: uppercase; letter-spacing: .07em; color: var(--bipt-muted); font-weight: 600; }
.bipt-v { font-variant-numeric: tabular-nums; font-weight: 500; font-size: 1.05em; }
.bipt-jv { font-weight: 700; color: var(--bipt-bt); }
.bipt-row[data-p="sunrise"] .bipt-en, .bipt-row[data-p="sunrise"] .bipt-v { color: var(--bipt-muted); font-weight: 500; }
.bipt-badge { font-size: .65em; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: .2em .6em; border-radius: 99px; order: 3; }
.bipt-badge:empty { display: none; }

.bipt-row.is-past { color: var(--bipt-muted); }
.bipt-row.is-past .bipt-jv { color: var(--bipt-muted); }
.bipt-row.is-past .bipt-v { opacity: .85; }

/* NEXT – outlined in the highlight colour with a live "in 25 min" */
.bipt-row.is-next { box-shadow: inset 0 0 0 2px var(--bipt-accent); border-radius: calc(var(--bipt-r) * .6); border-bottom-color: transparent; }
.bipt-row.is-next .bipt-badge { color: var(--bipt-at); background: var(--bipt-tint); border: 1px solid color-mix(in srgb, var(--bipt-accent) 35%, transparent); text-transform: none; letter-spacing: 0; font-size: .7em; }

/* NOW – solid highlight colour */
.bipt-row.is-current { background: var(--bipt-accent); color: var(--bipt-on-accent); border-radius: calc(var(--bipt-r) * .6); border-bottom-color: transparent; }
.bipt-row.is-current .bipt-jv,
.bipt-row.is-current .bipt-ar,
.bipt-row.is-current .bipt-cl { color: inherit; }
.bipt-row.is-current .bipt-cl { opacity: .8; }
.bipt-row.is-current .bipt-badge { color: var(--bipt-accent); background: var(--bipt-on-accent); display: inline-flex; align-items: center; gap: .4em; }
.bipt-row.is-current .bipt-badge::before { content: ""; width: .55em; height: .55em; border-radius: 50%; background: currentColor; }
.bipt.is-filled .bipt-row.is-current { background: var(--bipt-brand); color: var(--bipt-on-brand); }
.bipt.is-filled .bipt-row.is-current .bipt-badge { background: var(--bipt-on-brand); color: var(--bipt-brand); }
.bipt-row.is-current .bipt-cell-j { border-top-color: color-mix(in srgb, currentColor 35%, transparent) !important; }

/* ---------- extras ---------- */
.bipt-extras { grid-area: extras; display: flex; flex-wrap: wrap; gap: .4em 1.6em; font-size: .9em; color: var(--bipt-muted); padding: 0 .9em; }
.bipt-x { display: inline-flex; gap: .45em; }
.bipt-x-v { color: var(--bipt-text); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- quote ---------- */
.bipt-quote {
  grid-area: quote;
  border-top: 1px solid var(--bipt-line);
  padding: 1em .9em 0;
  display: flex; flex-direction: column; justify-content: center;
}
.bipt-q { opacity: 0; transform: translateY(4px); }
.bipt-q.is-in { animation: bipt-fade .7s ease forwards; }
@keyframes bipt-fade { to { opacity: 1; transform: none; } }
.bipt-q-ar { margin: 0 0 .35em; font-family: var(--bipt-ar-font); font-size: 1.4em; line-height: 1.8; text-align: right; color: var(--bipt-text); }
.bipt-q-en { font-size: 1em; line-height: 1.55; color: var(--bipt-text); }
.bipt-q-ref { margin-top: .45em; color: var(--bipt-muted); font-size: .82em; font-weight: 600; }
.bipt-q-dots { display: flex; gap: .3em; margin-top: .7em; }
.bipt-q-dots span { width: .35em; height: .35em; border-radius: 50%; background: var(--bipt-line); transition: all .3s; }
.bipt-q-dots span.on { background: var(--bipt-accent); width: 1em; border-radius: 99px; }

/* ---------- announcement ---------- */
.bipt-ann {
  grid-area: ann;
  position: relative;
  display: flex; align-items: center; gap: .9em;
  border-radius: calc(var(--bipt-r) * .7);
  background: var(--bipt-tint);
  border: 1px solid color-mix(in srgb, var(--bipt-accent) 22%, transparent);
  color: var(--bipt-card-text);
  padding: .75em 1em;
  font-size: .95em;
  overflow: hidden;
}
.bipt-ann-icon { display: grid; place-items: center; width: 2.1em; height: 2.1em; border-radius: 50%; background: var(--bipt-accent); color: var(--bipt-on-accent); flex: 0 0 auto; }
.bipt-ann-icon .bipt-ico { width: 1.05em; height: 1.05em; }
.bipt-ann-stage { position: relative; flex: 1; min-width: 0; display: grid; }
.bipt-ann-item { grid-area: 1 / 1; margin: 0; font-weight: 500; line-height: 1.45; opacity: 0; }
.bipt-ann-static .bipt-ann-stage { gap: .35em; }
.bipt-ann-static .bipt-ann-item { grid-area: auto; opacity: 1; }
.bipt-ann-count { flex: 0 0 auto; font-size: .78em; font-weight: 600; color: var(--bipt-muted); font-variant-numeric: tabular-nums; }
.bipt-ann-bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--bipt-accent); opacity: .7; }
@keyframes bipt-annbar { from { width: 0; } to { width: 100%; } }
/* slide: new text rises in, old text rises out */
.bipt-ann-slide .bipt-ann-item { transform: translateY(110%); transition: transform .6s cubic-bezier(.2,.7,.2,1), opacity .6s ease; }
.bipt-ann-slide .bipt-ann-item.is-in { transform: none; opacity: 1; }
.bipt-ann-slide .bipt-ann-item.is-out { transform: translateY(-110%); opacity: 0; }
/* fade */
.bipt-ann-fade .bipt-ann-item { transition: opacity .8s ease, filter .8s ease; filter: blur(2px); }
.bipt-ann-fade .bipt-ann-item.is-in { opacity: 1; filter: none; }
.bipt-ann-fade .bipt-ann-item.is-out { opacity: 0; }
/* ticker */
.bipt-ann-track { overflow: hidden; white-space: nowrap; -webkit-mask: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); mask: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.bipt-ann-track .bipt-ann-text { display: inline-block; padding-left: 100%; animation: bipt-ticker 30s linear infinite; font-weight: 500; }
.bipt-ann-track:hover .bipt-ann-text { animation-play-state: paused; }
@keyframes bipt-ticker { to { transform: translateX(-100%); } }
/* a gentle light sweep across the bar */
.bipt.is-animated .bipt-ann::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, color-mix(in srgb, #fff 35%, transparent) 50%, transparent 70%);
  transform: translateX(-100%); animation: bipt-sweep 6s ease-in-out 1.5s infinite;
}
.bipt[data-scheme="dark"].is-animated .bipt-ann::after { background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.07) 50%, transparent 70%); }
@keyframes bipt-sweep { 0% { transform: translateX(-100%); } 35%, 100% { transform: translateX(100%); } }

/* ---------- wider: prayers as columns ---------- */
@container (min-width: 760px) {
  .bipt:not(.is-compact) .bipt-lhead { display: none; }
  .bipt:not(.is-compact) .bipt-list { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .6em; }
  .bipt:not(.is-compact) .bipt-row {
    display: flex; flex-direction: column; align-items: stretch; gap: .5em;
    border: 1px solid var(--bipt-line); border-radius: calc(var(--bipt-r) * .8); padding: .9em .9em 1em;
  }
  .bipt:not(.is-compact) .bipt-row:last-child { border-bottom: 1px solid var(--bipt-line); }
  .bipt:not(.is-compact) .bipt-row.is-current { border-color: transparent; border-radius: calc(var(--bipt-r) * .8); transform: translateY(-3px); box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--bipt-accent) 70%, transparent); }
  .bipt.is-filled:not(.is-compact) .bipt-row.is-current { box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--bipt-brand) 70%, transparent); }
  .bipt:not(.is-compact) .bipt-row.is-next { border-color: var(--bipt-accent); box-shadow: inset 0 0 0 1px var(--bipt-accent); border-radius: calc(var(--bipt-r) * .8); }
  .bipt:not(.is-compact) .bipt-pname { padding-right: 0; }
  .bipt:not(.is-compact) .bipt-badge { position: static; order: 3; margin-top: .25em; }
  .bipt:not(.is-compact) .bipt-pname { flex-direction: column; align-items: flex-start; gap: .15em; min-height: 2.6em; justify-content: flex-start; position: relative; }
  .bipt:not(.is-compact) .bipt-pname .bipt-ar { order: -1; color: var(--bipt-muted); }
  .bipt:not(.is-compact) .bipt-en { font-size: 1.1em; }
  .bipt:not(.is-compact) .bipt-cell { flex-direction: row; justify-content: space-between; align-items: baseline; text-align: left; }
  .bipt:not(.is-compact) .bipt-cell-j { border-top: 1px dashed var(--bipt-line); padding-top: .45em; }
  .bipt:not(.is-compact) .bipt-row[data-p="sunrise"] .bipt-cell-j { border-top-color: transparent; }
  .bipt:not(.is-compact) .bipt-cl { display: block; }
  .bipt:not(.is-compact) .bipt-extras { padding: 0; }
  .bipt:not(.is-compact) .bipt-quote { padding: 1em 0 0; }
}
@container (min-width: 1000px) {
  .bipt:not(.is-compact) {
    padding: 1.5em;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "banner banner" "head head" "next quote" "list list" "extras extras" "ann ann";
  }
  .bipt:not(.is-compact) .bipt-quote { border-top: 0; border-left: 1px solid var(--bipt-line); padding: .4em 0 .4em 1.4em; }
}
@container (max-width: 560px) {
  .bipt-head-right { width: 100%; justify-content: space-between; }
  .bipt-clockbox { text-align: left; }
}
@container (max-width: 420px) {
  .bipt { padding: 1em; }
  .bipt-getbtn-l { display: none; }
  .bipt-getbtn { padding: 0; }
  .bipt-lhead, .bipt-row { padding-left: .6em; padding-right: .6em; }
}

/* ---------- compact ---------- */
.bipt.is-compact { grid-template-areas: "banner" "head" "next" "list" "extras"; gap: .8em; }
.bipt.is-compact .bipt-name { font-size: 1.15em; }
.bipt.is-compact .bipt-hm { font-size: 1.5em; }
.bipt.is-compact .bipt-next { padding: .8em 1em; }
.bipt.is-compact .bipt-next-name { font-size: 1.25em; }
.bipt.is-compact .bipt-count { font-size: 1.7em; }
.bipt.is-compact .bipt-row, .bipt.is-compact .bipt-lhead { padding-top: .55em; padding-bottom: .55em; }

/* ---------- TV / full-screen ---------- */
.bipt.is-tv {
  font-size: min(1.15vw, 2vh);
  min-height: 100vh;
  border: 0;
  border-radius: 0;
  padding: 3vh 3vw;
  gap: 2.2vh 2vw;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "banner banner" "head head" "next quote" "list list" "extras extras" "ann ann";
  grid-template-rows: auto auto auto minmax(0, 1fr) auto auto;
  align-content: stretch;
}
.bipt.is-tv .bipt-name { font-size: 1.9em; }
.bipt.is-tv .bipt-hm { font-size: 3.4em; }
.bipt.is-tv .bipt-sec { font-size: 1.8em; }
.bipt.is-tv .bipt-dates { font-size: 1.05em; }
.bipt.is-tv .bipt-next { padding: 1.4em 1.6em; }
.bipt.is-tv .bipt-next-name { font-size: 2.2em; }
.bipt.is-tv .bipt-count { font-size: 3.6em; }
.bipt.is-tv .bipt-quote { border-top: 0; border-left: 1px solid var(--bipt-line); padding: .4em 0 .4em 2em; font-size: 1.15em; }
.bipt.is-tv .bipt-lhead { display: none; }
.bipt.is-tv .bipt-list { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1vw; align-self: stretch; }
.bipt.is-tv .bipt-row {
  display: flex; flex-direction: column; justify-content: center; gap: 1em;
  border: 1px solid var(--bipt-line); border-radius: var(--bipt-r); padding: 1.4em 1.2em;
}
.bipt.is-tv .bipt-row.is-current { border-color: transparent; border-radius: var(--bipt-r); transform: translateY(-4px); box-shadow: 0 14px 34px -12px color-mix(in srgb, var(--bipt-accent) 80%, transparent); }
.bipt.is-tv .bipt-row.is-next { border-color: var(--bipt-accent); box-shadow: inset 0 0 0 2px var(--bipt-accent); border-radius: var(--bipt-r); }
.bipt.is-tv .bipt-pname { flex-direction: column; align-items: flex-start; gap: .1em; position: relative; }
.bipt.is-tv .bipt-pname .bipt-ar { order: -1; font-size: 1.6em; }
.bipt.is-tv .bipt-en { font-size: 1.5em; }
.bipt.is-tv .bipt-badge { position: static; order: 3; margin-top: .3em; font-size: .8em; }
.bipt.is-tv .bipt-cell { flex-direction: row; justify-content: space-between; align-items: baseline; }
.bipt.is-tv .bipt-cell-j { border-top: 1px dashed var(--bipt-line); padding-top: .7em; }
.bipt.is-tv .bipt-row[data-p="sunrise"] .bipt-cell-j { border-top-color: transparent; }
.bipt.is-tv .bipt-cl { display: block; font-size: .85em; }
.bipt.is-tv .bipt-v { font-size: 1.9em; }
.bipt.is-tv .bipt-extras { font-size: 1.1em; padding: 0; }
.bipt.is-tv .bipt-ann { font-size: 1.15em; }
@media (max-aspect-ratio: 1/1) {
  .bipt.is-tv { font-size: min(2.4vw, 1.7vh); grid-template-columns: minmax(0, 1fr); grid-template-areas: "banner" "head" "next" "list" "extras" "quote" "ann"; }
  .bipt.is-tv .bipt-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bipt.is-tv .bipt-quote { border-left: 0; padding: 0; }
}


/* ---------- custom background ---------- */
.bipt.has-bg { background: var(--bipt-bg); border-color: transparent; }
.bipt.has-bg > .bipt-head,
.bipt.has-bg > .bipt-extras,
.bipt.has-bg > .bipt-quote { --bipt-text: var(--bipt-ontext); --bipt-muted: var(--bipt-onmuted); --bipt-line: var(--bipt-online); --bipt-at: var(--bipt-ontext); }
.bipt.has-bg > .bipt-quote .bipt-q-dots span.on { background: var(--bipt-ontext); }
.bipt.has-bg-image {
  background:
    linear-gradient(color-mix(in srgb, var(--bipt-surface) var(--bipt-ov, 55%), transparent), color-mix(in srgb, var(--bipt-surface) var(--bipt-ov, 55%), transparent)),
    var(--bipt-bgimg) center / cover no-repeat;
  border-color: transparent;
}
.bipt.has-bg-image .bipt-next,
.bipt.has-bg-image .bipt-list,
.bipt.has-bg .bipt-list { background: color-mix(in srgb, var(--bipt-surface) 92%, transparent); border-radius: var(--bipt-r); }
.bipt.has-bg-image .bipt-next,
.bipt.has-bg-image .bipt-list { -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.bipt.has-bg .bipt-list, .bipt.has-bg .bipt-list { color: var(--bipt-card-text); }
.bipt.has-bg .bipt-next { background: var(--bipt-surface); }
@container (min-width: 760px) {
  .bipt.has-bg:not(.is-compact) .bipt-list, .bipt.has-bg-image:not(.is-compact) .bipt-list { background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .bipt.has-bg:not(.is-compact) .bipt-row:not(.is-current), .bipt.has-bg-image:not(.is-compact) .bipt-row:not(.is-current) { background: color-mix(in srgb, var(--bipt-surface) 94%, transparent); }
}
.bipt.is-tv.has-bg .bipt-list, .bipt.is-tv.has-bg-image .bipt-list { background: none; backdrop-filter: none; }
.bipt.is-tv.has-bg .bipt-row:not(.is-current), .bipt.is-tv.has-bg-image .bipt-row:not(.is-current) { background: color-mix(in srgb, var(--bipt-surface) 94%, transparent); }

/* ---------- animations (Display → Animations) ---------- */
.bipt.is-animated .bipt-head,
.bipt.is-animated .bipt-next,
.bipt.is-animated .bipt-quote,
.bipt.is-animated .bipt-row,
.bipt.is-animated .bipt-extras,
.bipt.is-animated .bipt-ann { animation: bipt-rise .6s cubic-bezier(.2,.7,.2,1) both; }
.bipt.is-animated .bipt-next { animation-delay: .06s; }
.bipt.is-animated .bipt-quote { animation-delay: .12s; }
.bipt.is-animated .bipt-row:nth-child(2) { animation-delay: .14s; }
.bipt.is-animated .bipt-row:nth-child(3) { animation-delay: .19s; }
.bipt.is-animated .bipt-row:nth-child(4) { animation-delay: .24s; }
.bipt.is-animated .bipt-row:nth-child(5) { animation-delay: .29s; }
.bipt.is-animated .bipt-row:nth-child(6) { animation-delay: .34s; }
.bipt.is-animated .bipt-row:nth-child(7) { animation-delay: .39s; }
.bipt.is-animated .bipt-extras { animation-delay: .42s; }
.bipt.is-animated .bipt-ann { animation-delay: .48s; }
@keyframes bipt-rise { from { opacity: 0; transform: translateY(10px); } }
.bipt.is-animated .bipt-row.is-current { animation: bipt-rise .6s cubic-bezier(.2,.7,.2,1) both, bipt-glow 3.2s ease-in-out 1s infinite; }
@keyframes bipt-glow { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--bipt-accent) 18%, transparent), 0 10px 24px -10px color-mix(in srgb, var(--bipt-accent) 70%, transparent); } }
.bipt.is-animated .bipt-row.is-current .bipt-badge::before { animation: bipt-blink 1.6s ease-in-out infinite; }
@keyframes bipt-blink { 50% { opacity: .25; transform: scale(.7); } }
.bipt.is-animated .bipt-row.is-next .bipt-badge { animation: bipt-nudge 4s ease-in-out infinite; }
@keyframes bipt-nudge { 0%, 85%, 100% { transform: none; } 90% { transform: translateY(-2px); } 95% { transform: translateY(1px); } }
.bipt.is-animated .bipt-progress span {
  background-image: linear-gradient(90deg, transparent, color-mix(in srgb, #fff 45%, transparent), transparent);
  background-size: 40% 100%; background-repeat: no-repeat; background-color: var(--bipt-accent);
  animation: bipt-shimmer 2.6s ease-in-out infinite;
}
@keyframes bipt-shimmer { from { background-position: -60% 0; } to { background-position: 160% 0; } }
.bipt.is-filled.is-animated .bipt-progress span { background-color: var(--bipt-on-brand); }
.bipt-next-name.is-swap { animation: bipt-swap .7s cubic-bezier(.2,.7,.2,1); }
@keyframes bipt-swap { from { opacity: 0; transform: translateY(.4em); filter: blur(3px); } }
.bipt.is-animated .bipt-banner:not([hidden]) { animation: bipt-drop .5s cubic-bezier(.2,.7,.2,1); }
.bipt.is-animated .bipt-banner.is-live { animation: bipt-drop .5s cubic-bezier(.2,.7,.2,1), bipt-livepulse 2s ease-in-out .5s infinite; }
@keyframes bipt-drop { from { opacity: 0; transform: translateY(-8px); } }
@keyframes bipt-livepulse { 50% { filter: brightness(1.15); } }
.bipt:not(.is-animated) .bipt-ann-item { transition: none !important; }
.bipt:not(.is-animated) .bipt-q.is-in { animation: none; opacity: 1; transform: none; }

/* ====================================================================
 * "Prayer times on your phone" dialog
 * ==================================================================== */
.bipt-modal {
  --bipt-brand: #334155;
  --bipt-on-brand: #fff;
  position: fixed; inset: 0; z-index: 100000;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  font-family: var(--bipt-font, system-ui, sans-serif);
  font-size: 15px; line-height: 1.45;
  color: var(--bipt-text);
}
.bipt-modal *, .bipt-modal *::before, .bipt-modal *::after { box-sizing: border-box; }
.bipt-modal-scrim { position: absolute; inset: 0; background: rgba(15, 23, 42, .5); animation: bipt-in .2s ease; }
.bipt-modal-box {
  position: relative; width: min(460px, 100%); max-height: calc(100vh - 32px); overflow: auto;
  background: var(--bipt-surface); border: 1px solid var(--bipt-line); border-radius: 16px;
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .35);
  padding: 22px;
  animation: bipt-pop .22s ease;
}
@keyframes bipt-in { from { opacity: 0; } }
@keyframes bipt-pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.bipt-modal-x {
  position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%;
  border: 0; background: var(--bipt-soft); color: var(--bipt-muted); cursor: pointer; display: grid; place-items: center;
}
.bipt-modal-x:hover { color: var(--bipt-text); }
.bipt-modal .bipt-ico { display: inline-flex; width: 18px; height: 18px; }
.bipt-modal .bipt-ico svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bipt-modal-head { display: flex; gap: 14px; align-items: flex-start; padding-right: 36px; margin-bottom: 18px; }
.bipt-modal-logo { width: 44px; height: 44px; object-fit: contain; border-radius: 10px; flex: 0 0 auto; }
.bipt-modal-badge { width: 44px !important; height: 44px !important; padding: 11px; border-radius: 12px; background: var(--bipt-brand); color: var(--bipt-on-brand); }
.bipt-modal-title { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; color: var(--bipt-text); }
.bipt-modal-text { margin: 4px 0 0; color: var(--bipt-muted); font-size: 14px; }
.bipt-opts { display: grid; gap: 10px; }
.bipt-opt { display: flex; gap: 12px; padding: 14px; border: 1px solid var(--bipt-line); border-radius: 12px; background: var(--bipt-surface); }
.bipt-opt-ico { width: 20px !important; height: 20px !important; color: var(--bipt-bt); margin-top: 2px; }
.bipt-opt-body { min-width: 0; flex: 1; }
.bipt-opt-title { margin: 0; font-size: 15px; font-weight: 650; color: var(--bipt-text); }
.bipt-opt-desc { margin: 2px 0 10px; font-size: 13.5px; color: var(--bipt-muted); }
.bipt-opt-how { margin: 4px 0 0; font-size: 13px; color: var(--bipt-muted); width: 100%; }
.bipt-opt-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bipt-chipbtn, .bipt-select {
  font: inherit; font-size: 13.5px; font-weight: 600; line-height: 1;
  display: inline-flex; align-items: center; height: 34px; padding: 0 12px;
  border: 1px solid var(--bipt-line); border-radius: 8px;
  background: var(--bipt-surface); color: var(--bipt-text) !important; text-decoration: none !important; cursor: pointer;
}
.bipt-select { font-weight: 500; padding-right: 8px; }
.bipt-chipbtn:hover { background: var(--bipt-soft); }
.bipt-chipbtn.is-primary { background: var(--bipt-brand); border-color: var(--bipt-brand); color: var(--bipt-on-brand) !important; }
.bipt-chipbtn.is-primary:hover { background: color-mix(in srgb, var(--bipt-brand) 88%, #000); }
.bipt-chipbtn:focus-visible, .bipt-select:focus-visible, .bipt-modal-x:focus-visible { outline: 2px solid var(--bipt-brand); outline-offset: 2px; }
@media (max-width: 520px) {
  .bipt-modal { align-items: flex-end; padding: 0; }
  .bipt-modal-box { border-radius: 18px 18px 0 0; max-height: 88vh; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); }
}


.bipt-modal.is-closing .bipt-modal-box { transition: transform .18s ease, opacity .18s ease; transform: translateY(12px); opacity: 0; }
.bipt-modal.is-closing .bipt-modal-scrim { transition: opacity .18s ease; opacity: 0; }
.bipt-modal-grab { display: none; width: 40px; height: 4px; border-radius: 4px; background: var(--bipt-line); margin: -8px auto 12px; }
.bipt-done { font-size: 14px; font-weight: 600; color: var(--bipt-at); }
.bipt-how { margin-top: 10px; padding: 12px 14px; border-radius: 10px; background: var(--bipt-soft); animation: bipt-rise .35s ease; position: relative; }
.bipt-steps { margin: 0; padding-left: 1.3em; display: grid; gap: 8px; font-size: 14px; color: var(--bipt-text); }
.bipt-steps li::marker { font-weight: 700; color: var(--bipt-at); }
.bipt-kbd { display: inline-flex; vertical-align: -5px; width: 22px; height: 22px; padding: 3px; border-radius: 6px; background: var(--bipt-surface); border: 1px solid var(--bipt-line); color: #0a84ff; }
.bipt-kbd svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bipt-kbd svg circle { fill: currentColor; }
.bipt-steps-arrow { text-align: center; font-size: 22px; color: var(--bipt-at); animation: bipt-bob 1.2s ease-in-out infinite; margin-top: 4px; }
@keyframes bipt-bob { 50% { transform: translateY(5px); } }
@media (max-width: 520px) { .bipt-modal-grab { display: block; } }

/* ---------- monthly timetable sheet ---------- */
html.bipt-sheet-open, html.bipt-sheet-open body { overflow: hidden; }
.bipt-sheet {
  position: fixed; inset: 0; z-index: 100001; overflow: auto; -webkit-overflow-scrolling: touch;
  background: var(--bipt-soft); color: var(--bipt-text);
  font-family: var(--bipt-font, system-ui, sans-serif); font-size: 14px; line-height: 1.4;
  animation: bipt-in .2s ease;
}
.bipt-sheet *, .bipt-sheet *::before, .bipt-sheet *::after { box-sizing: border-box; }
.bipt-sheet .bipt-ico { display: inline-flex; width: 18px; height: 18px; }
.bipt-sheet .bipt-ico svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.bipt-sheet-bar {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
  padding: max(10px, env(safe-area-inset-top)) 14px 10px; background: color-mix(in srgb, var(--bipt-surface) 92%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--bipt-line);
}
.bipt-sheet-close { width: 34px; padding: 0 !important; justify-content: center; }
.bipt-sheet-nav { display: flex; align-items: center; gap: 8px; }
.bipt-sheet-nav .bipt-chipbtn { width: 34px; justify-content: center; padding: 0; font-size: 18px; }
.bipt-sheet-month { min-width: 9em; text-align: center; font-size: 15px; }
.bipt-sheet-acts { display: flex; gap: 6px; }
.bipt-sheet-page { max-width: 900px; margin: 16px auto 40px; background: var(--bipt-surface); border: 1px solid var(--bipt-line); border-radius: 14px; padding: 18px; }
.bipt-sheet-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.bipt-sheet-head img { width: 48px; height: 48px; object-fit: contain; border-radius: 8px; }
.bipt-sheet-head h2 { margin: 0; font-size: 18px; }
.bipt-sheet-head p { margin: 2px 0 0; color: var(--bipt-muted); }
.bipt-sheet-scroll { overflow-x: auto; margin: 0 -6px; }
.bipt-tt { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; min-width: 480px; }
.bipt-tt th { position: sticky; top: 0; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--bipt-muted); font-weight: 600; padding: 8px 6px; text-align: center; border-bottom: 1px solid var(--bipt-line); background: var(--bipt-surface); }
.bipt-tt td { padding: 7px 6px; text-align: center; border-bottom: 1px solid var(--bipt-line); vertical-align: top; }
.bipt-tt td span { display: block; }
.bipt-tt-d { text-align: left !important; white-space: nowrap; }
.bipt-tt-d b { display: inline-block; min-width: 1.6em; font-size: 15px; }
.bipt-tt-d span { display: inline !important; color: var(--bipt-muted); font-size: 12px; }
.bipt-tt-j { font-size: 12.5px; font-weight: 700; color: var(--bipt-at); }
.bipt-tt tr.is-fri td { background: var(--bipt-soft); }
.bipt-tt tr.is-today td { background: var(--bipt-tint); }
.bipt-tt tr.is-today td:first-child { box-shadow: inset 3px 0 0 var(--bipt-accent); }
.bipt-sheet-note { margin: 12px 0 0; color: var(--bipt-muted); font-size: 12.5px; }
.bipt-sheet[data-scheme="light"] { --bipt-surface: #fff; --bipt-soft: #f3f4f6; --bipt-line: #e5e7eb; --bipt-text: #111827; --bipt-muted: #6b7280; --bipt-at: color-mix(in srgb, var(--bipt-accent) 85%, #000); --bipt-tint: color-mix(in srgb, var(--bipt-accent) 9%, #fff); }
.bipt-sheet[data-scheme="dark"] { --bipt-surface: #15191f; --bipt-soft: #0f1216; --bipt-line: #2a313b; --bipt-text: #f3f4f6; --bipt-muted: #9ca3af; --bipt-at: color-mix(in srgb, var(--bipt-accent) 55%, #fff); --bipt-tint: color-mix(in srgb, var(--bipt-accent) 18%, #15191f); }
@media (max-width: 560px) {
  .bipt-sheet-bar { display: grid; grid-template-columns: auto 1fr; row-gap: 8px; }
  .bipt-sheet-nav { justify-content: flex-end; }
  .bipt-sheet-acts { grid-column: 1 / -1; }
  .bipt-sheet-acts .bipt-chipbtn { flex: 1; justify-content: center; }
  .bipt-sheet-page { margin: 0; border-radius: 0; border: 0; padding: 14px 8px; }
  .bipt-sheet-month { min-width: 7.5em; font-size: 14px; }
  .bipt-sheet-scroll { margin: 0; overflow: visible; }
  .bipt-tt { min-width: 0; font-size: 12.5px; table-layout: fixed; }
  .bipt-tt th { font-size: 9.5px; letter-spacing: .02em; padding: 6px 1px; overflow: hidden; text-overflow: ellipsis; }
  .bipt-tt td { padding: 6px 1px; }
  .bipt-tt th:first-child, .bipt-tt td:first-child { width: 2.6em; }
  .bipt-tt-d b { font-size: 13.5px; min-width: 0; display: block; }
  .bipt-tt-d span { display: block !important; font-size: 10px; }
  .bipt-tt-j { font-size: 11.5px; }
}
@media print {
  html.bipt-sheet-open body > *:not(.bipt-sheet) { display: none !important; }
  html.bipt-sheet-open, html.bipt-sheet-open body { overflow: visible !important; background: #fff !important; }
  .bipt-sheet { position: static; overflow: visible; background: #fff; color: #111827; --bipt-surface: #fff; --bipt-soft: #f5f5f5; --bipt-line: #ddd; --bipt-text: #111; --bipt-muted: #555; animation: none; }
  .bipt-sheet-bar { display: none; }
  .bipt-sheet-page { margin: 0; border: 0; padding: 0; max-width: none; }
  .bipt-tt { min-width: 0; font-size: 11px; }
  .bipt-tt td, .bipt-tt th { padding: 3px 4px; }
  .bipt-tt tr { break-inside: avoid; }
  .bipt-tt tr.is-today td { background: none; box-shadow: none; }
  @page { size: A4 portrait; margin: 10mm; }
}

@media (prefers-reduced-motion: reduce) {
  .bipt *, .bipt *::before, .bipt-modal * { animation: none !important; transition: none !important; }
  .bipt-q { opacity: 1; transform: none; }
  .bipt-ann-track .bipt-ann-text { padding-left: 0; white-space: normal; }
  .bipt-ann-item { opacity: 1 !important; transform: none !important; }
}
