/* The notch, built in HTML/CSS after the app's own SwiftUI code (../Istiqamah/Sources/AthkarIsland/NotchUI):
   - NotchShape: flat top, concave "shoulders" curving out into the menu bar, rounded bottom corners.
   - NotchLayout: every size below is the app's, in points; --u is one point on this screen.
   - NotchSurface: pills are solid black in both themes; cards are Glass (dark frosted blur, black melting
     down from the camera, a faint light rim) or Classic (solid black with a soft shadow).
   - Typography: Thmanyah Sans for titles and prayer names; IBM Plex Sans Arabic (Arabic) or Inter
     (English) for everything else; Thmanyah Serif Display / Serif Text for athkar.
   One shape morphs between states (width, height and corners animate); content fades in after it
   starts growing, as in NotchMotion. */

@font-face { font-family: "IBM Plex Sans Arabic"; src: url("../fonts/ibm-plex-sans-arabic/IBMPlexSansArabic-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans Arabic"; src: url("../fonts/ibm-plex-sans-arabic/IBMPlexSansArabic-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IBM Plex Sans Arabic"; src: url("../fonts/ibm-plex-sans-arabic/IBMPlexSansArabic-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Amiri Quran"; src: url("../fonts/amiri-quran/AmiriQuran.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Thmanyah Serif Display"; src: url("../fonts/thmanyah-serif-display/thmanyahserifdisplay-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Thmanyah Serif Text"; src: url("../fonts/thmanyah-serif-text/thmanyahseriftext-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }

/* Screen points: big screens show the notch a little larger, phones smaller so the hub fits. */
:root { --u: 1.15px; }
@media (max-width: 1279px) { :root { --u: 1.05px; } }
@media (max-width: 1023px) { :root { --u: 0.95px; } }
@media (max-width: 759px)  { :root { --u: 0.8px; } }
@media (max-width: 419px)  { :root { --u: 0.74px; } }
@media (max-width: 759px) {
  .theme-toggle { width: 22px; height: 22px; }
  .theme-toggle svg { width: 13px; height: 13px; }
  .menu { font-size: 0.75rem; }
}

.island {
  /* NotchLayout */
  --k: 1;                               /* pill scale (1 = the app's own size) */
  --nw: calc(185 * var(--k) * var(--u));  /* the camera housing */
  --nh: calc(34 * var(--k) * var(--u));   /* pill height = the menu bar (46 points) */
  --sh: calc(6 * var(--k) * var(--u));    /* shoulder */
  --r: calc(10 * var(--u));             /* bottom radius */
  --W: calc(341 * var(--k) * var(--u));  /* notch + 2 wings (72) + 2 shoulders */
  --H: var(--nh);
  --acc: linear-gradient(90deg, #30d158, #64d2ff);   /* system green into system cyan */
  --t-ui: "Inter", "IBM Plex Sans Arabic", system-ui, sans-serif;

  position: fixed; top: 0; left: 50%; z-index: 50;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: calc(8 * var(--u));
  color: #fff;
  font-family: var(--t-ui);
  font-size: calc(13 * var(--u));
  line-height: 1.3;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  pointer-events: none;
  text-align: start;   /* never inherit the page's alignment: the app aligns to the leading edge unless a view says otherwise */
}
.island { --t-display: "Google Sans", "Inter", system-ui, sans-serif; }
.island:not(:lang(ar)) { --t-ui: "Google Sans", "Inter", system-ui, sans-serif; }   /* Typography: Google Sans for all English text */
.island:lang(ar) { --t-ui: "IBM Plex Sans Arabic", "Thmanyah Sans", system-ui, sans-serif; --t-display: "Thmanyah Sans", "IBM Plex Sans Arabic", system-ui, sans-serif; }
.island[dir="rtl"] { --acc: linear-gradient(270deg, #30d158, #64d2ff); }   /* leading → trailing */

/* Sizes per state (width includes the shoulders; height is measured from the content by site.js). */
.island[data-kind="card"] { --sh: calc(10 * var(--u)); --r: calc(26 * var(--u)); }
.island[data-state="none"]   { --W: var(--nw); --sh: 0px; }
.island[data-state="prayer"],
.island[data-state="offer"]  { --W: calc(460 * var(--u)); }
.island[data-state="resume"] { --W: calc(460 * var(--u)); }
.island[data-state="reader"],
.island[data-state="kahf"],
.island[data-state="hub"]    { --W: calc(480 * var(--u)); }
.island[data-state="light"]  { --W: calc(500 * var(--u)); }
.island[data-state="friday"],
.island[data-state="lastcall"] { --W: calc(540 * var(--u)); }

/* ---------- The shape ---------- */
.island-shape {
  position: relative;
  width: var(--W); height: var(--H);
  pointer-events: auto;
  transition: width 0.42s cubic-bezier(0.34, 1.32, 0.64, 1), height 0.42s cubic-bezier(0.34, 1.32, 0.64, 1), filter 0.3s;
}
/* The shoulders are real elements, not images. Each is a small box clipped to its square; a transparent circle
   with a huge black shadow (box-shadow spread) paints everything outside the arc black, so the curve is
   drawn by the browser's own antialiased border-radius (a gradient's hard stop comes out jagged).
   The box is 1px wider than the shoulder and the extra column is solid black under the notch body, so no
   hairline of the page can show where the two meet. */
.shoulder {
  position: absolute; top: 0; width: calc(var(--sh) + 1px); height: var(--sh);
  overflow: hidden; pointer-events: none;
  transition: width 0.42s, height 0.42s;
}
.shoulder::before {
  content: ""; position: absolute; top: 0;
  width: calc(var(--sh) * 2); height: calc(var(--sh) * 2);
  border-radius: 50%;
  box-shadow: 0 0 0 calc(var(--sh) * 2) #000;
  transition: width 0.42s, height 0.42s, left 0.42s, right 0.42s, box-shadow 0.42s;
}
.shoulder.start { left: 0; }
.shoulder.start::before { left: calc(var(--sh) * -1); }       /* circle centred on the shoulder's bottom-left corner */
.shoulder.end { right: 0; }
.shoulder.end::before { right: calc(var(--sh) * -1); }        /* ...and the bottom-right corner */
.island-body {
  position: absolute; top: 0; bottom: 0; left: var(--sh); right: var(--sh);
  border-radius: 0 0 var(--r) var(--r);
  overflow: hidden;
  transition: left 0.42s, right 0.42s, border-radius 0.42s;
}
.surface { position: absolute; inset: 0; border-radius: inherit; }
.surface-glass {
  background: rgba(0, 0, 0, 0.675);                         /* glassTint 0.35 + veil 0.5 */
  -webkit-backdrop-filter: blur(26px) saturate(1.6); backdrop-filter: blur(26px) saturate(1.6);
}
.surface-glass::before {                                    /* solid black over the camera, melting away */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, #000 0, #000 var(--nh), transparent calc(var(--nh) + 30 * var(--u)));
}
.surface-glass::after {                                     /* the soft light rim along the lower edge */
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.22); border-top: 0;
  -webkit-mask: linear-gradient(180deg, transparent, #000); mask: linear-gradient(180deg, transparent, #000);
}
.surface-black { background: #000; transition: opacity 0.3s ease; }
.island.glass[data-kind="card"] .surface-black { opacity: 0; }
.island.classic[data-kind="card"] .island-shape { filter: drop-shadow(0 calc(16 * var(--u)) calc(40 * var(--u)) rgba(0, 0, 0, 0.42)); }

/* ---------- Panels (one per state; only the active one shows) ---------- */
.panel {
  position: absolute; top: 0; left: 0; right: 0;
  opacity: 0; visibility: hidden;
  transform: translateY(calc(-4 * var(--u)));
  transition: opacity 0.1s ease-out, visibility 0s 0.1s, transform 0.1s;
}
.panel.is-active {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity 0.22s ease-out 0.14s, visibility 0s, transform 0.22s ease-out 0.14s;
}
/* CardInset: below the camera, card padding on the sides, 18 at the bottom. */
.card-inset { padding: calc(var(--nh) + 14 * var(--u)) calc(22 * var(--u)) calc(22 * var(--u)); }   /* cards ending in buttons */
.card-inset.friday, .card-inset.lastcall, .card-inset.light, .card-inset.accepted { padding-bottom: calc(21 * var(--u)); }   /* ending in text */
.island:not(:lang(ar)) .card-inset.friday, .island:not(:lang(ar)) .card-inset.lastcall, .island:not(:lang(ar)) .card-inset.light, .island:not(:lang(ar)) .card-inset.accepted { padding-bottom: calc(18.5 * var(--u)); }
.card-inset.reader { padding-bottom: calc(23 * var(--u)); }
.card-inset.tight { padding-top: calc(var(--nh) + 10 * var(--u)); }
.hub-inset  { padding: calc(var(--nh) + 12 * var(--u)) calc(20 * var(--u)) calc(20 * var(--u)); }

/* ---------- Shared pieces ---------- */
.acc-text { background: var(--acc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.acc-fill { background: var(--acc); }
.display { font-family: var(--t-display); }
.num { font-variant-numeric: tabular-nums; }
.sec { color: rgba(255, 255, 255, 0.66); font-size: calc(12 * var(--u)); }
.row { display: flex; align-items: center; gap: calc(8 * var(--u)); }
.spacer { flex: 1; }
.ico { width: 1em; height: 1em; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ico.acc { stroke: url(#acc-stroke); }
.card-label { font-size: calc(11 * var(--u)); font-weight: 600; letter-spacing: calc(0.6 * var(--u)); }
.island:lang(ar) .card-label { font-size: calc(12 * var(--u)); letter-spacing: 0; text-transform: none; }
/* Religious text: always Arabic, right to left, whatever the interface language. */
.athkar { direction: rtl; font-family: "Thmanyah Serif Text", "Thmanyah Sans", serif; color: #fff; }
.athkar.display-face { font-family: "Thmanyah Serif Display", "Thmanyah Serif Text", serif; }

/* CapsuleButtonStyle */
.nbtn {
  display: inline-flex; align-items: center; justify-content: center;
  height: calc(28 * var(--u)); padding: 0 calc(14 * var(--u)); border-radius: 999px; border: 0;
  font: 500 calc(13 * var(--u)) / 1 var(--t-ui); color: #fff; cursor: pointer;
  background: rgba(255, 255, 255, 0.13); transition: background 0.12s, filter 0.12s;
}
.nbtn:hover { background: rgba(255, 255, 255, 0.22); }
.nbtn:active { background: rgba(255, 255, 255, 0.08); transform: scale(0.97); }
.nbtn { transition: background 0.12s, filter 0.12s, transform 0.12s; }
.nbtn.pro { background: var(--acc); color: #000; font-weight: 600; padding: 0 calc(16 * var(--u)); }
.nbtn.pro:hover { filter: brightness(1.08); }
/* ChipButtonStyle */
.chip {
  display: inline-flex; align-items: center; gap: calc(6 * var(--u)); white-space: nowrap;
  height: calc(26 * var(--u)); padding: 0 calc(11 * var(--u)) 0 calc(9 * var(--u)); border-radius: 999px;
  font: 600 calc(12 * var(--u)) / 1 var(--t-ui); color: #fff; cursor: pointer;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.12s;
}
.chip:hover { background: rgba(255, 255, 255, 0.12); }
.chip.on { background: linear-gradient(90deg, rgba(48, 209, 88, 0.14), rgba(100, 210, 255, 0.14)); border-color: rgba(100, 215, 190, 0.55); }
.chip .tick { width: calc(16 * var(--u)); height: calc(16 * var(--u)); border-radius: 50%; display: grid; place-items: center; }
.chip.on .tick { background: var(--acc); color: #000; }
.chip { transition: background 0.12s, opacity 0.3s ease, transform 0.3s ease; }
.chip.on { padding-inline-start: calc(6 * var(--u)); }
.chip.on .lbl { background: var(--acc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.chip.gone { opacity: 0; transform: scale(0.85); pointer-events: none; }
.srow .every { display: flex; align-items: center; gap: calc(8 * var(--u)); }
.srow .every .sec { font-size: calc(13 * var(--u)); }
.chip .tick svg { width: calc(9 * var(--u)); height: calc(9 * var(--u)); stroke-width: 3.2; }
/* LinkButtonStyle */
/* IconButtonStyle */
.nicon { width: calc(20 * var(--u)); height: calc(20 * var(--u)); border-radius: 50%; border: 0; display: grid; place-items: center; color: rgba(255, 255, 255, 0.7); background: rgba(255, 255, 255, 0.1); cursor: pointer; padding: 0; }
.nicon:hover { background: rgba(255, 255, 255, 0.2); color: #fff; }
.nicon svg { width: calc(10 * var(--u)); height: calc(10 * var(--u)); stroke-width: 3; }
/* InnerChip: light glass in Glass, dark tile in Classic */
.inner { border-radius: calc(14 * var(--u)); background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.12); }
.island.classic .inner { background: linear-gradient(180deg, #1f1f1f, #141414); border-color: rgba(255, 255, 255, 0.06); }

/* ---------- Pill (idle, countdown) ---------- */
.pill { display: flex; align-items: center; height: var(--nh); cursor: pointer; font-size: calc(13 * var(--k) * var(--u)); }
.pill .wing { width: calc(72 * var(--k) * var(--u)); padding: 0 calc(8 * var(--k) * var(--u)); display: flex; align-items: center; gap: calc(5 * var(--k) * var(--u)); white-space: nowrap; font-weight: 500; font-variant-numeric: tabular-nums; }
.pill .wing.start { justify-content: flex-start; }
.pill .wing.trail { justify-content: flex-end; padding-inline-end: calc(12 * var(--k) * var(--u)); color: rgba(255, 255, 255, 0.85); }
.pill .gap { width: var(--nw); flex: none; }
.pill .name { font-family: var(--t-display); font-weight: 500; }
.pill .ico { font-size: calc(10 * var(--k) * var(--u)); stroke-width: 2.6; }
.ring { width: calc(11 * var(--k) * var(--u)); height: calc(11 * var(--k) * var(--u)); flex: none; overflow: visible; }
.ring circle { fill: none; stroke-width: 2; }
.unit { opacity: 0.7; }   /* CountdownText */

/* ---------- Prayer card ---------- */
.prayer-card .head { display: flex; align-items: flex-start; gap: calc(12 * var(--u)); }
.prayer-card .titles { display: grid; gap: calc(4 * var(--u)); flex: 1; }
.prayer-card .card-label { height: calc(16 * var(--u)); line-height: calc(16 * var(--u)); }
.prayer-card .ttl { margin: 0; height: calc(30 * var(--u)); font: 700 calc(22 * var(--u)) / calc(30 * var(--u)) var(--t-display); white-space: nowrap; }
.prayer-card .sub { height: calc(18 * var(--u)); line-height: calc(18 * var(--u)); font-size: calc(13 * var(--u)); color: rgba(255, 255, 255, 0.72); }
[data-panel="offer"] .sub { color: rgba(255, 255, 255, 0.66); }
.prayer-card .big-ico { font-size: calc(30 * var(--u)); stroke-width: 1.4; }
/* The app's own prayer icons (Hugeicons, 24-unit grid): their own stroke and gradient. */
.ico.glyph { stroke: url(#acc-glyph); }   /* fitted (tools/prayer_glyphs.py): the stroke width is on each icon */
.prayer-card .big-ico.glyph { font-size: calc(64 * var(--u)); margin-block: calc(-2 * var(--u)); }
.pill .ico.pill-glyph { font-size: calc(16 * var(--k) * var(--u)); }
.prayer-card .actions { margin-top: calc(14 * var(--u)); justify-content: flex-end; }

/* ---------- Offer ---------- */
.offer .ttl { margin: 0 0 calc(4 * var(--u)); height: calc(24 * var(--u)); font: 700 calc(17 * var(--u)) / calc(24 * var(--u)) var(--t-display); }
.offer .sub { height: calc(18 * var(--u)); line-height: calc(18 * var(--u)); font-size: calc(13 * var(--u)); color: rgba(255, 255, 255, 0.66); }
.offer .actions { margin-top: calc(14 * var(--u)); }

/* ---------- Reader ---------- */
.reader .head { height: calc(16 * var(--u)); }
.reader-card {
  position: relative; overflow: hidden; margin-top: calc(12 * var(--u));
  border-radius: calc(18 * var(--u)); min-height: calc(150 * var(--u));
  display: flex; flex-direction: column; justify-content: center;
  padding: calc(14 * var(--u)) 0; cursor: pointer; user-select: none;
}
.reader-card:hover { box-shadow: inset 0 0 0 999px rgba(255, 255, 255, 0.04); }
.reader-card .fill { position: absolute; inset: auto 0 0 0; height: 0; background: linear-gradient(180deg, rgba(100, 210, 255, 0.2), rgba(48, 209, 88, 0.26)); transition: height 0.35s cubic-bezier(0.3, 1.1, 0.5, 1); pointer-events: none; }
.reader-card .text { position: relative; padding: 0 calc(16 * var(--u)); text-align: center; font-size: calc(22 * var(--u)); line-height: calc(22 * var(--u) * 1.45 + 0.45 * 22 * var(--u)); transition: opacity 0.2s, transform 0.2s; }
.reader-card .text.short { font-family: "Thmanyah Serif Display", "Thmanyah Serif Text", serif; font-size: calc(34 * var(--u)); line-height: 1.5; }
.reader-card .text.long { font-size: calc(18 * var(--u)); line-height: calc(18 * var(--u) * 1.45 + 0.45 * 18 * var(--u)); }
.reader-card .count { position: relative; height: calc(24 * var(--u)); display: grid; place-items: center; font-weight: 600; color: rgba(255, 255, 255, 0.85); font-variant-numeric: tabular-nums; }
.reader-card .check { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transform: scale(0.4); transition: opacity 0.25s, transform 0.3s cubic-bezier(0.3, 1.6, 0.5, 1); pointer-events: none; }
.reader-card .check span { width: calc(46 * var(--u)); height: calc(46 * var(--u)); border-radius: 50%; background: var(--acc); display: grid; place-items: center; color: #000; }
.reader-card .check svg { width: calc(20 * var(--u)); height: calc(20 * var(--u)); stroke-width: 3.2; }
.reader-card.done .text, .reader-card.done .count { opacity: 0.25; transform: scale(0.97); }
.reader-card.done .check { opacity: 1; transform: none; }
.card-foot { height: calc(18 * var(--u)); margin-top: calc(12 * var(--u)); justify-content: flex-end; }

/* ---------- Light dhikr ---------- */
.light { text-align: center; display: grid; gap: calc(6 * var(--u)); }
.light .dhikr { height: calc(42 * var(--u)); display: grid; place-items: center; font-size: calc(26 * var(--u)); line-height: 1.2; }
.light .moment { margin: 0; height: calc(16 * var(--u)); line-height: calc(16 * var(--u)); }
.light .virtue { height: calc(44 * var(--u)); display: grid; place-items: center; font-size: calc(15 * var(--u)); line-height: 1.55; color: rgba(255, 255, 255, 0.75); }
.light .foot { height: calc(20 * var(--u)); display: flex; align-items: center; justify-content: center; gap: calc(10 * var(--u)); margin: 0; }
.nlink.quiet { color: rgba(255, 255, 255, 0.38); }
.nlink.quiet:hover { color: rgba(255, 255, 255, 0.62); }
/* "Turn off" on a card asks about a longer interval instead (the app, 2026-11-25). */
.light-ask { position: absolute; inset: calc(var(--nh) + 10 * var(--u)) calc(22 * var(--u)) 0; display: flex; flex-direction: column; align-items: center; opacity: 0; visibility: hidden; transition: opacity 0.2s, visibility 0s 0.2s; }
.light-ask .q { margin: 0; height: calc(30 * var(--u)); font: 700 calc(20 * var(--u)) / 1.5 var(--t-display); }
.light-ask .sec { margin: calc(4 * var(--u)) 0 0; height: calc(18 * var(--u)); font-size: calc(13 * var(--u)); }
.light-ask .row { margin-top: calc(12 * var(--u)); height: calc(28 * var(--u)); }
.light.asking .light-main { opacity: 0; visibility: hidden; transition: opacity 0.2s, visibility 0s 0.2s; }
.light.asking .light-ask { opacity: 1; visibility: visible; transition: opacity 0.2s; }
.light-main { transition: opacity 0.2s; }

/* ---------- Friday ---------- */
.friday .top { height: calc(18 * var(--u)); }
.friday .hadith { margin-top: calc(10 * var(--u)); height: calc(96 * var(--u)); overflow: hidden; font-size: calc(18 * var(--u)); line-height: calc(18 * var(--u) * 1.4 + 8.1 * var(--u)); text-align: right; }
.friday .ref { margin-top: calc(10 * var(--u)); height: calc(20 * var(--u)); }

/* ---------- Kahf and the last call ---------- */
.kahf .hadith { margin: calc(10 * var(--u)) 0 0; height: calc(70 * var(--u)); font-size: calc(18 * var(--u)); line-height: 1.75; text-align: right; overflow: hidden; }
.kahf .foot { margin-top: calc(10 * var(--u)); height: calc(28 * var(--u)); }
/* Buttons keep their one line; the reference beside them gives way (ellipsis), as a SwiftUI Text with one line does. */
.nbtn { white-space: nowrap; flex: none; }
.kahf .foot .sec { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.kahf .foot .spacer { flex: 0 0 calc(4 * var(--u)); }
.kahf .card-label { display: block; height: calc(18 * var(--u)); }
.nbtn.pro[data-kahf-read] { position: relative; min-width: calc(86 * var(--u)); }
.nbtn.pro[data-kahf-read] .t { transition: opacity 0.2s; }
.nbtn.pro[data-kahf-read] .tick { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transform: scale(0.3); transition: opacity 0.2s, transform 0.35s cubic-bezier(0.3, 1.6, 0.5, 1); }
.nbtn.pro[data-kahf-read] .tick svg { width: calc(13 * var(--u)); height: calc(13 * var(--u)); stroke-width: 3.2; }
.kahf.read .nbtn.pro[data-kahf-read] .t { opacity: 0; }
.kahf.read .nbtn.pro[data-kahf-read] .tick { opacity: 1; transform: none; }
.lastcall .top { height: calc(18 * var(--u)); }
.lastcall .hadith { margin: calc(10 * var(--u)) 0 0; height: calc(112 * var(--u)); overflow: hidden; text-align: right; }
.hadith.quran { font-family: "Amiri Quran", "Thmanyah Serif Text", serif; font-size: calc(22 * var(--u)); line-height: 1.9; }
.lastcall .ref { margin-top: calc(10 * var(--u)); height: calc(20 * var(--u)); }

/* ---------- Hub ---------- */
.hub-page { display: none; }
.hub-page.is-active { display: block; animation: hubfade 0.25s ease-out; }
@keyframes hubfade { from { opacity: 0; } to { opacity: 1; } }

/* Prayer tab */
.ptab-head { height: calc(18 * var(--u)); font-size: calc(12 * var(--u)); color: rgba(255, 255, 255, 0.6); white-space: nowrap; overflow: hidden; }
.ptab-head .dim { color: rgba(255, 255, 255, 0.45); }
.next-box {
  margin-top: calc(14 * var(--u)); height: calc(70 * var(--u)); padding: calc(10 * var(--u)) calc(14 * var(--u));
  display: flex; align-items: flex-end; border-radius: calc(16 * var(--u));
  background: linear-gradient(135deg, rgba(48, 209, 88, 0.18), rgba(100, 210, 255, 0.1));
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.island[dir="rtl"] .next-box { background: linear-gradient(225deg, rgba(48, 209, 88, 0.18), rgba(100, 210, 255, 0.1)); }
.next-box .l { display: grid; gap: calc(2 * var(--u)); }
.next-box .r { display: grid; gap: calc(2 * var(--u)); text-align: end; margin-inline-start: auto; }
.next-box .big { font: 700 calc(24 * var(--u)) / 1.1 var(--t-display); font-variant-numeric: tabular-nums; }
.next-box .in { font-size: calc(13 * var(--u)); font-weight: 600; }
.prow { margin-top: calc(18 * var(--u)); display: grid; grid-template-columns: repeat(5, 1fr); }
.pcol { position: relative; display: grid; justify-items: center; gap: calc(6 * var(--u)); }
.pcol + .pcol::before {                                     /* the segment from the previous ring to this one */
  content: ""; position: absolute; top: calc(8 * var(--u)); height: calc(2 * var(--u)); border-radius: 2px;
  inset-inline-end: calc(50% + 14 * var(--u)); width: calc(100% - 28 * var(--u));
  background: rgba(255, 255, 255, 0.16);
}
.pcol + .pcol.started::before { background: var(--acc); }   /* both prayers have started */
.pring { width: calc(18 * var(--u)); height: calc(18 * var(--u)); border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, 0.22); background: none; padding: 0; display: grid; place-items: center; color: #000; cursor: default; transition: transform 0.2s; }
.pcol.started .pring { border-color: rgba(255, 255, 255, 0.5); cursor: pointer; }
.pcol.started .pring:hover { transform: scale(1.08); box-shadow: 0 0 0 calc(5 * var(--u)) rgba(255, 255, 255, 0.12); }
.pcol.marked .pring { border: 0; background: var(--acc); }
.pring svg { width: calc(9 * var(--u)); height: calc(9 * var(--u)); stroke-width: 3.4; opacity: 0; }
.pcol.marked .pring svg { opacity: 1; }
.pname { font-size: calc(12 * var(--u)); color: rgba(255, 255, 255, 0.9); }
.pcol.started .pname { color: rgba(255, 255, 255, 0.55); }
.pcol.marked .pname { color: #30d158; }
.ptime { font: 400 calc(14 * var(--u)) / 1 var(--t-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pcol.started .ptime { color: rgba(255, 255, 255, 0.55); }

/* Athkar tab */
.set-list { display: grid; gap: calc(6 * var(--u)); }
.set-row { height: calc(62 * var(--u)); padding: 0 calc(14 * var(--u)); display: flex; align-items: center; gap: calc(12 * var(--u)); cursor: pointer; transition: background 0.12s; }
.set-row { position: relative; }
.set-row:hover { box-shadow: inset 0 0 0 999px rgba(255, 255, 255, 0.05); }
.set-row:active { transform: scale(0.985); }
.set-row .t { display: grid; gap: calc(3 * var(--u)); flex: 1; }
.set-row b { font: 700 calc(15 * var(--u)) / 1.2 var(--t-display); }
.island:not(:lang(ar)) .set-row b { font-weight: 500; }
.set-row .sec { font-size: calc(13 * var(--u)); }
/* Read in its time: dimmer title, "Read · renews at …", a faint gradient check. Part-way: "9 of 22" and a progress line. */
.set-row.read b { opacity: 0.55; }
.set-row.read .sec { color: rgba(255, 255, 255, 0.4); }
.read-check { display: grid; opacity: 0.6; }
.read-check svg { width: calc(12 * var(--u)); height: calc(12 * var(--u)); stroke: url(#acc-stroke); stroke-width: 3.2; }
.set-row .where { font-size: calc(12 * var(--u)); font-weight: 600; }
.row-progress { position: absolute; bottom: calc(1 * var(--u)); inset-inline-start: calc(14 * var(--u)); height: calc(2 * var(--u)); width: max(calc(4 * var(--u)), calc((100% - 28 * var(--u)) * var(--p))); border-radius: 999px; background: var(--acc); }
.set-row .ico { font-size: calc(12 * var(--u)); color: rgba(255, 255, 255, 0.5); stroke-width: 2.6; }
.island[dir="rtl"] .set-row .ico { transform: scaleX(-1); }

/* Tasbeeh tab */
.tchips { height: calc(30 * var(--u)); margin-inline: calc(-14 * var(--u)); padding-inline: calc(14 * var(--u)); display: flex; gap: calc(6 * var(--u)); overflow: hidden; -webkit-mask: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); mask: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.tchip { height: calc(30 * var(--u)); padding: 0 calc(12 * var(--u)); font: 400 calc(15 * var(--u)) / 1 "Thmanyah Serif Text", "Thmanyah Sans", serif; }
.chip.on { border: 1px solid transparent; background: linear-gradient(90deg, rgba(48, 209, 88, 0.14), rgba(100, 210, 255, 0.14)) padding-box, linear-gradient(90deg, rgba(48, 209, 88, 0.55), rgba(100, 210, 255, 0.55)) border-box; }
.chip:hover { border-color: rgba(255, 255, 255, 0.16); }
.tchip.add { width: calc(30 * var(--u)); padding: 0; justify-content: center; }
.tchip.add svg { width: calc(12 * var(--u)); height: calc(12 * var(--u)); color: rgba(255, 255, 255, 0.8); }
.tcounter {
  position: relative; overflow: hidden; margin-top: calc(12 * var(--u)); height: calc(150 * var(--u));
  border-radius: calc(20 * var(--u)); display: grid; place-content: center; gap: calc(4 * var(--u)); text-align: center;
  cursor: pointer; user-select: none; transition: transform 0.12s;
}
.tcounter:active { transform: scale(0.97); }
.tcounter:hover { box-shadow: inset 0 0 0 999px rgba(255, 255, 255, 0.05); }
.tcounter::before { content: ""; position: absolute; inset: 0; background: radial-gradient(calc(160 * var(--u)) at 50% 100%, rgba(48, 209, 88, 0.18), transparent); pointer-events: none; }
.tcounter .phrase { position: relative; font-size: calc(30 * var(--u)); line-height: 1.3; }
.tcounter .n { position: relative; font: 700 calc(34 * var(--u)) / 1.1 var(--t-display); font-variant-numeric: tabular-nums; }
.tfoot { height: calc(18 * var(--u)); margin-top: calc(12 * var(--u)); }

/* Settings tab */
.sgroup { overflow: hidden; }
.srow { height: calc(48 * var(--u)); padding: 0 calc(14 * var(--u)); display: flex; align-items: center; gap: calc(12 * var(--u)); font-size: calc(14 * var(--u)); }
.srow + .srow { border-top: 1px solid rgba(255, 255, 255, 0.15); }
.srow .lbl { flex: 1; display: grid; gap: calc(2 * var(--u)); }
.srow .lbl small { font-size: calc(12 * var(--u)); color: rgba(255, 255, 255, 0.6); }
.srow.quit { height: calc(44 * var(--u)); color: rgba(255, 69, 58, 0.9); cursor: pointer; }
.srow.quit .ico { font-size: calc(12 * var(--u)); color: rgba(255, 255, 255, 0.4); stroke-width: 2.6; }
.seg { display: inline-flex; gap: 2px; padding: 2px; border-radius: calc(8 * var(--u)); background: rgba(255, 255, 255, 0.08); }
.seg button { height: calc(24 * var(--u)); padding: 0 calc(12 * var(--u)); border: 0; border-radius: calc(6 * var(--u)); transition: background 0.2s; background: none; color: rgba(255, 255, 255, 0.7); font: 400 calc(12 * var(--u)) / 1 var(--t-ui); cursor: pointer; }
.seg button[aria-pressed="true"] { background: rgba(255, 255, 255, 0.2); color: #fff; font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); }
.picker { display: inline-flex; align-items: center; gap: calc(6 * var(--u)); height: calc(22 * var(--u)); padding: 0 calc(8 * var(--u)); border-radius: calc(6 * var(--u)); background: rgba(255, 255, 255, 0.1); font-size: calc(13 * var(--u)); }
.picker svg { width: calc(9 * var(--u)); height: calc(11 * var(--u)); stroke-width: 2.4; opacity: 0.7; }
.switch { position: relative; width: calc(38 * var(--u)); height: calc(22 * var(--u)); border-radius: 999px; border: 0; padding: 0; background: rgba(255, 255, 255, 0.2); cursor: pointer; transition: background 0.2s; }
.switch[aria-checked="true"] { background: var(--acc); }
.switch::after { content: ""; position: absolute; top: 2px; inset-inline-start: 2px; width: calc(22 * var(--u) - 4px); aspect-ratio: 1; border-radius: 50%; background: #fff; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.25); transition: inset-inline-start 0.25s cubic-bezier(0.3, 1.3, 0.5, 1); }
.switch[aria-checked="true"]::after { inset-inline-start: calc(100% - 22 * var(--u) + 2px); }
.version { margin-top: calc(10 * var(--u)); height: calc(16 * var(--u)); text-align: center; font-size: calc(11 * var(--u)); color: rgba(255, 255, 255, 0.4); }

/* ---------- Hub tab bar: a separate small pill under the card ---------- */
.tabbar {
  position: relative; display: flex; gap: calc(4 * var(--u)); padding: calc(4 * var(--u)); height: calc(38 * var(--u));
  border-radius: 999px; pointer-events: auto;
  opacity: 0; visibility: hidden; transform: translateY(calc(-8 * var(--u)));
  transition: opacity 0.12s, transform 0.12s, visibility 0s 0.12s;
}
.island[data-state="hub"] .tabbar { opacity: 1; visibility: visible; transform: none; transition: opacity 0.22s ease-out 0.14s, transform 0.22s ease-out 0.14s, visibility 0s; }
.island.glass .tabbar { background: rgba(0, 0, 0, 0.675); -webkit-backdrop-filter: blur(26px) saturate(1.6); backdrop-filter: blur(26px) saturate(1.6); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
.island.classic .tabbar { background: rgba(0, 0, 0, 0.85); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 10px 30px rgba(0, 0, 0, 0.35); }
.tabbar button {
  display: inline-flex; align-items: center; gap: calc(6 * var(--u));
  height: calc(30 * var(--u)); padding: 0 calc(9 * var(--u)); border: 0; border-radius: 999px;
  background: none; color: rgba(255, 255, 255, 0.6); cursor: pointer;
  font: 600 calc(13 * var(--u)) / 1 var(--t-ui); white-space: nowrap; transition: background 0.2s;   /* the width changes at once; the capsule (.tab-pill) does the moving */
}
.tabbar button:hover { background: rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.85); }
.tabbar button svg { width: calc(14 * var(--u)); height: calc(14 * var(--u)); stroke-width: 1.8; }
.tabbar button span { display: none; }
.tabbar button[aria-selected="true"] { background: rgba(255, 255, 255, 0.16); color: #fff; padding: 0 calc(13 * var(--u)); }
.tabbar button { position: relative; z-index: 1; }
/* The selected capsule slides between tabs (matchedGeometryEffect): the scripts place .tab-pill. */
.tab-pill { position: absolute; top: calc(4 * var(--u)); height: calc(30 * var(--u)); left: 0; width: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.16); opacity: 0; transition: left 0.42s cubic-bezier(0.34, 1.28, 0.64, 1), width 0.42s cubic-bezier(0.34, 1.28, 0.64, 1); }
.tabbar.sliding .tab-pill { opacity: 1; }
.tabbar.sliding button[aria-selected="true"] { background: none; }
.tabbar button[aria-selected="true"] span { display: inline; }

@media (prefers-reduced-motion: reduce) {
  .island-shape, .shoulder, .island-body { transition: none; }
  .panel, .panel.is-active { transition: opacity 0.15s; transform: none; }
}

/* The welcome card, as in the app since 2026-11-30: the prayer and time in grey, "Not now" as a
   quiet link, and "Remind me in − 15m +" beside the main button. */
.card-label.muted-text { color: rgba(255, 255, 255, 0.5); }
.nlink {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: 500 calc(12 * var(--u)) / 1 var(--t-ui); color: rgba(255, 255, 255, 0.5);
  transition: color 0.12s;
}
.nlink:hover { color: rgba(255, 255, 255, 0.72); }
.nbtn.remind { gap: calc(9 * var(--u)); padding: 0 calc(12 * var(--u)); cursor: default; }
.nbtn.remind b { font-weight: 700; opacity: 0.9; }

/* ---------- Remind me (CardViews, the snooze stepper) ----------
   One capsule: "Remind me in", a − step, the minutes, a + step. Steps are 26 x 28; hover shows a faint circle. */
.nbtn.remind { gap: 0; padding-block: 0; padding-inline: calc(10 * var(--u)) calc(2 * var(--u)); color: rgba(255, 255, 255, 0.92); cursor: pointer; }
.nbtn.remind .amount { font-weight: 500; font-size: calc(13 * var(--u)); min-width: calc(24 * var(--u)); text-align: center; }
.nbtn.remind .step { position: relative; width: calc(26 * var(--u)); height: calc(28 * var(--u)); display: grid; place-items: center; border: 0; padding: 0; background: none; color: inherit; cursor: pointer; }
.nbtn.remind .step::before { content: ""; position: absolute; inset: calc(3 * var(--u)) calc(1 * var(--u)); border-radius: 50%; background: rgba(255, 255, 255, 0.14); opacity: 0; transition: opacity 0.12s; }
.nbtn.remind .step:hover::before { opacity: 1; }
.nbtn.remind .step:disabled { opacity: 0.3; cursor: default; }
.nbtn.remind .step svg { position: relative; width: calc(10 * var(--u)); height: calc(10 * var(--u)); stroke-width: 3.2; }
.nbtn.remind .words { padding-inline-end: calc(2 * var(--u)); }

/* ---------- تقبل الله (AcceptedCard) ----------
   280 wide (+ shoulders); when the question shows, 320. The Dua icon draws itself in, the title rises in,
   then the card grows and the question fades in. */
.island[data-state="accepted"] { --W: calc(300 * var(--u)); }
.island[data-state="accepted"]:has(.accepted.asking) { --W: calc(340 * var(--u)); }
.accepted { display: grid; justify-items: center; text-align: center; }
.dua-wrap { position: relative; width: calc(64 * var(--u)); height: calc(64 * var(--u)); }
.dua { position: relative; width: 100%; height: 100%; overflow: visible; }
.dua-glow { position: absolute; inset: calc(-16 * var(--u)); border-radius: 50%; background: radial-gradient(circle, rgba(100, 210, 255, 0.55), rgba(48, 209, 88, 0.25) 45%, transparent 70%); filter: blur(calc(7.7 * var(--u))); opacity: 0.18; }
.dua path { stroke-dasharray: 1; stroke-dashoffset: 0; }
.dua .star { stroke-dasharray: none; transform-box: fill-box; transform-origin: center; }
.accepted .ttl { margin: calc(12 * var(--u)) 0 0; height: calc(30 * var(--u)); font: 700 calc(22 * var(--u)) / calc(30 * var(--u)) var(--t-display); }
.accepted .ask { display: none; justify-items: center; margin-top: calc(6 * var(--u)); }
.accepted.asking .ask { display: grid; animation: hubfade 0.25s ease-out 0.14s both; }
.accepted .ask .sec { margin: 0; height: calc(18 * var(--u)); line-height: calc(18 * var(--u)); font-size: calc(13 * var(--u)); white-space: nowrap; }
.accepted .ask .btns { margin-top: calc(14 * var(--u)); height: calc(28 * var(--u)); }
.accepted .ask .nlink { margin-top: calc(10 * var(--u)); height: calc(16 * var(--u)); }
.accepted.drawn .hand-r, .accepted.drawn .hand-l { animation: dua-draw 0.75s cubic-bezier(0.25, 0.8, 0.25, 1) both; }
.accepted.drawn .crescent { animation: dua-draw 0.55s ease-out 0.32s both; }
.accepted.drawn .star { animation: dua-star 0.45s cubic-bezier(0.3, 1.6, 0.5, 1) 0.7s both; }
.accepted.drawn .dua-glow { animation: dua-glow 2.6s ease-out 0.35s both; }
.accepted.drawn .ttl { animation: dua-rise 0.4s ease-out 0.42s both; }
@keyframes dua-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes dua-star { from { opacity: 0; transform: scale(0.2); } to { opacity: 1; transform: none; } }
@keyframes dua-glow { 0% { opacity: 0; } 30% { opacity: 0.5; } 100% { opacity: 0.18; } }
@keyframes dua-rise { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .accepted.drawn .hand-r, .accepted.drawn .hand-l, .accepted.drawn .crescent, .accepted.drawn .star, .accepted.drawn .dua-glow, .accepted.drawn .ttl { animation: none; }
  .tab-pill { transition: none; }
}
