/* The Islamic section: adhkar, tasbih, today, prayer times, calendar, Quran, pages, translation. Colours come from palettes.css. */
.isl { padding-block: 18px 40px; }
.isl.narrow { max-width: 820px; }
.isl .center { text-align: center; }
.isl .grow { flex: 1; min-width: 0; }
.isl .small { font-size: .85rem; }
.isl-lead { text-align: center; color: var(--muted); margin-top: -6px; }
.isl .card { margin-bottom: 14px; }
.isl .pad { padding: 18px; }
.isl .warn { color: var(--accent); }
.chip.soft { background: var(--surface2); color: var(--muted); }
.link { background: none; border: 0; padding: 0; color: var(--brand); font-weight: 700; text-decoration: underline; cursor: pointer; }

/* menu group headings + more button of the tab bar */
.sb-group { margin: 12px 18px 4px; font-size: .74rem; font-weight: 800; letter-spacing: .06em; color: var(--gold); opacity: .85; border-top: 1px solid color-mix(in srgb, var(--gold) 28%, transparent); padding-top: 10px; }
.sb-group:empty { margin-top: 8px; padding-top: 0; }
.tabbar button { display: flex; flex-direction: column; align-items: center; gap: 3px; flex: 1; background: none; border: 0; color: var(--muted); font: inherit; font-size: .68rem; font-weight: 700; padding: 6px 2px; cursor: pointer; }

/* home */
.isl-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.isl-tile { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px 10px; border-radius: 18px; background: var(--surface); border: 1px solid color-mix(in srgb, var(--gold) 35%, var(--line)); box-shadow: var(--shadow-s); color: var(--ink); text-align: center; transition: transform .15s, box-shadow .15s; }
.isl-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-m); text-decoration: none; }
.isl-tile span { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); border: 1px solid color-mix(in srgb, var(--gold) 55%, transparent); }
.home-next { display: flex; align-items: center; gap: 12px; padding: 14px 18px; margin-bottom: 16px; color: var(--ink); }
.home-next[hidden] { display: none; }
.home-next span { flex: 1; }
.cd { font-variant-numeric: tabular-nums; font-size: 1.25rem; color: var(--brand); }

/* progress bars + rings */
.isl .bar, .cat-card .bar { height: 7px; border-radius: 6px; background: var(--brand-soft); overflow: hidden; }
.isl .bar i, .cat-card .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--gold)); border-radius: 6px; transition: width .3s; }
.ring { --p: 0; display: grid; place-content: center; justify-items: center; width: 72px; height: 72px; border-radius: 50%; background: radial-gradient(closest-side, var(--surface) 78%, transparent 80%), conic-gradient(var(--gold) calc(var(--p) * 1%), var(--brand-soft) 0); flex: none; }
.ring b { font-size: .95rem; color: var(--head); }
.ring.big { width: 118px; height: 118px; }
.ring.big b { font-size: 1.5rem; }
.ring.big small { font-size: .65rem; color: var(--muted); text-align: center; max-width: 80px; line-height: 1.3; }

/* adhkar */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-bottom: 18px; }
.cat-card { display: flex; flex-direction: column; gap: 8px; padding: 20px; border-radius: 20px; background: var(--surface); border: 1px solid color-mix(in srgb, var(--gold) 35%, var(--line)); box-shadow: var(--shadow-s); color: var(--ink); }
.cat-card:hover { text-decoration: none; box-shadow: var(--shadow-m); }
.cat-card h3 { margin: 4px 0 0; color: var(--head); }
.cat-card p { margin: 0; color: var(--muted); font-size: .88rem; flex: 1; }
.cat-card small { color: var(--muted); font-weight: 700; }
.cat-card.full { border-color: var(--gold); background: linear-gradient(160deg, var(--surface), var(--accent-soft)); }
.c-ico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--brand-soft); color: var(--brand); flex: none; }
.adh-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; position: sticky; top: 66px; z-index: 15; }
.adh-head > div:nth-child(2) { flex: 1; min-width: 0; }
.adh-head h1 { margin: 0; font-size: 1.25rem; color: var(--head); }
.adh-head p { margin: 0; color: var(--muted); font-size: .85rem; }
.dhikr { background: var(--surface); border: 1px solid color-mix(in srgb, var(--gold) 30%, var(--line)); border-radius: 20px; padding: 14px 16px 16px; margin-bottom: 14px; box-shadow: var(--shadow-s); transition: opacity .3s, border-color .3s; }
.dhikr.finished { border-color: var(--gold); opacity: .72; }
.dh-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dh-ar { font-family: 'Amiri', 'Scheherazade New', serif; font-size: 1.55rem; line-height: 2.35; text-align: center; margin: 12px 0 8px; color: var(--ink); }
.dh-tr { text-align: center; color: var(--muted); margin: 0 0 10px; line-height: 1.9; }
.dhikr details { margin: 6px 0 12px; font-size: .88rem; }
.dhikr summary { cursor: pointer; color: var(--brand); font-weight: 700; text-align: center; }
.dh-translit { text-align: start; font-style: italic; }
.dh-foot { display: flex; gap: 10px; }
.dh-count { position: relative; overflow: hidden; flex: 1; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 64px; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--line)); background: var(--surface2); color: var(--ink); cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; font: inherit; }
.dh-count .fill { position: absolute; inset-block: 0; inset-inline-start: 0; background: var(--brand-soft); transition: width .25s; }
.dh-count b, .dh-count span { position: relative; }
.dh-count b { font-size: 1.8rem; color: var(--brand); display: grid; place-items: center; min-width: 2ch; }
.dh-count span { font-weight: 700; color: var(--muted); }
.dhikr.finished .dh-count { background: var(--accent-soft); }
.dh-count.pulse, .tas-btn.pulse { animation: tap .22s ease-out; }
@keyframes tap { 45% { transform: scale(.965); } }
.dh-done { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 76px; border-radius: 16px; background: var(--brand); color: var(--brand-ink); }
.dh-done b { font-size: 1.5rem; line-height: 1.2; }
.dh-done span { font-size: .72rem; opacity: .85; }

/* tasbih */
.tas { text-align: center; padding: 18px; }
.tas-select { max-width: 100%; margin-bottom: 4px; direction: rtl; font-family: 'Amiri', serif; font-size: 1.05rem; }
.tas-btn { position: relative; display: grid; place-content: center; justify-items: center; width: min(250px, 68vw); aspect-ratio: 1; margin: 16px auto; border-radius: 50%; border: 0; background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--brand) 80%, #fff), var(--brand) 62%); color: var(--brand-ink); box-shadow: var(--shadow-l); cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.tas-btn b { font-size: clamp(3rem, 16vw, 4.4rem); line-height: 1.1; font-variant-numeric: tabular-nums; }
.tas-btn small { opacity: .8; }
.tas-ring { --p: 0; position: absolute; inset: -11px; border-radius: 50%; background: conic-gradient(var(--gold) calc(var(--p) * 1%), color-mix(in srgb, var(--gold) 20%, transparent) 0); -webkit-mask: radial-gradient(closest-side, transparent 92%, #000 93%); mask: radial-gradient(closest-side, transparent 92%, #000 93%); pointer-events: none; }
.tas-meta { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; color: var(--muted); margin-bottom: 12px; }
.tas-meta b { color: var(--ink); }
.chips { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.chips button { display: inline-flex; align-items: center; gap: 5px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface2); color: var(--muted); font-weight: 700; cursor: pointer; font-family: inherit; }
.chips button.on { background: var(--btn); border-color: var(--btn); color: var(--btn-ink); }
.tas-opts { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.tas-opts .btn.on { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.tas-add { display: flex; gap: 8px; padding: 10px; }
.tas-add input { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface2); color: var(--ink); font: inherit; }
.tas-mine { display: flex; flex-wrap: wrap; gap: 8px; }
.tas-mine .chip button { background: none; border: 0; cursor: pointer; color: inherit; display: inline-grid; vertical-align: middle; }

/* today */
.today-head { display: flex; align-items: center; gap: 16px; padding: 18px 20px; background: linear-gradient(150deg, var(--surface), var(--brand-soft)); }
.th-date { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.th-date b { font-size: 1.5rem; color: var(--head); }
.th-date .hij { color: var(--accent); font-weight: 700; }
.city-btn { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; font-size: .85rem; }
.next { padding: 14px 18px; display: flex; flex-direction: column; gap: 8px; }
.n-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.adh-row { display: grid; grid-template-columns: auto 1fr auto; column-gap: 12px; align-items: center; padding: 12px 14px; margin-bottom: 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-weight: 700; }
.adh-row:hover { text-decoration: none; border-color: var(--brand); }
.adh-row .c-ico { grid-row: span 2; width: 40px; height: 40px; }
.adh-row .bar { grid-column: 2 / -1; }
.adh-row .count { color: var(--muted); font-size: .85rem; }
.adh-row.full { border-color: var(--gold); background: linear-gradient(150deg, var(--surface), var(--accent-soft)); }
.salah { padding: 14px 16px; }
.salah header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.salah h3 { margin: 0; color: var(--head); font-size: 1.2rem; }
.salah .time { font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.salah.passed { border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); }
.chks { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.chk { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface2); color: var(--ink); font: inherit; font-size: .9rem; font-weight: 700; cursor: pointer; text-align: start; }
.chk:hover { text-decoration: none; border-color: var(--brand); }
.chk i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--line); color: transparent; flex: none; }
.chk.on { background: var(--brand-soft); border-color: var(--brand); }
.chk.on i { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.chk.main.on i { background: var(--gold); border-color: var(--gold); color: #2a1a05; }
.chk.wide { width: 100%; margin-bottom: 12px; }
.chks.night .chk { margin-bottom: 0; }
.chks.night { margin-bottom: 12px; }
.quran-day { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.quran-day h3 { margin: 0 0 4px; display: flex; align-items: center; gap: 8px; font-size: 1.05rem; color: var(--head); }
.quran-day p { margin: 0 0 8px; }
.qd-btns { display: flex; gap: 6px; }
.kahf { display: flex; gap: 8px; align-items: flex-start; }
.kahf .chk { flex: 1; }
.r-row { display: flex; gap: 8px; align-items: flex-start; }
.r-row .chk { flex: 1; }
.history { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; padding: 16px 12px; text-align: center; }
.h-bar { display: flex; align-items: flex-end; height: 80px; width: 18px; margin: 0 auto 6px; border-radius: 9px; background: var(--brand-soft); overflow: hidden; }
.h-bar i { display: block; width: 100%; background: linear-gradient(var(--gold), var(--brand)); }
.h-day b { display: block; font-size: .8rem; }
.h-day small { color: var(--muted); font-size: .7rem; }

/* prayer + qibla */
.city-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.city-card > div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.city-card b { display: flex; align-items: center; gap: 6px; color: var(--head); }
.city-card small { color: var(--muted); }
.times { padding: 6px; }
.t-row { display: flex; justify-content: space-between; padding: 13px 16px; border-radius: 12px; font-size: 1.1rem; }
.t-row + .t-row { border-top: 1px solid var(--line); }
.t-row b { font-variant-numeric: tabular-nums; }
.t-row.next-one { background: var(--brand); color: var(--brand-ink); }
.pt-opts { display: grid; gap: 12px; }
.pt-opts label:not(.check) { display: grid; gap: 5px; font-weight: 700; font-size: .9rem; }
.isl select { padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface2); color: var(--ink); font: inherit; max-width: 100%; }
.pt-opts .check { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.qibla { text-align: center; padding: 20px; }
.compass { position: relative; width: 190px; height: 190px; margin: 0 auto 12px; border-radius: 50%; border: 6px solid var(--brand-soft); background: radial-gradient(var(--surface2), var(--surface)); box-shadow: var(--shadow-m); transition: transform .15s linear, border-color .3s; }
.compass .n { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); font-weight: 800; color: var(--muted); }
.compass .needle, .compass .kaaba { position: absolute; inset: 0; display: flex; justify-content: center; }
.compass .needle { align-items: center; color: var(--brand); }
.compass .needle svg { transform: rotate(-45deg); }
.compass .kaaba i { display: block; width: 22px; height: 20px; margin-top: 20px; background: #111; border-top: 5px solid var(--gold); border-radius: 3px; }
.compass.aligned { border-color: #2e9e5b; }
.table-scroll { overflow-x: auto; }
.pt-month { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: .88rem; text-align: center; }
.pt-month th, .pt-month td { padding: 7px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.pt-month thead th { color: var(--muted); font-size: .8rem; }
.pt-month tr.now { background: var(--brand-soft); font-weight: 800; }

/* city + translation windows */
.city-box, .gt-box { width: min(480px, 94vw); max-height: 86vh; display: flex; flex-direction: column; gap: 10px; }
.city-box h3, .gt-box h3 { display: flex; align-items: center; gap: 8px; margin: 0; }
.city-search { display: flex; gap: 8px; }
.city-search input, .gt-box input { flex: 1; min-width: 0; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface2); color: var(--ink); font: inherit; }
.city-list, .gt-list { overflow-y: auto; display: grid; gap: 6px; align-content: start; min-height: 60px; }
.city-list button, .gt-list button { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface2); color: var(--ink); cursor: pointer; font: inherit; text-align: start; }
.city-list button:hover, .gt-list button:hover { border-color: var(--brand); }
.city-list small, .gt-list small { color: var(--muted); }
.gt-list { grid-template-columns: 1fr 1fr; }
.gt-list button.on { background: var(--btn); border-color: var(--btn); color: var(--btn-ink); }
.gt-list button.on small { color: inherit; opacity: .8; }
.menu-pop button.gt-open { border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; font-size: .86rem; }
/* keep Google's banner and pop-ups out of the design */
.goog-te-banner-frame, .goog-te-balloon-frame, #goog-gt-tt, .goog-te-spinner-pos, iframe.skiptranslate, .VIpgJd-ZVi9od-ORHb-OEVmcd { display: none !important; }
body { top: 0 !important; }
.goog-text-highlight, font[style] { background: none !important; box-shadow: none !important; }

/* calendar */
.cal-now { display: flex; flex-direction: column; gap: 4px; }
.cal-now b { font-size: 1.4rem; color: var(--head); }
.cal { padding: 14px; }
.cal header { display: flex; align-items: center; justify-content: space-between; text-align: center; margin-bottom: 10px; }
.cal header h3 { margin: 0; color: var(--head); }
.cal header small { color: var(--accent); font-weight: 700; }
.c-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.c-wk { text-align: center; font-size: .72rem; font-weight: 800; color: var(--muted); padding: 4px 0; overflow: hidden; }
.c-cell { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 54px; border-radius: 12px; background: var(--surface2); border: 1px solid transparent; }
.c-cell.empty { background: none; }
.c-cell b { font-size: 1rem; }
.c-cell small { font-size: .68rem; color: var(--muted); text-align: center; line-height: 1.2; }
.c-cell.white { background: var(--brand-soft); }
.c-cell.event { background: var(--accent-soft); border-color: var(--gold); }
.c-cell.today { background: var(--brand); color: var(--brand-ink); }
.c-cell.today small { color: inherit; }
.c-foot, .c-off { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 12px; font-size: .84rem; }
.c-foot .k { display: inline-block; width: 12px; height: 12px; border-radius: 4px; vertical-align: -1px; }
.c-foot .k.event { background: var(--accent-soft); border: 1px solid var(--gold); }
.c-foot .k.white { background: var(--brand-soft); }
.c-off { gap: 8px; }
.c-off small { flex-basis: 100%; text-align: center; }
.events { padding: 6px 14px; }
.e-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; }
.e-row + .e-row { border-top: 1px solid var(--line); }
.e-row > div { display: flex; flex-direction: column; }
.e-row small { color: var(--muted); }

/* Quran */
.q-continue { display: flex; align-items: center; gap: 12px; padding: 14px 18px; color: var(--ink); }
.q-continue div { flex: 1; display: flex; flex-direction: column; }
.q-continue small { color: var(--muted); }
.q-search { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.q-search input { flex: 1; min-width: 200px; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; }
.surah-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.surah { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 16px; background: var(--surface); border: 1px solid color-mix(in srgb, var(--gold) 25%, var(--line)); }
.surah:hover { border-color: var(--brand); }
.surah a { flex: 1; display: flex; align-items: center; gap: 12px; color: var(--ink); min-width: 0; }
.surah a:hover { text-decoration: none; }
.s-n { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--brand-soft); color: var(--brand); border: 1px solid color-mix(in srgb, var(--gold) 60%, transparent); font-weight: 800; font-size: .85rem; }
.s-name { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.s-name b { font-family: 'Amiri', serif; font-size: 1.3rem; line-height: 1.5; }
.s-name small { color: var(--muted); font-size: .75rem; text-align: start; }
.s-meta { font-size: .72rem; color: var(--muted); text-align: end; line-height: 1.5; }
.surah .tool.on, .ayah-row .tool.on { color: var(--gold); }
.surah .tool.on svg, .ayah-row .tool.on svg { fill: currentColor; }
.q-head { display: flex; align-items: center; gap: 14px; padding: 14px 18px; }
.q-head > div:nth-child(2) { flex: 1; text-align: center; }
.q-head h1 { margin: 0; font-family: 'Amiri', serif; font-size: 1.9rem; color: var(--head); }
.q-head p { margin: 0; color: var(--muted); }
.q-meta { font-size: .75rem; color: var(--muted); text-align: end; }
.q-tools { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; padding: 12px 16px; }
.q-tools label { display: grid; gap: 4px; font-size: .8rem; font-weight: 700; flex: 1; min-width: 180px; }
.q-tools select { width: 100%; }
.q-btns { display: flex; gap: 6px; align-items: center; }
.bismillah { font-family: 'Amiri Quran', 'Amiri', serif; font-size: calc(1.7rem * var(--q-size, 1)); text-align: center; color: var(--head); margin: 18px 0; }
.ayah-row { padding: 14px 16px; margin-bottom: 10px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); scroll-margin-top: 90px; }
.ayah-row.playing { border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 35%, transparent); }
.q-ar { font-family: 'Amiri Quran', 'Amiri', serif; font-size: calc(1.75rem * var(--q-size, 1)); line-height: 2.5; text-align: justify; text-align-last: start; margin: 0 0 8px; }
.ayah-end { display: inline-grid; place-items: center; min-width: 1.7em; height: 1.7em; padding: 0 .25em; border: 1.5px solid var(--gold); border-radius: 50%; font-family: 'Amiri', serif; font-size: .62em; line-height: 1; vertical-align: .2em; color: var(--head); }
.q-tr { margin: 0 0 10px; line-height: 1.95; color: var(--ink); }
.q-acts { display: flex; align-items: center; gap: 6px; }
#verses.busy { opacity: .5; }

.page-article { padding: clamp(18px, 4vw, 40px); }
.page-article table { width: 100%; border-collapse: collapse; }
.page-article th, .page-article td { border: 1px solid var(--line); padding: 9px 12px; text-align: start; }
.page-article th { background: var(--brand-soft); }

@media (max-width: 560px) {
  .dh-ar { font-size: 1.4rem; }
  .gt-list { grid-template-columns: 1fr; }
  .c-cell { min-height: 46px; }
  .ring.big { width: 96px; height: 96px; }
  .adh-head { top: 62px; }
}
@media print { .dh-foot, .q-acts, .q-tools, .adh-head .ring { display: none !important; } }
