/* ===== Al-Qayyimah — shared styles ===== */
:root {
  --navy: #0b1f3f;
  --gold: #c9a74f;
  --gold-dark: #b89c64;
  --gold-soft: #e6d39c;
  --cream: #f4e8d0;
  --cream-light: #fbf3e6;
  --sand: #e3d6bd;
  --green: #2c4a3b;
  --ink: #1d1d1d;
  --serif: "Cormorant Garamond", "EB Garamond", Georgia, serif;
  --sans: "Jost", "Avenir Next", Avenir, Helvetica, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--sans); color: var(--text); background: var(--cream-light); line-height: 1.6; }
img { max-width: 100%; display: block; }
a { color: inherit; }
.center { text-align: center; }
.mobile-only { display: none; }

/* ---------- Prayer bar ---------- */
.prayer-bar { background: var(--bar); color: var(--bar-text); text-align: center; font-family: var(--serif); font-weight: 700; font-size: 1.2rem; padding: .4rem 1rem; min-height: 2.4rem; }

/* ---------- Header ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.hdr { max-width: 1180px; margin: 0 auto; padding: 0 1.25rem; height: 108px; display: flex; align-items: center; gap: 1.5rem; }
.logo { display: inline-flex; align-items: center; text-decoration: none; }
.logo img { height: 92px; width: auto; display: block; }
.logo .logo-fallback { font-family: var(--serif); font-weight: 700; color: var(--heading); letter-spacing: .1em; }
.main-nav { display: flex; gap: 1.75rem; align-items: center; margin-right: auto; }
.main-nav > a { text-decoration: none; letter-spacing: .04em; font-size: 1.05rem; color: var(--heading); padding: .2rem 0; border-bottom: 2px solid transparent; }
.main-nav > a:hover, .main-nav > a.active { border-bottom-color: var(--gold); }
.menu-toggle { display: none; -webkit-appearance: none; appearance: none; background: none; border: 0; width: 44px; height: 44px; font-size: 1.5rem; color: var(--heading); cursor: pointer; }
.socials { display: flex; justify-content: flex-end; gap: 1.1rem; font-size: 1.35rem; }
.socials a { text-decoration: none; color: var(--heading); transition: transform .15s, opacity .15s; }
.socials a:hover { transform: scale(1.1); }
/* ---------- Buttons: gold = donate, navy = everything else ---------- */
.btn { display: inline-block; text-decoration: none; font-family: var(--serif); font-size: 1.3rem; font-weight: 600; letter-spacing: .05em; padding: .65rem 2rem; border-radius: 3px; border: 0; cursor: pointer; transition: opacity .15s, transform .15s; }
.btn:hover { opacity: .9; transform: translateY(-1px); }
.btn-gold { background: linear-gradient(180deg, #d4b26a, #b08a3c); color: #fff; font-weight: 600; box-shadow: 0 4px 14px rgba(184,146,63,.4); }
.btn-navy { background: var(--btn); color: var(--btn-text); }
.btn-lg { font-size: 2.2rem; padding: .9rem 4rem; letter-spacing: .08em; }
.btn-sm { font-size: 1.05rem; padding: .4rem 1.3rem; }

/* ---------- Sections ---------- */
section { padding: 4rem 2rem; }
.section-title { font-family: var(--serif); font-style: italic; text-align: center; font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.2; margin: 0 0 2rem; font-weight: 500; }
.hero { background: var(--btn); color: var(--btn-text); text-align: center; padding: 4.5rem 2rem; }
.hero h1 { font-family: var(--serif); font-weight: 400; letter-spacing: .22em; font-size: clamp(1.4rem, 3vw, 2.6rem); line-height: 1.45; margin: 0 auto 2.5rem; max-width: 1100px; text-transform: uppercase; }
.moments { background: var(--green); color: var(--gold-soft); text-align: center; }

/* Carousel */
.carousel { position: relative; max-width: 1400px; margin: 0 auto 2.5rem; }
.carousel-track { display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track img { height: 450px; width: auto; flex: none; object-fit: cover; scroll-snap-align: start; background: #1d3a2c; min-width: 300px; }
.carousel-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--gold); color: var(--navy); font-size: 1.4rem; cursor: pointer; }
.carousel-btn.prev { left: .5rem; } .carousel-btn.next { right: .5rem; }

.clips { background: var(--sand); }

/* ---------- Prayer times & key dates ---------- */
.prayer-section { background: var(--cream); }
.prayer-grid { display: grid; grid-template-columns: 1.15fr 1.85fr; gap: 3rem; max-width: 1400px; margin: 0 auto; align-items: start; }
.hijri-date { font-family: var(--serif); font-weight: 700; font-size: 1.9rem; margin: 0; color: var(--heading); }
.next-prayer { font-family: var(--serif); font-size: 1.5rem; margin: .3rem 0 1.25rem; }
.next-prayer strong { font-weight: 700; }
.next-prayer .sep { color: var(--gold); margin: 0 .3rem; }
.times { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .5rem; }
.times div { text-align: center; }
.times .name { font-family: var(--serif); font-size: 1.4rem; display: block; color: var(--heading); }
.times .time { color: var(--accent); font-size: 1.3rem; font-weight: 500; }
.key-dates { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.key-date { border-top: 3px solid var(--gold); padding-top: 1rem; }
.key-date h3 { font-family: var(--serif); font-weight: 500; font-size: 1.6rem; margin: 0 0 .75rem; line-height: 1.2; color: var(--heading); }
.key-date h3 a { text-decoration: none; }
.key-date h3 a:hover { text-decoration: underline; text-decoration-color: var(--gold); }
.key-date .g { font-weight: 600; font-size: 1.05rem; }
.key-date .h { font-family: var(--serif); font-size: 1.2rem; color: #555; }

/* ---------- Page headings & text ---------- */
.page-title { font-family: var(--serif); text-align: center; color: var(--heading); font-weight: 700; letter-spacing: .2em; font-size: clamp(2.2rem, 5.5vw, 4rem); line-height: 1.15; margin: 0 auto; padding-bottom: .4rem; border-bottom: 3px solid var(--gold); width: fit-content; max-width: 100%; }
.divider { height: 0; max-width: 220px; margin: 2.5rem auto; border-top: 2px solid var(--gold); opacity: .8; }
.gold-rule { width: 180px; height: 0; border: 0; border-top: 2px solid var(--gold); margin: 2.5rem auto; }
.prose { max-width: 820px; margin: 0 auto; font-size: 1.2rem; }
.tagline { font-family: var(--serif); text-align: center; font-weight: 700; font-size: clamp(1.3rem, 2.5vw, 1.6rem); color: var(--heading); }
.closing-quote { font-family: var(--serif); font-style: italic; color: #a8843e; text-align: center; max-width: 800px; margin: 2rem auto 0; font-size: 1.45rem; }
.empty { text-align: center; font-size: 1.2rem; }

/* ---------- Events list ---------- */
.event-card { display: grid; grid-template-columns: 1fr 1fr; align-items: start; background: var(--surface); max-width: 1100px; margin: 0 auto 2rem; text-decoration: none; color: inherit; transition: box-shadow .2s; }
.event-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,.12); }
.event-card img { width: 100%; height: auto; }
.event-card .body { padding: 2rem 2.5rem; }
.event-card h2 { font-family: var(--serif); font-weight: 500; font-size: 2rem; margin: 0 0 .5rem; line-height: 1.2; color: var(--heading); }
.event-card .date { color: var(--heading); font-weight: 600; border-left: 3px solid var(--gold); padding-left: .75rem; }
.read-more { color: var(--heading); font-weight: 500; }

/* ---------- Event page ---------- */
.event-page { max-width: 1150px; margin: 0 auto; font-size: 1.15rem; }
.event-page .back { margin: 0 0 1rem; }
.event-page h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(2rem, 5vw, 3rem); line-height: 1.15; margin: .5rem 0; color: var(--heading); }
.tag-finished { display: inline-block; background: #e4e0d8; color: #555; font-size: .85rem; padding: .25rem .75rem; border-radius: 999px; }
.event-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); grid-template-areas: "poster details" "poster desc"; grid-template-rows: auto 1fr; gap: 1.5rem 3rem; align-items: start; margin-top: 1.5rem; }
.event-poster { grid-area: poster; width: 100%; }
.event-details { grid-area: details; list-style: none; margin: 0; padding: 1.25rem 1.5rem; background: var(--surface); border-left: 4px solid var(--gold); }
.event-details li { display: flex; gap: .75rem; padding: .35rem 0; color: var(--heading); }
.event-details .ico { width: 1.5rem; flex: none; }
.event-details .addr { display: block; font-size: .95rem; color: #666; }
.event-details .maps { display: block; margin-top: .25rem; font-size: .95rem; color: var(--heading); }
.event-desc { grid-area: desc; }
.event-desc p:first-child { margin-top: 0; }

/* ---------- Donate ---------- */
.donate-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; max-width: 1150px; margin: 0 auto; align-items: start; }
.donate-grid iframe { width: 100%; max-width: 500px; border: 0; }
.donate-hadith { font-family: var(--serif); font-style: italic; color: #a8843e; font-size: 1.5rem; text-align: center; }

/* ---------- Contact ---------- */
.contact { max-width: 1000px; margin: 0 auto; }
.contact h1, .contact h2 { font-family: var(--serif); font-weight: 500; color: var(--heading); }
.contact h1 { font-size: clamp(2.6rem, 6vw, 4rem); margin: 0; }
.contact h2 { font-size: clamp(2rem, 4.5vw, 2.6rem); margin: 2.5rem 0 1rem; }
.contact p { font-family: var(--sans) !important; font-size: 1.15rem !important; }
.contact-cols { display: flex; gap: 5rem; flex-wrap: wrap; }
.contact-cols .socials { justify-content: flex-start; font-size: 1.6rem; gap: 1.1rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer); color: var(--heading); padding: 2.5rem 6% 1.25rem; border-top: 3px solid var(--gold); }
.site-footer a { color: var(--heading); }
.site-footer a.btn-donate { color: #fff; }
.footer-inner { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 2rem; align-items: start; max-width: 1200px; margin: 0 auto; }
.footer-brand .logo img { height: 110px; }
.footer-brand p { margin: .75rem 0 0; font-size: .95rem; line-height: 1.7; color: var(--text); }
.footer-cta { text-align: center; font-family: var(--serif); font-size: 1.35rem; color: var(--heading); }
.footer-cta p { margin: 0 0 1rem; }
.footer-cta .socials { justify-content: center; font-size: 1.6rem; gap: 1.5rem; margin-bottom: 1.5rem; }
.footer-cta .socials a { color: var(--heading); }
.footer-cta .socials a:hover { color: var(--accent); }
.footer-links { list-style: none; padding: 0; margin: 0; text-align: right; font-size: .95rem; line-height: 2; }
.footer-links a { text-decoration: none; opacity: .85; }
.footer-links a:hover { opacity: 1; color: var(--accent); }
.copyright { text-align: center; font-size: .85rem; color: var(--muted); margin: 2rem 0 0; border-top: 1px solid var(--line); padding-top: 1rem; }

/* ---------- Featured event (Home) ---------- */
.featured { background: var(--cream-light); padding: 3.5rem 2rem; }
.featured-inner { max-width: 1100px; margin: 0 auto; }
.featured-label { font-family: var(--serif); font-style: italic; text-align: center; font-size: clamp(2rem, 4.5vw, 3rem); margin: 0 0 1.75rem; color: var(--heading); }
.featured-card { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface); align-items: center; box-shadow: 0 4px 20px rgba(0,0,0,.06); }
.featured-card img { width: 100%; height: auto; }
.featured-body { padding: 2rem 2.5rem; }
.featured-body h2 { font-family: var(--serif); font-weight: 500; font-size: 2rem; line-height: 1.2; margin: 0 0 .5rem; color: var(--heading); }
.featured-body .date { color: var(--heading); font-weight: 600; border-left: 3px solid var(--gold); padding-left: .75rem; }
.featured-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; margin-top: 1.25rem; }
.text-link { color: var(--heading); font-weight: 500; text-decoration: none; border-bottom: 1px solid var(--gold); }
.gap-sub { font-size: .95rem; color: #666; margin-top: 1.25rem; }
.gap-sub a { color: var(--heading); }
.gap-note { text-align: center; margin-bottom: 2.5rem; }
.gap-note .empty { margin-bottom: .25rem; }
.section-title.sub { font-size: clamp(1.7rem, 3.5vw, 2.3rem); color: var(--heading); }
.watch-tag { color: var(--heading); font-weight: 600; margin: 0; }

/* ---------- Lectures ---------- */
.lectures-intro { margin: 1.5rem auto 2.5rem; font-size: 1.1rem; }
.lectures-list { position: relative; max-width: 1200px; margin: 0 auto; }
.lecture-track { display: flex; gap: 1.25rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: .25rem .25rem 1rem; }
.lecture-track::-webkit-scrollbar { display: none; }
.lecture { background: var(--surface); flex: 0 0 calc((100% - 2.5rem) / 3); scroll-snap-align: start; box-shadow: 0 2px 12px rgba(0,0,0,.06); }
.lecture-play { position: relative; display: block; width: 100%; padding: 0; border: 0; cursor: pointer; background: #000; aspect-ratio: 16 / 9; overflow: hidden; }
.lecture-play img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.82); transition: filter .2s; }
.lecture-play:hover img { filter: brightness(1); }
.play-icon { position: absolute; inset: 0; margin: auto; width: 50px; height: 50px; border-radius: 50%; background: rgba(201,167,79,.95); color: var(--navy); font-size: 1.2rem; display: flex; align-items: center; justify-content: center; padding-left: 4px; box-shadow: 0 2px 10px rgba(0,0,0,.35); }
.lecture .video { aspect-ratio: 16 / 9; }
.lectures-list .carousel-btn { top: 28%; z-index: 2; }
.lectures-list .carousel-btn.prev { left: -1.25rem; }
.lectures-list .carousel-btn.next { right: -1.25rem; }
.lecture-body { padding: 1rem 1.15rem 1.25rem; }
.lecture-body h2 { font-family: var(--serif); font-weight: 500; font-size: 1.35rem; line-height: 1.2; margin: 0 0 .35rem; color: var(--heading); }
.lecture-body .date { margin: 0 0 .75rem; color: #555; }
.video { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.event-video { margin: 1.5rem 0 2rem; }
.watch-heading { font-family: var(--serif); font-weight: 500; font-size: 1.6rem; color: var(--heading); margin: 0 0 .75rem; }

/* ---------- Contact form ---------- */
.contact-intro { margin: .5rem 0 2rem; }
.contact-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 3rem; align-items: start; }
.contact-form { background: var(--surface); padding: 2rem; border-top: 3px solid var(--gold); display: grid; gap: 1rem; }
.contact-form label { display: grid; gap: .35rem; font-weight: 500; color: var(--heading); font-size: .95rem; }
.contact-form input, .contact-form select, .contact-form textarea { font: inherit; font-size: 1rem; padding: .7rem .8rem; border: 1px solid var(--line2); border-radius: 6px; background: var(--cream-light); color: var(--text); width: 100%; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { outline: 2px solid var(--gold); border-color: var(--gold); background: var(--surface); }
.contact-form textarea { resize: vertical; }
.contact-form .btn { justify-self: start; }
.contact-form .btn:disabled { opacity: .6; cursor: wait; }
.hp { position: absolute; left: -9999px; }
.form-status { margin: 0; font-size: .95rem; }
.form-status.ok { color: #2c6b3f; font-weight: 500; }
.form-status.error { color: #a8283a; }
.contact-side h2 { margin-top: 0 !important; font-size: 1.8rem !important; }
.contact-side .socials { justify-content: flex-start; font-size: 1.6rem; gap: 1.1rem; }

/* ---------- Policy pages ---------- */
.policy { font-size: 1.05rem; }
.policy h2 { font-family: var(--serif); font-weight: 600; color: var(--heading); font-size: 1.6rem; margin: 2.2rem 0 .6rem; }
.policy p:first-child em, .policy p:first-child strong { color: #555; }
.policy ul, .policy ol { padding-left: 1.3rem; }
.policy li { margin: .35rem 0; }


/* ================= Shared buttons ================= */
.btn-donate { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 1.4rem; border-radius: 3px; background: linear-gradient(180deg, #d4b26a, #b08a3c); color: #fff !important; font-family: var(--sans); font-weight: 600; font-size: 1rem; letter-spacing: .02em; text-decoration: none; box-shadow: 0 4px 14px rgba(184,146,63,.4); transition: transform .15s, box-shadow .15s; white-space: nowrap; }
.btn-donate:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(184,146,63,.5); }
.btn-donate-lg { min-height: 54px; padding: 0 2.6rem; font-size: 1.1rem; }
.btn-outline { display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: 0 2rem; border-radius: 3px; border: 1.5px solid var(--heading); color: var(--heading); font-weight: 600; text-decoration: none; background: var(--surface); }
.btn-outline:hover { border-color: var(--gold); }
.laptop-only { display: block; }
.h-actions .ls { display: none; }
.phone-only { display: none; }

/* ================= Home page ================= */
body.home { background: var(--input); }
.home main section { padding: 0; }
.home main { max-width: 1180px; margin: 0 auto; padding: 0 1.25rem 3rem; }
.home main .h-hero { text-align: center; padding: 3.25rem 0 2.5rem; }
.h-name { font-family: var(--serif); font-weight: 700; color: var(--heading); font-size: 4.2rem; line-height: 1; margin: 0; }
.h-slogan { font-family: var(--serif); font-size: 1.45rem; color: var(--muted); max-width: 600px; margin: .8rem auto 1.6rem; line-height: 1.35; }
.h-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; max-width: 540px; margin: 0 auto; }
.h-support { grid-column: 1 / -1; margin: .5rem 0 0; font-size: .92rem; color: var(--muted); }
.h-support b { color: var(--heading); }
.h-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
.h-today { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 1.25rem; }
.h-tabs { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 4px; padding: 3px; margin-bottom: 1rem; }
.h-tabs button { font: inherit; font-size: .95rem; border: 0; background: none; color: var(--muted); padding: .6rem; border-radius: 2px; cursor: pointer; min-height: 44px; }
.h-tabs button[aria-selected="true"] { background: var(--btn); color: var(--btn-text); }
.h-hijri { font-family: var(--serif); font-weight: 700; font-size: 1.4rem; color: var(--heading); margin: 0; }
.h-next { color: var(--muted); font-size: .95rem; margin: .15rem 0 1rem; }
.h-next b { color: var(--heading); }
.h-times { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); text-align: center; gap: 2px; }
.h-times b { display: block; font-family: var(--serif); font-weight: 600; font-size: 1.15rem; color: var(--heading); }
.h-times span { color: var(--accent); font-weight: 500; }
.h-times .now { background: var(--chip); border-radius: 10px; }
.h-kd-list .kd-row { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.h-kd-list .kd-row:last-child { border-bottom: 0; }
.h-kd-list b { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; color: var(--heading); }
.h-kd-list span { text-align: right; font-size: .85rem; color: var(--muted); white-space: nowrap; }
.h-kd-list em { font-style: normal; font-size: .8rem; }
.h-kd-list .ev-count { display: block; text-align: left; color: var(--btn-text); font-size: .72rem; margin: 0 0 .3rem; }
.h-kd-next { margin: .9rem 0 0; padding-top: .75rem; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
.h-kd-next b { color: var(--heading); font-weight: 600; }
.h-kd-next a { color: inherit; text-decoration: none; }
.h-kd-list a, .h-kd-tiles a { text-decoration: none; }
.h-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; border-bottom: 1px solid var(--line); padding-bottom: .6rem; margin-bottom: 1rem; }
.h-head h2 { font-family: var(--serif); font-weight: 600; font-size: 2rem; color: var(--heading); margin: 0; }
.h-head a { color: var(--accent); font-weight: 600; font-size: .9rem; text-decoration: none; white-space: nowrap; }
.fe { display: grid; grid-template-columns: 200px 1fr; gap: 1rem; text-decoration: none; color: inherit; align-items: start; }
.fe img { width: 100%; border-radius: 12px; box-shadow: 0 6px 14px rgba(0,0,0,.15); }
.fe-when { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin: 0; }
.fe h3 { font-family: var(--serif); font-size: 1.55rem; font-weight: 600; color: var(--heading); margin: .2rem 0; line-height: 1.15; }
.fe-sum { font-size: .92rem; color: var(--muted); margin: 0 0 .5rem; }
.fe-label, .fe-arrow { display: none; }
.fe-more { color: var(--heading); font-weight: 600; font-size: .9rem; border-bottom: 1.5px solid var(--gold); }
.h-clips { margin-top: 2.5rem; }

/* Phone layout */
@media (max-width: 899px) {
  .laptop-only { display: none !important; }
  .phone-only { display: block; }
  .home main { padding: 0 1rem 2.5rem; }
  /* Hero panel */
  .home main .h-hero { margin: 1rem 0 0; padding: 1.4rem 1.1rem 1.2rem; text-align: center; background: var(--panel); border: 1px solid var(--panel-line); border-radius: 22px; }
  .h-name { display: none; }
  .h-slogan { font-family: var(--serif); font-weight: 700; font-size: 1.6rem; line-height: 1.18; color: var(--heading); margin: 0 0 1rem; max-width: none; }
  .h-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; max-width: none; }
  .h-actions .h-events, .h-actions .h-lectures { min-height: 50px; padding: 0 .75rem; font-size: 1rem; }
  .h-actions .lw { display: none; }
  .h-actions .ls { display: inline; }
  .h-support { margin: .4rem 0 0; font-size: .8rem; line-height: 1.4; }
  /* Order: event, then prayer card */
  .h-grid { display: flex; flex-direction: column; align-items: stretch; gap: 1rem; margin-top: 1rem; }
  .h-event { order: 1; }
  .h-today { order: 2; }
  .h-event .h-head { display: none; }
  /* Slim event box */
  .fe { display: flex; align-items: center; gap: .8rem; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: .5rem; }
  .fe img { flex: 0 0 92px; width: 92px; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; box-shadow: none; }
  .fe-body { flex: 1; min-width: 0; }
  .fe-label { display: block; font-size: .62rem; letter-spacing: .15em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
  .fe h3 { font-size: 1.2rem; margin: .1rem 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .fe-when { font-size: .75rem; letter-spacing: 0; text-transform: none; color: var(--muted); font-weight: 400; order: 3; }
  .fe-body { display: flex; flex-direction: column; }
  .fe-sum, .fe-more { display: none; }
  .fe-arrow { display: block; font-style: normal; font-size: 1.7rem; color: var(--line2); padding-right: .3rem; }
  /* Prayer / key dates card */
  .h-today { padding: .9rem 1rem 1rem; border-radius: 20px; }
  .h-tabs { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 0; margin-bottom: .9rem; }
  .h-tabs button { border-radius: 0; }
  .h-tabs button[aria-selected="true"] { background: none; color: var(--heading); font-weight: 600; box-shadow: inset 0 -3px 0 var(--gold); }
  .h-np { display: flex; justify-content: space-between; align-items: flex-end; }
  .h-np small { font-size: .66rem; letter-spacing: .16em; color: var(--accent); font-weight: 600; }
  .h-np b { display: block; font-family: var(--serif); font-size: 1.9rem; line-height: 1; color: var(--heading); font-weight: 600; }
  .h-np > span { text-align: right; font-size: .85rem; color: var(--muted); }
  .h-hijri { font-family: var(--serif); font-weight: 500; color: var(--accent); font-size: 1rem; margin: .3rem 0 .7rem; }
  .h-times { border-top: 1px solid var(--line); padding-top: .6rem; }
  .h-times b { font-size: .98rem; }
  .h-times span { font-size: .86rem; }
  .h-kd-list b { font-size: 1.05rem; }
  .h-clips { margin-top: 1.6rem; }
  .h-clips .h-head { border-bottom: 0; padding-bottom: 0; margin-bottom: .6rem; }
  .h-clips .h-head h2 { font-size: 1.5rem; }
}


/* ================= Inner pages: shared ================= */
main.page section { padding: 0; }
main.page { max-width: 1180px; margin: 0 auto; padding: 2.25rem 1.25rem 3.5rem; }
body:has(main.page) { background: var(--input); }
.pg-title { font-family: var(--serif); font-weight: 700; color: var(--heading); font-size: 3.4rem; line-height: 1; margin: 0; }
.pg-sub { color: var(--muted); margin: .4rem 0 0; }
.ev-btns { display: flex; gap: .6rem; flex-wrap: wrap; }
.ev-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 1.4rem; border-radius: 3px; background: var(--btn); color: var(--btn-text); font: inherit; font-weight: 600; border: 0; cursor: pointer; text-decoration: none; }
.ev-btn-o { background: var(--surface); color: var(--heading); border: 1.5px solid var(--line2); }
.ev-btn:hover { opacity: .9; }
.ev-none { color: var(--muted); padding: .5rem 0; }

/* ================= Events page ================= */
.ev-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; margin-bottom: 1.5rem; }
.ev-gap { flex: 0 0 400px; background: var(--panel); border: 1px solid var(--panel-line); border-radius: 16px; padding: .9rem 1.1rem; }
.ev-gap b { font-family: var(--serif); font-size: 1.2rem; color: var(--heading); }
.ev-gap p { font-size: .85rem; color: var(--muted); margin: .1rem 0 .25rem; }
.ev-gap a { color: var(--accent); font-weight: 600; font-size: .88rem; text-decoration: none; }
.ev-label { font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin: 0 0 .6rem; }
.ev-spot { display: grid; grid-template-columns: 1.1fr 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.ev-spot-img img { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 4/3; }
.ev-spot-body { padding: 2rem 2.2rem; display: flex; flex-direction: column; justify-content: center; }
.ev-spot-body small { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.ev-spot-body h2 { font-family: var(--serif); font-weight: 700; font-size: 2.4rem; line-height: 1.05; color: var(--heading); margin: .4rem 0 .6rem; }
.ev-spot-body p { color: var(--muted); line-height: 1.6; margin: 0 0 1.2rem; }
.ev-sec { margin-top: 2.2rem; }
.ev-sec-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; border-bottom: 1px solid var(--line); padding-bottom: .6rem; margin-bottom: .9rem; }
.ev-sec-head h2, .evp-sec h2 { font-family: var(--serif); font-weight: 600; font-size: 2rem; color: var(--heading); margin: 0; }
.ev-filter { display: flex; gap: .4rem; }
.ev-filter button { font: inherit; font-size: .85rem; border: 1px solid var(--line); border-radius: 999px; padding: .45rem .9rem; background: var(--surface); color: var(--muted); cursor: pointer; min-height: 38px; }
.ev-filter button[aria-pressed="true"] { background: var(--btn); color: var(--btn-text); border-color: var(--btn); }
.ev-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.ev-grid-3 { grid-template-columns: repeat(3, 1fr); }
.ev-row { display: flex; align-items: center; gap: .9rem; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: .6rem; text-decoration: none; color: inherit; transition: box-shadow .2s; }
.ev-row:hover { box-shadow: 0 6px 18px rgba(11,31,63,.08); }
.ev-row img, .ev-row-ph { flex: 0 0 110px; width: 110px; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; background: var(--chip); }
.ev-row-body { flex: 1; min-width: 0; }
.ev-row-body small { font-size: .72rem; color: var(--accent); font-weight: 600; }
.ev-row-body b { display: block; font-family: var(--serif); font-weight: 600; color: var(--heading); font-size: 1.25rem; line-height: 1.12; }
.ev-row-body span { display: block; font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-tag { font-style: normal; font-size: .75rem; font-weight: 600; color: var(--heading); background: var(--chip); border-radius: 999px; padding: .25rem .65rem; white-space: nowrap; }
.ev-chev { font-style: normal; color: var(--line2); font-size: 1.6rem; padding: 0 .4rem; }

/* ================= Event page ================= */
.ev-back { display: inline-block; color: var(--accent); font-weight: 600; font-size: .9rem; text-decoration: none; margin-bottom: 1.1rem; }
.evp { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 2.75rem; align-items: start; }
.evp-poster { position: sticky; top: 130px; }
.evp-poster img { width: 100%; border-radius: 20px; box-shadow: 0 14px 34px rgba(0,0,0,.18); display: block; }
.evp-tag { display: inline-block; font-size: .75rem; font-weight: 600; letter-spacing: .05em; color: var(--muted); background: var(--chip); border-radius: 999px; padding: .25rem .75rem; }
.evp-main h1 { font-family: var(--serif); font-weight: 700; color: var(--heading); font-size: 3.2rem; line-height: 1.05; margin: .7rem 0 1.1rem; }
.evp-det { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: .3rem 1.25rem; }
.evp-det > div { display: flex; gap: .9rem; align-items: flex-start; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.evp-det > div:last-child { border-bottom: 0; }
.evp-det svg { flex: 0 0 20px; width: 20px; height: 20px; margin-top: 2px; stroke: var(--accent); fill: none; stroke-width: 1.8; }
.evp-det p { margin: 0; }
.evp-det b { display: block; color: var(--heading); font-weight: 600; }
.evp-det span { display: block; font-size: .9rem; color: var(--muted); }
.evp-det a { display: inline-block; margin-top: .25rem; color: var(--accent); font-weight: 600; font-size: .88rem; text-decoration: none; }
.evp-desc { margin: 1.3rem 0; line-height: 1.75; color: var(--text); font-size: 1.05rem; }
.evp-desc p { margin: 0 0 .75rem; }
.evp-sec { margin-top: 2.8rem; }
.evp-sec h2 { border-bottom: 1px solid var(--line); padding-bottom: .6rem; margin-bottom: 1rem; }
.evp-video { max-width: 860px; border-radius: 18px; overflow: hidden; }

@media (max-width: 899px) {
  main.page { padding: 1.3rem 1rem 2.5rem; }
  .pg-title { font-size: 2.3rem; }
  .ev-top { display: block; margin-bottom: 1.2rem; }
  .ev-gap { margin-top: .9rem; text-align: center; }
  .ev-spot { grid-template-columns: 1fr; }
  .ev-spot-body { padding: 1rem 1.1rem 1.2rem; }
  .ev-spot-body h2 { font-size: 1.6rem; }
  .ev-spot-body p { font-size: .9rem; margin-bottom: .9rem; }
  .ev-btn { min-height: 44px; padding: 0 1.1rem; font-size: .92rem; }
  .ev-sec { margin-top: 1.6rem; }
  .ev-sec-head { flex-direction: column; align-items: flex-start; gap: .5rem; border: 0; padding: 0; margin-bottom: .6rem; }
  .ev-sec-head h2, .evp-sec h2 { font-size: 1.55rem; }
  .ev-grid, .ev-grid-3 { grid-template-columns: 1fr; gap: .55rem; }
  .ev-row img, .ev-row-ph { flex-basis: 80px; width: 80px; }
  .ev-row-body b { font-size: 1.08rem; }
  .evp { grid-template-columns: 1fr; gap: 1.1rem; }
  .evp-poster { position: static; }
  .evp-poster img { border-radius: 16px; }
  .evp-main h1 { font-size: 2.2rem; margin: .6rem 0 .9rem; }
  .evp-det { padding: .1rem 1rem; }
  .evp-desc { font-size: 1rem; }
  .evp-main .ev-btns .ev-btn { flex: 1; }
  .evp-sec { margin-top: 1.8rem; }
  .evp-sec h2 { border: 0; padding: 0; margin-bottom: .6rem; }
  .evp-video { border-radius: 14px; }
}


/* ================= About page ================= */
.ab { max-width: 860px; margin: 0 auto; text-align: center; }
.ab-cap { display: block; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: .5rem; }
.ab-tag { font-family: var(--serif); font-weight: 600; color: var(--heading); font-size: 1.75rem; line-height: 1.3; margin: 1rem 0 0; }
.orn { display: flex; align-items: center; gap: .75rem; justify-content: center; width: 220px; margin: 2.2rem auto; }
.orn i { flex: 1; height: 1px; background: var(--gold); }
.orn b { width: 7px; height: 7px; background: var(--gold); transform: rotate(45deg); }
.ab-prose { text-align: left; }
.ab-prose p { font-size: 1.08rem; line-height: 1.8; color: var(--text); margin: 0; }
.ab-prose p + p { margin-top: .9rem; }
.ab-prose p:first-child::first-letter { font-family: var(--serif); font-size: 3.6rem; float: left; line-height: .8; padding: .35rem .5rem 0 0; color: var(--accent); font-weight: 700; }
.ab-h2 { font-family: var(--serif); font-weight: 600; color: var(--heading); font-size: 2rem; margin: 0 0 1rem; }
.ab-frame { border: 1px solid var(--panel-line); border-radius: 24px; padding: .6rem; background: var(--surface); }
.ab-quote { margin: 0; text-align: left; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 18px; padding: 1.6rem 1.75rem; }
.ab-quote p { margin: 0; line-height: 1.8; color: var(--text); }
.ab-quote p + p { margin-top: .75rem; }
.ab-quote strong { color: var(--heading); }
.ab-nar { color: var(--muted) !important; font-size: .95rem; }
.ab-close { font-family: var(--serif); font-style: italic; color: var(--accent); font-size: 1.45rem; line-height: 1.5; margin: 0; }
.ab-don { margin-top: 1.5rem; }
@media (max-width: 899px) {
  .ab-tag { font-size: 1.3rem; }
  .orn { margin: 1.6rem auto; }
  .ab-prose p { font-size: 1rem; }
  .ab-h2 { font-size: 1.6rem; }
  .ab-quote { padding: 1.1rem 1.1rem; }
  .ab-close { font-size: 1.2rem; }
  .ab-don .btn-donate { width: 100%; }
}


/* ================= Lectures page ================= */
.lec-wrap { margin-top: 1.6rem; }
.lec-track { display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: .4rem; }
.lec-track::-webkit-scrollbar { display: none; }
.lec-card { flex: 0 0 calc((100% - 2rem) / 3); scroll-snap-align: start; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.lec-play { position: relative; display: block; width: 100%; padding: 0; border: 0; cursor: pointer; background: #000; aspect-ratio: 16/9; }
.lec-play img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.82); transition: filter .2s; display: block; }
.lec-play:hover img { filter: brightness(1); }
.lec-icon { position: absolute; inset: 0; margin: auto; width: 54px; height: 54px; border-radius: 50%; background: rgba(201,167,79,.95); color: var(--navy); display: flex; align-items: center; justify-content: center; padding-left: 4px; font-size: 1.1rem; box-shadow: 0 2px 10px rgba(0,0,0,.35); }
.lec-card .video { aspect-ratio: 16/9; }
.lec-body { padding: .85rem 1rem 1rem; }
.lec-body b { display: block; font-family: var(--serif); font-weight: 600; font-size: 1.3rem; color: var(--heading); line-height: 1.15; }
.lec-body small { display: block; color: var(--muted); font-size: .85rem; margin-top: .15rem; }
.lec-body a { display: inline-block; margin-top: .5rem; color: var(--accent); font-weight: 600; font-size: .88rem; text-decoration: none; }
.lec-arrows { display: flex; gap: .5rem; justify-content: flex-end; margin-top: .6rem; }
.lec-arr { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--gold); color: var(--navy); font-size: 1.4rem; cursor: pointer; }
.lec-sub { margin-top: 2.2rem; background: var(--panel); border: 1px solid var(--panel-line); border-radius: 22px; padding: 1.6rem 1.8rem; display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; }
.lec-sub h2 { font-family: var(--serif); font-weight: 600; font-size: 1.65rem; color: var(--heading); margin: 0; }
.lec-sub p { color: var(--muted); margin: .2rem 0 0; }

/* ================= Contact page ================= */
.ct-hero { background: var(--panel); border: 1px solid var(--panel-line); border-radius: 26px; padding: 2.6rem 2rem; text-align: center; }
.ct-hero .pg-title { font-size: 3.1rem; }
.ct-email { display: inline-block; margin-top: 1rem; color: var(--heading); font-weight: 600; font-size: 1.15rem; text-decoration: none; border-bottom: 1.5px solid var(--gold); }
.ct-socials { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-top: 1.2rem; }
.ct-socials a { display: inline-flex; align-items: center; gap: .45rem; min-height: 40px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 0 1rem; color: var(--heading); font-weight: 500; font-size: .92rem; text-decoration: none; }
.ct-socials a:hover { border-color: var(--gold); }
.ct-card { max-width: 720px; margin: 1.5rem auto 0; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 1.8rem; }
.ct-card h2 { font-family: var(--serif); font-weight: 600; font-size: 1.65rem; color: var(--heading); margin: 0 0 .9rem; }
.ct-form { display: grid; gap: .9rem; }
.ct-form label { display: grid; gap: .35rem; font-weight: 500; color: var(--heading); font-size: .95rem; }
.ct-form input, .ct-form select, .ct-form textarea { font: inherit; font-size: 1rem; padding: .75rem .85rem; border: 1px solid var(--line2); border-radius: 10px; background: var(--input); color: var(--text); width: 100%; }
.ct-form input:focus, .ct-form select:focus, .ct-form textarea:focus { outline: 2px solid var(--gold); border-color: var(--gold); background: var(--surface); }
.ct-form textarea { resize: vertical; }
.ct-send { width: 100%; }
.ct-send:disabled { opacity: .6; cursor: wait; }
.ct-note { text-align: center; color: var(--muted); margin: 1.2rem 0 0; font-size: .92rem; }
.ct-note a { color: var(--accent); font-weight: 600; text-decoration: none; }
@media (max-width: 899px) {
  .lec-card { flex-basis: 82%; }
  .lec-arrows { display: none; }
  .lec-sub { flex-direction: column; text-align: center; padding: 1.3rem 1rem; }
  .lec-sub h2 { font-size: 1.4rem; }
  .ct-hero { padding: 1.6rem 1rem; }
  .ct-hero .pg-title { font-size: 2.1rem; }
  .ct-card { padding: 1.2rem; }
}


/* ================= Policy pages ================= */
.pol { max-width: 820px; margin: 0 auto; }
.pol .pg-title { font-size: 3rem; margin-bottom: 1.5rem; }
.pol-body { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 2rem 2.4rem; color: var(--text); font-size: 1.02rem; line-height: 1.75; }
.pol-body > p:first-child { color: var(--muted); font-size: .92rem; margin-top: 0; }
.pol-body h2 { font-family: var(--serif); font-weight: 600; color: var(--heading); font-size: 1.6rem; margin: 2rem 0 .5rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.pol-body h2:first-of-type { border-top: 0; padding-top: 0; }
.pol-body ul, .pol-body ol { padding-left: 1.3rem; }
.pol-body li { margin: .35rem 0; }
.pol-body strong { color: var(--heading); }
.pol-body a { color: var(--accent); font-weight: 600; }
@media (max-width: 899px) {
  .pol .pg-title { font-size: 2.2rem; margin-bottom: 1rem; }
  .pol-body { padding: 1.3rem 1.2rem; font-size: 1rem; }
  .pol-body h2 { font-size: 1.4rem; }
}


/* ================= Donate page ================= */
.dn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.25rem; align-items: start; margin-top: 1.75rem; }
.dn-form iframe { display: block; width: 100%; max-width: 500px; margin: 0 auto; border: 0; }
.dn-help { text-align: center; color: var(--muted); font-size: .9rem; margin: .8rem 0 0; }
.dn-help a { color: var(--accent); font-weight: 600; text-decoration: none; }
.dn-side { position: sticky; top: 130px; }
.dn-quote { margin: 0; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 18px; padding: 1.5rem 1.6rem; }
.dn-quote p { font-family: var(--serif); font-size: 1.25rem; line-height: 1.55; color: var(--heading); margin: 0; }
.dn-quote p + p { margin-top: .8rem; }
.dn-quote .dn-nar { font-family: var(--sans); font-size: .92rem; color: var(--muted); }
.dn-ded { font-family: var(--serif); font-style: italic; color: var(--accent); font-size: 1.25rem; line-height: 1.45; margin: 1.25rem 0 0; }
@media (max-width: 899px) {
  .dn-grid { grid-template-columns: 1fr; gap: 1.25rem; margin-top: 1.2rem; }
  .dn-side { position: static; }
  .dn-quote { padding: 1.1rem; }
  .dn-quote p { font-size: 1.1rem; }
  .dn-ded { font-size: 1.1rem; text-align: center; }
}


/* ================= Theme colours (light / dark) ================= */
:root {
  --page: #fbf8f2; --surface: #fff; --input: #fbf8f2; --line: #e6dcc8; --line2: #d8cdb5;
  --text: #2b2720; --heading: #0b1f3f; --muted: #6b6457; --accent: #86601f;
  --panel: linear-gradient(160deg, #f6ecd2, #fbf6ea); --panel-line: #ead9ad; --chip: #f1e7cf; --footer: #f5efe2;
  --btn: #0b1f3f; --btn-text: #fff; --bar: #e6d39c; --bar-text: #0b1f3f;
  color-scheme: light dark; /* tells browsers (e.g. Samsung Internet) we have our own dark mode, so they don't recolour the page */
}
html[data-theme="dark"] {
  --page: #141312; --surface: #1f1d1a; --input: #141312; --line: #36322c; --line2: #4a443b;
  --text: #e9e3d6; --heading: #f1e6cc; --muted: #b0a898; --accent: #d9b968;
  --panel: linear-gradient(160deg, #26231e, #1c1a17); --panel-line: #3d372f; --chip: #2b2823; --footer: #0e0d0c;
  --btn: #efe2bf; --btn-text: #1a1814; --bar: #1c1a18; --bar-text: #d9b968;
  color-scheme: dark;
}
html[data-theme="dark"] .site-header { background: #1c1a18; }
html[data-theme="dark"] .logo img { content: url("../images/logo-red.png"); }
html[data-theme="dark"] .ev-row img, html[data-theme="dark"] .ev-spot-img img, html[data-theme="dark"] .evp-poster img, html[data-theme="dark"] .fe img { box-shadow: none; }
html[data-theme="dark"] .h-times .now, html[data-theme="dark"] .times .now { background: rgba(217,185,104,.16); }
html[data-theme="dark"] .ct-form input:focus, html[data-theme="dark"] .ct-form select:focus, html[data-theme="dark"] .ct-form textarea:focus { background: var(--input); }
html[data-theme="dark"] .form-status.ok { color: #7fc79a; }
html[data-theme="dark"] .form-status.error { color: #f08a96; }
html[data-theme="dark"] .ev-gap a, html[data-theme="dark"] .h-head a { color: var(--accent); }
/* ================= Tablet & phone ================= */
@media (max-width: 900px) {
  .mobile-only { display: block; }
  .hdr { height: 80px; gap: .75rem; }
  .logo img { height: 72px; }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .set-wrap { display: none; }
  .hdr-donate { margin-left: auto; }
  .hdr { gap: .55rem; }
  .main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); flex-direction: column; gap: .2rem; padding: .75rem 0 1.25rem; border-bottom: 1px solid var(--line); box-shadow: 0 10px 20px rgba(11,31,63,.08); margin: 0; }
  .site-header.menu-open .main-nav { display: flex; }
  /* Long menu (settings, notifications): scroll inside the menu, below the header */
  .main-nav { max-height: calc(100vh - 81px); max-height: calc(100dvh - 81px); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  .main-nav > a { font-size: 1.2rem; padding: .5rem 0; }
  .menu-extras .socials { justify-content: center; margin-top: .75rem; font-size: 1.5rem; gap: 1.6rem; }

  section { padding: 3rem 1.25rem; }
  .hero { padding: 3rem 1.25rem; }
  .hero h1 { letter-spacing: .12em; font-size: 1.3rem; line-height: 1.55; margin-bottom: 1.75rem; }
  .btn-lg { font-size: 1.6rem; padding: .7rem 2.8rem; }
  .section-title { margin-bottom: 1.5rem; }
  .carousel-track img { height: 300px; min-width: 220px; }

  .prayer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hijri-date { font-size: 1.5rem; }
  .next-prayer { font-size: 1.25rem; }
  .times .name { font-size: 1.05rem; }
  .times .time { font-size: 1rem; }
  .key-dates { grid-template-columns: 1fr; gap: 0; }
  .key-date { display: grid; grid-template-columns: 7.8rem 1fr; grid-template-areas: "g title" "h title"; column-gap: 1rem; border-top: 1px solid rgba(201,167,79,.6); padding: .8rem 0; }
  .key-date:first-child { border-top: 3px solid var(--gold); }
  .key-date h3 { grid-area: title; font-size: 1.25rem; margin: 0; align-self: center; }
  .key-date .g { grid-area: g; font-size: .9rem; }
  .key-date .h { grid-area: h; font-size: .9rem; }

  .page-title { letter-spacing: .1em; }
  .prose { font-size: 1.1rem; }
  .closing-quote { font-size: 1.25rem; }
  .event-card { grid-template-columns: 1fr; }
  .event-card .body { padding: 1.5rem; }
  .event-card h2 { font-size: 1.7rem; }
  .event-layout { grid-template-columns: 1fr; grid-template-areas: "details" "poster" "desc"; grid-template-rows: auto; }
  .donate-grid { grid-template-columns: 1fr; }
  .donate-hadith { font-size: 1.25rem; }
  .contact-cols { gap: 2rem; flex-direction: column; }
  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
  .contact-form { padding: 1.5rem; }
  .contact-form .btn { justify-self: stretch; text-align: center; }
  .featured { padding: 2.5rem 1.25rem; }
  .featured-card { grid-template-columns: 1fr; }
  .featured-body { padding: 1.5rem; }
  .featured-body h2 { font-size: 1.7rem; }
  .lecture { flex-basis: 82%; }
  .lectures-list .carousel-btn { display: none; }

  .footer-inner { grid-template-columns: 1fr; text-align: center; gap: 2rem; }
  .footer-brand .logo { display: inline-block; }
  .footer-brand .logo img { height: 90px; margin: 0 auto; }
  .footer-links { text-align: center; }
}
@media (max-width: 380px) {
  .times .name { font-size: .95rem; }
  .times .time { font-size: .9rem; }
}

/* ===== Home hero buttons, play icons, event tags (Nov update) ===== */
.h-actions .h-events, .h-actions .h-lectures { min-height: 54px; font-size: 1.05rem; padding: 0 1.5rem; }
.h-support a { color: var(--accent); font-weight: 600; text-decoration: none; border-bottom: 1px solid currentColor; }
.h-support a:hover { color: var(--heading); }
.i-play { width: .85em; height: .85em; vertical-align: -0.08em; margin-right: .3em; flex: none; }
.i-playc { width: 1.05em; height: 1.05em; vertical-align: -0.18em; margin-left: .25em; }
.lec-icon .i-play { width: 20px; height: 20px; margin: 0; }
.lec-icon { padding-left: 3px; }
.ev-tag { display: inline-flex; align-items: center; }
.ev-tag .i-play { width: .8em; height: .8em; margin-right: .3em; color: var(--gold); }
.evp-tag-up { background: var(--chip); color: var(--accent); }
.ev-row-body { min-width: 0; }
@media (max-width: 899px) { .ev-grid, .ev-grid-3 { grid-template-columns: minmax(0, 1fr); } }
html[data-theme="dark"] .prayer-bar { border-bottom: 2px solid #b8923f; }

/* ===== Settings: ⚙︎ button, panel, city picker ===== */
.set-wrap { position: relative; display: flex; align-items: center; }
.set-btn { width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background .15s, color .15s; }
.set-btn svg { width: 19px; height: 19px; }
.set-btn:hover, .set-btn[aria-expanded="true"] { background: var(--chip); color: var(--heading); }
.set-pop { position: absolute; right: -6px; top: calc(100% + 12px); width: 290px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px rgba(0,0,0,.16); padding: 1rem; z-index: 60; }
.set-h { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin: 0 0 .5rem; }
.set-seg { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 4px; padding: 3px; margin-bottom: 1rem; }
.set-seg button { font: inherit; font-size: .85rem; border: 0; background: none; color: var(--muted); padding: .5rem .25rem; border-radius: 2px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-height: 36px; }
.set-seg button svg { width: 14px; height: 14px; }
.set-seg button.on { background: var(--btn); color: var(--btn-text); }
.loc-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.loc-list button { font: inherit; font-size: .95rem; text-align: left; border: 0; border-top: 1px solid var(--line); background: var(--surface); color: var(--text); padding: .7rem .85rem; cursor: pointer; display: flex; align-items: center; gap: .5rem; min-height: 44px; }
.loc-list button:first-child { border-top: 0; }
.loc-list button:hover { background: var(--chip); }
.loc-list button svg { width: 16px; height: 16px; flex: none; }
.loc-list .loc-me { color: var(--accent); font-weight: 600; }
.loc-list button.sel { font-weight: 600; color: var(--heading); }
.loc-list button.sel::after { content: "✓"; margin-left: auto; color: var(--accent); }
.set-hint, .loc-note { font-size: .78rem; color: var(--muted); line-height: 1.45; margin: .6rem 0 0; }
.loc-note:empty { display: none; }
.set-box { margin: 1rem 1.25rem 0; background: var(--page); border: 1px solid var(--line); border-radius: 14px; padding: .9rem; text-align: left; }
.set-locrow { display: flex; align-items: center; justify-content: space-between; gap: .75rem; color: var(--text); }
.set-locrow > span { display: inline-flex; align-items: center; gap: .4rem; }
.set-locrow svg { width: 16px; height: 16px; color: var(--accent); }
.loc-btn { font: inherit; font-size: .85rem; font-weight: 600; color: var(--heading); background: var(--page); border: 1px solid var(--line2); border-radius: 3px; padding: .4rem .75rem; cursor: pointer; display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap; }
.loc-btn:hover { border-color: var(--gold); }
.loc-chip svg { width: 14px; height: 14px; color: var(--accent); }
.loc-chip .car { font-size: .65rem; color: var(--accent); }
.h-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
/* City picker: dropdown on laptop, bottom panel on phone */
.loc-sheet[hidden] { display: none; }
.loc-dim { position: fixed; inset: 0; z-index: 90; }
.loc-panel { position: absolute; z-index: 91; width: 260px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px rgba(0,0,0,.18); padding: .75rem; }
.loc-grab, .loc-title { display: none; }
@media (max-width: 899px) {
  .loc-dim { background: rgba(0,0,0,.35); }
  .loc-panel { position: fixed; left: 0 !important; right: 0; bottom: 0; top: auto !important; width: auto; border-radius: 20px 20px 0 0; padding: .6rem 1rem calc(1.4rem + env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform .25s ease; }
  .loc-panel { max-height: 88vh; max-height: 88dvh; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  .loc-dim { touch-action: none; }
  .loc-sheet.open .loc-panel { transform: none; }
  .loc-grab { display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--line2); margin: .2rem auto .8rem; }
  .loc-title { display: block; font-family: var(--serif); font-weight: 700; font-size: 1.4rem; color: var(--heading); margin: 0 0 .6rem; }
  .h-row .h-hijri { margin: .3rem 0 .7rem; }
}
.loc-panel .loc-list { border: 0; }
.loc-panel { padding: .35rem; }
@media (max-width: 900px) {
  .set-wrap { display: none; }
  .menu-extras { width: 100%; }
  .set-box { margin: 1.1rem 1.25rem 0; }
}
@media (max-width: 899px) {
  .loc-panel { padding: .6rem 1rem calc(1.4rem + env(safe-area-inset-bottom)); }
  .loc-panel .loc-list { border: 1px solid var(--line); }
}

/* ===== "Add to Home Screen" how-to (opened from the phone menu) ===== */
.a2 { position: fixed; inset: 0; z-index: 120; }
.a2-dim { position: absolute; inset: 0; background: rgba(0,0,0,.4); opacity: 0; transition: opacity .25s; }
.a2-sheet { position: absolute; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto; background: var(--surface); color: var(--text); border-radius: 18px 18px 0 0; padding: 1.1rem 1.2rem calc(1.2rem + env(safe-area-inset-bottom)); box-shadow: 0 -10px 30px rgba(0,0,0,.25); transform: translateY(100%); transition: transform .25s ease; }
.a2.open .a2-dim { opacity: 1; }
.a2.open .a2-sheet { transform: none; }
@media (prefers-reduced-motion: reduce) { .a2-dim, .a2-sheet { transition: none; } }
.a2-top { display: flex; align-items: center; gap: .75rem; }
.a2-top img { width: 48px; height: 48px; border-radius: 11px; box-shadow: 0 0 0 1px var(--line); flex: none; object-fit: contain; background: #fff; padding: 4px; }
.a2-top b { flex: 1; color: var(--heading); font-size: 1rem; line-height: 1.3; }
.a2-x { background: none; border: 0; color: var(--muted); font-size: 1rem; width: 44px; height: 44px; cursor: pointer; flex: none; }
.a2-sheet ol { margin: .9rem 0 0; padding-left: 1.3rem; line-height: 1.9; font-size: .95rem; }
.a2-sheet ol b { color: var(--heading); }
.a2-share { color: #0a84ff; display: inline-flex; vertical-align: -3px; }
.a2-ok { display: block; width: 100%; margin-top: 1rem; min-height: 46px; background: var(--btn); color: var(--btn-text); border: 0; border-radius: 3px; font: inherit; font-weight: 600; cursor: pointer; }

/* ===== "Add to Home Screen" tip (phones only) ===== */
.app-tip { position: fixed; left: 10px; right: 10px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 80; display: flex; align-items: center; gap: .7rem; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 30px rgba(0,0,0,.2); padding: .75rem; transform: translateY(140%); transition: transform .3s ease; }
.app-tip.show { transform: none; }
.app-tip img { width: 42px; height: 42px; border-radius: 10px; flex: none; box-shadow: 0 0 0 1px var(--line); object-fit: contain; background: #fff; padding: 3px; }
.app-tip b { font-size: .88rem; color: var(--heading); }
.app-tip p { font-size: .8rem; color: var(--muted); margin: .15rem 0 0; line-height: 1.35; }
.app-tip > div { flex: 1; min-width: 0; }
.app-tip-share { color: #0a84ff; display: inline-flex; vertical-align: -2px; }
.app-tip-install { font: inherit; font-size: .82rem; font-weight: 600; background: var(--btn); color: var(--btn-text); border: 0; border-radius: 3px; padding: .5rem .8rem; cursor: pointer; }
.app-tip-x { align-self: flex-start; background: none; border: 0; color: var(--muted); font-size: .9rem; padding: .1rem .2rem; cursor: pointer; }
.app-tip > div > b { display: block; line-height: 1.3; }

/* ===== Designed event covers (tone by occasion) ===== */
.cv { position: relative; aspect-ratio: 4 / 3; container-type: inline-size; overflow: hidden; display: block; width: 100%;
  --fg: #f4ecd4; --g: #d4b062; --sub: #dcc285; background: radial-gradient(120% 90% at 50% 40%, #25694f, #123d2d); } /* Celebration: green */
.cv[data-tone="mourn"] { --fg: #efe4c8; --g: #b8923f; --sub: #cfae62; background: radial-gradient(120% 90% at 50% 40%, #24211d, #121110); }
.cv[data-tone="study"] { --fg: #2f2414; --g: #b8923f; --sub: #8a6a2a; background: radial-gradient(120% 90% at 50% 40%, #fbf6ea, #efe4cb); } /* General: parchment */
.cv-frame { position: absolute; inset: 4.5cqw; border: 1px solid var(--g); outline: 1px solid var(--g); outline-offset: -2.2cqw; }
.cv-frame::before, .cv-frame::after { content: ""; position: absolute; left: calc(50% - 1.3cqw); width: 2.6cqw; height: 2.6cqw; background: var(--g); transform: rotate(45deg); top: -1.3cqw; }
.cv-frame::after { top: auto; bottom: -1.3cqw; }
.cv-in { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 12cqw; }
.cv-in small { font-family: var(--sans); font-size: 3.6cqw; letter-spacing: .32em; text-transform: uppercase; color: var(--sub); font-weight: 600; margin-bottom: 2.4cqw; padding-left: .32em; }
.cv-in b { font-family: var(--serif); font-weight: 700; color: var(--fg); font-size: 10.5cqw; line-height: 1.04; }
.cv-l .cv-in b { font-size: 9cqw; }
.cv-xl .cv-in b { font-size: 7.4cqw; }
.cv-in i { display: block; width: 16cqw; height: 1px; background: var(--g); margin: 3.6cqw 0 3cqw; position: relative; }
.cv-in i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 1.8cqw; height: 1.8cqw; background: var(--g); transform: translate(-50%, -50%) rotate(45deg); }
.cv-in span { font-family: var(--sans); font-size: 3.9cqw; letter-spacing: .12em; color: var(--sub); text-transform: uppercase; }
/* Small thumbnails: just the title */
@container (max-width: 170px) {
  .cv-in { padding: 0 10cqw; }
  .cv-in small, .cv-in span { display: none; }
  .cv-in b, .cv-l .cv-in b { font-size: 11.5cqw; }
  .cv-xl .cv-in b { font-size: 9.5cqw; }
  .cv-in i { margin: 3cqw 0 0; }
}
/* Where covers sit */
.ev-row > .cv { flex: 0 0 110px; width: 110px; border-radius: 10px; }
.ev-spot-img { display: block; }
.ev-spot-img .cv { height: 100%; }
.fe-cover .cv, .fe-cover img { width: 100%; border-radius: 12px; }
.fe-cover img { aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.evp-poster .cv { border-radius: 20px; }
@media (max-width: 899px) {
  .ev-row > .cv { flex-basis: 80px; width: 80px; border-radius: 8px; }
  .fe-cover { flex: 0 0 92px; width: 92px; }
  .fe-cover .cv, .fe-cover img { border-radius: 10px; }
  .evp-poster .cv { border-radius: 16px; }
}

/* "In 12 days" countdown on the next event */
.ev-count { display: inline-block; width: max-content; font-family: var(--sans); font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: none; color: var(--btn-text); background: var(--btn); border-radius: 3px; padding: .2rem .55rem; margin: 0 0 .45rem; }
.ev-label .ev-count { margin: 0 0 0 .6rem; vertical-align: 1px; }
@media (max-width: 899px) { .fe .ev-count { width: max-content; align-self: flex-start; display: block; font-size: .66rem; padding: .12rem .45rem; margin: .15rem 0 .2rem; } }

/* ===== Latest clips (own Instagram feed) ===== */
.clips-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: .75rem; }
.clip { position: relative; display: block; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; background: #111; transition: transform .2s; }
.clip:hover { transform: translateY(-3px); }
.clip img, .clip video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.clip video { opacity: 0; transition: opacity .25s; }
.clip.playing video { opacity: 1; }
.clip-pl { position: absolute; left: 10px; top: 10px; width: 30px; height: 30px; border-radius: 50%; background: rgba(0,0,0,.45); color: #fff; display: flex; align-items: center; justify-content: center; transition: opacity .2s; }
.clip-pl svg { width: 14px; height: 14px; }
.clip.playing .clip-pl { opacity: 0; }
.clip-ig { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.6rem .7rem .7rem; background: linear-gradient(transparent, rgba(0,0,0,.72)); color: #fff; font-size: .78rem; font-weight: 600; opacity: 0; transition: opacity .2s; }
.clip:hover .clip-ig { opacity: 1; }
.clips-empty { display: flex; align-items: center; gap: .6rem; padding: 1.1rem 1.25rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--heading); font-weight: 600; text-decoration: none; }
.clips-empty svg { width: 18px; height: 18px; color: var(--accent); }
@media (max-width: 899px) {
  .clips-row { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: .6rem; margin-right: -1rem; padding-right: 1rem; scrollbar-width: none; }
  .clips-row::-webkit-scrollbar { display: none; }
  .clip { flex: 0 0 42%; scroll-snap-align: start; }
  .clip-ig { display: none; }
}
.h-clips .clips { background: none; }

/* Notifications (settings) */
.set-h-gap { margin-top: 1rem; }
.nt-on { font: inherit; font-size: .95rem; font-weight: 600; width: 100%; min-height: 44px; border: 0; border-radius: 6px; background: var(--btn); color: var(--btn-text); display: flex; align-items: center; justify-content: center; gap: .5rem; cursor: pointer; }
.nt-on svg { width: 16px; height: 16px; }
.nt-on:disabled { opacity: .7; cursor: default; }
.nt-list { background: var(--surface); display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.nt-row { font: inherit; text-align: left; display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .6rem .85rem; border: 0; border-top: 1px solid var(--line); min-height: 44px; font-size: .95rem; color: var(--text); background: var(--surface); cursor: pointer; width: 100%; }
.nt-row:first-child { border-top: 0; }
@media (hover: hover) { .nt-row:hover { background: var(--chip); } }
.nt-row small { display: block; color: var(--muted); font-size: .78rem; }
.sw { width: 42px; height: 24px; border-radius: 99px; background: var(--line); position: relative; flex: none; transition: background .15s; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: left .15s; }
.sw.on { background: var(--accent); }
.sw.on::after { left: 21px; }
.nt-off { font: inherit; font-size: .82rem; color: var(--muted); text-decoration: underline; background: none; border: 0; padding: 0; margin: .6rem 0 0; cursor: pointer; }
.nt-msg { color: var(--accent); }
.nt-chips { display: flex; flex-wrap: wrap; gap: .4rem; padding: .15rem .85rem .7rem; background: var(--surface); }
.nt-chip { font: inherit; font-size: .85rem; border: 1px solid var(--line); border-radius: 99px; padding: .35rem .8rem; min-height: 36px; background: none; color: var(--muted); cursor: pointer; }
.nt-chip.on { background: var(--btn); color: var(--btn-text); border-color: var(--btn); }
.nt-when { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; margin: 0 .85rem .8rem; border: 1px solid var(--line); border-radius: 4px; padding: 3px; }
.nt-when button { font: inherit; font-size: .82rem; border: 0; background: none; color: var(--muted); padding: .4rem; border-radius: 2px; cursor: pointer; min-height: 36px; }
.nt-when button.on { background: var(--btn); color: var(--btn-text); }
.nt-place { display: inline-flex; align-items: center; gap: .25rem; }
.nt-place svg { width: 12px; height: 12px; }

/* ================= Prayer reminders strip (home page prayer card) ================= */
.pn-strip { font: inherit; width: 100%; display: flex; align-items: center; gap: .55rem; margin: .9rem 0 0; padding: .7rem .85rem; border: 0; border-radius: 10px; background: var(--chip); color: var(--heading); font-size: .9rem; text-align: left; cursor: pointer; min-height: 44px; }
.pn-strip svg { width: 18px; height: 18px; color: var(--accent); flex: none; }
.pn-strip span { flex: 1; }
.pn-strip b { color: var(--accent); font-weight: 600; white-space: nowrap; }
.pn-strip.on { background: none; padding: .75rem 0 0; border-top: 1px solid var(--line); border-radius: 0; color: var(--muted); }
.nt-panel { width: 320px; }
.nt-panel .loc-title { display: block; font-family: var(--serif); font-weight: 700; font-size: 1.3rem; color: var(--heading); margin: .2rem .3rem .6rem; }
.nt-done { font: inherit; font-weight: 600; width: 100%; min-height: 44px; margin: .8rem 0 0; border: 1px solid var(--line2); border-radius: 6px; background: var(--surface); color: var(--heading); cursor: pointer; }
.nt-big { font-size: .9rem; color: var(--text); margin-top: 0; }
.nt-steps { margin: .5rem 0 0; padding-left: 1.3rem; font-size: .9rem; color: var(--text); line-height: 1.7; }
@media (max-width: 899px) { .nt-panel { width: auto; } }

.p-bell { display: flex; align-items: center; justify-content: center; gap: 2px; height: 15px; margin-top: 2px; font-style: normal; font-size: .64rem; font-weight: 700; color: var(--accent); }
.p-bell svg { width: 11px; height: 11px; }
/* ================= Add to calendar ================= */
.cal-wrap { position: relative; display: flex; }
.ev-btn svg { width: 16px; height: 16px; margin-right: .4rem; }
.cal-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 20; min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 34px rgba(0,0,0,.16); padding: .35rem; }
.cal-menu[hidden] { display: none; }
.cal-menu a { display: flex; align-items: center; gap: .6rem; padding: .7rem .75rem; border-radius: 8px; color: var(--text); text-decoration: none; font-size: .95rem; }
.cal-menu a:hover { background: var(--chip); }
.cal-menu svg { width: 16px; height: 16px; color: var(--accent); }
@media (max-width: 600px) { .evp-main .ev-btns .cal-wrap { flex: 1 1 100%; } .evp-main .ev-btns .cal-wrap .ev-btn { width: 100%; } }

/* ================= Monthly prayer timetable ================= */
.tt-link { text-decoration: none; }
.tt-page { max-width: 820px; margin: 0 auto; }
.tt-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.tt-title { margin: .2rem 0 .1rem; }
.tt-sub { margin: 0; color: var(--muted); font-size: .9rem; }
.tt-ctrl { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.tt-nav { font: inherit; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--accent); font-size: 1.3rem; cursor: pointer; }
.tt-print { min-height: 40px; }
.tt-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: .4rem .6rem; overflow-x: auto; }
.tt-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tt-table th { font-family: var(--serif); color: var(--heading); font-weight: 700; padding: .55rem .3rem; border-bottom: 1px solid var(--line); text-align: center; }
.tt-table td { text-align: center; padding: .42rem .3rem; border-bottom: 1px solid var(--line); color: var(--text); font-variant-numeric: tabular-nums; }
.tt-table th:first-child, .tt-table td:first-child { text-align: left; white-space: nowrap; }
.tt-table td:first-child small { margin-left: .4rem; color: var(--muted); font-size: .74rem; }
.tt-table tr:last-child td { border-bottom: 0; }
.tt-table tr.past td { color: var(--muted); }
.tt-table tr.today td { background: var(--chip); font-weight: 600; }
.tt-star { color: var(--accent); font-size: .8rem; }
.tt-keys { margin-top: 1rem; font-size: .9rem; }
.tt-keys b { color: var(--accent); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.tt-keys p { margin: .35rem 0 0; } .tt-keys p span { display: inline-block; min-width: 4rem; color: var(--muted); }
.tt-note { color: var(--muted); font-size: .8rem; margin-top: .9rem; }
@media (max-width: 600px) {
  .tt-table { font-size: .8rem; }
  .tt-table th { font-size: .78rem; padding: .45rem .15rem; }
  .tt-table td { padding: .38rem .15rem; }
  .tt-table td:first-child small { display: block; margin: 0; }
}
@media print {
  .prayer-bar, #site-header, #site-footer, .tt-ctrl, .app-tip, .a2, .loc-sheet, .tt-note { display: none !important; }
  body { background: #fff !important; }
  .tt-page { max-width: none; }
  .tt-wrap { border: 0; padding: 0; }
  .tt-table { font-size: 10px; }
  .tt-table td, .tt-table th { padding: 1.5px 4px; color: #000 !important; opacity: 1 !important; }
  .tt-table td:first-child small { display: inline; margin-left: .4rem; }
  .page { padding: 0 !important; margin: 0 !important; }
  .tt-title { font-size: 22px !important; }
  .tt-top { margin-bottom: 6px; }
  .tt-keys { font-size: 10px; margin-top: 6px; }
  .tt-table tr.today td { background: none; font-weight: 400; }
  @page { margin: 12mm; }
}

/* Timetable preview (download as PDF / print) */
.tt-print svg, .ttp-btns svg { width: 17px; height: 17px; margin-right: .45rem; }
.ttp-sheet[hidden] { display: none; }
.ttp-dim { position: fixed; inset: 0; z-index: 95; background: rgba(20,19,18,.55); }
.ttp-panel { position: fixed; z-index: 96; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); display: flex; flex-direction: column; background: var(--surface); border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.3); padding: .8rem; }
.ttp-head { display: flex; justify-content: space-between; align-items: center; padding: 0 .2rem .5rem; }
.ttp-head b { font-family: var(--serif); font-size: 1.3rem; color: var(--heading); }
.ttp-head .np-x { display: block; position: static; }
.ttp-page { flex: 1; overflow: auto; background: #e9e4d8; border-radius: 8px; padding: .6rem; text-align: center; min-height: 200px; }
.ttp-img { width: 100%; height: auto; display: block; box-shadow: 0 2px 10px rgba(0,0,0,.15); background: #fff; }
.ttp-wait { color: var(--muted); padding: 3rem 0; }
.ttp-btns { display: flex; gap: .6rem; padding-top: .7rem; }
.ttp-btns .ev-btn { flex: 1; }
html.menu-lock, html.menu-lock body { overflow: hidden; overscroll-behavior: none; }
@media print {
  html.ttp-open body > *:not(.ttp-sheet) { display: none !important; }
  html.ttp-open .ttp-dim, html.ttp-open .ttp-head, html.ttp-open .ttp-btns { display: none !important; }
  html.ttp-open .ttp-panel { position: static; transform: none; width: auto; max-height: none; box-shadow: none; padding: 0; background: #fff; }
  html.ttp-open .ttp-page { background: #fff; padding: 0; overflow: visible; }
  html.ttp-open .ttp-img { box-shadow: none; width: 100%; }
  html.ttp-open body { position: static !important; }
}

/* ================= Notifications panel ================= */
.nt-nav { font: inherit; width: 100%; display: flex; align-items: center; gap: .55rem; padding: .6rem .8rem; min-height: 44px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); font-size: .95rem; text-align: left; cursor: pointer; }
.nt-nav svg { width: 17px; height: 17px; color: var(--accent); flex: none; }
.nt-nav span { flex: 1; }
.nt-nav small { color: var(--muted); font-size: .8rem; }
.nt-nav b { color: var(--accent); font-size: 1.1rem; line-height: 1; }
.nt-sheet .nt-panel { width: auto; padding: .6rem 1rem calc(1.2rem + env(safe-area-inset-bottom)); max-height: 88vh; overflow-y: auto; }
.np-title { font-family: var(--serif); font-weight: 700; font-size: 1.45rem; color: var(--heading); margin: 0 0 .05rem; }
.np-sub { font-size: .82rem; color: var(--muted); margin: 0 0 .7rem; }
.np-x { display: none; position: absolute; top: .7rem; right: .8rem; font: inherit; font-size: 1.05rem; border: 0; background: none; color: var(--muted); cursor: pointer; width: 36px; height: 36px; border-radius: 50%; }
.np-x:hover { background: var(--chip); }
.np-h { display: flex; justify-content: space-between; align-items: baseline; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 700; margin: .9rem .15rem .4rem; }
.np-h em { font-style: normal; text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--muted); font-size: .75rem; }
.np-grp { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.np-it { display: flex; align-items: center; gap: .6rem; padding: .45rem .8rem; min-height: 52px; border-top: 1px solid var(--line); }
.np-it:first-child { border-top: 0; }
.np-nm { flex: 1; font-size: .97rem; line-height: 1.25; color: var(--text); }
.np-nm small { display: block; color: var(--muted); font-size: .78rem; }
.np-pill { font: inherit; font-size: .76rem; font-weight: 600; white-space: nowrap; border: 1px solid var(--line); background: var(--chip); color: var(--accent); border-radius: 99px; padding: .3rem .7rem; min-height: 30px; cursor: pointer; }
.np-pill.ghost { visibility: hidden; }
.sw-btn { border: 0; background: none; padding: 6px 0; cursor: pointer; display: flex; }
.np-chips { display: flex; gap: .4rem; padding: 0 .8rem .6rem; }
.np-chip { font: inherit; font-size: .78rem; font-weight: 600; border: 1px solid var(--line); border-radius: 99px; padding: .3rem .75rem; min-height: 32px; background: var(--surface); color: var(--muted); cursor: pointer; }
.np-chip.on { background: var(--btn); color: var(--btn-text); border-color: var(--btn); }
.np-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .9rem; }
.np-foot .nt-off { margin: 0; }
.np-done { font: inherit; font-weight: 600; font-size: .95rem; border: 0; border-radius: 8px; background: var(--btn); color: var(--btn-text); min-height: 42px; padding: 0 1.4rem; cursor: pointer; }
@media (min-width: 900px) {
  .nt-sheet .loc-dim { background: rgba(20,19,18,.35); }
  .nt-sheet .nt-panel { position: fixed; top: 50% !important; left: 50% !important; transform: translate(-50%, -50%); width: 420px; padding: 1.2rem 1.3rem 1.1rem; border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
  .np-x { display: block; }
}

/* ================= Browser-forced dark mode (e.g. Samsung Internet) =================
   Samsung Internet darkens anything light on the page. When it's on, the site switches to its own
   dark design (see the script at the top of each page) and swaps the light buttons for dark ones,
   so there's nothing left for the browser to darken. */
html.auto-dark[data-theme="dark"] { --btn: #2a2620; --btn-text: #e3c879; }
html.auto-dark .btn-navy, html.auto-dark .ev-btn:not(.ev-btn-o), html.auto-dark .ev-filter button[aria-pressed="true"],
html.auto-dark .set-seg button.on, html.auto-dark .app-tip-install, html.auto-dark .a2-ok, html.auto-dark .nt-on, html.auto-dark .nt-chip.on,
html.auto-dark .nt-when button.on, html.auto-dark .np-done, html.auto-dark .np-chip.on, html.auto-dark .pn-strip:not(.on), html.auto-dark .ev-count:not(.h-kd-list .ev-count) { box-shadow: inset 0 0 0 1px #8a7440; }
html.auto-dark .btn-gold, html.auto-dark .btn-donate, html.auto-dark .btn-donate:hover { background: #2a2620; color: #e3c879 !important; box-shadow: inset 0 0 0 1px #c9a54f, 0 0 14px rgba(217,185,104,.25); }

/* ---------- Less gold: gold kept for Donate, Support our work and the next prayer ---------- */
.main-nav > a:hover, .main-nav > a.active { border-bottom-color: currentColor; }
.site-footer { border-top: 1px solid var(--line); }
.h-times span { color: var(--heading); }
.h-times .next b, .h-times .next span { color: var(--accent); }
.h-head a, html[data-theme="dark"] .h-head a { color: var(--heading); }
.fe-when, .fe-label, .h-np small { color: var(--muted); }
.fe-more { border-bottom-color: currentColor; }
.pn-strip svg, .pn-strip b { color: var(--heading); }
.h-support a { color: var(--accent); border-bottom: 0; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.h-support a:hover { color: var(--accent); text-decoration-thickness: 2px; }
.h-support a i { font-style: normal; display: inline-block; transition: transform .2s; }
.h-support a:hover i { transform: translateX(5px); }
@media (max-width: 899px) { .h-tabs button[aria-selected="true"] { box-shadow: inset 0 -3px 0 var(--heading); } }
/* Donate page: make the Donorbox form sit as a neat card (no white strip beside it) */
.dn-form iframe { width: 100%; max-width: 424px !important; border-radius: 14px; box-shadow: 0 8px 28px rgba(0,0,0,.18); }
html[data-theme="dark"] .dn-form iframe { box-shadow: 0 8px 28px rgba(0,0,0,.45); }

/* ---------- Donate box (our own, paid through Stripe) ---------- */
.dz { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 1.6rem; max-width: 520px; width: 100%; margin: 0 auto; }
.dz-title { font-family: var(--serif); font-weight: 600; font-size: 1.7rem; color: var(--heading); margin: 0 0 1rem; line-height: 1.2; }
.dz button { font: inherit; color: inherit; cursor: pointer; }
.dz-seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin-bottom: .6rem; }
.dz-seg button { border: 0; background: none; padding: .65rem; border-radius: 999px; font-weight: 600; color: var(--muted); }
.dz-seg button.on { background: var(--btn); color: var(--btn-text); }
.dz-hint { color: var(--muted); font-size: .9rem; text-align: center; margin: 0 0 1.2rem; min-height: 1.4em; }
.dz-amts { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-bottom: .7rem; }
.dz-amts button { border: 1px solid var(--line); background: var(--input); border-radius: 12px; padding: 1rem 0; font-size: 1.25rem; font-weight: 500; }
.dz-amts button.on { border-color: var(--btn); background: var(--btn); color: var(--btn-text); }
.dz-custom { display: flex; align-items: center; gap: .4rem; border: 1px solid var(--line); background: var(--input); border-radius: 12px; padding: 0 1rem; margin-bottom: 1.3rem; }
.dz-custom.on { border-color: var(--btn); }
.dz-custom span { color: var(--muted); font-size: 1.2rem; }
.dz-custom input { flex: 1; min-width: 0; border: 0; background: none; color: var(--text); font: inherit; font-size: 1.1rem; padding: .95rem 0; outline: none; }
.dz .dz-go { width: 100%; border: 0; background: var(--gold); color: #1a1814; font-weight: 600; font-size: 1.15rem; padding: 1.05rem; border-radius: 6px; transition: opacity .15s; }
.dz .dz-go:disabled { opacity: .5; cursor: default; }
.dz-safe { display: flex; align-items: center; justify-content: center; gap: .45rem; color: var(--muted); font-size: .84rem; margin: .9rem 0 0; }
.dz-safe svg { width: 15px; height: 15px; }
.dz .dz-back { background: none; border: 0; padding: 0; font-weight: 600; color: var(--text); margin-bottom: .9rem; }
.dz-sum { display: flex; justify-content: space-between; align-items: center; background: var(--chip); border-radius: 12px; padding: .8rem 1rem; margin-bottom: 1.1rem; }
.dz-sum b { font-size: 1.1rem; }
.dz-sum button { background: none; border: 0; color: var(--muted); text-decoration: underline; font-size: .9rem; }
.dz form label { display: block; }
.dz form label span { display: block; font-size: .88rem; color: var(--muted); margin: 0 0 .3rem; }
.dz form label input { width: 100%; border: 1px solid var(--line2); background: var(--input); color: var(--text); border-radius: 10px; padding: .8rem .9rem; font: inherit; font-size: 1rem; margin-bottom: .8rem; outline: none; }
.dz form label input:focus { border-color: var(--btn); }
.dz-two { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.dz-pay { margin: .3rem 0 1rem; min-height: 120px; }
.dz-loading { color: var(--muted); text-align: center; padding: 2.2rem 0; margin: 0; font-size: .95rem; }
.dz-error { color: #b3261e; background: rgba(179,38,30,.08); border-radius: 10px; padding: .7rem .9rem; margin: 0 0 .9rem; font-size: .95rem; }
html[data-theme="dark"] .dz-error { color: #f08a96; background: rgba(240,138,150,.1); }
.dz-fine { color: var(--muted); font-size: .84rem; text-align: center; margin: .8rem 0 0; }
.dz-fine:empty { display: none; }
.dz-done { text-align: center; padding: 1rem 0; outline: none; }
.dz-tick { width: 58px; height: 58px; border-radius: 50%; border: 2px solid var(--accent); color: var(--accent); display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; font-size: 1.6rem; }
.dz-done p { color: var(--muted); line-height: 1.55; margin: 0 0 .6rem; }
.dz-manage { text-align: center; color: var(--muted); font-size: .9rem; margin: 1.2rem 0 0; }
.dz-manage a { color: var(--text); font-weight: 600; }
@media (max-width: 600px) {
  .dz { padding: 1.2rem; border-radius: 18px; }
  .dz-amts button { padding: .85rem 0; font-size: 1.15rem; }
}
/* The standalone /give page: just the logo and the donate box */
.give-page { background: var(--page); min-height: 100vh; }
.give-wrap { max-width: 560px; margin: 0 auto; padding: 1.6rem 1rem 3rem; }
.give-logo { display: block; width: 84px; margin: 0 auto .6rem; }
html[data-theme="dark"] .give-logo { content: url("../images/logo-red.png"); }
.give-wrap h1 { font-family: var(--serif); font-weight: 500; font-size: 2.2rem; color: var(--heading); text-align: center; margin: 0 0 .3rem; line-height: 1.15; }
.give-sub { text-align: center; color: var(--muted); margin: 0 0 1.4rem; }
.give-foot { text-align: center; font-size: .85rem; color: var(--muted); margin-top: 1.6rem; }
.give-foot a { color: var(--muted); }

/* ---------- Hero line: slightly smaller and lighter ---------- */
.h-slogan { font-size: 1.25rem; text-wrap: balance; }
@media (max-width: 899px) { .home main .h-slogan { font-size: 1.4rem; font-weight: 600; } }

/* ---------- Compact footer on phones ---------- */
@media (max-width: 899px) {
  .site-footer { padding: 1.6rem 6% 1rem; }
  .footer-inner { gap: 1.1rem; }
  .footer-brand { display: flex; align-items: center; justify-content: center; gap: .9rem; text-align: left; }
  .footer-brand .logo img { height: 56px; margin: 0; }
  .footer-brand p { margin: 0; font-size: .85rem; line-height: 1.5; }
  .footer-cta p { display: none; }
  .footer-cta .socials { font-size: 1.3rem; gap: 1.5rem; margin: 0; }
  .footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: .15rem 1rem; font-size: .82rem; line-height: 1.7; }
  .copyright { font-size: .78rem; margin-top: 1rem; padding-top: .8rem; }
}

/* ---------- Phone menu: compact, centred links; one-line settings; pinned header ---------- */
@media (max-width: 900px) {
  .site-header.menu-open { position: fixed; left: 0; right: 0; z-index: 60; }
  .menu-dim { position: fixed; inset: 0; z-index: 55; background: rgba(10,12,20,.45); }
  .menu-dim[hidden] { display: none; }
  .main-nav { flex-direction: row; flex-wrap: wrap; justify-content: center; align-content: flex-start; gap: .2rem 1.4rem; padding: 1.1rem 18px 1rem; box-shadow: 0 14px 28px rgba(11,31,63,.12); }
  .main-nav > a { font-family: var(--serif); font-size: 1.45rem; font-weight: 600; letter-spacing: 0; padding: .15rem 0; border-bottom: 2px solid transparent; }
  .main-nav > a.active { border-bottom-color: var(--gold); }
  .menu-extras { flex-basis: 100%; }
  .mset { margin: .7rem 0 0; background: var(--page); border: 1px solid var(--line); border-radius: 14px; padding: 0 .9rem; text-align: left; }
  .mrow { display: flex; align-items: center; gap: .7rem; min-height: 50px; border-top: 1px solid var(--line); font-size: .98rem; color: var(--text); }
  .mrow:first-child { border-top: 0; }
  .mrow > svg { width: 19px; height: 19px; color: var(--muted); flex: none; }
  .mrow b { font-weight: 600; color: var(--heading); }
  .mrow .loc-btn { margin-left: auto; }
  .mrow-btn { width: 100%; font: inherit; background: none; border: 0; border-top: 1px solid var(--line); padding: 0; cursor: pointer; text-align: left; }
  .mrow-btn small { margin-left: auto; color: var(--muted); font-size: .92rem; }
  .mrow-btn > svg:last-child { width: 15px; height: 15px; color: var(--muted); }
  .mseg { margin-left: auto; display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
  .mseg button { font: inherit; font-size: .85rem; border: 0; background: none; color: var(--muted); padding: .35rem .7rem; border-radius: 999px; cursor: pointer; min-height: 32px; }
  .mseg button.on { background: var(--btn); color: var(--btn-text); }
}
html[data-theme="dark"] .menu-dim { background: rgba(0,0,0,.55); }

/* ---------- Prayer box: reminders and timetable side by side ---------- */
.pa { display: grid; grid-template-columns: 1fr 1fr; margin: .9rem 0 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pa-cell { display: flex; }
.pa-cell:first-child { border-right: 1px solid var(--line); }
.pa-cell:empty { display: none; }
.pa:has(.pa-cell:empty) { grid-template-columns: 1fr; }
.pa a.pa-cell, .pa-cell button { font: inherit; flex: 1; display: flex; align-items: center; justify-content: center; gap: .45rem; min-height: 46px; padding: 0 .4rem; color: var(--heading); font-size: .92rem; font-weight: 500; text-decoration: none; background: none; border: 0; cursor: pointer; white-space: nowrap; }
.pa svg { width: 17px; height: 17px; color: var(--muted); flex: none; }
.pa a.pa-cell:hover, .pa-cell button:hover { color: var(--accent); }
.pa-narrow { display: none; }
@media (max-width: 600px) { .pa-wide { display: none; } .pa-narrow { display: inline; } }
.home .h-kd-next { margin: 0; padding-top: .6rem; border-top: 0; font-size: .8rem; text-align: center; }

/* ---------- Phone hero: name above the line, like desktop ---------- */
@media (max-width: 899px) {
  .home main .h-name { display: block; font-size: 2.5rem; line-height: 1.05; margin: 0 0 .45rem; }
  .home main .h-slogan { font-size: 1.15rem; font-weight: 500; color: var(--muted); margin-bottom: 1.2rem; }
}
/* ---------- Design polish (Impeccable pass) ---------- */
/* Donate buttons: navy text on gold so the label is easy to read; a soft neutral shadow instead of a gold glow */
.btn-donate, .site-footer a.btn-donate { color: var(--navy) !important; box-shadow: 0 2px 6px rgba(0,0,0,.14); }
.btn-donate:hover { box-shadow: 0 4px 12px rgba(0,0,0,.18); }
/* Quote boxes and event details: an even, quiet border instead of a thick gold edge */
.ab-quote, .dn-quote { border-left: 1px solid var(--line); }
.event-details { border: 1px solid var(--line); border-radius: 14px; }
.event-card .date, .featured-body .date { border-left: 0; padding-left: 0; }
/* Hero line: a little more space between lines when it wraps */
.h-slogan { line-height: 1.3; }
/* Browser details that carry the design: text selection, focus rings, form controls */
::selection { background: rgba(201,167,79,.35); color: inherit; }
:focus-visible { outline: 2px solid var(--heading); outline-offset: 3px; border-radius: 3px; }
:root { accent-color: var(--navy); caret-color: var(--heading); }
html[data-theme="dark"] { accent-color: var(--gold); }
/* Comfortable reading width for longer text (about 70 characters a line) */
.pol { max-width: 680px; }
.ab-prose { max-width: 68ch; margin-left: auto; margin-right: auto; }
.ab-frame { max-width: 640px; margin-left: auto; margin-right: auto; }
.ab-tag { max-width: 30ch; margin-left: auto; margin-right: auto; text-wrap: balance; }
.ab-close { max-width: 560px; margin-left: auto; margin-right: auto; }

/* ---------- Lectures page (A1: play here + list) ---------- */
.lx { margin-top: 1.4rem; }
.lx-play { position: relative; display: block; width: 100%; padding: 0; border: 0; cursor: pointer; background: #0b1f3f; aspect-ratio: 16/9; border-radius: 14px; overflow: hidden; }
.lx-play img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lx-feat .video { aspect-ratio: 16/9; border-radius: 14px; overflow: hidden; background: #000; }
.lx-feat .video iframe { width: 100%; height: 100%; border: 0; display: block; }
.lx-big, .lx-pi { position: absolute; inset: 0; margin: auto; border-radius: 50%; background: rgba(255,255,255,.94); color: #0b1f3f; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.lx-big { width: 62px; height: 62px; } .lx-big .i-play { width: 22px; height: 22px; margin-left: 3px; }
.lx-pi { width: 30px; height: 30px; box-shadow: 0 2px 6px rgba(0,0,0,.25); } .lx-pi .i-play { width: 11px; height: 11px; margin-left: 2px; }
.lx-t { font-family: var(--serif); font-weight: 600; color: var(--heading); font-size: 1.85rem; line-height: 1.12; margin: .95rem 0 .2rem; }
.lx-m { color: var(--muted); font-size: .9rem; margin: 0; }
.lx-s { margin: .6rem 0 0; }
.lx-acts { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin-top: 1.05rem; }
.lx-b1, .lx-b2 { display: inline-flex; align-items: center; gap: .45rem; min-height: 48px; padding: 0 1.25rem; border-radius: 4px; font: inherit; font-weight: 600; cursor: pointer; }
.lx-b1 { background: var(--navy); color: #fff; border: 0; }
.lx-b2 { background: var(--surface); color: var(--heading); border: 1px solid var(--line); font-weight: 500; }
.lx-b1 .i-play, .lx-b2 svg { width: 16px; height: 16px; }
.lx-more { color: var(--heading); font-size: .92rem; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.lx-list { margin-top: 2.3rem; }
.lx-list h2 { font-family: var(--serif); font-weight: 600; color: var(--heading); font-size: 1.6rem; margin: 0 0 .35rem; }
.lx-row { display: grid; grid-template-columns: 132px 1fr; gap: .85rem; align-items: center; width: 100%; padding: .65rem 0; background: none; border: 0; border-top: 1px solid var(--line); text-align: left; font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.lx-th { position: relative; display: block; aspect-ratio: 16/9; border-radius: 9px; overflow: hidden; background: #0b1f3f; }
.lx-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lx-row b { display: block; font-family: var(--serif); font-weight: 600; font-size: 1.16rem; line-height: 1.15; color: var(--heading); }
.lx-row small { display: block; color: var(--muted); font-size: .84rem; margin-top: .15rem; }
.lx-row.cur b { color: var(--accent); }
.lx-row.cur small::before { content: "Now showing · "; color: var(--accent); font-weight: 500; }
@media (hover: hover) { .lx-row:hover b { color: var(--accent); } }
@media (min-width: 900px) {
  .lx { display: grid; grid-template-columns: 1.55fr 1fr; gap: 2.5rem; align-items: start; }
  .lx-list { margin-top: 0; position: sticky; top: 7rem; max-height: calc(100vh - 8rem); overflow: auto; padding-right: .4rem; scrollbar-width: thin; }
  .lx-t { font-size: 2.3rem; }
  .lx-row { grid-template-columns: 150px 1fr; }
}
[data-theme="dark"] .lx-b1 { background: #efe2bf; color: #1a1814; }

/* ---------- Lecture references (fold-out under the lecture) ---------- */
.lx-refs { margin-top: 1.3rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.lx-refs summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .95rem 1.1rem; cursor: pointer; list-style: none; -webkit-tap-highlight-color: transparent; }
.lx-refs summary::-webkit-details-marker { display: none; }
.lx-refs summary b { font-family: var(--serif); font-weight: 600; font-size: 1.3rem; color: var(--heading); }
.lx-refs summary span { color: var(--muted); font-size: .88rem; display: inline-flex; align-items: center; gap: .45rem; }
.lx-refs summary span::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
.lx-refs[open] summary span::after { transform: rotate(-135deg) translateY(-2px); }
.lx-refs > :not(summary) { margin-left: 1.1rem; margin-right: 1.1rem; }
.lx-rg { font-size: .8rem; font-weight: 600; color: var(--muted); margin-top: .4rem; margin-bottom: .1rem; }
.lx-refs ul { list-style: none; padding: 0; margin-top: 0; margin-bottom: .4rem; }
.lx-refs li { display: grid; grid-template-columns: auto 1fr; gap: .75rem; align-items: baseline; padding: .55rem 0; border-top: 1px solid var(--line); font-size: .95rem; }
.lx-refs li:first-child { border-top: 0; }
.lx-ts { font: inherit; font-size: .8rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--heading); background: var(--bg-alt, rgba(201,167,79,.12)); border: 1px solid var(--line); border-radius: 99px; padding: .2rem .6rem; min-width: 3.6rem; cursor: pointer; }
.lx-ts.none { display: none; }
.lx-refs ul:has(.lx-ts:not(.none)) .lx-ts.none { display: block; visibility: hidden; padding: 0; border: 0; min-width: 3.6rem; }
.lx-rn { font-size: .8rem; color: var(--muted); margin-top: .2rem; margin-bottom: 1rem; }
.lx-refs > ul:last-of-type { margin-bottom: 1rem; }
.lx-rc { display: block; font-style: normal; font-size: .78rem; color: var(--accent); margin-top: .1rem; }
