/* ==========================================================================
   مواقيتي — demo styles
   Mirrors the Compose theme: mint palette, soft cards, large Arabic type.
   ========================================================================== */

@font-face {
  font-family: "Almarai";
  src: url("fonts/almarai-light.ttf") format("truetype");
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: "Almarai";
  src: url("fonts/almarai-regular.ttf") format("truetype");
  font-weight: 400 500;
  font-display: swap;
}
@font-face {
  font-family: "Almarai";
  src: url("fonts/almarai-bold.ttf") format("truetype");
  font-weight: 600 700;
  font-display: swap;
}
@font-face {
  font-family: "Almarai";
  src: url("fonts/almarai-extrabold.ttf") format("truetype");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "Amiri";
  src: url("fonts/amiri-regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #f4faf7;
  --card: #ffffff;
  --ink: #0c2a21;
  --text-2: #5c7770;
  --text-3: #5a756d;
  --border: #e1efe9;
  --primary: #0e7c60;
  --on-primary: #ffffff;
  --mint-soft: #e4f5ee;
  --mint-bright: #2fbf8f;
  --gold: #d2a75c;
  --gold-deep: #8a5f1c;
  --gold-soft: #fbf3e2;
  --danger: #b64a43;
  --hero-top: #0a5b46;
  --hero-bottom: #0f8063;
  --ring-gold: #f2ce8f;
  --nav-bg: rgba(255, 255, 255, 0.9);
  --shadow: 0 18px 34px -18px rgba(6, 58, 44, 0.38);
  --shadow-soft: 0 10px 24px -16px rgba(6, 58, 44, 0.42);
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #061410;
  --card: #0c211a;
  --ink: #e8f5f0;
  --text-2: #9db8af;
  --text-3: #6f8b82;
  --border: #1d3b30;
  --primary: #4fd6a8;
  --on-primary: #04231a;
  --mint-soft: #123829;
  --mint-bright: #2fbf8f;
  --gold: #e5bf78;
  --gold-deep: #e5bf78;
  --gold-soft: #2a2418;
  --danger: #e08a82;
  --hero-top: #0a3d30;
  --hero-bottom: #0f7258;
  --ring-gold: #f2ce8f;
  --nav-bg: rgba(12, 33, 26, 0.92);
  --shadow: 0 18px 34px -18px rgba(0, 0, 0, 0.7);
  --shadow-soft: 0 10px 24px -16px rgba(0, 0, 0, 0.65);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Almarai", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html[data-theme="dark"] body {
  background: var(--bg);
}

button,
input {
  font-family: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: middle;
  flex: none;
  fill: currentColor;
  stroke: none;
}

.app-shell {
  position: relative;
  max-width: 480px;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  overflow: clip;
}

@media (min-width: 520px) {
  body {
    background:
      radial-gradient(circle at 15% 10%, rgba(47, 191, 143, 0.14), transparent 55%),
      radial-gradient(circle at 85% 90%, rgba(210, 167, 92, 0.12), transparent 50%),
      #e9f2ed;
  }
  html[data-theme="dark"] body {
    background: #030c09;
  }
  .app-shell {
    min-height: 100dvh;
    box-shadow: 0 30px 80px -30px rgba(6, 58, 44, 0.45);
  }
}

.screens {
  position: relative;
}

.screen {
  display: block;
  padding: calc(12px + env(safe-area-inset-top)) 18px
    calc(102px + env(safe-area-inset-bottom));
  animation: screenIn 0.28s ease both;
}

@keyframes screenIn {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ============================ home header ============================ */

.home-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.home-head-main {
  flex: 1;
  min-width: 0;
}

.location-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  margin-inline-start: -2px;
  padding: 2px;
  border: 0;
  border-radius: 12px;
  background: none;
  color: var(--ink);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
  cursor: pointer;
}

.location-btn > .icon {
  width: 17px;
  height: 17px;
  color: var(--primary);
}

.location-btn .chev {
  width: 16px;
  height: 16px;
  color: var(--text-3);
}

.location-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-date {
  margin-top: 2px;
  color: var(--text-2);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-hijri {
  color: var(--gold-deep);
  font-size: 12px;
  font-weight: 600;
}

.round-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--card);
  color: var(--primary);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.round-btn:active {
  transform: scale(0.94);
}

.round-btn .icon {
  width: 22px;
  height: 22px;
}

.spinner {
  position: absolute;
  inset: 13px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.round-btn.is-loading > .icon {
  visibility: hidden;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================ hero ============================ */

.hero {
  position: relative;
  height: 206px;
  margin-top: 14px;
  border-radius: 30px;
  overflow: hidden;
  background: linear-gradient(150deg, var(--hero-top) 0%, var(--hero-bottom) 100%);
  color: #fff;
  box-shadow: 0 22px 38px -20px rgba(10, 91, 70, 0.75);
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  top: -128px;
  inset-inline-start: -76px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.055);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: -150px;
  inset-inline-end: -70px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  border: 1px solid rgba(210, 167, 92, 0.35);
  background: rgba(255, 255, 255, 0.03);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  padding: 20px 22px;
}

.hero-copy {
  flex: 1;
  min-width: 0;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 50px;
  background: rgba(0, 0, 0, 0.18);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.hero-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(210, 167, 92, 0.18);
}

.hero-prayer {
  margin: 14px 0 0;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
  white-space: nowrap;
}

.hero-time-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.hero-time {
  font-size: 25px;
  font-weight: 700;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.95);
  font-variant-numeric: tabular-nums;
}

.tomorrow-badge {
  padding: 3px 8px;
  border-radius: 50px;
  background: rgba(210, 167, 92, 0.22);
  color: #ffe3ac;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.4;
}

.hero-note {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
}

.ring {
  position: relative;
  width: 112px;
  height: 112px;
  flex: none;
}

.ring svg {
  display: block;
  width: 112px;
  height: 112px;
  transform: rotate(-90deg);
}

.ring-track,
.ring-fill {
  fill: none;
  stroke-width: 7;
}

.ring-track {
  stroke: rgba(255, 255, 255, 0.16);
}

.ring-fill {
  stroke: var(--ring-gold);
  stroke-linecap: round;
  stroke-dasharray: 289.0265;
  stroke-dashoffset: 289.0265;
  transition: stroke-dashoffset 0.9s linear;
  filter: drop-shadow(0 0 4px rgba(210, 167, 92, 0.35));
}

.ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
}

.ring-text span {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.2px;
}

.ring-text small {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

/* ============================ night cards ============================ */

.night-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 9px;
}

.night-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--card);
}

.night-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.night-copy strong {
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.bubble {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 12px;
  background: var(--mint-soft);
  color: var(--primary);
}

.bubble .icon {
  width: 17px;
  height: 17px;
}

.bubble.gold {
  background: var(--gold-soft);
  color: var(--gold-deep);
}

.muted {
  color: var(--text-2);
}

.tiny {
  font-size: 10px;
  line-height: 1.4;
}

/* ============================ prayers list ============================ */

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.section-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
}

.friday-note {
  color: var(--gold-deep);
  font-size: 12px;
  font-weight: 600;
}

.card {
  border: 1px solid var(--border);
  border-radius: 26px;
  background: var(--card);
}

.prayer-list {
  margin-top: 8px;
  padding: 5px;
}

.prayer-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 7px 10px;
  border-radius: 18px;
  transition: background 0.25s ease;
}

.prayer-row + .prayer-row::before {
  content: "";
  position: absolute;
  top: 0;
  left: 16px;
  right: 56px;
  height: 1px;
  background: var(--border);
}

.prayer-row.is-next {
  background: var(--mint-soft);
}

.p-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 14px;
  background: var(--mint-soft);
  color: var(--primary);
  transition: background 0.25s ease, color 0.25s ease;
}

.p-icon .icon {
  width: 20px;
  height: 20px;
}

.p-icon.gold {
  background: var(--gold-soft);
  color: var(--gold-deep);
}

.p-name-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.p-name {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
}

.p-name-wrap .icon {
  width: 14px;
  height: 14px;
  color: var(--text-3);
}

.p-right {
  margin-inline-start: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}

.p-time {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  transition: color 0.25s ease;
}

.p-badge {
  font-size: 10px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--primary);
}

.p-badge.now {
  color: var(--gold-deep);
}

.prayer-row.is-past .p-name {
  color: var(--text-2);
}

.prayer-row.is-past .p-time {
  color: var(--text-3);
}

.prayer-row.is-next .p-icon {
  background: var(--primary);
  color: var(--on-primary);
}

.prayer-row.is-next .p-time {
  color: var(--primary);
}

/* ============================ verse ============================ */

.verse-card {
  margin-top: 20px;
  padding: 22px 20px;
  border: 1px solid rgba(210, 167, 92, 0.22);
  border-radius: 26px;
  background: linear-gradient(135deg, var(--gold-soft), var(--mint-soft));
  text-align: center;
}

.verse {
  margin: 0;
  font-family: "Amiri", serif;
  font-size: 21px;
  line-height: 1.8;
  color: var(--ink);
}

.verse-source {
  display: inline-block;
  margin-top: 8px;
  color: var(--gold-deep);
  font-size: 12px;
  font-weight: 600;
}

/* ============================ generic page ============================ */

.page-title {
  margin: 0;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.2px;
}

.page-sub {
  margin: 2px 0 0;
  color: var(--text-2);
  font-size: 12px;
}

/* ============================ qibla ============================ */

.status-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 11px 14px;
  border: 1px solid transparent;
  border-radius: 18px;
  background: var(--mint-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
}

.status-banner .icon {
  width: 17px;
  height: 17px;
}

.status-banner span {
  flex: 1;
}

.status-banner.is-aligned {
  background: var(--gold-soft);
  border-color: rgba(210, 167, 92, 0.3);
  color: var(--gold-deep);
}

.status-banner.is-muted {
  background: var(--card);
  border-color: var(--border);
  color: var(--text-2);
}

.mini-btn {
  padding: 5px 11px;
  border: 1px solid var(--primary);
  border-radius: 50px;
  background: transparent;
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.compass-wrap {
  display: grid;
  place-items: center;
  margin-top: 14px;
}

.compass {
  position: relative;
  width: min(340px, 100%);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  box-shadow: 0 24px 48px -28px rgba(6, 58, 44, 0.55);
  touch-action: none;
}

.compass-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.compass-face {
  fill: var(--card);
}

.compass-ring {
  fill: none;
  stroke: var(--border);
  stroke-width: 1.5;
}

.compass-inner {
  fill: var(--mint-soft);
  fill-opacity: 0.45;
  stroke: var(--border);
  stroke-width: 1;
}

#compass-ticks {
  /* SVG attribute rotations already carry their own center, so the CSS
     transform-origin must sit at 0 0 or the dial gets rotated twice. */
  transform-origin: 0 0;
  transform-box: view-box;
  transition: transform 0.18s ease-out;
}

#compass-ticks line {
  stroke: var(--text-3);
  stroke-width: 1;
  stroke-linecap: round;
  opacity: 0.55;
}

#compass-ticks line.major {
  stroke: var(--primary);
  stroke-width: 2;
  opacity: 0.85;
}

#compass-ticks line.cardinal {
  stroke: var(--gold-deep);
  stroke-width: 2.4;
  opacity: 0.95;
}

#compass-needle {
  transform-origin: 0 0;
  transform-box: view-box;
  transition: transform 0.18s ease-out;
}

.needle-shaft {
  stroke: var(--gold-deep);
  stroke-width: 4;
  stroke-linecap: round;
}

.needle-tip {
  fill: var(--primary);
}

.compass-hub {
  fill: var(--card);
  stroke: none;
}

.compass-hub-ring {
  fill: none;
  stroke: var(--border);
  stroke-width: 1.4;
}

.compass-kaaba {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  transform: translate(-50%, -50%);
  color: var(--gold-deep);
  pointer-events: none;
}

.compass-kaaba .icon {
  width: 27px;
  height: 27px;
}

#compass-cardinals {
  position: absolute;
  inset: 0;
  transform-origin: 50% 50%;
  transition: transform 0.18s ease-out;
  pointer-events: none;
}

#compass-cardinals span {
  position: absolute;
  transform: translate(-50%, -50%);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

#compass-cardinals span.north {
  color: var(--gold-deep);
  font-size: 15px;
}

.stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.stat-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--card);
}

.stat-card strong {
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.info-card {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--card);
}

.info-card p {
  margin: 0;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.6;
}

.info-card small {
  display: block;
  margin-top: 3px;
  font-size: 10px;
}

.kaaba-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 14px;
}

.kaaba-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.kaaba-copy strong {
  font-size: 15px;
}

.kaaba-bearing {
  margin-inline-start: auto;
  color: var(--gold-deep);
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ============================ calendar ============================ */

.calendar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.pill-btn {
  flex: none;
  padding: 8px 14px;
  border: 0;
  border-radius: 50px;
  background: var(--mint-soft);
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.calendar-card {
  margin-top: 16px;
  padding: 8px 0;
}

.month-head {
  display: flex;
  align-items: center;
  padding: 0 6px;
}

.month-title {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-width: 0;
}

.month-title strong {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
}

.month-title span {
  color: var(--gold-deep);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--text-2);
  cursor: pointer;
}

.icon-btn .icon {
  width: 20px;
  height: 20px;
}

.weekday-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 0 8px;
  margin-top: 4px;
}

.weekday-row span {
  color: var(--text-3);
  font-size: 10px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: 46px;
  padding: 6px 6px 8px;
}

.day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 40px;
  height: 40px;
  margin: auto;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 14px;
  background: none;
  color: var(--ink);
  font-family: inherit;
  cursor: pointer;
}

.day .d {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
}

.day .h {
  color: var(--text-3);
  font-size: 9px;
  font-weight: 600;
  line-height: 1.15;
}

.day.is-friday .d {
  color: var(--gold-deep);
}

.day.is-today {
  border-color: rgba(14, 124, 96, 0.35);
}

html[data-theme="dark"] .day.is-today {
  border-color: rgba(79, 214, 168, 0.35);
}

.day.is-selected {
  background: var(--primary);
  border-color: var(--primary);
}

.day.is-selected .d,
.day.is-selected .h {
  color: var(--on-primary);
}

.day.is-selected .h {
  opacity: 0.72;
}

.day:not(.is-selected):active {
  background: var(--mint-soft);
}

.selected-card {
  margin-top: 10px;
  padding: 16px;
}

.selected-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.selected-head > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.selected-head strong {
  font-size: 15px;
  font-weight: 700;
}

.selected-head span#selected-hijri {
  color: var(--gold-deep);
  font-size: 12px;
  font-weight: 600;
}

.today-badge {
  flex: none;
  padding: 4px 10px;
  border-radius: 50px;
  background: var(--mint-soft);
  color: var(--primary);
  font-size: 10px;
  font-weight: 600;
}

.chip-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.time-chip {
  padding: 9px;
  border-radius: 16px;
  background: var(--mint-soft);
}

.time-chip.gold {
  background: var(--gold-soft);
}

.chip-label {
  display: flex;
  align-items: center;
  gap: 3px;
  color: var(--primary);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.time-chip.gold .chip-label {
  color: var(--gold-deep);
}

.chip-label .icon {
  width: 13px;
  height: 13px;
}

.chip-time {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.night-inline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 12px;
}

.night-inline div {
  display: flex;
  flex-direction: column;
}

.night-inline strong {
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ============================ settings ============================ */

.group-title {
  margin: 20px 4px 8px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 700;
}

.settings-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 26px;
  background: var(--card);
}

.settings-card > * + * {
  border-top: 1px solid var(--border);
}

.row {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 12px 16px;
  border: 0;
  background: none;
  color: inherit;
  font-family: inherit;
  text-align: start;
  cursor: pointer;
}

.row-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 13px;
  background: var(--mint-soft);
  color: var(--primary);
}

.row-icon .icon {
  width: 19px;
  height: 19px;
}

.row-main {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
}

.row-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
}

.row-sub {
  color: var(--text-3);
  font-size: 11px;
  line-height: 1.5;
}

.row-value {
  margin-inline-start: auto;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  text-align: end;
  max-width: 46%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-value.primary {
  color: var(--primary);
}

.row-value.danger {
  color: var(--danger);
}

.row-chev {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--text-3);
}

.row.is-static {
  cursor: default;
}

.section-block {
  padding: 14px 16px;
}

.block-label {
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 600;
}

.segmented {
  display: flex;
  gap: 3px;
  padding: 3px;
  border-radius: 14px;
  background: var(--mint-soft);
}

.segmented button {
  flex: 1;
  padding: 7px 4px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.segmented button.is-selected {
  background: var(--primary);
  color: var(--on-primary);
}

.switch {
  position: relative;
  width: 46px;
  height: 28px;
  flex: none;
  margin-inline-start: auto;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50px;
  background: var(--border);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  inset-inline-start: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(6, 58, 44, 0.28);
  transition: transform 0.2s ease;
}

.switch.on {
  background: var(--primary);
  border-color: var(--primary);
}

.switch.on::after {
  transform: translateX(-18px);
}

html[dir="ltr"] .switch.on::after {
  transform: translateX(18px);
}

.stepper {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-inline-start: auto;
}

.step-btn {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: var(--mint-soft);
  color: var(--primary);
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}

.step-btn:disabled {
  background: var(--border);
  color: var(--text-3);
  cursor: default;
}

.step-value {
  width: 42px;
  color: var(--primary);
  font-size: 17px;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.permission-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-top: 10px;
  padding: 14px;
  border: 1px solid rgba(210, 167, 92, 0.35);
  border-radius: 20px;
  background: var(--gold-soft);
}

.permission-card strong {
  color: var(--gold-deep);
  font-size: 14px;
}

.permission-card p {
  margin: 0;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.6;
}

.permission-card button {
  margin-top: 4px;
  padding: 6px 12px;
  border: 0;
  border-radius: 50px;
  background: var(--gold);
  color: #3a2a0c;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.about-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.about-head .bubble {
  width: 44px;
  height: 44px;
  border-radius: 15px;
}

.about-head .bubble .icon {
  width: 23px;
  height: 23px;
}

.about-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.about-copy strong {
  font-size: 17px;
  font-weight: 700;
}

.about-copy span {
  color: var(--text-2);
  font-size: 12px;
}

.about-body {
  margin: 10px 0 0;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.7;
}

.privacy-block {
  padding: 12px 16px;
}

.privacy-block strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
}

.privacy-block span {
  display: block;
  margin-top: 2px;
  color: var(--text-3);
  font-size: 11px;
  line-height: 1.6;
}

.made-with {
  margin: 18px 0 0;
  color: var(--text-3);
  font-size: 10px;
  text-align: center;
}

/* ============================ dua ============================ */

.dua-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 18px;
  padding: 22px 20px;
  border-radius: 26px;
  background: linear-gradient(150deg, var(--hero-top) 0%, var(--hero-bottom) 100%);
  color: var(--on-primary);
  text-align: center;
}

.dua-hero-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: var(--ring-gold);
}

.dua-hero-icon .icon {
  width: 26px;
  height: 26px;
}

.dua-owner-label {
  margin-top: 12px;
  color: var(--ring-gold);
  font-size: 14px;
  font-weight: 700;
}

.dua-owner-name {
  color: var(--on-primary);
  font-size: 34px;
  font-weight: 800;
  line-height: 1.45;
}

.dua-intro {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  line-height: 1.85;
}

.dua-parents {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 14px;
  padding: 20px;
  border: 1px solid rgba(210, 167, 92, 0.32);
  border-radius: 26px;
  background: var(--gold-soft);
  text-align: center;
}

.dua-parents-label {
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
}

.dua-parents-names {
  margin-top: 2px;
  color: var(--ink);
  font-size: 25px;
  font-weight: 700;
  line-height: 1.4;
}

.dua-parents-body {
  margin: 10px 0 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.85;
}

.dua-parents-request {
  margin: 12px 0 0;
  color: var(--primary);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.6;
}

.dua-verse {
  margin-top: 14px;
  padding: 20px;
  border: 1px solid rgba(210, 167, 92, 0.22);
  border-radius: 26px;
  background: linear-gradient(150deg, var(--mint-soft) 0%, var(--gold-soft) 100%);
  text-align: center;
}

.dua-verse-text {
  margin: 0;
  color: var(--ink);
  font-family: "Amiri", "Almarai", serif;
  font-size: 22px;
  line-height: 1.75;
}

.dua-verse-source {
  display: inline-block;
  margin-top: 8px;
  color: var(--gold-deep);
  font-size: 12px;
  font-weight: 600;
}

.dua-thanks {
  margin: 18px 0 0;
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

/* ============================ bottom bar ============================ */

.tabbar {
  position: fixed;
  bottom: calc(8px + env(safe-area-inset-bottom));
  left: 50%;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  width: min(calc(100% - 36px), 444px);
  height: 66px;
  padding: 6px;
  transform: translateX(-50%);
  border: 1px solid var(--border);
  border-radius: 25px;
  background: var(--nav-bg);
  box-shadow: 0 18px 36px -14px rgba(6, 58, 44, 0.35);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 5px 0;
  border: 0;
  border-radius: 20px;
  background: transparent;
  color: var(--text-2);
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.5;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.tab .icon {
  width: 20px;
  height: 20px;
}

.tab.is-active {
  background: var(--primary);
  color: var(--on-primary);
}

/* ============================ sheet ============================ */

.scrim {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(4, 22, 16, 0.46);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
}

.sheet {
  position: fixed;
  bottom: 0;
  left: 50%;
  z-index: 50;
  display: flex;
  flex-direction: column;
  width: min(100%, 480px);
  max-height: 82dvh;
  padding-bottom: env(safe-area-inset-bottom);
  transform: translateX(-50%);
  border-radius: 30px 30px 0 0;
  background: var(--bg);
  box-shadow: 0 -20px 50px -20px rgba(4, 22, 16, 0.4);
  animation: sheetUp 0.28s cubic-bezier(0.2, 0.85, 0.25, 1);
}

@keyframes sheetUp {
  from {
    transform: translate(-50%, 100%);
  }
  to {
    transform: translate(-50%, 0);
  }
}

.sheet-handle {
  width: 40px;
  height: 4px;
  flex: none;
  margin: 8px auto 0;
  border-radius: 4px;
  background: var(--border);
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: none;
  padding: 6px 12px 4px 18px;
}

.sheet-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.sheet-body {
  overflow-y: auto;
  padding: 6px 14px 20px;
  overscroll-behavior: contain;
}

.option-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 13px 12px;
  border: 0;
  border-radius: 16px;
  background: none;
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  text-align: start;
  cursor: pointer;
}

.option.is-selected {
  background: var(--mint-soft);
  color: var(--primary);
  font-weight: 700;
}

.option .icon {
  width: 18px;
  height: 18px;
  color: var(--primary);
  opacity: 0;
}

.option.is-selected .icon {
  opacity: 1;
}

.option-main {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.option-sub {
  color: var(--text-3);
  font-size: 11px;
  font-weight: 400;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 4px 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--mint-soft);
  color: var(--text-3);
}

.search-field .icon {
  width: 17px;
  height: 17px;
}

.search-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  color: var(--ink);
  font-size: 14px;
}

.search-field input::placeholder {
  color: var(--text-3);
}

.city-list {
  max-height: 54dvh;
  overflow-y: auto;
}

.sheet-empty {
  padding: 26px 0;
  color: var(--text-3);
  font-size: 13px;
  text-align: center;
}

.silent-hint {
  margin: 2px 4px 10px;
  color: var(--text-3);
  font-size: 12px;
}

/* ============================ dialog + toast ============================ */

.dialog-scrim {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(4, 22, 16, 0.5);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  animation: fadeIn 0.18s ease;
}

.dialog {
  width: min(100%, 340px);
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 26px;
  background: var(--card);
  box-shadow: var(--shadow);
  animation: dialogIn 0.22s cubic-bezier(0.2, 0.85, 0.25, 1);
}

@keyframes dialogIn {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
}

.dialog h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.dialog p {
  margin: 8px 0 18px;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.7;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.text-btn {
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--primary);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.text-btn.danger {
  color: var(--danger);
}

.toast {
  position: fixed;
  bottom: calc(92px + env(safe-area-inset-bottom));
  left: 50%;
  z-index: 70;
  max-width: calc(100% - 40px);
  padding: 10px 16px;
  transform: translateX(-50%);
  border-radius: 14px;
  background: var(--ink);
  color: var(--bg);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 14px 30px -12px rgba(4, 22, 16, 0.5);
  animation: toastIn 0.22s ease;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translate(-50%, 10px);
  }
}

.noscript {
  margin: 24px;
  padding: 16px;
  border-radius: 18px;
  background: var(--gold-soft);
  color: var(--gold-deep);
  font-size: 13px;
  text-align: center;
}

@media (max-height: 720px) {
  .hero {
    height: 208px;
  }
  .hero-inner {
    padding: 16px 20px;
  }
  .ring,
  .ring svg {
    width: 102px;
    height: 102px;
  }
}

@media (max-width: 360px) {
  .screen {
    padding-inline: 14px;
  }
  .hero-inner {
    padding: 18px;
  }
  .hero-prayer {
    font-size: 30px;
  }
  .hero-time {
    font-size: 22px;
  }
  .ring,
  .ring svg {
    width: 100px;
    height: 100px;
  }
  .prayer-row {
    gap: 10px;
  }
  .p-name {
    font-size: 16px;
  }
  .p-time {
    font-size: 18px;
  }
}

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

/* ======================= dua reminder popup ======================= */
.dua-popup {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(18px, env(safe-area-inset-top)) 20px max(18px, env(safe-area-inset-bottom));
  background: linear-gradient(160deg, var(--hero-top) 0%, var(--hero-bottom) 100%);
  overflow: hidden;
}

.dua-popup[hidden] {
  display: none;
}

.dua-popup-orb {
  position: absolute;
  top: -18%;
  inset-inline-end: -34%;
  width: 78%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.dua-popup-orb.second {
  top: auto;
  bottom: -26%;
  inset-inline-end: auto;
  inset-inline-start: -30%;
  width: 70%;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: 0 0 0 1px rgba(210, 167, 92, 0.18);
}

.dua-popup-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 420px;
  height: 100%;
  max-height: 820px;
  animation: dua-pop-in 0.32s ease both;
}

@keyframes dua-pop-in {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.dua-popup-bismillah {
  font-family: "Amiri", serif;
  font-size: 26px;
  color: var(--gold);
  line-height: 1.2;
}

.dua-popup-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
}

.dua-popup-eyebrow .icon {
  width: 18px;
  height: 18px;
}

.dua-popup-prayer {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

.dua-popup-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-top: 14px;
  padding: 22px 20px;
  border: 1px solid rgba(210, 167, 92, 0.42);
  border-radius: 30px;
  background: rgba(0, 0, 0, 0.16);
  overflow-y: auto;
  flex: 1;
}

.dua-popup-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding-block: 18px;
}

.dua-popup-body .dua-text {
  margin: 0;
  font-family: "Amiri", serif;
  font-size: 23px;
  line-height: 1.72;
  color: #ffffff;
  text-align: center;
}

.dua-popup-body .dua-text.small {
  font-size: 20px;
  line-height: 1.68;
}

.dua-popup-body .dua-source {
  font-size: 12px;
  color: var(--gold);
}

.dua-popup-hint {
  margin: 14px 0 10px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  text-align: center;
}

.dua-popup-btn {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 18px;
  background: var(--gold);
  color: #0a3d30;
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

.dua-popup-btn:active {
  transform: scale(0.99);
}

.dua-ornament {
  display: flex;
  align-items: center;
  gap: 5px;
  width: 82%;
  color: var(--gold);
}

.dua-ornament.short {
  width: 55%;
}

.dua-ornament span {
  flex: 1;
  height: 1px;
  background: linear-gradient(to left, transparent, rgba(210, 167, 92, 0.85));
}

.dua-ornament span:last-child {
  background: linear-gradient(to right, transparent, rgba(210, 167, 92, 0.85));
}

.dua-ornament i,
.dua-ornament b {
  display: block;
  border-radius: 50%;
  background: currentColor;
}

.dua-ornament i {
  width: 7px;
  height: 7px;
}

.dua-ornament b {
  width: 11px;
  height: 11px;
  background: transparent;
  border: 1px solid currentColor;
}

.dua-preview-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.dua-preview-btn {
  width: 100%;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--mint-soft);
  color: var(--primary);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.dua-preview-btn:active {
  transform: scale(0.99);
}
