/* Ramadan Times – app.css (light theme by default, dark theme via [data-theme=dark]) */
:root {
  --bg: #f6f7f9; --surface: #ffffff; --surface-2: #f1f4f7; --text: #0f172a; --muted: #5b6474; --border: #e4e8ee;
  --primary: #0f766e; --primary-2: #115e59; --accent: #c4861a; --accent-soft: #fdf4df; --link: #0f766e; --ok: #15803d;
  --header-bg: rgba(255, 255, 255, .92); --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
  --space-1: #040a18; --space-2: #0a1b33; --space-3: #10284a;
  --zA: #16a34a; --zB: #84cc16; --zC: #f59e0b; --zD: #ef4444; --zS: #64748b; --zN: #334155;
  --radius: 16px; --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; --display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0a111f; --surface: #101a2c; --surface-2: #15223a; --text: #e6edf6; --muted: #98a6ba; --border: #1e2b45;
  --primary: #2dd4bf; --primary-2: #14b8a6; --accent: #f0b84a; --accent-soft: #2a2213; --link: #5eead4;
  --header-bg: rgba(10, 17, 31, .9); --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px rgba(0, 0, 0, .28);
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
.lang-ar { font-family: 'IBM Plex Sans Arabic', var(--font); }
.lang-ur { font-family: 'Noto Nastaliq Urdu', 'IBM Plex Sans Arabic', var(--font); line-height: 2.05; }
.lang-bn { font-family: 'Noto Sans Bengali', var(--font); }
.lang-ur h1, .lang-ur h2, .lang-ur h3 { line-height: 1.9; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.22; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 1.1rem + 2.2vw, 2.5rem); }
h2 { font-size: 1.3rem; } h3, .h3 { font-size: 1.05rem; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); } .small { font-size: .86rem; } .strong { font-weight: 600; } .mt { margin-top: 1.2em; }
.skip { position: absolute; inset-inline-start: -999px; } .skip:focus { inset-inline-start: 8px; top: 8px; background: var(--surface); padding: 8px; z-index: 99; }

/* header */
.site-header { position: sticky; top: 0; z-index: 40; background: var(--header-bg); backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--border); }
.hdr { display: flex; align-items: center; gap: 22px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 1.12rem; white-space: nowrap; font-family: var(--display); letter-spacing: .01em; }
.brand:hover { text-decoration: none; }
.lang-ar .brand, .lang-ur .brand, .lang-bn .brand { font-family: inherit; }
.nav { display: flex; gap: 2px; flex: 1; }
.nav a { color: var(--muted); padding: 8px 12px; border-radius: 10px; font-weight: 500; font-size: .95rem; }
.nav a:hover, .nav a[aria-current] { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav a[aria-current] { color: var(--primary); }
.hdr-tools { display: flex; align-items: center; gap: 6px; margin-inline-start: auto; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; font-size: 1.1rem; }
.icon-btn:hover { background: var(--surface-2); }
.i-moon { display: none; } [data-theme="dark"] .i-sun { display: none; } [data-theme="dark"] .i-moon { display: block; }
.menu-btn { display: none; }
.langs { position: relative; }
.langs summary { list-style: none; display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; font-size: .9rem; color: var(--text); background: var(--surface); }
.langs summary::-webkit-details-marker { display: none; }
.langs ul { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); list-style: none; margin: 0; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); min-width: 190px; z-index: 50; }
.langs li a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--text); }
.langs li a:hover, .langs li a[aria-current] { background: var(--surface-2); text-decoration: none; }
.langs li a[aria-current] { color: var(--primary); font-weight: 600; }
.subbar { border-top: 1px solid var(--border); }
.subbar-in { display: flex; align-items: center; gap: 16px; min-height: 46px; }
.hdate { color: var(--accent); font-weight: 600; font-size: .9rem; white-space: nowrap; }
.search { position: relative; flex: 1; display: flex; max-width: 520px; margin-inline-start: auto; }
.search input { width: 100%; padding: 8px 44px 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; font-size: .92rem; }
[dir=rtl] .search input { padding: 8px 14px 8px 44px; }
.search input:focus { outline: 2px solid var(--primary); outline-offset: 1px; background: var(--surface); }
.geo-btn { position: absolute; inset-inline-end: 4px; top: 50%; transform: translateY(-50%); border: 0; background: var(--primary); color: #fff; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; }
.sugg { position: absolute; top: calc(100% + 6px); inset-inline: 0; margin: 0; padding: 6px; list-style: none; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); z-index: 45; max-height: 360px; overflow: auto; }
.sugg a, .sugg button { display: block; padding: 8px 10px; border-radius: 8px; color: var(--text); width: 100%; text-align: start; background: none; border: 0; font: inherit; cursor: pointer; }
.sugg a:hover, .sugg a.on, .sugg button:hover { background: var(--surface-2); text-decoration: none; }
.sugg small { color: var(--muted); } .sugg .none { padding: 8px 10px; color: var(--muted); }

main { padding: 18px 16px 48px; }
main:not(.wrap) { padding: 0 0 48px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 4px 0 14px; font-size: .84rem; color: var(--muted); }
.crumbs li + li::before { content: '›'; margin-inline-end: 6px; }
[dir=rtl] .crumbs li + li::before { content: '‹'; }
.page-head { margin: 8px 0 22px; }
.lead { color: var(--muted); font-size: 1.07rem; margin: 0; max-width: 780px; }
.eyebrow { display: inline-block; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: #fde68a; margin-bottom: 12px; }
.eyebrow.dark { color: var(--accent); }
.flag { font-size: 1.15em; }

/* cards & blocks */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 20px; }
a.card { color: inherit; display: block; } a.card:hover { text-decoration: none; border-color: var(--primary); }
.block { margin: 34px 0; }
.block-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.block-title { font-size: 1.45rem; }
.grid2, .grid3 { display: grid; gap: 20px; margin-bottom: 20px; } .grid2 > .card, .grid3 > .card { margin: 0; }
.grid2 { grid-template-columns: repeat(2, 1fr); } .grid3 { grid-template-columns: repeat(3, 1fr); }
.big { font-size: 1.35rem; font-weight: 700; display: block; margin: 4px 0; }
.stat { display: flex !important; flex-direction: column; gap: 2px; }
.more { display: inline-block; font-weight: 600; }
.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--primary); color: #fff; border: 1px solid transparent; border-radius: 12px; padding: 11px 20px; font: inherit; font-weight: 600; cursor: pointer; box-shadow: 0 6px 16px rgba(15, 118, 110, .22); }
[data-theme="dark"] .btn { color: #04201d; }
.btn:hover { filter: brightness(1.06); text-decoration: none; }
.btn.small { padding: 7px 14px; font-size: .88rem; box-shadow: none; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--border); box-shadow: none; }
.linklike { background: none; border: 0; color: var(--link); cursor: pointer; font: inherit; padding: 0; }
.row { display: flex; gap: 8px; flex-wrap: wrap; } .row.center { justify-content: center; }

/* ===== home hero (space) ===== */
.hero { position: relative; overflow: hidden; color: #e8f1ff; background: radial-gradient(1200px 600px at 75% 40%, var(--space-3), transparent 60%), linear-gradient(160deg, var(--space-1), var(--space-2) 60%, #0b2742); }
.hero::after { content: ''; position: absolute; inset: auto 0 0 0; height: 80px; background: linear-gradient(to bottom, transparent, rgba(4, 10, 24, .35)); pointer-events: none; }
.hero .stars { position: absolute; inset: 0; background-image: radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,.6), transparent 60%), radial-gradient(1px 1px at 80% 10%, rgba(255,255,255,.5), transparent 60%), radial-gradient(1.5px 1.5px at 50% 70%, rgba(255,255,255,.4), transparent 60%); opacity: .7; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 1fr; gap: 28px; align-items: center; padding-top: 48px; padding-bottom: 54px; }
.hero h1 { font-size: clamp(1.8rem, 1.1rem + 2.4vw, 2.75rem); color: #fff; font-family: var(--display); letter-spacing: -.02em; }
.lang-ar .hero h1, .lang-ur .hero h1, .lang-bn .hero h1 { font-family: inherit; }
.hero h1 .hl { display: block; background: linear-gradient(90deg, #fde68a, #f5b94a 50%, #5eead4); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { color: #b9c8dc; }
.countdown { display: flex; gap: 10px; margin: 24px 0 8px; }
.countdown div { min-width: 78px; padding: 12px 10px 10px; text-align: center; border-radius: 14px; background: rgba(255,255,255,.06); border: 1px solid rgba(148, 197, 255, .22); box-shadow: inset 0 0 22px rgba(94, 234, 212, .06); }
.countdown b { display: block; font: 700 2rem/1 var(--display); color: #fff; font-variant-numeric: tabular-nums; }
.countdown span { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: #93c5fd; }
.cd-label { color: #93a7c3 !important; font-size: .86rem; margin: 0 0 20px; }
.cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hero .btn { background: linear-gradient(90deg, #f3c969, #e0a33a); color: #1a1205; box-shadow: 0 8px 24px rgba(240, 184, 74, .25); }
.hero .btn.ghost { background: rgba(255,255,255,.06); color: #e8f1ff; border-color: rgba(148, 197, 255, .3); box-shadow: none; }
.hero-visual { position: relative; min-height: 420px; }
#orbit { width: 100%; height: 420px; display: block; }
.hud { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.hud li { padding: 10px 12px; border-radius: 12px; background: rgba(8, 20, 40, .55); border: 1px solid rgba(94, 234, 212, .22); backdrop-filter: blur(4px); }
.hud span { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: #7dd3fc; }
.hud b { font: 600 .93rem var(--display); color: #f1f5f9; }
.lang-ar .hud b, .lang-ur .hud b, .lang-bn .hud b { font-family: inherit; }

/* near me */
.home-body { padding-top: 0; }
.near { margin-top: -34px; position: relative; z-index: 2; }
.near-head { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 14px; }
.near-head h2 { margin: 0 0 2px; }
.near-city { margin: 0; }
.near-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.near-next { margin: 12px 0 0; font-weight: 600; display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.near-next a { margin-inline-start: auto; font-weight: 600; }
.near:not(.ready) .tv { color: var(--muted); }

/* key dates */
.kd-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kd { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; position: relative; overflow: hidden; }
.kd::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--accent), var(--primary)); }
.kd-ic { font-size: 1.5rem; } .kd-l { color: var(--muted); font-size: .85rem; } .kd b { font-size: 1.02rem; } .kd small { color: var(--accent); font-weight: 600; }

/* articles */
.art-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.art-grid.three { grid-template-columns: repeat(3, 1fr); }
.art-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.art-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(15, 23, 42, .12); }
.art-img img { aspect-ratio: 1200 / 630; object-fit: cover; width: 100%; }
.art-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.art-body h2, .art-body h3 { margin: 0; font-size: 1.03rem; line-height: 1.35; }
.art-body h2 a, .art-body h3 a { color: var(--text); }
.art-body p { margin: 0; color: var(--muted); font-size: .93rem; flex: 1; }
.art-hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 0; padding: 0; overflow: hidden; }
.art-hero .art-body { padding: 26px; justify-content: center; gap: 12px; }
.art-hero h2 { font-size: 1.5rem; }
.art-hero img { height: 100%; object-fit: cover; }

/* moon teaser */
.moon-teaser { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: center; padding: 28px; }
.evenings { list-style: none; padding: 0; margin: 10px 0; display: flex; flex-direction: column; gap: 6px; }
.evenings li { display: flex; gap: 10px; align-items: center; }
.crescent-art { position: relative; height: 230px; border-radius: 18px; background: radial-gradient(circle at 60% 40%, #13325a, #050b18 70%); overflow: hidden; }
.cr-moon { position: absolute; width: 120px; height: 120px; border-radius: 50%; left: 50%; top: 50%; transform: translate(-50%, -50%); box-shadow: inset -18px 4px 0 0 #fbe7b0; filter: drop-shadow(0 0 18px rgba(251, 231, 176, .45)); animation: cr 6s ease-in-out infinite alternate; }
.cr-glow { position: absolute; inset: 0; background: radial-gradient(circle at 20% 80%, rgba(240, 184, 74, .25), transparent 50%); }
@keyframes cr { from { box-shadow: inset -12px 4px 0 0 #fbe7b0; } to { box-shadow: inset -26px 4px 0 0 #fbe7b0; } }

/* countries */
.country-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.country-grid a { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.country-grid a:hover { border-color: var(--primary); text-decoration: none; }
.country-grid .flag { grid-row: span 2; font-size: 1.6rem; line-height: 1; align-self: center; }
.country-grid .cn { font-weight: 600; } .country-grid .cd { color: var(--muted); font-size: .85rem; }

/* blog post */
.post-head { max-width: 860px; margin: 8px 0 18px; }
.post-cover { border-radius: var(--radius); width: 100%; max-height: 460px; object-fit: cover; margin-bottom: 24px; }
.post-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 34px; align-items: start; }
.post-body { max-width: 760px; font-size: 1.05rem; }
.post-body h2 { font-size: 1.35rem; margin-top: 1.6em; } .post-body h3 { margin-top: 1.3em; }
.post-body li { margin: .35em 0; }
.post-body blockquote { margin: 1.2em 0; padding: 12px 18px; border-inline-start: 4px solid var(--accent); background: var(--accent-soft); border-radius: 8px; }
.post-body .tip { padding: 14px 18px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.post-side { position: sticky; top: 130px; }
.share a { display: inline-block; margin: 4px 8px 4px 0; font-weight: 600; }

/* sitemap page */
.sm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; } .sm-grid .card { margin: 0; }
.sm-list { margin: 0; padding-inline-start: 18px; } .sm-list li { padding: 3px 0; }

/* prayer times */
.hero-grid.city { padding: 0; }
.times { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.times.compact { grid-template-columns: repeat(6, 1fr); }
.tcard { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 8px; text-align: center; display: flex; flex-direction: column; gap: 4px; }
.ti { font-size: 1.3rem; } .tn { color: var(--muted); font-size: .9rem; font-weight: 500; }
.tv { font: 700 1.38rem var(--display); font-variant-numeric: tabular-nums; }
.tcard.is-next { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent) inset; }
.tcard.is-next .tn { color: var(--accent); }
.city .hero-grid, article.city .hero-grid { grid-template-columns: minmax(240px, 1fr) 2.4fr; padding: 0; gap: 18px; margin-bottom: 14px; color: inherit; }
.next-card { margin: 0; background: linear-gradient(160deg, var(--space-1), var(--space-3)); color: #fff; border: 0; text-align: center; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.next-card .muted { color: rgba(255,255,255,.7); }
.next-label { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; color: #fde68a; margin-top: 6px; }
.next-name { font-size: 1.8rem; font-weight: 700; }
.next-count { font: 700 2.2rem var(--display); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.mini-row { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 10px 4px 18px; font-size: .95rem; }
.mini-row time { font-weight: 600; font-variant-numeric: tabular-nums; }
.settings summary { cursor: pointer; font-weight: 600; }
.settings-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; margin-top: 12px; }
.settings label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--muted); }
select, input[type=number], input[type=date], .loc-pick input { font: inherit; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }

/* tables */
.tbl-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.tbl-head h2 { margin: 0; }
.pager { display: flex; gap: 14px; font-size: .9rem; }
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: .93rem; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { padding: 9px 10px; text-align: start; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl thead th { background: var(--surface-2); font-weight: 600; font-size: .8rem; color: var(--muted); position: sticky; top: 0; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl tr.today { background: var(--accent-soft); font-weight: 600; }
.tbl tr.today td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.tbl tr.qadr td:first-child::after { content: ' ★'; color: var(--accent); }
.tbl tr.past { opacity: .55; }
.tbl tbody th { font-weight: 500; }

/* lists */
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); font-size: .92rem; }
.chips a:hover { border-color: var(--primary); text-decoration: none; }
.cols { columns: 4 200px; column-gap: 24px; list-style: none; padding: 0; margin: 0 0 8px; }
.cols li { break-inside: avoid; padding: 3px 0; font-size: .95rem; }
.all-cities h3, .card h3 { color: var(--muted); font-size: .86rem; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--border); padding-bottom: 4px; margin-top: 1.4em; }
.lang-ur .card h3, .lang-ar .card h3 { text-transform: none; letter-spacing: 0; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 600; }
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 18px; }
.feat { display: flex !important; flex-direction: column; gap: 6px; margin: 0; } .fi { font-size: 1.8rem; }
.prose { max-width: 820px; } .prose p { color: var(--text); }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; margin-bottom: 8px; }
.faq summary { cursor: pointer; font-weight: 600; } .faq p { margin: 8px 0 0; color: var(--muted); }

/* compass */
.qibla-card { text-align: center; }
.compass { width: 180px; height: 180px; margin: 4px auto 8px; } .qibla-big .compass { width: 260px; height: 260px; }
.compass svg { width: 100%; height: 100%; }
.c-ring { fill: var(--surface-2); stroke: var(--border); stroke-width: 3; }
.c-dial { transform-origin: 100px 100px; transition: transform .2s; } .c-dial text { fill: var(--muted); font-size: 14px; font-weight: 700; }
.c-needle { transform-origin: 100px 100px; transition: transform .3s; }
.c-arrow { fill: var(--accent); } .c-kaaba { fill: #111; stroke: #f6d27a; stroke-width: 1.5; } .c-hub { fill: var(--text); }

/* zones */
.zone { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .79rem; font-weight: 600; color: #fff; margin: 1px 0; }
.zA { background: var(--zA); } .zB { background: var(--zB); color: #1d2b0f; } .zC { background: var(--zC); color: #2a1d00; } .zD { background: var(--zD); }
.zS { background: var(--zS); } .zN { background: var(--zN); } .zX { background: #999; }

/* moon page */
.moon-now { display: grid; grid-template-columns: 180px 1fr; gap: 24px; align-items: center; }
.moon-now canvas { width: 180px; height: 180px; }
.tl-track { position: relative; height: 62px; margin: 8px 12px 0; border-bottom: 2px solid var(--border); }
.tl-ev small { display: block; margin-bottom: 1px; }
.tl-ev.alt small { margin-bottom: 31px; }
.tl-ev.alt b { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); }
.tl-ev.key small { color: var(--accent); font-weight: 700; }
@media (max-width: 780px) { .tl-ev.nm small { display: none; } .tl-ev.nm.key small { display: block; margin-bottom: 1px; } }
.tl-ev { position: absolute; bottom: 2px; transform: translateX(-50%); text-align: center; line-height: 1.1; color: var(--muted); }
[dir=rtl] .tl-ev { transform: translateX(50%); }
.tl-ev b { display: block; font-size: 1rem; color: var(--accent); } .tl-ev.fm b { color: var(--muted); font-size: .8rem; }
.tl-ev small { font-size: .66rem; white-space: nowrap; }
.tl-now { position: absolute; bottom: -6px; width: 2px; height: 14px; background: var(--ok); }
.tl-range { width: 100%; margin: 6px 0 10px; accent-color: var(--accent); }
.tl-controls { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.tl-controls label { display: flex; gap: 6px; align-items: center; }
.tl-out { display: grid; grid-template-columns: 220px 1fr 320px; gap: 20px; align-items: center; }
.tl-out canvas { width: 200px; height: 200px; }
.tl-date { font-size: 1.15rem; font-weight: 700; }
.sky { width: 100%; height: auto; border-radius: 12px; overflow: hidden; background: #0b1622; }
.sky .sky-bg { fill: #3a7bbf; } .sky .ground { fill: #1e2b1f; } .sky .hz { stroke: #9fb3a0; stroke-width: 1; }
.sky .grid { stroke: rgba(255,255,255,.18); stroke-dasharray: 3 3; } .sky .sky-t { fill: rgba(255,255,255,.75); font-size: 11px; }
.sky .sky-sun { fill: #ffd34d; } .sky .sky-moon { fill: #f4f1e6; }
.loc-pick { position: relative; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.loc-pick input { width: 180px; padding: 6px 10px; }
.vis-controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.seg button { background: var(--surface); color: var(--text); border: 0; padding: 7px 12px; cursor: pointer; font: inherit; font-size: .85rem; border-inline-end: 1px solid var(--border); }
.seg button:last-child { border: 0; } .seg button[aria-pressed=true] { background: var(--primary); color: #fff; }
.map-wrap { position: relative; border-radius: 12px; overflow: hidden; }
#vis-map { width: 100%; height: auto; display: block; --ocean: #0e2233; --land: #24435a; cursor: crosshair; }
.map-busy { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.35); color: #fff; font-weight: 600; }
.legend { list-style: none; padding: 0; margin: 10px 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .85rem; }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-inline-end: 6px; }
.vis-info { background: var(--surface-2); border-radius: 10px; padding: 10px 14px; font-size: .92rem; }

/* hijri */
.hijri-hero { text-align: center; }
.hijri-big { font-size: clamp(1.6rem, 1rem + 3vw, 2.6rem); font-weight: 700; color: var(--accent); }
.conv-out { display: block; margin-top: 10px; font-size: 1.15rem; font-weight: 700; min-height: 1.6em; }
.converter h3 { margin-top: 0; text-transform: none; letter-spacing: 0; border: 0; color: var(--text); font-size: 1rem; }
.months-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; } .months-grid .card { margin: 0; }
.hmonth h3 { margin-top: 0; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-h { font-size: .72rem; color: var(--muted); text-align: center; font-weight: 600; }
.cal-d { background: var(--surface-2); border-radius: 8px; padding: 4px 2px; text-align: center; display: flex; flex-direction: column; min-height: 46px; justify-content: center; }
.cal-d b { font-size: 1rem; } .cal-d small { font-size: .65rem; color: var(--muted); }
.cal-d.today { background: var(--primary); color: #fff; } .cal-d.today small { color: #fff; }
.cal-d.ev { box-shadow: inset 0 0 0 2px var(--accent); }

/* footer */
.site-footer { background: #07101f; color: rgba(226, 232, 240, .78); padding: 40px 0 18px; margin-top: 30px; }
.site-footer a { color: rgba(226, 232, 240, .9); }
.site-footer .brand { color: #fff; }
.foot { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 26px; }
.foot h2 { font-size: .82rem; color: #fde68a; text-transform: uppercase; letter-spacing: .08em; }
.foot ul { list-style: none; padding: 0; margin: 0; } .foot li { padding: 3px 0; font-size: .92rem; }
.foot-langs { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.copy { font-size: .8rem; color: rgba(226, 232, 240, .5); margin-top: 22px; }

/* responsive */
@media (max-width: 1040px) {
  .hero-grid { grid-template-columns: 1fr; padding-top: 30px; }
  .hero-visual { min-height: 0; }
  #orbit { height: 340px; }
  .art-grid { grid-template-columns: repeat(2, 1fr); }
  .kd-grid, .country-grid { grid-template-columns: repeat(2, 1fr); }
  .times, .times.compact { grid-template-columns: repeat(3, 1fr); }
  .city .hero-grid, article.city .hero-grid { grid-template-columns: 1fr; }
  .grid3, .features, .sm-grid { grid-template-columns: repeat(2, 1fr); }
  .tl-out { grid-template-columns: 1fr 1fr; } .tl-out .sky { grid-column: 1 / -1; }
  .months-grid { grid-template-columns: repeat(2, 1fr); }
  .post-grid { grid-template-columns: 1fr; } .post-side { position: static; }
  .foot { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 780px) {
  .nav { display: none; position: absolute; top: 64px; inset-inline: 0; background: var(--surface); border-bottom: 1px solid var(--border); flex-direction: column; padding: 8px 16px 14px; box-shadow: var(--shadow); }
  body.menu-open .nav { display: flex; }
  .menu-btn { display: inline-grid; }
  .langs summary span { display: none; }
  .subbar-in { flex-direction: column; align-items: stretch; gap: 6px; padding: 8px 0; }
  .search { max-width: none; margin: 0; }
  .grid2, .grid3, .features, .settings-grid, .months-grid, .sm-grid, .moon-teaser, .art-hero { grid-template-columns: 1fr; }
  .art-grid, .art-grid.three { grid-template-columns: 1fr; }
  .moon-now { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .tl-out { grid-template-columns: 1fr; justify-items: center; }
  .countdown div { min-width: 0; flex: 1; padding: 10px 4px 8px; } .countdown b { font-size: 1.6rem; }
  #orbit { height: 290px; }
  .hud { grid-template-columns: 1fr 1fr; }
  .tv { font-size: 1.2rem; } .next-count { font-size: 1.9rem; }
  .card { padding: 16px; }
  .foot { grid-template-columns: 1fr; }
  .cols { columns: 2 140px; }
  .near { margin-top: -20px; }
}
@media print {
  .site-header, .site-footer, .crumbs, .settings, .faq, .grid3, .chips, .pager, .next-card, [data-print], .more, .hero { display: none !important; }
  body { background: #fff; color: #000; } .card { box-shadow: none; border: 0; padding: 0; }
}
@media (prefers-reduced-motion: reduce) { .cr-moon { animation: none; } .art-card { transition: none; } }
.side-dates .kv dd { white-space: nowrap; }
.evenings li > span:first-child { white-space: nowrap; }
@media (max-width: 780px) { .moon-teaser .crescent-art { max-height: 220px; } }
.note { padding: 12px 16px; border-radius: 12px; background: var(--accent-soft); border: 1px solid var(--border); font-size: .92rem; }
[lang="ar"]:not(html) { font-family: "IBM Plex Sans Arabic", "Noto Naskh Arabic", "Traditional Arabic", serif; font-style: normal; }
.page-head .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.sm-region { margin-bottom: 16px; } .sm-cities li { padding: 2px 0; break-inside: avoid; }
.foot { grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr; }
@media (max-width: 1040px) { .foot { grid-template-columns: 1fr 1fr; } }
.nav a { white-space: nowrap; }
@media (min-width: 781px) and (max-width: 1240px) {
  .hdr { gap: 12px; }
  .nav a { padding: 8px 8px; font-size: .88rem; }
  .langs summary span { display: none; }
}
@media (min-width: 781px) and (max-width: 1000px) { .brand-txt { display: none; } .nav a { padding: 8px 6px; font-size: .84rem; } }
/* ---------- Ramadan Kareem images & greetings ---------- */
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; margin: 18px 0; }
.img-grid.four { grid-template-columns: repeat(4, 1fr); }
.img-grid.small { grid-template-columns: repeat(4, 1fr); gap: 10px; }
.img-grid.small img { border-radius: 12px; aspect-ratio: 1; object-fit: cover; width: 100%; }
.img-card { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.img-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(15, 23, 42, .12); }
.img-card img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: #0b1220; }
.img-card figcaption { padding: 10px 12px 12px; font-size: .9rem; font-weight: 600; line-height: 1.35; }
.img-card figcaption a { color: var(--text); }
.img-page { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; align-items: start; margin-top: 8px; }
.img-main { padding: 0; overflow: hidden; } .img-main img { display: block; width: 100%; height: auto; }
.img-info h1 { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem); }
.img-text .greet-title { font-size: 1.4rem; font-weight: 700; margin: 4px 0; color: var(--accent); }
.img-text .greet-line { margin: 0; }
.share-row a { font-weight: 600; } .pager { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.prose ul.msgs { list-style: none; padding: 0; margin: 14px 0 22px; display: grid; gap: 10px; }
.prose ul.msgs li { background: var(--surface); border: 1px solid var(--border); border-inline-start: 4px solid var(--accent); border-radius: 12px; padding: 12px 14px; margin: 0; }
.msg-tools { display: flex; gap: 8px; margin-top: 8px; }
.msg-tools button, .msg-tools a { font: inherit; font-size: .8rem; font-weight: 600; padding: 4px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); cursor: pointer; text-decoration: none; }
.msg-tools .ok { color: var(--ok); }
.prose .tpl { background: var(--surface-2); border: 1px dashed var(--border); border-radius: 12px; padding: 14px 18px; margin: 14px 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: .93rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--border); padding: 8px 10px; text-align: start; vertical-align: top; }
.prose th { background: var(--surface-2); }
.prose .ar, .prose [lang="ar"] { font-family: "IBM Plex Sans Arabic", "Noto Naskh Arabic", "Amiri", serif; font-style: normal; font-size: 1.15em; line-height: 2; }
.post-faq, .post-imgs { margin-top: 28px; }
.faq-item { border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; margin: 8px 0; background: var(--surface); }
.faq-item summary { cursor: pointer; font-weight: 600; }
@media (max-width: 1040px) { .img-grid.four { grid-template-columns: repeat(2, 1fr); } .img-page { grid-template-columns: 1fr; } }
@media (max-width: 780px) { .img-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } .img-grid.small { grid-template-columns: repeat(2, 1fr); } }
