/* Prayer times – mobile-first, light/dark, LTR + RTL */
:root {
  --bg: #faf8f3; --card: #ffffff; --ink: #14231c; --muted: #56655d; --line: #e6e1d4; --soft: #f1efe7;
  --green: #0f5c46; --green-2: #137257; --deep: #0a3f30; --gold: #c9a227; --gold-ink: #7a5d0c; --gold-soft: #f7f0dc; --next: #e6f2ec;
  --radius: 16px; --shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 20px rgba(11,74,51,.06);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Noto Sans", "Noto Sans Arabic", Tahoma, Arial, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] { --bg: #0d1512; --card: #15201b; --ink: #e8efe9; --muted: #9db0a5; --line: #26352e; --green: #3fbf88; --green-2: #5fd3a0; --deep: #0f2b20; --gold: #e2b65a; --gold-ink: #e8c46e; --gold-soft: #2a2516; --next: #1d3328; color-scheme: dark; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--ink); line-height: 1.55; font-size: 16px; padding-bottom: 72px; }
a { color: var(--green-2); }
a:hover { color: var(--gold-ink); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--card); padding: 8px 12px; z-index: 50; }
.skip:focus { top: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.small { font-size: .86rem; color: var(--muted); }

/* header */
.top { background: var(--deep); color: #fff; position: sticky; top: 0; z-index: 20; }
:root[data-theme="dark"] .top { background: #0f2b20; }
.top-in { display: flex; align-items: center; gap: 12px; min-height: 58px; }
.brand { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.brand svg { width: 30px; height: 30px; }
.mainnav { display: none; gap: 4px; margin-inline-start: 12px; }
.mainnav a { color: #e9f3ee; text-decoration: none; padding: 8px 10px; border-radius: 10px; font-size: .95rem; }
.mainnav a:hover, .mainnav a[aria-current] { background: rgba(255,255,255,.12); color: #fff; }
.tools { margin-inline-start: auto; display: flex; align-items: center; gap: 6px; }
.lang { color: #fff; text-decoration: none; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; padding: 4px 12px; font-size: .9rem; }
.langmenu { position: relative; }
.langmenu summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.langmenu summary::-webkit-details-marker { display: none; }
.langmenu summary svg { width: 16px; height: 16px; }
.langmenu ul { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.18); list-style: none; margin: 0; padding: 6px; min-width: 170px; max-height: 70vh; overflow-y: auto; z-index: 40; }
.langmenu li a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.langmenu li a:hover, .langmenu li a[aria-current] { background: var(--soft, #f3f3f3); font-weight: 600; }
.foot-langs a { margin: 0 2px; }
.icon-btn { background: transparent; border: 0; color: #fff; width: 40px; height: 40px; border-radius: 10px; display: none; place-items: center; cursor: pointer; }
.icon-btn svg { width: 22px; height: 22px; }

/* main */
main { padding-top: 14px; }
h1 { font-size: 1.55rem; line-height: 1.25; margin: 6px 0 12px; color: var(--green); }
h2 { font-size: 1.12rem; margin: 0 0 10px; }
.lead { color: var(--muted); margin-top: -4px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; font-size: .85rem; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-inline-end: 6px; }
[dir="rtl"] .crumbs li + li::before { content: "‹"; }
.crumbs a { color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin: 0 0 14px; }
.grid2 { display: grid; gap: 14px; }
.grid2 .card { margin: 0; }
.grid2 { margin-bottom: 14px; }

/* times card – the most important block */
.times-card { background-image: linear-gradient(var(--card), var(--card)), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cpath d='M30 4l7 19 19 7-19 7-7 19-7-19-19-7 19-7z' fill='none' stroke='%23b8892b' stroke-opacity='.18'/%3E%3C/svg%3E"); background-clip: padding-box, border-box; border-top: 4px solid var(--gold); }
.dates { color: var(--muted); font-size: .92rem; display: flex; flex-wrap: wrap; gap: 6px; }
.dates .dot { opacity: .6; }
.next { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin: 10px 0 12px; padding: 12px 14px; border-radius: 12px; background: var(--gold-soft); }
.next .lbl { font-size: .85rem; color: var(--muted); width: 100%; }
.next strong { font-size: 1.5rem; color: var(--green); }
.next [data-next-time] { font-size: 1.2rem; font-weight: 600; }
.next .cd { margin-inline-start: auto; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--gold-ink); }
.daynav { display: flex; gap: 8px; align-items: center; margin: 0 0 10px; flex-wrap: wrap; }
.daynav input { flex: 1 1 150px; min-width: 0; }
table { width: 100%; border-collapse: collapse; }
.times th, .times td { white-space: nowrap; padding: 11px 8px; border-bottom: 1px solid var(--line); text-align: start; font-variant-numeric: tabular-nums; }
.times thead th { font-size: .8rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .02em; }
[dir="rtl"] .times thead th { text-transform: none; letter-spacing: 0; }
.times tbody th { font-weight: 600; white-space: normal; }
.times td.t { font-weight: 700; font-size: 1.08rem; }
.times tr.is-next { background: var(--next); }
.times tr.is-next th { color: var(--green); }
.times tr.is-next th::after { content: " ●"; color: var(--gold); font-size: .7em; vertical-align: middle; }
.times tr.row-sunrise { color: var(--muted); }
.times.wide td, .times.wide th { white-space: nowrap; }
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.meta { margin: 10px 0 0; color: var(--muted); font-size: .88rem; }
.kv th, .kv td { padding: 8px 4px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
.kv th { font-weight: 500; color: var(--muted); }
.kv td { font-weight: 700; white-space: nowrap; text-align: end; font-variant-numeric: tabular-nums; }
.pair { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.pair strong { font-size: 1.15rem; font-variant-numeric: tabular-nums; }

/* prayer page */
.hero-prayer .big, .ramadan-card .big { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0 6px; }
.hero-prayer .big > div, .ramadan-card .big > div { background: var(--gold-soft); border-radius: 12px; padding: 14px; text-align: center; }
.hero-prayer .big .lbl, .ramadan-card .big .lbl { display: block; color: var(--muted); font-size: .85rem; }
.hero-prayer .big strong, .ramadan-card .big strong { font-size: 2rem; color: var(--green); font-variant-numeric: tabular-nums; }
.cd-line { font-weight: 600; color: var(--gold-ink); text-align: center; margin: 6px 0 0; }

/* chips, lists */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-block; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--soft, #fff); color: var(--ink); text-decoration: none; font-size: .93rem; }
.chip:hover { border-color: var(--gold); color: var(--green); }
.chip.strong { background: var(--green); color: #fff; border-color: var(--green); }
.near { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 6px; }
.near li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.near span { color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; }
details { border-bottom: 1px solid var(--line); padding: 10px 0; }
summary { cursor: pointer; font-weight: 600; }
details p { margin: 8px 0 0; color: var(--muted); }

/* home */
.pick { display: flex; gap: 8px; flex-wrap: wrap; }
.pick select { flex: 1 1 200px; }
.city-name { font-size: 1.35rem; margin: 10px 0 2px; color: var(--green); }
.loc-status { color: var(--muted); font-size: .9rem; margin: 6px 0 0; min-height: 0; }
.loc-status:empty { display: none; }
.countries { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.country { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); background: var(--soft, #fff); }
.country .cflag { grid-row: span 2; width: 36px; height: 24px; border-radius: 3px; align-self: center; }
.country small { color: var(--muted); }
.country:hover { border-color: var(--gold); }

/* qibla */
.compass-wrap { display: grid; place-items: center; margin: 14px 0 6px; }
.compass { width: min(280px, 80vw); height: auto; }
.needle { transform-origin: 100px 100px; transition: transform .4s ease; fill: var(--gold); }
.qibla-read { text-align: center; font-size: 1.05rem; }
.qibla-read strong { font-size: 2rem; color: var(--green); }

/* hijri */
.hijri-big { font-size: 2rem; font-weight: 700; color: var(--green); margin: 4px 0; }
.conv { display: grid; gap: 10px; }
.conv output { font-weight: 700; font-size: 1.15rem; color: var(--green); min-height: 1.4em; }
.row3 { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.6fr) minmax(0,1fr); gap: 8px; }
.row3 label, .row3 select, .row3 input { min-width: 0; width: 100%; }
.months { columns: 2; padding-inline-start: 0; list-style: none; margin: 0; }
.months li { padding: 6px 0; break-inside: avoid; }
.months .n { display: inline-block; width: 1.8em; color: var(--gold-ink); font-weight: 700; }
.months small { color: var(--muted); margin-inline-start: 6px; }

/* forms + buttons */
label { display: grid; gap: 4px; font-size: .92rem; color: var(--muted); }
select, input { font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; min-height: 42px; }
button { font: inherit; cursor: pointer; border-radius: 10px; padding: 9px 14px; min-height: 42px; border: 1px solid var(--line); background: var(--card); color: var(--ink); }
button.primary { background: var(--green); border-color: var(--green); color: #fff; font-weight: 600; }
:root[data-theme="dark"] button.primary { color: #08140f; }
button.ghost { background: transparent; }
button:hover { border-color: var(--gold); }

/* settings dialog */
dialog { border: 0; border-radius: 18px; padding: 0; width: min(440px, 94vw); background: var(--card); color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(0,0,0,.45); }
.settings { display: grid; gap: 12px; padding: 20px; }
.settings h2 { margin: 0; }
.row-btns { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }

/* footer */
.foot { margin-top: 24px; padding: 20px 0 30px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.foot-countries { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 10px; }
.foot a { color: var(--muted); }

/* bottom nav (phones) */
.bottom { position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.bottom a, .bottom button { display: grid; justify-items: center; gap: 2px; padding: 8px 4px; font-size: .72rem; color: var(--muted); text-decoration: none; background: none; border: 0; border-radius: 0; min-height: 56px; }
.bottom svg { width: 22px; height: 22px; }
.bottom [aria-current] { color: var(--green); }

/* tablets / desktop / Windows */
@media (min-width: 720px) {
  h1 { font-size: 2rem; }
  .card { padding: 22px; }
  .grid2 { grid-template-columns: 1fr 1fr; }
  .countries { grid-template-columns: repeat(4, 1fr); }
  .next .lbl { width: auto; }
}
@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .bottom { display: none; }
  .mainnav { display: flex; }
  .icon-btn { display: grid; }
  .times-card .times td.t { font-size: 1.2rem; }
}
/* share row, monthly timetable, Ramadan */
.share-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -4px 0 14px; }
.share-row button { background: var(--card); }
.btn-wa { display: inline-flex; align-items: center; min-height: 42px; padding: 0 14px; border-radius: 10px; background: #1f9d55; color: #fff; text-decoration: none; font-weight: 600; }
.share-row .chip.strong { margin-inline-start: auto; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-head h2 { margin: 0; }
.month td, .month th { font-variant-numeric: tabular-nums; }
.month th[scope="row"] { font-weight: 500; white-space: nowrap; }
.ramadan-card .meta { text-align: center; }
@media (max-width: 600px) { .share-row .chip.strong { margin-inline-start: 0; } .ramadan-card .big strong { font-size: 1.45rem; white-space: nowrap; } .ramadan-card .big > div { padding: 12px 6px; } }
/* home banner */
.banner { background: linear-gradient(135deg, #0a3f30, #0f5c46); color: #fff; border: 0; }
.banner .banner-txt { font-size: 1.15rem; font-weight: 700; margin: 0 0 10px; }
.banner .chip { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.3); }
.banner .chip.strong { background: var(--gold); border-color: var(--gold); color: #1f1a08; }
/* Islamic calendar */
.section-h { color: #fff; margin: 18px 0 10px; font-size: 1.25rem; }
:root[data-theme="dark"] .section-h { color: var(--ink); }
.cal-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .cal-grid { grid-template-columns: 1fr 1fr; } }
.cal-month { margin: 0; }
.cal-month h3 { margin: 0 0 10px; font-size: 1.05rem; color: var(--green); }
.cal-month h3 small { display: block; color: var(--muted); font-weight: 400; font-size: .8rem; margin-top: 2px; }
.cal { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cal th { font-size: .72rem; color: var(--muted); font-weight: 600; padding: 4px 0; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal td { border: 1px solid var(--line); vertical-align: top; padding: 4px; height: 52px; text-align: center; font-size: .8rem; }
.cal td b { display: block; font-size: 1rem; color: var(--ink); }
.cal td small { display: block; color: var(--muted); font-size: .68rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal td.empty { background: transparent; border-color: transparent; }
.cal td.ev { background: var(--gold-soft); }
.cal td.today { outline: 2px solid var(--green); outline-offset: -2px; background: var(--next); }
.cal .ev-name { display: block; font-size: .62rem; color: var(--gold-ink); font-weight: 700; line-height: 1.15; margin-top: 2px; }
/* event page */
.event-card .ev-answer { font-size: 1.2rem; font-weight: 600; text-align: center; margin: 6px 0; }
/* Zakat */
.zakat { display: grid; gap: 12px; }
.zgrid { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .zgrid { grid-template-columns: 1fr 1fr; } }
.zakat label { display: grid; gap: 4px; font-size: .92rem; }
.zresult { display: grid; gap: 10px; grid-template-columns: 1fr; margin-top: 14px; }
@media (min-width: 700px) { .zresult { grid-template-columns: 1fr 1fr 1fr; } }
.zresult > div { background: var(--soft, #f5f5f5); border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-align: center; }
.zresult .lbl { display: block; color: var(--muted); font-size: .85rem; }
.zresult strong { font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.zresult .due { background: var(--gold-soft); }
.zresult .due strong { color: var(--green); }
@media print {
  .share-row, [data-print] { display: none !important; }
  .top, .bottom, .foot, .daynav, dialog, .pick { display: none !important; }
  body { background: #fff; padding: 0; }
  .card { box-shadow: none; border: 1px solid #ccc; }
}
@media (prefers-reduced-motion: reduce) { .needle { transition: none; } }

/* Emerald / ivory / gold theme: gold is only an accent; gold text uses the darker --gold-ink so it stays readable. */
:root[data-theme="dark"] { --soft: #1d2b25; }

/* Info pages, Tasbih, Tracker, 99 Names, Duas */
.prose p { line-height: 1.7; margin: 0 0 10px; }
.contact-mail { font-size: 1.05rem; }
.dhikr-pick { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 10px 0; }
.dhikr-pick .chip { cursor: pointer; font: inherit; font-size: 1.05rem; }
.dhikr-pick .chip[aria-pressed="true"] { background: var(--green); color: #fff; border-color: var(--green); }
.dhikr-ar { text-align: center; font-size: 2rem; margin: 10px 0 0; line-height: 1.6; }
.dhikr-tr { text-align: center; color: var(--muted, #666); margin: 0 0 10px; }
.tap { display: flex; flex-direction: column; align-items: center; justify-content: center; width: min(240px, 70vw); aspect-ratio: 1; margin: 6px auto 14px; border-radius: 50%; border: 6px solid var(--gold, #c9a227); background: var(--green); color: #fff; cursor: pointer; font: inherit; touch-action: manipulation; user-select: none; -webkit-user-select: none; transition: transform .06s; }
.tap:active { transform: scale(.96); }
.tap.done { background: var(--gold, #c9a227); }
.tap-n { font-size: 3.4rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.tap-of { opacity: .85; }
.tap-lbl { font-size: .85rem; opacity: .85; margin-top: 6px; }
.tasbih-row { display: flex; gap: 12px; justify-content: center; align-items: center; flex-wrap: wrap; }
.tasbih-msg { text-align: center; font-weight: 600; color: var(--green); min-height: 1.4em; }
.tasbih .small { text-align: center; }
.tk-today { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.tk-p { display: flex; align-items: center; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft, #fff); cursor: pointer; font-weight: 600; }
.tk-p input { width: 20px; height: 20px; accent-color: var(--green); }
.tk-p.on { border-color: var(--green); }
.tk-streak { font-weight: 600; color: var(--green); }
.tk-week td { text-align: center; }
.tk-on { color: var(--green); font-weight: 700; }
.tk-off { color: var(--muted, #999); }
button.warn { border-color: #c62828; color: #c62828; }
.names td { vertical-align: middle; }
.ar-big { font-size: 1.35rem; white-space: nowrap; }
.name-ar { text-align: center; font-size: 3rem; margin: 0 0 8px; line-height: 1.6; color: var(--green); }
.name-dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 0 0 12px; }
.name-dl div { background: var(--soft, #f5f5f5); border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.name-dl dt { font-size: .8rem; color: var(--muted, #666); }
.name-dl dd { margin: 2px 0 0; font-weight: 600; }
.pager { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.dua-ar { font-size: 1.6rem; line-height: 2; text-align: center; margin: 8px 0; }
.dua-ar.big { font-size: 1.9rem; }
.dua .lbl { font-weight: 600; }
.dua-tr i { font-style: italic; }

/* Prayer alerts, calendar, city search, website widget */
.alert-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.alert-note { margin: 4px 0 12px; }
.city-search { position: relative; margin: 0 0 10px; }
.city-search input { width: 100%; padding: 11px 14px; font: inherit; font-size: 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); }
.city-search input:focus { outline: 2px solid var(--green); outline-offset: 1px; }
.search-res { position: absolute; inset-inline: 0; top: 100%; z-index: 20; margin: 4px 0 0; padding: 4px; list-style: none; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); max-height: 320px; overflow: auto; }
.search-res li { padding: 9px 12px; border-radius: 8px; cursor: pointer; }
.search-res li:hover, .search-res li[aria-selected="true"] { background: var(--next); }
.search-res li.none { color: var(--muted); cursor: default; }
.search-card { padding: 12px 16px; }
.search-card .city-search { margin: 0; }
.widget-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 8px; }
.widget-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .9rem; }
.widget-form select { min-width: 0; }
.w-code { width: 100%; font: .85rem/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft, #f7f7f7); color: var(--ink); resize: vertical; }
.w-preview { display: block; width: 100%; max-width: 380px; height: 420px; border: 0; }
.flag { width: 21px; height: 14px; flex: none; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.12); vertical-align: -2px; }
.langmenu li a { display: flex; align-items: center; gap: 10px; }
.langmenu summary .flag { margin-inline-start: -2px; }
.langmenu summary svg.flag { width: 21px; height: 14px; }
.langmenu ul { min-width: 210px; } .langmenu li a { white-space: nowrap; }

/* Prayer cards with Now / Next, method footer, install button */
.langmenu summary svg.caret { width: 9px; height: 6px; opacity: .85; }
.install-btn { display: inline-flex; align-items: center; gap: 6px; background: transparent; color: #fff; border: 2px solid var(--gold, #c9a227); border-radius: 999px; padding: 5px 14px; font: inherit; font-size: .9rem; font-weight: 700; cursor: pointer; white-space: nowrap; }
.install-btn:hover { background: rgba(255,255,255,.1); }
.install-btn svg { width: 16px; height: 16px; }
.install-btn[hidden] { display: none; }
@media (max-width: 600px) { .install-btn span { display: none; } .install-btn { padding: 6px 8px; } }
.install-tip { position: fixed; z-index: 60; top: 64px; inset-inline: 12px; max-width: 420px; margin: 0 auto; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; box-shadow: 0 10px 30px rgba(0,0,0,.25); cursor: pointer; }
.install-tip[hidden] { display: none; }
.tc-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.change-loc { font-weight: 700; color: var(--ink); white-space: nowrap; }
.tc-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px 16px; flex-wrap: wrap; margin-top: 10px; }
.tc-foot .meta { margin: 0; }
.mdetail { margin: 4px 0 0; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; text-decoration: underline; color: var(--ink); cursor: pointer; }
.embed-link { font-weight: 700; color: var(--green); }

/* Special Islamic days */
.up-list { list-style: none; margin: 0 0 12px; padding: 0; }
.up-list li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.up-list li a { font-weight: 700; color: var(--ink); }
.up-date { grid-column: 1; color: var(--muted); font-size: .9rem; }
.up-list .days-to { grid-row: 1 / span 2; grid-column: 2; align-self: center; }
.days-to { display: inline-block; font-weight: 700; font-size: .85rem; color: var(--green); background: var(--next); border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.days-to.soon { background: var(--gold-soft); color: var(--gold-ink); }
.days-to:empty { display: none; }
.special td, .special th { vertical-align: middle; }
.strong-line { font-weight: 700; color: var(--green); }

/* Downloadable timetable */
.tt-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.tt-head h2 { margin: 0; }
.seg { display: inline-flex; background: var(--soft, #f3f3f3); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: transparent; font: inherit; padding: 7px 16px; border-radius: 8px; cursor: pointer; color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--card); box-shadow: 0 1px 4px rgba(0,0,0,.12); font-weight: 700; }
.tt-hijri { color: var(--green); font-weight: 600; margin: 12px 0; }
.tt-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; }
.tt-row select[hidden] { display: none; }
.tt-row:has(select[hidden]) { grid-template-columns: 1fr auto; }
.tt-tip { margin: 6px 0 0; }
.tt-chart { margin-top: 12px; }
.tt-chart summary { font-weight: 700; cursor: pointer; padding: 6px 0; }
.tt-mrow th { background: var(--gold-soft); text-align: start; }
@media (max-width: 600px) { .tt-row { grid-template-columns: 1fr 1fr; } .tt-row button { grid-column: 1 / -1; } .tt-row:has(select[hidden]) { grid-template-columns: 1fr; } }
.tt-print[hidden] { display: none; }
@media print {
  body.print-tt > :not(.tt-print) { display: none !important; }
  body.print-tt { background: #fff !important; color: #000; }
  .tt-print h1 { font-size: 18pt; margin: 0 0 4pt; color: #000; }
  .tt-print table { width: 100%; border-collapse: collapse; font-size: 9pt; }
  .tt-print th, .tt-print td { border: 1px solid #bbb; padding: 3pt 4pt; color: #000; }
  .tt-print .tt-mrow th { background: #eee; break-after: avoid; }
}

/* Dark / light switch */
.theme-btn { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 999px; border: 1px solid rgba(255,255,255,.35); background: transparent; color: #fff; cursor: pointer; flex: none; }
.theme-btn:hover { background: rgba(255,255,255,.12); }
.theme-btn svg { width: 19px; height: 19px; }
.theme-btn .i-sun { display: none; }
:root[data-theme="dark"] .theme-btn .i-sun { display: block; }
:root[data-theme="dark"] .theme-btn .i-moon { display: none; }

/* Tools grid (icons + labels) */
.tools-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.tool { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 18px 8px; border-radius: 14px; text-decoration: none; color: var(--ink); text-align: center; font-weight: 700; font-size: 1.05rem; line-height: 1.25; transition: background .15s, transform .15s; }
.tool svg { width: 34px; height: 34px; color: var(--ink); }
.tool:hover { background: var(--soft, #f6f6f6); transform: translateY(-2px); }
.tool:hover svg { color: var(--green); }
@media (max-width: 760px) { .tools-grid { grid-template-columns: repeat(3, 1fr); gap: 4px; } .tool { padding: 14px 4px; font-size: .92rem; gap: 8px; } .tool svg { width: 30px; height: 30px; } }

/* 100 hadith */
.hd-list { list-style: none; margin: 0; padding: 0; }
.hd-link { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.hd-link:hover strong { color: var(--green); text-decoration: underline; }
.hd-n { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold-ink); font-weight: 700; font-size: .85rem; }
.hd-link > span:last-child { display: flex; flex-direction: column; gap: 3px; }
.hd-txt { color: var(--muted); font-size: .93rem; line-height: 1.5; }
.hadith-card .hd-ar { font-size: 1.7rem; line-height: 2; text-align: center; margin: 6px 0 14px; color: var(--green); }
.hadith-card .hd-en { font-size: 1.12rem; line-height: 1.7; }

/* Hadith tiles (list page) */
.hd-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 18px; }
.hd-tile { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 72px; padding: 12px 18px; background: var(--card); border: 1px solid #c9d8e6; border-radius: 14px; text-decoration: none; color: var(--ink); box-shadow: 0 2px 6px rgba(20,40,70,.06); transition: border-color .15s, box-shadow .15s, transform .15s; }
.hd-tile:hover { border-color: var(--green); box-shadow: 0 6px 16px rgba(20,40,70,.12); transform: translateY(-1px); }
.hd-num { display: flex; flex-direction: column; font-weight: 800; font-size: 1.3rem; color: var(--green); white-space: nowrap; line-height: 1.2; }
.hd-num small { font-weight: 500; font-size: .78rem; color: var(--muted); white-space: normal; margin-top: 3px; max-width: 14em; }
.hd-arname { font-family: "Amiri", "Traditional Arabic", "Noto Naskh Arabic", "Segoe UI", serif; font-weight: 700; font-size: 1.35rem; color: #3d4448; text-align: end; line-height: 1.5; }
:root[data-theme="dark"] .hd-tile { border-color: var(--line); }
:root[data-theme="dark"] .hd-arname { color: var(--ink); }
@media (max-width: 1000px) { .hd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .hd-grid { grid-template-columns: 1fr; gap: 10px; } .hd-num { font-size: 1.15rem; } .hd-arname { font-size: 1.2rem; } }

/* Qaza calculator */
.qz-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 10px 0; }
.qz-form label, .hage-row label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .9rem; }
.qz-form input, .hage-row input { font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); min-height: 44px; }
.qz-form label.chk { flex-direction: row; align-items: center; gap: 8px; align-self: end; min-height: 44px; }
.qz-form label.chk input { min-height: 0; width: 20px; height: 20px; accent-color: var(--green); }
.qz-msg { color: #c62828; font-weight: 600; min-height: 1em; }
.qz-row { padding: 12px 0; border-bottom: 1px solid var(--line); }
.qz-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.qz-top span { font-variant-numeric: tabular-nums; color: var(--muted); }
.qz-bar { height: 10px; border-radius: 999px; background: var(--soft, #eee); margin: 8px 0; overflow: hidden; }
.qz-bar span { display: block; height: 100%; background: var(--green); border-radius: 999px; transition: width .3s; }
.qz-btns { display: flex; gap: 8px; }
.qz-sum { font-size: 1.1rem; margin-top: 14px; }
/* Hijri age */
.hage-row { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.hage-row label { flex: 1 1 220px; }
.hage-res { margin-top: 16px; padding: 16px; border-radius: 14px; background: var(--gold-soft); }
.hage-big { font-size: 1.5rem; font-weight: 800; color: var(--green); margin: 0 0 6px; }
/* Quiz */
.quiz-n { color: var(--muted); margin: 0; }
.quiz-q { margin: 6px 0 14px; font-size: 1.3rem; }
.quiz-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.quiz-opt { font: inherit; text-align: start; padding: 14px 16px; min-height: 52px; border: 2px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); cursor: pointer; font-weight: 600; }
.quiz-opt:hover:not([disabled]) { border-color: var(--green); }
.quiz-opt.right { border-color: #1e8e3e; background: #e6f4ea; color: #0d5323; }
.quiz-opt.wrong { border-color: #c62828; background: #fdecea; color: #8c1d18; }
.quiz-fb { font-weight: 700; min-height: 1.4em; }
.quiz-score { font-size: 1.6rem; font-weight: 800; color: var(--green); }
@media (max-width: 600px) { .quiz-opts { grid-template-columns: 1fr; } }
/* Hadith of the day */
.hotd-ar { font-size: 1.45rem; line-height: 1.9; color: var(--green); margin: 4px 0 8px; }
.hotd-txt { font-size: 1.05rem; line-height: 1.65; margin: 0 0 8px; }

/* How to pray guide */
.g-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.g-card { display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); background: var(--card); transition: border-color .15s, transform .15s; }
.g-card:hover { border-color: var(--green); transform: translateY(-2px); }
.g-card strong { font-size: 1.1rem; color: var(--green); }
.g-card span:last-child { color: var(--muted); font-size: .92rem; line-height: 1.5; }
.g-num { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold-ink); font-weight: 800; }
.g-list { margin: 0; padding-inline-start: 1.4em; display: grid; gap: 8px; line-height: 1.6; }
ol.g-list li::marker { font-weight: 800; color: var(--green); }
.ph-list { display: grid; gap: 10px; margin: 0; }
.ph-list div { padding: 10px 14px; border-radius: 12px; background: var(--soft, #f7f7f7); border: 1px solid var(--line); }
.ph-list dt { font-size: 1.4rem; line-height: 1.8; color: var(--green); }
.ph-list dd { margin: 2px 0 0; color: var(--muted); font-style: italic; }
.rk td { text-align: center; } .rk td.t { font-weight: 800; color: var(--green); }
.rk th, .rk td { padding: 10px 8px; }
@media (max-width: 600px) { .rk { font-size: .85rem; } .rk thead th { white-space: normal; font-size: .7rem; } }
/* Quran surahs */
.sr-grid, .bn-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sr-tile { display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; align-items: center; gap: 2px 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); height: 100%; box-sizing: border-box; transition: border-color .15s, transform .15s; }
.sr-tile:hover, .bn-tile:hover { border-color: var(--green); transform: translateY(-1px); }
.sr-n { grid-row: 1 / 3; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--soft, rgba(31,157,85,.1)); color: var(--green); font-weight: 700; font-size: .9rem; }
.sr-txt { display: flex; flex-direction: column; min-width: 0; }
.sr-txt small { color: var(--muted); font-size: .8rem; }
.sr-ar { font-size: 1.25rem; font-family: "Amiri", "Noto Naskh Arabic", serif; color: var(--green); }
.sr-p { grid-column: 3; font-size: .7rem; padding: 1px 6px; border-radius: 6px; justify-self: end; }
.sr-p.mk { background: rgba(200,140,30,.15); color: #9a6410; } .sr-p.md { background: rgba(31,120,200,.13); color: #1f5f9a; }
:root[data-theme="dark"] .sr-p.mk { color: #e8b55a; } :root[data-theme="dark"] .sr-p.md { color: #7fb6ea; }
.sr-big, .bn-big { font-size: 2.6rem; text-align: center; margin: 6px 0 14px; color: var(--green); font-family: "Amiri", "Noto Naskh Arabic", serif; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 0 0 14px; }
.facts div { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.facts dt { font-size: .78rem; color: var(--muted); } .facts dd { margin: 2px 0 0; font-weight: 700; }
a.btn { display: inline-flex; align-items: center; min-height: 42px; padding: 0 16px; border-radius: 10px; text-decoration: none; font-weight: 600; }
a.btn.primary { background: var(--green); color: #fff; } :root[data-theme="dark"] a.btn.primary { color: #08140f; }
/* Kids corner */
.k-pillars { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.k-pillars li { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 14px; text-align: center; align-items: center; }
.k-c0 { background: rgba(31,157,85,.12); } .k-c1 { background: rgba(31,120,200,.12); } .k-c2 { background: rgba(230,120,40,.13); } .k-c3 { background: rgba(140,80,200,.12); } .k-c4 { background: rgba(200,160,30,.15); }
.k-emo { font-size: 2.2rem; } .k-pillars span:last-child { font-size: .9rem; }
.k-iman, .k-proph { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.k-iman li, .k-proph li { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; flex-wrap: wrap; }
.k-par { font-size: 1.2rem; font-family: "Amiri", "Noto Naskh Arabic", serif; } .k-proph small { color: var(--muted); }
.k-abc { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.k-abc li { display: flex; flex-direction: column; align-items: center; padding: 10px 4px; border-radius: 12px; border: 1px solid var(--line); }
.k-letter { font-size: 2rem; line-height: 1.3; color: var(--green); font-family: "Amiri", "Noto Naskh Arabic", serif; } .k-abc small { font-size: .75rem; color: var(--muted); }
/* Baby names */
.bn-tile { display: flex; flex-direction: column; gap: 2px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); height: 100%; box-sizing: border-box; border-inline-start: 4px solid #4a90d9; transition: border-color .15s, transform .15s; }
.bn-tile.g { border-inline-start-color: #d9578f; }
.bn-ar { font-size: 1.2rem; color: var(--green); font-family: "Amiri", "Noto Naskh Arabic", serif; } .bn-tile small { color: var(--muted); font-size: .82rem; }
.bn-filter input { width: 100%; box-sizing: border-box; margin-top: 10px; }
@media (max-width: 760px) {
  .sr-grid, .bn-grid, .k-iman, .k-proph { grid-template-columns: 1fr; }
  .k-pillars { grid-template-columns: 1fr 1fr; } .k-abc { grid-template-columns: repeat(4, 1fr); }
  .sr-big, .bn-big { font-size: 2rem; }
}
@media (min-width: 761px) and (max-width: 980px) { .sr-grid, .bn-grid { grid-template-columns: 1fr 1fr; } .k-pillars { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 761px) { .tools-grid { grid-template-columns: repeat(6, 1fr); } }
/* Dark green footer */
.foot { background: var(--deep); color: #cfe0d7; border-top: 0; padding-top: 26px; }
.foot a { color: #fff; }
.foot a:hover { color: var(--gold); }
@media print { .foot { background: none; color: #000; } .foot a { color: #000; } }
/* Custom method notice + high-latitude note */
.custom-m { display: inline-flex; align-items: center; gap: 6px; margin-inline-start: 6px; padding: 1px 8px; border-radius: 999px; background: var(--gold-soft); color: var(--gold-ink); font-size: .8rem; font-weight: 700; }
.custom-m button { border: 0; background: none; padding: 0; color: var(--green); text-decoration: underline; font: inherit; cursor: pointer; min-height: 0; }
.hilat { margin: 8px 0 0; }
/* Ended (Fajr after sunrise) */
.foot .small { color: #a9c1b5; }

/* ===== Next-prayer card + prayer list (redesign) ===== */
.home-h1 { font-size: 1.35rem; margin: 0 0 10px; color: var(--ink); }
.home-in { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); letter-spacing: .01em; }
.sbox { position: relative; display: flex; align-items: center; margin: 0 0 8px; }
.sbox input { width: 100%; padding-inline-start: 40px; padding-inline-end: 50px; min-height: 48px; border-radius: 12px; font-size: 1rem; }
.sbox-i { position: absolute; inset-inline-start: 12px; width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.sbox-geo { position: absolute; inset-inline-end: 5px; width: 40px; height: 38px; min-height: 0; padding: 0; display: grid; place-items: center; border-radius: 10px; border: 0; background: var(--next); color: var(--green); cursor: pointer; }
.sbox-geo svg { width: 20px; height: 20px; }
.sbox-geo:hover { background: var(--green); color: #fff; }
.sbox .search-res { top: calc(100% + 4px); }
.hero { position: relative; overflow: hidden; margin: 14px 0; padding: 18px 20px 16px; border-radius: 18px; background: var(--deep); color: #fff; }
.hero::after { content: ""; position: absolute; inset-inline-end: -40px; top: -40px; width: 170px; height: 170px; border-radius: 50%; box-shadow: -26px 18px 0 0 rgba(255,255,255,.06); pointer-events: none; }
.hero-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.hero-l, .hero-r { display: flex; flex-direction: column; }
.hero-r { text-align: end; }
.hero-k { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #a9cbbb; }
.hero-n { font-size: 2.3rem; line-height: 1.1; margin-top: 4px; }
.hero-at { color: #d5e6dd; font-size: .95rem; }
.hero-cd { font-size: 1.9rem; line-height: 1.1; color: var(--gold); font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.hero-rem { color: #d5e6dd; font-size: .9rem; }
.hero-bar { height: 5px; border-radius: 99px; background: rgba(255,255,255,.16); margin: 14px 0 10px; overflow: hidden; }
.hero-bar span { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--gold); transition: width .6s; }
.hero-now { margin: 0; font-size: .9rem; color: #d5e6dd; }
.pcards { list-style: none; margin: 0 0 12px; padding: 6px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.pc { display: grid; grid-template-columns: 10px 1fr auto 40px; align-items: center; gap: 12px; padding: 12px 10px; border-radius: 12px; border: 2px solid transparent; }
.pc + .pc { margin-top: 2px; }
.pc-dot { width: 7px; height: 7px; border-radius: 50%; background: #c7cec9; }
.pc-sunrise .pc-dot, .pc.is-next .pc-dot { background: var(--gold); }
.pc-name { display: flex; flex-direction: column; min-width: 0; }
.pc-n-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pc-n { font-size: 1.08rem; }
.pc-sunrise .pc-n { font-weight: 500; color: var(--muted); }
.pc-cd { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.pc-cd:empty { display: none; }
.pc-t { font-weight: 700; font-size: 1.08rem; font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; text-align: end; }
.pc-badge { font-size: .68rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 2px 8px; border-radius: 6px; }
.pc-badge:empty { display: none; }
.pc-bell { width: 38px; height: 38px; min-height: 0; padding: 0; display: grid; place-items: center; border: 0; border-radius: 10px; background: none; color: #9aa59f; cursor: pointer; }
.pc-bell svg { width: 20px; height: 20px; }
.pc-bell.on { color: var(--green); }
.pc-bell:hover { background: var(--soft); }
.pc.is-past .pc-n, .pc.is-past .pc-t { color: var(--muted); font-weight: 500; }
.pc.is-now { background: var(--next); }
.pc.is-now .pc-dot { background: var(--green); }
.pc.is-now .pc-badge { background: var(--green); color: #fff; }
.pc.is-next { border-color: var(--green); background: var(--card); }
.pc.is-next .pc-badge { background: var(--gold-soft); color: var(--gold-ink); }
.pc.is-next .pc-cd { color: var(--gold-ink); font-weight: 600; }
.tc-foot { margin: 0 0 8px; }
.more-link { margin: 0 0 8px; font-size: .92rem; }
.mline { display: flex; justify-content: space-between; align-items: center; gap: 8px 14px; flex-wrap: wrap; }
.mline .meta { margin: 0; font-size: .88rem; color: var(--muted); }
.ml-k { color: var(--muted); }
.mline .linkbtn { font-weight: 700; color: var(--green); text-decoration: none; }
.alert-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 4px; }
.al-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border-radius: 12px; font-weight: 700; }
.al-btn svg { width: 19px; height: 19px; flex: none; }
.alert-row .ghost.al-btn { background: var(--card); border: 1px solid var(--line); color: var(--ink); }
.al-btn.on { background: var(--next); color: var(--green); border: 1px solid var(--green); }
.dlg-title { font-size: 1.2rem; font-weight: 700; margin: 0 0 12px; }
@media (min-width: 900px) {
  .home-card .pcards, .times-card .pcards { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; padding: 8px; }
  .pc { grid-template-columns: 1fr auto; grid-template-areas: "name bell" "time time"; gap: 6px 4px; padding: 14px 12px; align-content: start; }
  .pc + .pc { margin-top: 0; }
  .pc-dot { display: none; }
  .pc-name { grid-area: name; } .pc-t { grid-area: time; text-align: start; font-size: 1.3rem; } .pc-bell, .pc-bell-gap { grid-area: bell; width: 32px; height: 32px; }
  .alert-row { max-width: 520px; }
}
/* Language button: globe + code */
.lang .globe { width: 17px; height: 17px; }
/* Tools: white cards with the icon in a soft square */
.tools-grid { gap: 10px; }
.tool { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 8px 14px; gap: 10px; font-size: .9rem; font-weight: 600; }
.tool svg { width: 22px; height: 22px; color: var(--green); padding: 9px; box-sizing: content-box; border-radius: 12px; background: var(--next); }
.tool:hover { background: var(--card); border-color: var(--green); }
@media (max-width: 760px) { .tools-grid { gap: 8px; } .tool { padding: 14px 4px 12px; font-size: .85rem; } .tool svg { width: 20px; height: 20px; padding: 8px; } }
/* Upcoming Islamic days: whole row clickable, no underline, chevron */
.up-list li { position: relative; padding-inline-end: 26px; }
.up-list li a { text-decoration: none; }
.up-list li a::after { content: ""; position: absolute; inset: 0; }
.up-list li::after { content: "›"; position: absolute; inset-inline-end: 4px; top: 50%; transform: translateY(-55%); font-size: 1.4rem; color: var(--muted); }
[dir="rtl"] .up-list li::after { content: "‹"; }
.up-list li:hover a { color: var(--green); }
:root[data-theme="dark"] .hero { background: #10291f; border: 1px solid var(--line); }
:root[data-theme="dark"] .pc.is-now .pc-badge { color: #08140f; }
.mline { flex-wrap: nowrap; }
.mline .meta { flex: 1 1 auto; min-width: 0; }
.mline .linkbtn { flex: none; }
.hilat { margin: 8px 0 0; color: var(--muted); }
.hilat summary { cursor: pointer; font-weight: 700; color: var(--green); }
.hilat p { margin: 6px 0 0; }
@media (min-width: 900px) { .pc { min-height: 112px; align-content: space-between; } }
.tc-foot { display: block; }
/* Articles */
.article { max-width: 820px; margin: 0 auto; }
.art-meta { font-size: .9rem; }
.art-body h2 { margin: 26px 0 8px; font-size: 1.3rem; scroll-margin-top: 80px; }
.art-body p, .art-body li { line-height: 1.75; }
.art-body ul, .art-body ol { padding-inline-start: 22px; margin: 0 0 12px; }
.art-body li { margin: 4px 0; }
.art-desc { font-size: 1.08rem; color: var(--muted); }
.art-toc { background: var(--soft); border-radius: 12px; padding: 12px 16px; margin: 12px 0 6px; }
.art-toc ol { margin: 0; padding-inline-start: 20px; }
.art-toc a { text-decoration: none; }
.art-note { margin-top: 22px; }
.art-list li { grid-template-columns: 1fr auto; }
.art-topics { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 8px; }
.art-topics .chip { font-size: .8rem; padding: 3px 10px; }
.kw-chips .kw-chip { cursor: default; background: var(--soft); border-color: transparent; color: var(--muted); font-size: .85rem; }
.kw-line .kw { display: inline-block; margin: 2px 4px 2px 0; padding: 1px 8px; border-radius: 999px; background: var(--soft); }
.kw-topics a { font-weight: 600; }
.art-lead { font-size: .92rem; color: var(--muted); border-inline-start: 3px solid var(--gold); padding-inline-start: 10px; }
/* Countries page: dropdowns */
.cpick-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; }
.cpick-row label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .9rem; }
.cpick-row select { width: 100%; min-height: 48px; font-size: 1rem; }
.cpick-row button { min-height: 48px; }
@media (max-width: 760px) { .cpick-row { grid-template-columns: 1fr; } }
/* ===== Header dropdowns: Countries + Tools ===== */
.mainnav { display: flex; align-items: center; gap: 4px; }
.navdd { position: relative; }
.navdd summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; color: #e9f3ee; padding: 8px 12px; border-radius: 10px; font-size: .95rem; user-select: none; }
.navdd summary::-webkit-details-marker { display: none; }
.navdd summary .caret { width: 10px; height: 6px; opacity: .85; transition: transform .15s; }
.navdd[open] summary { background: rgba(255,255,255,.14); color: #fff; }
.navdd[open] summary .caret { transform: rotate(180deg); }
.navdd summary:hover { background: rgba(255,255,255,.1); }
.dd-panel { position: absolute; inset-inline-start: 0; top: calc(100% + 8px); z-index: 45; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 40px rgba(0,0,0,.2); padding: 8px; max-height: 75vh; overflow-y: auto; }
.dd-panel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.dd-countries { width: 520px; }
.dd-countries ul { grid-template-columns: repeat(3, 1fr); }
.dd-tools { width: 560px; }
.dd-tools ul { grid-template-columns: repeat(3, 1fr); }
.dd-panel li a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: var(--ink); text-decoration: none; font-size: .9rem; line-height: 1.25; }
.dd-panel li a:hover, .dd-panel li a:focus-visible { background: var(--next); color: var(--green); }
.dd-panel .flag { width: 21px; height: 14px; flex: none; border-radius: 2px; }
.dd-tools li a svg { width: 18px; height: 18px; flex: none; color: var(--green); padding: 6px; box-sizing: content-box; border-radius: 9px; background: var(--next); }
.dd-all { display: block; margin: 6px 4px 2px; padding: 8px 10px; border-top: 1px solid var(--line); font-weight: 700; color: var(--green); text-decoration: none; }
@media (max-width: 899px) {
  .top-in { flex-wrap: wrap; row-gap: 0; }
  .mainnav { order: 3; width: 100%; margin: 0 -8px; padding: 0 0 6px; gap: 2px; }
  .navdd { position: static; }
  .navdd summary { padding: 6px 10px; font-size: .9rem; }
  .dd-panel { position: absolute; inset-inline: 8px; top: 100%; width: auto; max-height: 70vh; }
  .dd-countries ul, .dd-tools ul { grid-template-columns: 1fr 1fr; }
  .top { position: sticky; }
  .top-in { position: relative; }
}
:root[data-theme="dark"] .dd-panel { box-shadow: 0 14px 40px rgba(0,0,0,.5); }
.top details { border-bottom: 0; padding: 0; }
.dd-blog { width: 640px; }
.dd-blog ul { grid-template-columns: repeat(3, 1fr); }
.dd-blog li a { justify-content: space-between; }
.dd-blog li a small { color: var(--muted); font-size: .75rem; background: var(--soft); border-radius: 999px; padding: 1px 7px; flex: none; }
.dd-note { margin: 2px 6px 6px; font-size: .8rem; color: var(--muted); }
@media (min-width: 900px) { .mainnav .navdd:last-child .dd-panel { inset-inline-start: auto; inset-inline-end: -200px; } }
@media (max-width: 899px) { .dd-blog ul { grid-template-columns: 1fr 1fr; } }
@media (max-width: 899px) { .dd-panel.dd-blog, .dd-panel.dd-tools, .dd-panel.dd-countries { width: auto; } }
.top .dd-panel a.dd-all { color: var(--green); opacity: 1; } .top .dd-panel a.dd-all:hover { background: var(--next); border-radius: 9px; }
/* ===== Qibla Finder ===== */
.qf-controls { display: grid; grid-template-columns: auto auto 1fr; gap: 10px; align-items: end; }
.qf-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border-radius: 12px; font-weight: 700; padding: 0 16px; }
.qf-btn svg { width: 19px; height: 19px; flex: none; }
.qf-btn.ghost { background: var(--card); border: 1px solid var(--line); color: var(--ink); }
.qf-btn.on { background: var(--next); border-color: var(--green); color: var(--green); }
.qf-btn:disabled { opacity: .6; cursor: progress; }
.qf-city { display: flex; flex-direction: column; gap: 4px; font-size: .82rem; font-weight: 600; color: var(--muted); }
.qf-city select { min-height: 48px; font-size: 1rem; color: var(--ink); }
.qf-status { min-height: 1.2em; margin: 10px 0 0; font-size: .9rem; color: var(--muted); }
.qf-status:empty { display: none; }
.qf-status.warn { color: var(--ink); background: var(--gold-soft); border-inline-start: 3px solid var(--gold); padding: 8px 12px; border-radius: 8px; }
.qf-main { display: grid; grid-template-columns: minmax(0, 360px) 1fr; gap: 28px; align-items: center; margin: 18px 0 8px; }
.qf-stage { position: relative; width: min(100%, 360px); aspect-ratio: 1; margin: 0 auto; }
.qf-pointer { position: absolute; top: -4px; left: 50%; width: 22px; height: 15px; transform: translateX(-50%); fill: var(--muted); z-index: 2; transition: fill .3s; }
.qf-dial { width: 100%; height: 100%; display: block; overflow: visible; }
.qf-dial .ring-o { fill: var(--card); stroke: var(--line); stroke-width: 2; filter: drop-shadow(0 6px 18px rgba(10,63,48,.12)); transition: stroke .3s, fill .3s; }
.qf-dial .ring-i { fill: none; stroke: var(--line); stroke-width: 1; }
.qf-dial .tk { stroke: #b9c2bc; stroke-width: 1; }
.qf-dial .tk-b { stroke: var(--muted); stroke-width: 1.6; }
.qf-dial .tn { font: 600 8px/1 system-ui, sans-serif; fill: var(--muted); text-anchor: middle; }
.qf-dial .tl { font: 800 15px/1 system-ui, sans-serif; fill: var(--ink); text-anchor: middle; }
.qf-dial .tl-n { fill: #c0392b; }
.qf-dial .q-line { stroke: var(--green); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 2 6; }
.qf-dial .q-kaaba rect { fill: #1b1b1b; stroke: var(--gold); stroke-width: 1.2; }
.qf-dial .q-kaaba .q-band { fill: var(--gold); stroke: none; }
.qf-dial .q-hub { fill: var(--green); }
.qf-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; text-align: center; padding: 0 22%; }
.qf-center strong { font-size: clamp(2rem, 9vw, 2.8rem); line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; background: color-mix(in srgb, var(--card) 85%, transparent); border-radius: 12px; padding: 4px 8px; }
.qf-center span { margin-top: 6px; font-size: .78rem; color: var(--muted); background: color-mix(in srgb, var(--card) 85%, transparent); border-radius: 6px; padding: 0 4px; }
.qf-stage.aligned .ring-o { stroke: var(--green); stroke-width: 5; fill: var(--next); }
.qf-stage.aligned .qf-pointer { fill: var(--green); }
.qf-stage.aligned .qf-center strong { color: var(--green); }
.qf-stage.live .qf-pointer { fill: var(--ink); }
.qf-turn { font-size: 1.15rem; font-weight: 700; margin: 0 0 14px; color: var(--ink); line-height: 1.4; }
.qf-stage.aligned + .qf-side .qf-turn, .qf-main:has(.aligned) .qf-turn { color: var(--green); }
.qf-info { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.qf-info > div { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--card); }
.qf-info dt { font-size: .76rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.qf-info dd { margin: 4px 0 0; font-weight: 700; font-size: 1.05rem; }
.qf-info dd small { display: block; font-weight: 500; font-size: .8rem; color: var(--muted); margin-top: 2px; }
.qf-info dd small.ok { color: var(--green); } .qf-info dd small.mid { color: var(--gold-ink); } .qf-info dd small.bad { color: #b3261e; }
.qf-help { border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; margin-top: 10px; background: var(--card); }
.qf-help summary { padding: 12px 0; font-weight: 700; color: var(--green); }
.qf-help[open] { padding-bottom: 12px; }
.qf-help ul, .qf-help ol { margin: 0; padding-inline-start: 20px; } .qf-help li { margin: 4px 0; line-height: 1.55; }
.qf-fig8 { width: 140px; height: 58px; display: block; margin: 8px auto 0; }
.qf-fig8 path { fill: none; stroke: var(--green); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 260; animation: fig8 3s linear infinite; }
@keyframes fig8 { from { stroke-dashoffset: 520; } to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .qf-fig8 path { animation: none; } }
@media (max-width: 760px) {
  .qf-controls { grid-template-columns: 1fr 1fr; }
  .qf-city { grid-column: 1 / -1; }
  .qf-main { grid-template-columns: 1fr; gap: 16px; }
  .qf-info { grid-template-columns: 1fr; }
  .qf-turn { text-align: center; }
}
:root[data-theme="dark"] .qf-dial .tk { stroke: #4b5a53; }
:root[data-theme="dark"] .qf-dial .tl-n { fill: #ff7a6b; }
.qf-table { border: 0; padding: 0; }
.qf-table summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; list-style: none; }
.qf-table summary::-webkit-details-marker { display: none; }
.qf-table summary h2 { margin: 0; }
.qf-table summary::after { content: "+"; font-size: 1.5rem; color: var(--green); font-weight: 700; }
.qf-table[open] summary::after { content: "–"; }
.qf-table summary .small { margin-inline-start: auto; background: var(--soft); border-radius: 999px; padding: 2px 10px; }
.qf-table .scroll { margin-top: 12px; max-height: 70vh; overflow: auto; }
.qf-stage .qf-center strong { box-shadow: 0 0 0 6px color-mix(in srgb, var(--card) 85%, transparent); }
.qf-fig8 path { stroke-dasharray: 28 72; animation: fig8b 2.4s linear infinite; }
@keyframes fig8b { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
.qf-fig8 { background: none; }

/* ===== Design system polish (applies site-wide) ===== */
:root { --radius: 18px; --r-ctl: 12px; --shadow: 0 1px 2px rgba(10,63,48,.04), 0 8px 24px rgba(10,63,48,.06); --shadow-h: 0 2px 4px rgba(10,63,48,.06), 0 14px 32px rgba(10,63,48,.10); --ease: cubic-bezier(.2,.7,.2,1); }
:root[data-theme="dark"] { --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25); --shadow-h: 0 2px 6px rgba(0,0,0,.35), 0 14px 32px rgba(0,0,0,.35); }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; } }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: color-mix(in srgb, var(--green) 22%, transparent); }
main.wrap { padding-top: 6px; padding-bottom: 28px; }
h1 { font-size: clamp(1.55rem, 1.2rem + 1.4vw, 2.1rem); letter-spacing: -.015em; font-weight: 800; margin: 8px 0 16px; }
h2 { font-size: 1.15rem; letter-spacing: -.005em; font-weight: 750; color: var(--ink); }
.card { border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
@media (max-width: 760px) { .card { padding: 16px; border-radius: 16px; } }
.prose p, .art-body p, .art-body li { max-width: 72ch; }
main a:not(.chip):not(.tool):not(.btn):not(.g-card):not(.country):not(.sr-tile):not(.bn-tile):not(.hd-tile) { text-underline-offset: 3px; text-decoration-thickness: 1px; }
/* controls */
select, input { border-radius: var(--r-ctl); transition: border-color .15s, box-shadow .15s; }
select:focus-visible, input:focus-visible { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 22%, transparent); }
button, a.btn { border-radius: var(--r-ctl); transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s, transform .08s; }
button:active:not(:disabled), a.btn:active { transform: scale(.98); }
button.primary:hover:not(:disabled) { background: var(--green-2); border-color: var(--green-2); }
button:hover { border-color: var(--green); }
button:disabled { cursor: not-allowed; }
:focus-visible { outline-color: var(--green); }
.top :focus-visible { outline-color: var(--gold); }
/* chips & tiles */
.chip { transition: background-color .15s, border-color .15s, color .15s; }
.chip:hover { background: var(--next); border-color: var(--green); color: var(--green); }
.tool, .g-card, .country, .sr-tile, .bn-tile { transition: border-color .15s, box-shadow .2s var(--ease), transform .2s var(--ease); }
.tool:hover, .g-card:hover, .sr-tile:hover, .bn-tile:hover { box-shadow: var(--shadow-h); transform: translateY(-2px); }
.g-card { border-radius: 16px; }
/* tables */
.times tbody tr:hover { background: color-mix(in srgb, var(--next) 55%, transparent); }
.scroll thead th { position: sticky; top: 0; background: var(--card); z-index: 1; }
/* details (FAQ etc.) */
main details > summary { transition: color .15s; }
main details > summary:hover { color: var(--green); }
/* footer spacing */
.foot { margin-top: 12px; }
/* breadcrumbs */
.crumbs { font-size: .85rem; }
/* Prayer cards: a border around each prayer */
.pc { border: 1px solid var(--line); background: var(--card); }
.pc + .pc { margin-top: 6px; }
.pc.is-now { background: var(--next); border-color: color-mix(in srgb, var(--green) 35%, var(--line)); }
.pc.is-next { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.pcards { padding: 8px; }
@media (min-width: 900px) { .pc + .pc { margin-top: 0; } .home-card .pcards, .times-card .pcards { gap: 10px; padding: 10px; } }
@keyframes zflash { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 45%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }
.flash { animation: zflash .8s ease-out; border-radius: 12px; }
/* Articles: quick answer box + tables */
.quick { background: var(--next); border: 1px solid color-mix(in srgb, var(--green) 30%, var(--line)); border-inline-start: 5px solid var(--green); border-radius: 14px; padding: 14px 16px; margin: 14px 0 6px; }
.quick-h { margin: 0 0 4px; font-weight: 800; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--green); }
.quick p:last-child { margin: 0; font-size: 1.02rem; line-height: 1.65; color: var(--ink); max-width: none; }
.art-tablewrap { margin: 10px 0 14px; border: 1px solid var(--line); border-radius: 12px; }
.art-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.art-table th, .art-table td { padding: 9px 12px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: top; }
.art-table thead th { background: var(--soft); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.art-table tbody tr:last-child th, .art-table tbody tr:last-child td { border-bottom: 0; }
.art-table tbody th { font-weight: 700; }
.dd-pop { display: block; margin: 0 4px 6px; padding: 9px 10px; border-radius: 9px; background: var(--gold-soft); color: var(--gold-ink) !important; font-weight: 700; text-decoration: none; font-size: .9rem; }
.dd-pop:hover { background: var(--next); }

/* Home: Hijri date as a pill so it reads clearly on phones */
.dates { align-items: center; }
.dates [data-hijri] { background: var(--gold-soft); color: var(--gold-ink); border-radius: 999px; padding: 2px 10px; font-weight: 500; }
.dates .dot { display: none; }

/* Next-prayer box: drawn from the start (space reserved) so the page doesn't jump when the script fills it in */
html:not(.js) .hero { display: none; }
.hero :is(.hero-n, .hero-at, .hero-cd, .hero-now, .hero-rem):empty::before { content: "\a0"; }

/* ===== Design: arch & pattern (idea 3) ===== */
:root { --bg: #f8f3e8; --line: #e5dcc6; }
.hero { padding: 14px 14px 14px; text-align: center; border-radius: 20px; background-color: var(--deep);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Cg fill='none' stroke='%23c9a227' stroke-opacity='.15' stroke-width='1.2'%3E%3Crect x='14' y='14' width='20' height='20'/%3E%3Crect x='14' y='14' width='20' height='20' transform='rotate(45 24 24)'/%3E%3C/g%3E%3C/svg%3E"); }
.hero::after { display: none; }
.hero-ar { margin: 0 0 10px; font-family: "Amiri", "Noto Naskh Arabic", "Traditional Arabic", "Times New Roman", serif; font-size: 1.6rem; line-height: 1.3; color: var(--gold); }
.hero-row { flex-direction: column; align-items: center; justify-content: center; gap: 2px; max-width: 330px; margin: 0 auto; padding: 34px 18px 16px; border-radius: 170px 170px 0 0; background: var(--bg); color: var(--ink); }
.hero-l, .hero-r { align-items: center; text-align: center; }
.hero-r { margin-top: 6px; }
.hero-k { color: var(--gold-ink); }
.hero-n { color: var(--green); font-size: 2.4rem; }
.hero-at, .hero-rem { color: var(--muted); }
.hero-cd { color: var(--gold-ink); font-size: 2.1rem; }
.hero-bar { max-width: 330px; margin: 0 auto 12px; height: 6px; border-radius: 0 0 6px 6px; }
@media (min-width: 900px) { .hero-row, .hero-bar { max-width: 400px; } .hero-n { font-size: 2.7rem; } }
/* prayer cards with arch tops on wide screens */
@media (min-width: 900px) {
  .home-card .pcards, .times-card .pcards { border: 0; background: none; padding: 0; gap: 10px; }
  .pc { grid-template-columns: 1fr; grid-template-areas: "name" "time" "bell"; justify-items: center; text-align: center; padding: 26px 8px 10px; border-radius: 70px 70px 14px 14px; border: 1px solid var(--line); background: var(--card); }
  .pc-n-row { justify-content: center; }
  .pc-t { text-align: center; }
  .pc-bell, .pc-bell-gap { width: 36px; height: 36px; }
  .pc.is-now { border-color: #b9d4c4; }
  .pc.is-next { background: var(--deep); border-color: var(--deep); }
  .pc.is-next .pc-n, .pc.is-next .pc-t { color: #fff; }
  .pc.is-next .pc-cd { color: var(--gold); }
  .pc.is-next .pc-bell { color: #cfe0d7; }
  .pc.is-next .pc-bell:hover { background: rgba(255,255,255,.1); }
}
/* Ramadan banner: warm gold card */
.banner { background: #f1e4c3; color: #3d2c08; }
.banner .chip { background: #fff; color: #3d2c08; border-color: #e5dcc6; }
.banner .chip.strong { background: var(--deep); border-color: var(--deep); color: #fff; }
:root[data-theme="dark"] .banner { background: #2a2516; color: #f1e4c3; }
:root[data-theme="dark"] .banner .chip { background: var(--card); color: var(--ink); border-color: var(--line); }
:root[data-theme="dark"] .banner .chip.strong { background: var(--gold); border-color: var(--gold); color: #1f1a08; }
:root[data-theme="dark"] .hero-row { background: #1c2c25; }

/* Morning / evening adhkar */
.dk-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.dk-head h2 { margin: 0; font-size: 1.05rem; }
.dk-no { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 13px; background: var(--next); color: var(--green); font-size: .85rem; margin-inline-end: 6px; }
.dk-times { font-weight: 700; color: var(--gold-ink); background: var(--gold-soft); border-radius: 999px; padding: 2px 10px; font-size: .9rem; }
.dk .dua-ar.big { line-height: 2.1; margin: 14px 0 10px; }
.dk-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.dk-foot .small { margin: 0; }
.dk-btn { min-width: 110px; min-height: 48px; border-radius: 24px; border: 2px solid var(--green); background: var(--card); color: var(--green); font: inherit; font-weight: 700; font-size: 1.05rem; cursor: pointer; font-variant-numeric: tabular-nums; }
.dk-btn:active { transform: scale(.97); }
.dk.done { border-color: var(--green); }
.dk.done .dk-btn { background: var(--green); color: #fff; }
.dk.done .dua-ar, .dk.done .dua-m { opacity: .6; }
@media (max-width: 600px) { .dk .dua-ar.big { font-size: 1.45rem; line-height: 2; } }

/* Tables on phones: let text wrap and tighten spacing so key columns (e.g. Iftar) stay on screen */
@media (max-width: 600px) {
  .times.wide:not(.month) th, .times.wide:not(.month) td { white-space: normal; padding: 9px 6px; font-size: .92rem; }
  .times.wide:not(.month) td.t { font-size: 1rem; white-space: nowrap; }
}
@media (max-width: 420px) { .times.wide:not(.month) th, .times.wide:not(.month) td { padding: 8px 3px; font-size: .82rem; } .times.wide:not(.month) td.t { font-size: .92rem; } }

/* ===== Accessibility fixes (audit Nov 2026) ===== */
/* Dark mode: green is light there, so text on green must be dark to stay readable (WCAG 4.5:1) */
:root[data-theme="dark"] :is(.chip.strong, .dhikr-pick .chip[aria-pressed="true"], .sbox-geo:hover, .pc.is-now .pc-badge, .dk.done .dk-btn, .tap) { color: #08140f; }
:root[data-theme="dark"] .banner .chip.strong { color: #1f1a08; }
/* Section headings sit on the page background: they were white on cream */
.section-h { color: var(--green); }
/* WhatsApp share button: darker green so white text is readable */
.btn-wa { background: #157a42; }
.btn-wa:hover { background: #106636; }
/* Bigger tap areas for links in tables and lists on touch screens */
@media (pointer: coarse), (max-width: 700px) {
  .times td a, .times th a, .kv a, main h2 > a, main h3 > a { display: inline-block; padding: 6px 0; }
}
/* Older browsers without color-mix() (Safari < 16.2, Firefox < 113): plain fallbacks so focus rings and borders still show */
@supports not (color: color-mix(in srgb, red 50%, blue)) {
  select:focus-visible, input:focus-visible { outline: 3px solid var(--gold); outline-offset: 1px; box-shadow: none; }
  .qf-center strong, .qf-center span { background: var(--card); }
  .pc.is-now { border-color: var(--green); }
  .quick { border-color: var(--line); border-inline-start-color: var(--green); }
  .times tbody tr:hover { background: var(--next); }
}
/* Readability: no text smaller than 12px */
.pc-badge { font-size: .75rem; }
.cal .ev-name, .ev-name { font-size: .75rem; }
.cal td small { font-size: .75rem; }

/* Card title with a Print button, 7-day table, Friday note, report line */
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.card-head + .scroll, .card-head + table { margin-top: 10px; }
.print-btn { min-height: 40px; padding: 0 14px; }
.fri-note { background: var(--gold-soft); border-radius: 12px; padding: 10px 14px; margin: 0 0 10px; }
.fri-note p { margin: 0 0 8px; }
.report-line { margin: 4px 2px 14px; }
@media print {
  .print-btn, .report-line, [data-share-img] { display: none !important; }
  body.print-one main > :not(.print-me) { display: none !important; }
  body.print-one .print-me { border: 0; }
}

/* Site search */
.ss-box { display: flex; align-items: center; gap: 8px; border: 2px solid var(--line); border-radius: 14px; padding: 0 12px; background: var(--card); }
.ss-box:focus-within { border-color: var(--green); }
.ss-box svg { width: 22px; height: 22px; color: var(--muted); flex: none; }
.ss-box input { flex: 1; border: 0; background: transparent; font: inherit; font-size: 1.1rem; min-height: 52px; color: var(--ink); outline: none; min-width: 0; }
.ss-group h2 { font-size: 1.05rem; margin: 18px 0 8px; }
.ss-group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ss-group a { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; background: var(--soft, #f6f6f6); text-decoration: none; color: var(--ink); min-height: 44px; justify-content: center; }
.ss-group a:hover { background: var(--next); }
.ss-group a span { font-size: .85rem; color: var(--muted); }
.ss-group button { margin-top: 8px; }

/* Checklists, own lists, stories, halal checker */
.ck { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ck li { display: flex; align-items: center; gap: 8px; }
.ck label { display: flex; align-items: center; gap: 12px; flex: 1; min-height: 44px; padding: 6px 10px; border-radius: 10px; cursor: pointer; }
.ck label:hover { background: var(--soft); }
.ck input[type=checkbox] { width: 22px; height: 22px; flex: none; accent-color: var(--green); }
.ck input:checked + span { text-decoration: line-through; color: var(--muted); }
.ck-count { font-weight: 700; color: var(--green); }
.ul-row { display: flex; gap: 8px; margin: 0 0 10px; }
.ul-row input { flex: 1; min-width: 0; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; font: inherit; background: var(--card); color: var(--ink); }
.ul-del { min-width: 40px; min-height: 40px; font-size: 1.2rem; }
.story h2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.story-ar { font-weight: 400; color: var(--muted); }
.story-lesson { background: var(--gold-soft); border-radius: 10px; padding: 8px 12px; }
.hl-key { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.hl-st { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .82rem; font-weight: 700; white-space: nowrap; }
.hl-st.ok { background: #dff3e8; color: #0b5a3a; }
.hl-st.check { background: #fbefd2; color: #6b4e05; }
.hl-st.avoid { background: #fbe0de; color: #8a1c14; }
:root[data-theme="dark"] .hl-st.ok { background: #173d2c; color: #9fe3c0; }
:root[data-theme="dark"] .hl-st.check { background: #3b3115; color: #f0d48a; }
:root[data-theme="dark"] .hl-st.avoid { background: #45201d; color: #f6b3ad; }
.hl-table td, .hl-table th { white-space: normal; }
@media print { .ck input[type=checkbox] { accent-color: #000; } .row-btns, .ul-row, .ul-del { display: none !important; } }
.grid2 > .ulist { min-width: 0; }
.ul-row input { width: 100%; }
.ss-box input[type=search], .ss-box input { border: 0 !important; box-shadow: none !important; outline: none; padding-inline: 2px; }
