/* Minara 5 – the same design as the iPhone app: a big picture at the top of every tab, white cards
   that overlap it, a large countdown and an icon tab bar. Fluid from 280 px phones to large screens;
   light mode and a neutral (not green) dark mode. */

:root {
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, 'Segoe UI', Roboto, 'Manrope', 'Helvetica Neue', Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, 'Segoe UI', Roboto, 'Manrope', sans-serif;
  --font-num: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, 'Segoe UI', Roboto, 'Manrope', sans-serif;
  --font-ar: 'Noto Kufi Arabic', -apple-system, system-ui, 'Segoe UI', Tahoma, sans-serif;
  --gold: #F3C65F;
  --sat: var(--safe-area-inset-top, env(safe-area-inset-top, 0px));
  --sab: var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px));
  --sal: var(--safe-area-inset-left, env(safe-area-inset-left, 0px));
  --sar: var(--safe-area-inset-right, env(safe-area-inset-right, 0px));
  --gx: clamp(12px, 4.1vw, 16px);               /* side gutter */
  --gap: 16px;                                  /* space between cards */
  --nav-h: 54px;
  --r: 22px;                                    /* card corners */
  --r-sm: 14px;
  --hero-h: clamp(244px, 76vw, 312px);          /* picture height (plus the status bar) */
  --over: clamp(86px, 27vw, 112px);             /* how far the cards overlap the picture */
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.3, 1.35, .5, 1);
}

:root,
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #F6F7F6;
  --card: #FFFFFF;
  --card-2: #F2F5F3;
  --line: rgba(15, 31, 24, 0.07);
  --sep: rgba(15, 31, 24, 0.07);
  --border: rgba(15, 31, 24, 0.1);
  --text: #15211C;
  --text-2: #66706B;
  --accent: #129462;
  --accent-2: #0D7E53;
  --accent-text: #0F855A;
  --accent-ink: #FFFFFF;
  --accent-soft: #E3F4EB;
  --accent-soft-2: #CDEBDC;
  --accent-glow: rgba(18, 148, 98, 0.32);
  --gold-ink: #9A6F12;
  --gold-soft: #FBF1D7;
  --nav: rgba(249, 250, 249, 0.86);
  --nav-border: rgba(15, 31, 24, 0.08);
  --tab-off: #8E948F;
  --shadow: 0 1px 2px rgba(15, 42, 30, 0.04), 0 8px 26px -10px rgba(15, 42, 30, 0.14);
  --shadow-up: 0 2px 4px rgba(15, 42, 30, 0.05), 0 16px 34px -14px rgba(15, 42, 30, 0.24);
  --danger: #C2362D;
  --ring-track: #EAF0ED;
  --ring-a: #5FD9AC;
  --ring-b: #129462;
  --dial-a: #FFFFFF;
  --dial-b: #EAF2EE;
  --dial-line: rgba(20, 44, 34, 0.08);
  --sk-a: #EEF3F0;
  --sk-b: #E3EAE6;
  --g-bg: #E3F4EB; --g-fg: #0F855A;
  --t-bg: #E3F4EB; --t-fg: #0F855A;
  --y-bg: #FBF1D7; --y-fg: #9A6F12;
  --b-bg: #E3F4EB; --b-fg: #0F855A;
  --n-bg: #EEF1F0; --n-fg: #4A5550;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0E0F11;
  --card: #17181B;
  --card-2: #1F2125;
  --line: rgba(255, 255, 255, 0.07);
  --sep: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.12);
  --text: #F2F3F5;
  --text-2: #9B9FA7;
  --accent: #46D69E;
  --accent-2: #27B680;
  --accent-text: #5FDDAA;
  --accent-ink: #04261A;
  --accent-soft: rgba(70, 214, 158, 0.15);
  --accent-soft-2: rgba(70, 214, 158, 0.26);
  --accent-glow: rgba(70, 214, 158, 0.25);
  --gold-ink: #F3C65F;
  --gold-soft: rgba(243, 198, 95, 0.14);
  --nav: rgba(22, 23, 26, 0.88);
  --nav-border: rgba(255, 255, 255, 0.08);
  --tab-off: #7C8088;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 26px -10px rgba(0, 0, 0, 0.6);
  --shadow-up: 0 2px 4px rgba(0, 0, 0, 0.3), 0 16px 34px -14px rgba(0, 0, 0, 0.75);
  --danger: #FF8A80;
  --ring-track: #26282D;
  --ring-a: #7BE6BB;
  --ring-b: #27B680;
  --dial-a: #222428;
  --dial-b: #121316;
  --dial-line: rgba(255, 255, 255, 0.08);
  --sk-a: #1B1D20;
  --sk-b: #25272B;
  --g-bg: rgba(70, 214, 158, 0.15); --g-fg: #5FDDAA;
  --t-bg: rgba(70, 214, 158, 0.15); --t-fg: #5FDDAA;
  --y-bg: rgba(243, 198, 95, 0.14); --y-fg: #F3C65F;
  --b-bg: rgba(70, 214, 158, 0.15); --b-fg: #5FDDAA;
  --n-bg: rgba(255, 255, 255, 0.08); --n-fg: #C3C7CE;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
body {
  position: relative; margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 15px; line-height: 1.42; letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none;
  text-rendering: optimizeLegibility; overflow-x: hidden;
}
html[lang="ar"] body { font-family: var(--font-ar); letter-spacing: 0; }
button, input, select { font: inherit; color: inherit; }
button { -webkit-user-select: none; user-select: none; }
a { color: var(--accent-text); text-decoration: none; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 12px; }
.ic { width: 20px; height: 20px; flex: none; stroke-width: 1.85; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.small { font-size: 12.5px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
html[dir="rtl"] .flip { transform: scaleX(-1); }
.bg { display: none; }

/* ---------- shell ---------- */
.app {
  width: 100%; max-width: 560px; margin: 0 auto; min-height: 100vh; min-height: 100dvh;
  padding: 0 calc(var(--gx) + var(--sar)) calc(var(--nav-h) + var(--sab) + 28px) calc(var(--gx) + var(--sal));
}
main { display: flex; flex-direction: column; gap: var(--gap); }
.col { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
.grow { flex: 1; min-width: 0; }
.home-grid, .times-grid, .dhikr-grid, .split, .cal-grid-wrap, .qibla-grid { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }

/* ---------- the picture header of each tab ---------- */
.hero {
  position: relative; height: calc(var(--sat) + var(--hero-h));
  margin: 0 calc(-1 * (var(--gx) + var(--sar))) 0 calc(-1 * (var(--gx) + var(--sal)));
}
.hero-pic {
  position: absolute; inset: 0; border-radius: 0 0 34px 34px; overflow: hidden;
  background-color: var(--card-2); background-position: center 62%; background-size: cover; background-repeat: no-repeat;
}
/* light pictures melt into the light page; in dark mode they keep their rounded edge */
:root[data-theme="light"] .hero.fade .hero-pic {
  border-radius: 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 50%, rgba(0, 0, 0, .55) 75%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 50%, rgba(0, 0, 0, .55) 75%, transparent 100%);
}
.hero-row {
  position: absolute; z-index: 1; top: calc(var(--sat) + clamp(30px, 10.5vw, 48px));
  left: calc(22px + var(--sal)); right: calc(20px + var(--sar)); display: flex; align-items: center; gap: 10px;
}
.hero h1 {
  flex: 1; min-width: 0; margin: 0; font-family: var(--font-display); font-size: clamp(32px, 11.2vw, 44px); font-weight: 760;
  letter-spacing: -0.03em; line-height: 1.12; color: #fff; text-shadow: 0 2px 14px rgba(0, 0, 0, .3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
html[lang="ar"] .hero h1 { letter-spacing: 0; line-height: 1.35; }
.hero.ink h1 { color: #15211C; text-shadow: 0 1px 12px rgba(255, 255, 255, .45); }
.hbtn {
  width: 46px; height: 46px; flex: none; border-radius: 50%; display: grid; place-items: center; cursor: pointer; padding: 0;
  color: #fff; background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .3);
  -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%);
  transition: transform .18s var(--spring), background .2s;
}
.hbtn .ic { width: 22px; height: 22px; stroke-width: 2; }
.hbtn:active { transform: scale(.9); }
.hero.ink .hbtn { color: #15211C; background: rgba(255, 255, 255, .58); border-color: rgba(255, 255, 255, .75); }
@media (hover: hover) { .hbtn:hover { background: rgba(255, 255, 255, .3); } .hero.ink .hbtn:hover { background: rgba(255, 255, 255, .8); } }
.hero + main { position: relative; z-index: 2; margin-top: calc(-1 * var(--over)); }
body[data-page="more"] { --over: clamp(112px, 37vw, 150px); }

/* compact header for inner pages */
.topbar { display: flex; align-items: center; gap: 12px; padding: calc(var(--sat) + 14px) 2px 8px; }
.topbar .tt { flex: 1; min-width: 0; }
.topbar h1 {
  margin: 0; font-family: var(--font-display); font-size: clamp(26px, 8.2vw, 32px); font-weight: 760; letter-spacing: -0.03em; line-height: 1.15;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
html[lang="ar"] .topbar h1 { letter-spacing: 0; line-height: 1.4; }
.eyebrow { display: flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 550; color: var(--text-2); margin-bottom: 2px; }
.eyebrow .ic { width: 13px; height: 13px; }
.round-btn, .back {
  width: 42px; height: 42px; flex: none; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  color: var(--accent-text); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .18s var(--spring);
}
.round-btn .ic, .back .ic { width: 21px; height: 21px; stroke-width: 2.2; }
.round-btn:active, .back:active { transform: scale(.9); }

/* small title bar that slides in while scrolling */
.minibar {
  position: fixed; z-index: 45; top: 0; left: 0; right: 0; height: calc(var(--sat) + 46px); padding: var(--sat) calc(56px + var(--sar)) 0 calc(56px + var(--sal));
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: var(--nav); border-bottom: 1px solid var(--nav-border);
  -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  opacity: 0; transform: translateY(-100%); transition: opacity .2s var(--ease), transform .26s var(--ease); pointer-events: none;
}
.minibar.show { opacity: 1; transform: none; pointer-events: auto; }
.minibar b { font-size: 16px; font-weight: 650; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mb-back { position: absolute; left: calc(6px + var(--sal)); bottom: 3px; width: 40px; height: 40px; display: grid; place-items: center; color: var(--accent-text); }
html[dir="rtl"] .mb-back { left: auto; right: calc(6px + var(--sar)); }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
a.card, button.card, .evcard { transition: transform .18s var(--spring), box-shadow .25s var(--ease); }
a.card:active, button.card:active, .evcard:active { transform: scale(.975); }
@media (hover: hover) {
  a.card:hover, button.card:hover, .evcard:hover { box-shadow: var(--shadow-up); transform: translateY(-1px); }
  .row-link:hover, .crow:is(a):hover, .drow:hover, .result:hover, .pick:hover, .bell:hover, .nav-btn:hover, .icon-btn:hover { background: var(--card-2); }
}
.card-head { padding: 14px 16px 6px; }
.card-head h2 { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.group-label { margin: 10px 8px -6px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); scroll-margin-top: calc(var(--sat) + 60px); }
.sectitle { margin: 6px 6px -6px; font-family: var(--font-display); font-size: clamp(22px, 6.8vw, 26px); font-weight: 760; letter-spacing: -0.025em; line-height: 1.2; }
html[lang="ar"] .sectitle { letter-spacing: 0; }

/* badge: rounded square with a soft green background */
.bd { width: 44px; height: 44px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.bd .ic { width: 22px; height: 22px; stroke-width: 1.9; }

/* card row: badge, two lines of text, chevron */
.crow { position: relative; display: flex; align-items: center; gap: 14px; padding: 15px 18px; color: var(--text); transition: background .15s; }
.crow + .crow::before, .crow + .about-text::before { content: ''; position: absolute; top: 0; inset-inline-start: 76px; inset-inline-end: 0; border-top: 1px solid var(--sep); }
.crow b { display: block; font-size: 17px; font-weight: 650; letter-spacing: -0.015em; line-height: 1.25; }
.crow small { display: block; margin-top: 2px; font-size: 13.5px; color: var(--text-2); line-height: 1.3; }
.crow .chev { width: 18px; height: 18px; color: var(--accent-text); flex: none; stroke-width: 2.4; }
.crow .logo { width: 44px; height: 44px; border-radius: 13px; flex: none; }
button.crow { width: 100%; font: inherit; text-align: start; cursor: pointer; }
a.card.crow, button.card.crow { padding: 16px 18px; }
.about-text { position: relative; padding: 14px 18px 16px; }
.about-text p { margin: 0 0 6px; font-size: 14.5px; }
.about-text p:last-child { margin: 0; }

/* ---------- Home ---------- */
.placeline {
  display: flex; align-items: center; gap: 6px; min-width: 0; padding: 0 8px; margin-bottom: -6px;
  font-size: 15px; color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, .4);
}
.placeline .ic { width: 17px; height: 17px; stroke-width: 2.2; }
.placeline b { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; max-width: 58%; }
.placeline span { opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.hero.ink + main .placeline { color: #15211C; text-shadow: 0 1px 8px rgba(255, 255, 255, .5); }

/* the countdown */
.count { display: flex; align-items: center; gap: 12px; min-height: 122px; padding: 20px 22px; }
.cd {
  display: flex; align-items: flex-start; gap: 4px; direction: ltr; font-family: var(--font-num); font-size: clamp(40px, 13.8vw, 56px);
  font-weight: 720; letter-spacing: -0.035em; line-height: 1.04; font-variant-numeric: tabular-nums;
}
html[dir="rtl"] .cd { justify-content: flex-end; }
.cd sup { font-size: .46em; font-weight: 600; color: var(--text-2); margin-top: .14em; min-width: 1.3em; letter-spacing: -0.01em; }
.cd-sub { margin-top: 6px; font-size: clamp(14px, 4.3vw, 17px); font-weight: 520; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cd-ic { flex: none; color: var(--accent); display: grid; place-items: center; }
.cd-ic .ic { width: clamp(44px, 14vw, 58px); height: clamp(44px, 14vw, 58px); stroke-width: 1.5; }
.sk-count { width: 70%; height: 44px; }
.sk-sub { width: 50%; height: 14px; margin-top: 10px; }

/* today's six times in a row */
.strip {
  position: relative; display: flex; gap: 4px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: none;
  scroll-snap-type: x proximity; margin: -2px calc(-1 * var(--gx)); padding: 2px var(--gx);
  --fade: var(--gx);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--fade), #000 calc(100% - var(--fade)), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 var(--fade), #000 calc(100% - var(--fade)), transparent 100%);
}
.strip::-webkit-scrollbar { display: none; }
.strip .it {
  flex: 1 0 76px; scroll-snap-align: center; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 4px;
  border-radius: 18px; color: var(--text); transition: background .25s var(--ease);
}
.strip .ic { width: 24px; height: 24px; color: var(--accent); }
.strip b { display: flex; align-items: baseline; gap: 2px; font-family: var(--font-num); font-size: clamp(18px, 5.6vw, 22px); font-weight: 560; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; line-height: 1.2; }
.strip b small { font-size: 11px; font-weight: 600; color: var(--text-2); }
.strip span { max-width: 100%; font-size: 14px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip .past b, .strip .past .ic { color: var(--text-2); }
.strip .next { background: var(--accent-soft); }
.strip .next b { font-weight: 760; }
.strip .next span { color: var(--accent-text); font-weight: 650; }
@media (hover: hover) { .strip .it:hover:not(.next) { background: var(--card-2); } }

/* the next Islamic day */
.evcard {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: var(--r); color: #fff;
  background: linear-gradient(135deg, #0F5C42, #0A3B2E); box-shadow: 0 16px 30px -18px rgba(5, 40, 30, .75);
}
.evcard .evi { width: 58px; height: 58px; flex: none; border-radius: 18px; display: grid; place-items: center; color: #FFF3C9; background: rgba(255, 255, 255, .13); }
.evcard .evi .ic { width: 28px; height: 28px; }
.evcard b { display: block; font-size: 18px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.25; }
.evcard em { display: block; margin-top: 3px; font-style: normal; font-size: 14.5px; font-weight: 650; color: #FFE7A3; }
.evcard small { display: block; margin-top: 3px; font-size: 13px; opacity: .82; }
.evcard .chev { width: 18px; height: 18px; color: rgba(255, 255, 255, .85); stroke-width: 2.4; }
.evcard .spark { position: absolute; top: 10px; inset-inline-end: 10px; color: rgba(243, 198, 95, .4); }
.evcard .spark .ic { width: 20px; height: 20px; }

/* Qibla and calendar side by side */
.minis { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.mini { display: flex; flex-direction: column; gap: 10px; min-height: 128px; padding: 16px; color: var(--text); }
.mini .bd { width: 46px; height: 46px; border-radius: 15px; }
.mini b { font-size: 16.5px; font-weight: 650; letter-spacing: -0.015em; line-height: 1.25; }
.mini small { margin-top: -6px; font-size: 13px; color: var(--text-2); line-height: 1.3; }

/* one-line cards and tips */
.line { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; color: var(--text); }
.line b { font-size: 16px; font-weight: 650; letter-spacing: -0.01em; line-height: 1.25; display: block; }
.line small { display: block; margin-top: 2px; font-size: 13px; color: var(--text-2); }
.tip { padding-inline-end: 8px; }
.tip small.wrap { white-space: normal; line-height: 1.3; }
.x-btn { width: 32px; height: 32px; flex: none; margin-inline-start: -4px; border: 0; border-radius: 50%; background: transparent; color: var(--text-2); display: grid; place-items: center; cursor: pointer; }
.x-btn .ic { width: 16px; height: 16px; }
@media (hover: hover) { .x-btn:hover { background: var(--card-2); } }
.precise .spinner { width: 16px; height: 16px; color: var(--text-2); }
.leaving { animation: leave .24s var(--ease) forwards; }
@keyframes leave { to { opacity: 0; transform: scale(.96); } }
.tag { flex: none; font-size: 12px; font-weight: 700; color: var(--gold-ink); background: var(--gold-soft); padding: 5px 10px; border-radius: 99px; white-space: nowrap; }

/* ad space */
.ad-slot { border-radius: 20px; border: 1.5px dashed var(--border); background: color-mix(in srgb, var(--card) 65%, transparent); min-height: 88px; display: grid; place-content: center; text-align: center; gap: 2px; padding: 12px; overflow: hidden; }
.ad-slot .ad-label { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-2); }
.ad-slot .ad-ph { font-size: 13px; color: var(--text-2); }
.ad-slot.filled { border-style: solid; border-color: var(--line); display: block; padding: 0; background: var(--card); }

/* skeletons */
.sk { display: block; border-radius: 9px; background: linear-gradient(90deg, var(--sk-a) 25%, var(--sk-b) 50%, var(--sk-a) 75%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.sk-ic { width: 24px; height: 24px; border-radius: 8px; flex: none; }
.sk-name { flex: 0 0 38%; height: 14px; }
.sk-time { width: 52px; height: 16px; margin-inline-start: auto; margin-inline-end: 46px; }

/* ---------- Times: the day card and the list ---------- */
.datecard { display: flex; align-items: center; gap: 2px; padding: 10px 8px; }
.nav-btn { position: relative; width: 40px; height: 44px; flex: none; border: 0; border-radius: 12px; background: transparent; color: var(--accent-text); display: grid; place-items: center; cursor: pointer; transition: transform .18s var(--spring), background .15s; }
.nav-btn .ic { width: 20px; height: 20px; stroke-width: 2.4; }
.nav-btn:active { transform: scale(.86); }
.pick { position: relative; min-width: 0; padding: 4px 6px; border-radius: 12px; cursor: pointer; transition: background .15s; }
.pick b { display: flex; align-items: center; gap: 6px; font-size: clamp(18px, 5.6vw, 22px); font-weight: 760; letter-spacing: -0.025em; white-space: nowrap; line-height: 1.25; }
.pick b .dd { width: 15px; height: 15px; color: var(--accent-text); stroke-width: 2.6; }
.pick small { display: block; font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; margin: 0; }
.today-btn { position: relative; min-height: 32px; flex: none; padding: 0 12px; border-radius: 999px; border: 0; background: var(--accent-soft); color: var(--accent-text); font-weight: 700; font-size: 13.5px; cursor: pointer; }
.nav-btn::after, .today-btn::after { content: ''; position: absolute; inset: -4px; }

.list, .plist, .dlist { overflow: hidden; }
.prow { position: relative; display: flex; align-items: center; gap: 16px; min-height: 62px; padding: 6px 8px 6px 20px; transition: background .25s var(--ease); }
html[dir="rtl"] .prow { padding: 6px 20px 6px 8px; }
.prow + .prow::before { content: ''; position: absolute; top: 0; left: 0; right: 0; border-top: 1px solid var(--sep); }
.prow .pi { color: var(--accent); display: grid; place-items: center; }
.prow .pi .ic { width: 24px; height: 24px; }
.prow .pn { flex: 1; min-width: 0; font-size: 18px; font-weight: 450; letter-spacing: -0.015em; line-height: 1.25; }
.prow .pn .in { display: block; font-size: 13px; font-weight: 650; color: var(--accent-text); letter-spacing: -0.005em; }
.prow .pt { font-family: var(--font-num); font-size: 20px; font-weight: 720; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; white-space: nowrap; }
.prow .pt small { font-size: 11px; font-weight: 600; margin-inline-start: 3px; color: var(--text-2); }
.prow.next { background: var(--card-2); }
.prow.next .pn { font-weight: 720; }
.prow.past .pn, .prow.past .pt, .prow.past .pi { color: var(--text-2); }
.bell { position: relative; width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; background: transparent; color: var(--text-2); display: grid; place-items: center; cursor: pointer; transition: color .2s, transform .18s var(--spring); }
.bell:active { transform: scale(.84); }
.bell[aria-pressed="true"] { color: var(--accent); }
.bell[aria-pressed="true"] .ic { fill: currentColor; }
.bell .ic { width: 21px; height: 21px; }
.bell-gap { width: 44px; flex: none; }
.swipe { touch-action: pan-y; }
.slide-l { animation: slideL .3s var(--ease); }
.slide-r { animation: slideR .3s var(--ease); }
@keyframes slideL { from { opacity: 0; transform: translateX(22px); } }
@keyframes slideR { from { opacity: 0; transform: translateX(-22px); } }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 0; background: transparent; color: var(--text); display: grid; place-items: center; cursor: pointer; }
.icon-btn:active { background: var(--card-2); }

/* ---------- More: tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tile { display: flex; flex-direction: column; gap: 14px; min-height: clamp(118px, 38vw, 150px); padding: 14px; color: var(--text); }
.tile .bd { width: 50px; height: 50px; border-radius: 16px; }
.tile .bd .ic { width: 24px; height: 24px; }
.tile b { font-size: clamp(13.5px, 4.1vw, 16px); font-weight: 650; letter-spacing: -0.015em; line-height: 1.22; overflow-wrap: anywhere; hyphens: auto; }

/* empty and welcome states */
.empty, .welcome { padding: 32px 22px 28px; text-align: center; display: grid; justify-items: center; gap: 8px; }
.ei { position: relative; width: 66px; height: 66px; display: grid; place-items: center; margin: 6px 0 6px; color: var(--accent-text); }
.ei::before, .ei::after { content: ''; position: absolute; inset: 7px; border-radius: 16px; background: var(--accent-soft); }
.ei::after { transform: rotate(45deg); }
.ei .ic { position: relative; z-index: 1; width: 26px; height: 26px; }
.empty h2, .welcome h2 { margin: 4px 0 0; font-size: 21px; font-weight: 750; letter-spacing: -0.02em; }
.empty p, .welcome p { margin: 0; color: var(--text-2); font-size: 15px; max-width: 320px; }
.welcome .stack { width: 100%; max-width: 360px; margin-top: 10px; }

/* ---------- lists and controls ---------- */
.row { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 9px 16px; position: relative; }
.row + .row::before, .row + .results::before, .results + .row::before { content: ''; position: absolute; top: 0; left: 16px; right: 16px; border-top: 1px solid var(--sep); }
.results { position: relative; }
.row .grow { flex: 1; min-width: 0; }
.row .label { font-weight: 550; font-size: 15px; display: block; }
.row .hint { display: block; color: var(--text-2); font-size: 12.5px; margin-top: 1px; }
.row .chev { color: var(--text-2); width: 18px; height: 18px; }
.row.col { flex-direction: column; align-items: stretch; }
.row-link { color: var(--text); transition: background .15s; }
.row-link:active { background: var(--card-2); }
.switch-row { cursor: pointer; }
.row .ri { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent-text); }
.row .ri .ic { width: 17px; height: 17px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 20px;
  border-radius: 999px; border: 0; cursor: pointer; font-weight: 650; font-size: 15px; color: var(--accent-ink);
  background: linear-gradient(160deg, var(--accent), var(--accent-2)); box-shadow: 0 10px 20px -12px var(--accent-glow); transition: transform .18s var(--spring), filter .15s;
}
.btn .ic { width: 18px; height: 18px; }
.btn:active { transform: scale(.96); }
@media (hover: hover) { .btn:hover { filter: brightness(1.05); } }
.btn.ghost { background: var(--card-2); color: var(--text); border: 1px solid var(--line); box-shadow: none; }
.btn.block { width: 100%; }
.btn.sm { min-height: 34px; padding: 6px 14px; font-size: 12.5px; flex: none; box-shadow: none; }
.btn.sm .spinner { width: 16px; height: 16px; }
.btn:disabled { opacity: 0.6; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin 0.8s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.error { color: var(--danger); font-weight: 600; font-size: 13.5px; margin: 0; padding: 0 6px; }
.select {
  appearance: none; -webkit-appearance: none; border: 0; background: transparent; color: var(--text-2); font-size: 14.5px; text-align: end;
  max-width: 55%; min-height: 40px; padding: 6px 20px 6px 4px; cursor: pointer; border-radius: 10px;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 8px) 52%, calc(100% - 3px) 52%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
html[dir="rtl"] .select { background-position: 8px 52%, 3px 52%; padding: 6px 4px 6px 20px; text-align: start; }
.select option { color: #000; }
.field { width: 100%; min-height: 46px; padding: 10px 16px; border-radius: 15px; border: 1px solid var(--border); background: var(--card-2); color: var(--text); font-size: 16px; transition: border-color .15s, box-shadow .15s; }
.field:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field::placeholder { color: var(--text-2); }
.seg { display: flex; gap: 2px; padding: 3px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--line); width: 100%; }
.seg button { flex: 1; min-width: 0; min-height: 36px; border: 0; border-radius: 11px; background: transparent; color: var(--text-2); font-weight: 600; font-size: 13.5px; cursor: pointer; padding: 4px 6px; transition: background .25s var(--ease), color .2s, box-shadow .25s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 4px 10px -4px rgba(0, 0, 0, .14); }
.switch { position: relative; width: 48px; height: 29px; flex: none; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: var(--border); transition: background 0.25s var(--ease); }
.switch i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 25px; height: 25px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22); transition: transform 0.28s var(--spring); }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(19px); }
html[dir="rtl"] .switch i::after { left: auto; right: 2px; }
html[dir="rtl"] .switch input:checked + i::after { transform: translateX(-19px); }
.switch input:focus-visible + i { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.stepper { display: flex; align-items: center; gap: 2px; background: var(--card-2); border: 1px solid var(--line); border-radius: 13px; padding: 2px; }
.stepper button { width: 40px; height: 36px; border-radius: 11px; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; color: var(--text); }
.stepper button:active { background: var(--card); }
.stepper .ic { width: 16px; height: 16px; }
.stepper output { min-width: 52px; text-align: center; font-family: var(--font-num); font-weight: 650; font-variant-numeric: tabular-nums; font-size: 13.5px; }
details.group > summary { list-style: none; cursor: pointer; }
details.group > summary::-webkit-details-marker { display: none; }
details.group > summary .chev { transition: transform 0.25s var(--ease); color: var(--text-2); }
details.group[open] > summary .chev { transform: rotate(90deg); }
.group { overflow: hidden; }
.results { display: flex; flex-direction: column; }
.result { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-height: 52px; padding: 10px 16px; border: 0; background: transparent; text-align: start; cursor: pointer; width: 100%; }
.result + .result::before { content: ''; position: absolute; top: 0; left: 16px; right: 16px; border-top: 1px solid var(--sep); }
.result span { font-size: 12.5px; color: var(--text-2); }
.note { font-size: 12.5px; color: var(--text-2); padding: 0 8px; margin: 0; line-height: 1.5; }
.inline-link { display: inline-block; font-weight: 650; padding: 10px 2px; margin: -10px 0; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 16px; background: var(--card-2); border: 1px solid var(--line); font-size: 13px; color: var(--text-2); }
.notice .ic { width: 18px; height: 18px; color: var(--accent-text); flex: none; margin-top: 1px; }
.loc-line { display: flex; align-items: center; gap: 6px; }
.loc-line .ic { width: 15px; height: 15px; }

/* ---------- qibla ---------- */
.compass-card { padding: 20px 16px 16px; display: grid; place-items: center; gap: 14px; }
.compass { position: relative; width: min(68vw, 270px); aspect-ratio: 1; border-radius: 50%; transition: box-shadow 0.3s; box-shadow: 0 16px 34px -18px rgba(0, 0, 0, .35); }
.compass.ok { box-shadow: 0 0 0 5px rgba(61, 214, 154, 0.22), 0 0 40px rgba(61, 214, 154, 0.38); }
.compass svg { width: 100%; height: 100%; display: block; }
.qibla-status { text-align: center; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; min-height: 24px; max-width: 320px; }
.qibla-status.ok { color: var(--accent-text); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fact { padding: 12px 14px; display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; }
.fact .fi { grid-row: span 2; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--g-bg); color: var(--g-fg); }
.fact .fi .ic { width: 18px; height: 18px; }
.fact b { display: block; font-family: var(--font-num); font-size: 18px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.1; }
.fact span { font-size: 11.5px; color: var(--text-2); }


/* ---------- Dhikr list ---------- */
.dhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--sep); }
.dhead b { font-size: 20px; font-weight: 750; letter-spacing: -0.02em; }
.dhead span { font-size: 13.5px; font-weight: 650; color: var(--accent-text); white-space: nowrap; }
.drow { position: relative; display: flex; align-items: center; gap: 14px; padding: 12px 18px 12px 20px; color: var(--text); transition: background .15s; }
html[dir="rtl"] .drow { padding: 12px 20px 12px 18px; }
.drow + .drow::before { content: ''; position: absolute; top: 0; inset-inline-start: 64px; inset-inline-end: 0; border-top: 1px solid var(--sep); }
.drow:active { background: var(--card-2); }
.dic { width: 30px; flex: none; display: grid; place-items: center; color: var(--accent-text); opacity: .5; }
.dic .ic { width: 24px; height: 24px; }
.dic.on { opacity: 1; }
.drow .ar { display: block; font-family: var(--font-ar); font-size: 20px; font-weight: 600; line-height: 1.75; }
html:not([dir="rtl"]) .drow .ar { text-align: left; }
.drow small { display: block; font-size: 13.5px; color: var(--text-2); line-height: 1.3; }
.drow .chev { width: 18px; height: 18px; color: var(--accent-text); stroke-width: 2.4; flex: none; }
.trow .bd { width: 36px; height: 36px; border-radius: 11px; }
.trow .bd .ic { width: 19px; height: 19px; }
.trow .label { font-weight: 550; }

/* ---------- Tasbih counter ---------- */
.tasbih-page { display: flex; flex-direction: column; gap: 18px; }
.dhikr-text { text-align: center; padding: 4px 16px 0; }
.dhikr-text .ar { font-family: var(--font-ar); font-size: clamp(26px, 8.4vw, 34px); line-height: 1.7; font-weight: 600; }
.dhikr-text .tl { font-weight: 650; font-size: 17px; }
.dhikr-text .mean { color: var(--text-2); font-size: 15px; margin-top: 2px; }
.counter-wrap { display: grid; place-items: center; padding: 2px 0; }
.counter {
  position: relative; width: min(70vw, 270px); aspect-ratio: 1; border-radius: 50%; padding: 0; cursor: pointer; color: var(--text);
  touch-action: manipulation; user-select: none; -webkit-user-select: none; transition: transform 0.15s var(--spring);
  background: var(--card); border: 1px solid var(--line); box-shadow: 0 18px 40px -18px rgba(15, 42, 30, .35);
}
:root[data-theme="dark"] .counter { box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .8); }
.counter svg { position: absolute; inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); transform: rotate(-90deg); }
html[dir="rtl"] .counter svg { transform: rotate(-90deg) scaleY(-1); }
.counter .track { stroke: var(--ring-track); }
.counter .bar { transition: stroke-dashoffset 0.3s var(--ease); }
.counter .inner { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; padding: 0 18%; }
.counter .count { font-family: var(--font-num); font-size: clamp(54px, 18vw, 72px); font-weight: 720; line-height: 1; letter-spacing: -0.04em; }
.counter .count.bump { animation: bump .24s var(--spring); }
@keyframes bump { 0% { transform: scale(.9); } 60% { transform: scale(1.06); } }
.counter .of { color: var(--text-2); font-family: var(--font-num); font-weight: 650; font-size: 17px; margin-top: 4px; }
.counter .tap { color: var(--text-2); font-size: 13px; margin-top: 6px; line-height: 1.25; }
.counter:active { transform: scale(0.965); }
.counter.pulse { animation: pulse 0.6s ease; }
@keyframes pulse { 40% { box-shadow: 0 0 0 14px var(--accent-soft); } }
.seg.targets button { font-size: clamp(12px, 3.6vw, 14px); padding: 4px 2px; }
.stats { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.stat { min-width: 0; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 14px 16px; }
.stat small { font-size: 15px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat b { font-family: var(--font-num); font-size: 20px; font-weight: 720; }
.reset-row { width: 100%; justify-content: center; gap: 8px; border: 0; background: transparent; color: var(--danger); font-weight: 600; font-size: 16px; cursor: pointer; }
.reset-row .ic { width: 19px; height: 19px; }
@media (hover: hover) { .reset-row:hover { background: var(--card-2); } }

/* ---------- calendar ---------- */
.hijri-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.moon-ic { width: 42px; height: 42px; border-radius: 14px; flex: none; display: grid; place-items: center; color: var(--y-fg); background: var(--y-bg); }
.moon-ic .ic { width: 21px; height: 21px; }
.hijri-big { font-family: var(--font-display); font-size: clamp(17px, 5vw, 20px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.cal-card { padding-bottom: 12px; }
.month-nav { display: flex; align-items: center; gap: 6px; padding: 10px 10px 6px; }
.month-nav h2 { flex: 1; margin: 0; text-align: center; font-size: 15.5px; font-weight: 700; }
.month-nav .sub { display: block; font-size: 12px; color: var(--text-2); font-weight: 550; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; padding: 0 10px; }
.cal-grid .wd { text-align: center; font-size: 11px; font-weight: 650; color: var(--text-2); padding: 4px 0; }
.cal-day { position: relative; min-height: 42px; border-radius: 13px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.cal-day b { font-family: var(--font-num); font-size: 14px; font-weight: 650; }
.cal-day small { font-size: 10px; color: var(--text-2); }
.cal-day.today { background: linear-gradient(160deg, var(--accent), var(--accent-2)); color: var(--accent-ink); box-shadow: 0 6px 14px -8px var(--accent-glow); }
.cal-day.today small { color: var(--accent-ink); opacity: 0.85; }
.cal-day.ev { background: var(--gold-soft); }
.cal-day.ev::after { content: ''; position: absolute; top: 4px; right: 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.event { position: relative; display: flex; align-items: center; gap: 10px; padding: 11px 16px; }
.event + .event::before { content: ''; position: absolute; top: 0; left: 16px; right: 16px; border-top: 1px solid var(--sep); }
.event .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex: none; }
.event .grow { flex: 1; min-width: 0; }
.event .label b { font-size: 14px; font-weight: 650; }
.event .when { font-size: 12px; color: var(--text-2); }
.event .days { font-weight: 700; color: var(--gold-ink); font-size: 12px; text-align: end; flex: none; }


/* ---------- tab bar: icons only, like the iPhone app ---------- */
.tabbar {
  position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; padding: 0 var(--sar) max(var(--sab), 2px) var(--sal);
  background: var(--nav); border-top: 1px solid var(--nav-border);
  -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%); view-transition-name: tabbar;
}
.tabbar .inner { height: var(--nav-h); max-width: 560px; margin: 0 auto; padding: 0 8px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center; }
.tabbar .brand { display: none; }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 100%; min-width: 0; color: var(--tab-off); transition: color .2s; }
.tab .tb { width: 52px; height: 40px; display: grid; place-items: center; transition: transform .2s var(--spring); }
.tab .ic { width: 26px; height: 26px; stroke-width: 1.9; }
.tab .tl { display: none; }
.tab:active .tb { transform: scale(.86); }
.tab[aria-current="page"] { color: var(--accent); }
.tab[aria-current="page"] .ic { stroke-width: 2.2; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--sab) + 14px); transform: translate(-50%, 20px);
  display: flex; align-items: center; gap: 14px; white-space: nowrap;
  background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 999px; font-weight: 600; font-size: 14px;
  box-shadow: 0 12px 28px -12px rgba(0, 0, 0, .45);
  opacity: 0; pointer-events: none; transition: opacity 0.22s, transform 0.28s var(--spring); max-width: calc(100% - 32px); z-index: 50;
}
.toast span { overflow: hidden; text-overflow: ellipsis; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.has-act.show { pointer-events: auto; }
.toast .act { border: 0; background: none; padding: 4px 2px; font-weight: 750; font-size: 14px; color: #6BE3B3; cursor: pointer; }
:root[data-theme="dark"] .toast .act { color: #0B7550; }

/* page changes */
.view-enter { animation: enter 0.3s var(--ease); }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } }
::view-transition-old(root) { animation: vt-out .14s ease both; }
::view-transition-new(root) { animation: vt-in .26s var(--ease) both; }
::view-transition-group(tabbar) { animation: none; }
::view-transition-old(tabbar) { display: none; }
::view-transition-new(tabbar) { animation: none; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; } }

/* ---------- small phones ---------- */
@media (max-width: 359px) {
  :root { --gap: 12px; }
  .count { padding: 16px; min-height: 104px; }
  .crow, a.card.crow, button.card.crow { padding: 13px 14px; gap: 12px; }
  .crow + .crow::before { inset-inline-start: 70px; }
  .row { padding: 8px 12px; }
  .prow { gap: 12px; padding-left: 14px; }
  html[dir="rtl"] .prow { padding-right: 14px; }
  .prow .pn { font-size: 16.5px; }
  .prow .pt { font-size: 18px; }
  .datecard .nav-btn { width: 32px; }
  .tiles { gap: 8px; }
  .tile { padding: 12px; gap: 10px; }
  .tile .bd { width: 42px; height: 42px; }
  .minis { gap: 8px; }
  .mini { padding: 13px; }
  .tab .tb { width: 44px; }
  .evcard { padding: 14px; gap: 12px; }
  .evcard .evi { width: 48px; height: 48px; }
  .tip { flex-wrap: wrap; row-gap: 8px; }
  .tip .grow { flex: 1 1 calc(100% - 100px); }
  .tip .btn.sm { order: 3; margin-inline-start: 58px; }
}
@media (max-width: 300px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .minis { grid-template-columns: minmax(0, 1fr); }
  .hbtn { width: 40px; height: 40px; }
}

/* ---------- phones on their side ---------- */
@media (max-height: 500px) and (orientation: landscape) {
  :root { --hero-h: 210px; --over: 70px; --nav-h: 48px; }
  .hero-row { top: calc(var(--sat) + 26px); }
  .topbar { padding-top: calc(var(--sat) + 10px); }
}

/* ---------- tablets: the picture becomes a rounded banner ---------- */
@media (min-width: 700px) {
  :root { --gx: 28px; --gap: 18px; --nav-h: 60px; --hero-h: 300px; --over: 88px; }
  body[data-page="more"] { --over: 110px; }
  .app { max-width: 860px; }
  .hero { margin: calc(var(--sat) + 20px) 0 0; height: var(--hero-h); }
  .hero-pic, :root[data-theme="light"] .hero.fade .hero-pic { border-radius: 32px; -webkit-mask-image: none; mask-image: none; background-position: center 58%; }
  .hero-row { top: 40px; left: 34px; right: 30px; }
  .hero h1 { font-size: 46px; }
  .topbar { padding-top: calc(var(--sat) + 30px); padding-bottom: 12px; }
  .topbar h1 { font-size: 34px; }
  .home-grid, .times-grid, .dhikr-grid, .split, .cal-grid-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .qibla-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: start; }
  .tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .tile { min-height: 132px; }
  .strip { margin: 0 -6px; padding: 0 6px; --fade: 10px; }
  .tasbih-page { max-width: 520px; width: 100%; margin: 0 auto; }
  .tabbar .inner { max-width: 640px; }
  .tab .tl { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0; }
  .tab .tb { height: 30px; }
  .tab .ic { width: 24px; height: 24px; }
  body[data-page="settings"] main { max-width: 640px; margin: 0 auto; width: 100%; }
}

/* ---------- computers: menu on the left ---------- */
@media (min-width: 1100px) {
  :root { --nav-w: 236px; --gap: 20px; --hero-h: 320px; --over: 92px; }
  body { padding-left: var(--nav-w); }
  .app { max-width: 1080px; padding: 0 44px 52px; }
  .hero { margin-top: 28px; }
  .hero-row { top: 44px; left: 40px; right: 36px; }
  .hero h1 { font-size: 50px; }
  .topbar { padding-top: 34px; padding-bottom: 12px; }
  .minibar { display: none; }
  .tabbar {
    top: 0; bottom: 0; left: 0; right: auto; width: var(--nav-w); padding: 0; border: 0;
    border-inline-end: 1px solid var(--line); background: var(--card); -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  html[dir="rtl"] body { padding-left: 0; padding-right: var(--nav-w); }
  html[dir="rtl"] .tabbar { left: auto; right: 0; }
  .tabbar .inner { height: auto; max-width: none; display: flex; flex-direction: column; gap: 4px; padding: 26px 14px; }
  .tabbar .brand { display: flex; align-items: center; gap: 10px; padding: 2px 10px 24px; color: var(--text); font-family: var(--font-display); font-size: 19px; font-weight: 750; letter-spacing: -0.02em; }
  .tabbar .brand img { width: 36px; height: 36px; border-radius: 11px; }
  .tab { flex-direction: row; justify-content: flex-start; gap: 12px; height: 46px; padding: 0 12px; border-radius: 14px; color: var(--text-2); transition: background .2s var(--ease), color .2s; }
  .tab .tb { width: auto; height: auto; transform: none; }
  .tab .ic { width: 21px; height: 21px; }
  .tab .tl { font-size: 14.5px; font-weight: 600; }
  .tab:hover { background: var(--card-2); color: var(--text); }
  .tab[aria-current="page"] { background: var(--accent-soft); color: var(--accent-text); }
  .tab[aria-current="page"] .tl { font-weight: 750; }
  .home-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
  .toast { bottom: 28px; }
  body[data-page="settings"] main { max-width: 700px; margin: 0; }
}
@media (min-width: 1600px) {
  :root { --nav-w: 260px; }
  .app { max-width: 1180px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
