@import url("https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&family=Cairo:wght@300;400;600;700&family=Noto+Naskh+Arabic:wght@400;600;700&display=swap");

:root {
  --bg: #fffdf8;
  --surface: #fffdf8;
  --surface-soft: #f3ead9;
  --ink: #16130d;
  --muted: #9a7b39;
  --primary: #c59a16;
  --primary-soft: #fff5cf;
  --accent: #c59a16;
  --accent-soft: #fbf1db;
  --line: #d9b543;
  --danger: #a24b43;
  --shadow: 0 14px 34px rgba(70, 52, 18, 0.16);
  --app-max: 430px;
  --page-pad: clamp(16px, 6.8vw, 30px);
  --bottom-safe: env(safe-area-inset-bottom, 0px);
  --top-safe: env(safe-area-inset-top, 0px);
  font-family: "Cairo", sans-serif;
}

* {
  box-sizing: border-box;
  min-width: 0;
}

html,
body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  min-height: 100%;
  position: relative;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  overflow-x: clip;
  overscroll-behavior-x: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

#root {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

button,
input,
textarea {
  font: inherit;
  max-width: 100%;
}

img,
svg,
canvas {
  max-width: 100%;
}

main,
section,
article,
header,
nav,
form {
  max-width: 100%;
}

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

.app {
  width: min(100%, var(--app-max));
  max-width: var(--app-max);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  position: relative;
  overflow-x: hidden;
  overflow-x: clip;
  overscroll-behavior-x: none;
  touch-action: pan-y;
  background: var(--bg);
  box-shadow: var(--shadow);
}

.app > * {
  width: 100%;
  max-width: 100%;
}

.app.dark {
  --bg: #101412;
  --surface: #171d1a;
  --surface-soft: #202722;
  --ink: #f3efe6;
  --muted: #b6b9b2;
  --primary: #9bd2b9;
  --primary-soft: #24342d;
  --accent: #d5b76f;
  --accent-soft: #332d1b;
  --line: #343d37;
  --danger: #d4867b;
}

.hero {
  min-height: 174px;
  padding: 22px 20px 18px;
  display: grid;
  grid-template-columns: 58px 1fr;
  align-items: end;
  gap: 14px;
  position: relative;
  background: #fffdf8;
  border-bottom: 0;
  box-shadow: none;
}

.compact-hero {
  position: relative;
  z-index: 30;
  width: 100%;
  height: auto;
  min-height: 148px;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto;
  place-items: start center;
  align-items: center;
  justify-content: center;
  padding: calc(24px + var(--top-safe)) 62px 18px;
  margin: 0;
  background:
    radial-gradient(circle at 50% -12px, rgba(196, 154, 22, 0.08), transparent 86px),
    #fffdf8;
}

.compact-hero + .content {
  padding-top: 14px;
}

.search-entry,
.settings-entry {
  position: absolute;
  top: calc(47px + var(--top-safe));
  width: 46px;
  height: 46px;
  border: 1px solid #ead58c;
  border-radius: 50%;
  color: #173d32;
  background: #fffdf8;
  box-shadow: 0 8px 18px rgba(139, 101, 20, 0.12);
  font-size: 1.54rem;
  line-height: 1;
}

.search-entry .line-icon,
.settings-entry .line-icon {
  width: 24px;
  height: 24px;
  stroke-width: 1.9;
}

.brand-stack {
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
  align-content: start;
  min-height: 124px;
  width: 230px;
  margin-inline: auto;
}

.brand-logo {
  width: 213px;
  height: 92px;
  max-width: 213px;
  max-height: 92px;
  object-fit: contain;
  object-position: center;
  mix-blend-mode: normal;
}

.brand-stack p {
  margin: 0;
  padding: 0;
  color: #9a7b39;
  font-size: 0.82rem;
  line-height: 1.35;
  font-weight: 500;
  white-space: nowrap;
}

.theme-toggle {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--primary);
  background: var(--surface-soft);
}

.hero-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: var(--primary);
  background: transparent;
  font: 700 2rem "Amiri", serif;
}

.hero h1 {
  margin: 0;
  color: var(--primary);
  font: 700 2.2rem/1.1 "Amiri", serif;
}

.hero p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.content {
  width: 100%;
  max-width: 100%;
  padding: 16px var(--page-pad) calc(108px + var(--bottom-safe));
  background: #fffdf8;
  overflow-x: hidden;
}

.daily-card,
.start-card,
.menu-card,
.dua-card,
.fav-row,
.private-form,
.setting-row,
.journey-card,
.name-card,
.today-card,
.continue-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.today-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  margin-bottom: 12px;
  border-color: var(--line);
  background: linear-gradient(135deg, #fffdf8, #f8eedb);
}

.ticker-card {
  width: 100%;
  min-height: 44px;
  display: grid;
  grid-template-columns: 32px auto 1fr;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: #fffdf8;
  overflow: hidden;
}

.ticker-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 0;
  color: #173d32;
  background: transparent;
}

.ticker-icon .emoji-icon {
  font-size: 1rem;
}

.ticker-card strong {
  color: #b1840e;
  font-size: 0.82rem;
  white-space: nowrap;
}

.ticker-track {
  overflow: hidden;
  white-space: nowrap;
  color: var(--ink);
  font-size: 0.82rem;
  direction: ltr;
}

.ticker-track span {
  display: inline-block;
  min-width: 100%;
  padding-inline-start: 100%;
  direction: rtl;
  animation: tickerMove 18s linear infinite;
}

@keyframes tickerMove {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(100%);
  }
}

.today-card span {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
}

.today-card p {
  margin: 0;
  color: var(--ink);
  text-align: center;
  font: 1.35rem/2.2 "Amiri", "Noto Naskh Arabic", serif;
}

.today-card small {
  color: var(--muted);
  text-align: center;
}

.today-card button,
.continue-card {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: #c49a16;
  font-weight: 700;
}

.resume-button {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #c99d14, #b8860d) !important;
  box-shadow: 0 8px 18px rgba(184, 134, 13, 0.22);
  font-weight: 700;
}

.standalone-resume {
  margin: 0 0 12px;
}

.daily-ward-card {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  background: transparent;
}

.daily-ward-card h2 {
  margin: 0;
  color: var(--ink);
  text-align: center;
  font-size: 1.06rem;
  font-weight: 800;
  line-height: 1.3;
}

.daily-ward-card h2 span {
  display: none;
}

.daily-ward-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.daily-ward-panel .daily-ward-actions,
.daily-ward-panel .ward-progress-row {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 4px;
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 0;
  direction: rtl;
}

.ward-progress-row span {
  color: #173d32;
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
  direction: rtl;
  justify-self: end;
}

.ward-progress-row i {
  height: 8px;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  border-radius: 999px;
  background: #efe4cc;
}

.ward-progress-row b {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, #1f5a46, #2f7a5b);
}

.ward-quick-status {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-column: 1 / -1;
  gap: 8px;
  margin: 0 0 10px;
  direction: rtl;
}

.ward-quick-status button {
  min-height: 41px;
  padding: 0 14px;
  border-radius: 11px;
  border: 1px solid #ead58c;
  color: #9a7414;
  background: rgba(255, 253, 248, 0.72);
  font-size: 0.97rem;
  font-weight: 800;
}

.ward-quick-status button:first-child.active {
  color: #fff;
  border-color: #c49a16;
  background: #c49a16;
}

.ward-quick-status button:last-child {
  color: #a3483e;
  border-color: rgba(185, 74, 64, 0.32);
}

.ward-quick-status button:last-child.active {
  color: #fff;
  border-color: #b94a40;
  background: #b94a40;
}

.tracker-card.compact-tracker-card {
  min-height: 0;
  height: auto;
  padding: 12px 14px 13px;
  border: 1px solid #ead58c;
  border-radius: 16px;
  background: linear-gradient(180deg, #fffdf8 0%, #fff9ef 100%);
  box-shadow: 0 8px 18px rgba(139, 101, 20, 0.07);
  gap: 9px;
  align-content: start;
  margin-bottom: 10px;
}

.tracker-title.centered {
  display: grid;
  justify-content: center;
  text-align: center;
  gap: 4px;
  margin: 0;
}

.tracker-title.centered span {
  color: #173d32;
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1.15;
}

.tracker-heading-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.tracker-heading-icon b {
  font: inherit;
}

.tracker-icon-box {
  width: 0;
  height: 0;
  display: none;
  place-items: center;
  flex: 0 0 22px;
  border: 0;
  border-radius: 50%;
  color: #173d32;
  background: #fff2cf;
  box-shadow: inset 0 0 0 1px rgba(196, 154, 22, 0.28);
}

.tracker-heading-icon .tracker-line-icon {
  width: 14px;
  height: 14px;
  color: #173d32;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 14px;
  display: block;
}

.tracker-title.centered small {
  color: #6c5b40;
  font-size: 0.82rem;
  line-height: 1.2;
  font-weight: 700;
  margin: 0;
}

.compact-zad-card {
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
}

.compact-zad-card .morning-zad-head {
  min-width: 0;
}

.compact-zad-card .morning-zad-button {
  min-width: 96px;
  padding: 0 14px;
}

.sections-menu {
  gap: 10px;
}

.tracker-card {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}

.tracker-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #9a7b39;
  font-size: 0.9rem;
  font-weight: 700;
}

.tracker-title small {
  color: #9a7b39;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.tracker-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.tracker-actions button {
  min-height: 40px;
  border-radius: 10px;
  font-weight: 700;
}

.tracker-done {
  color: #fff;
  border: 1px solid #c49a16;
  background: #c49a16;
}

.tracker-missed {
  color: #1c160c;
  border: 1px solid #e0bc43;
  background: #fffdf8;
}

.tracker-done.active {
  box-shadow: 0 8px 18px rgba(184, 134, 13, 0.22);
}

.tracker-missed.active {
  color: #173d32;
  border-color: #e0bc43;
  background: #fff5cf;
}

.week-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 7px;
  padding: 4px 2px 0;
  margin-top: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  touch-action: pan-x pan-y;
  user-select: none;
  cursor: grab;
}

.week-range {
  color: #173d32;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.2;
}

.day-dot {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 7px;
  min-width: 0;
  white-space: nowrap;
}

.day-dot span {
  color: #7f693c;
  font-size: 0.76rem;
  line-height: 1;
  font-weight: 800;
  white-space: nowrap;
}

.day-dot i {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #9a7b39;
  background: #f3ead8;
  border: 1px solid rgba(224, 188, 67, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  font-style: normal;
  font-size: 1rem;
  font-weight: 900;
}

.day-dot.done i {
  color: #fff;
  background: linear-gradient(135deg, #cfaa2a, #b8870b);
  border-color: #c49a16;
  box-shadow: 0 5px 12px rgba(184, 134, 13, 0.22);
  font-size: 1rem;
}

.day-dot.today span {
  color: #173d32;
  font-weight: 800;
}

.day-dot.today i {
  outline: 2px solid #173d32;
  outline-offset: 2px;
  background: #fffaf1;
}

.day-dot.done.today i {
  color: #fff;
  background: linear-gradient(135deg, #cfaa2a, #b8870b);
  border-color: #c49a16;
}

.day-dot.missed.today i {
  color: #fff;
  background: linear-gradient(135deg, #bd554b, #a63c34);
  border-color: #b94a40;
}

.day-dot.missed i {
  color: #fff;
  background: linear-gradient(135deg, #bd554b, #a63c34);
  border: 1px solid #b94a40;
  box-shadow: 0 5px 12px rgba(169, 60, 52, 0.16);
  font-size: 1.02rem;
  font-weight: 900;
  line-height: 0.9;
}

.continue-card {
  width: 100%;
  display: grid;
  gap: 2px;
  padding: 13px 15px;
  margin-bottom: 12px;
  text-align: right;
  color: var(--ink);
  border-color: var(--line);
  background: var(--surface);
}

.continue-card span {
  color: var(--accent);
  font-size: 0.76rem;
}

.continue-card strong {
  color: var(--primary);
}

.daily-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 14px;
  padding: 14px;
  margin-bottom: 12px;
}

.daily-card span,
.daily-card small {
  color: var(--muted);
  font-size: 0.8rem;
}

.daily-card strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 1.12rem;
}

.daily-ring {
  min-width: 54px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--primary);
  background: var(--primary-soft);
  font-weight: 700;
}

.progress {
  grid-column: 1 / -1;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}

.progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.menu-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.menu-card {
  width: 100%;
  min-height: 60px;
  display: grid;
  grid-template-columns: 42px 1fr 16px;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 4px 12px;
  padding: 8px 12px 10px;
  text-align: right;
  color: #1f3d34;
  border-color: #ead58c;
  background: #fffdf8;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
  -webkit-tap-highlight-color: rgba(196, 154, 22, 0.14);
}

.menu-card:hover,
.menu-card:focus-visible,
.menu-card:active {
  border-color: #c49a16;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(139, 101, 20, 0.1);
}

.menu-card:hover,
.menu-card:focus-visible {
  transform: translateY(-1px);
}

.menu-card:active {
  transform: scale(0.992);
  box-shadow: 0 4px 12px rgba(139, 101, 20, 0.18);
}

.menu-card:hover .menu-icon,
.menu-card:focus-visible .menu-icon,
.menu-card:active .menu-icon {
  color: #b1840e;
  transform: scale(1.04);
  box-shadow: none;
}

.menu-card::after {
  content: "‹";
  grid-column: 3;
  grid-row: 1 / 3;
  color: #c49a16;
  font-size: 1.1rem;
  justify-self: end;
}

.menu-icon {
  grid-row: 1 / 3;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: var(--section-icon-color, #123f33);
  background: transparent;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.line-icon {
  width: var(--section-icon-size, 29px);
  height: var(--section-icon-size, 29px);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.menu-card strong {
  align-self: end;
  color: var(--section-title-color, var(--appearance-card-title-color, #1f3d34));
  font-size: var(--section-title-size, var(--appearance-card-title-size, 0.98rem));
  font-weight: var(--section-title-weight, var(--appearance-title-weight, 800));
}

.menu-card small,
.meta,
.empty {
  color: var(--muted);
}

.menu-card small {
  align-self: start;
  color: var(--section-desc-color, var(--appearance-card-desc-color, #a9842a));
  font-size: var(--section-desc-size, var(--appearance-card-desc-size, 0.72rem));
  line-height: 1.45;
}

.featured-menu-card {
  margin-bottom: 10px;
}

.icon-green,
.icon-amber,
.icon-warm,
.icon-blue,
.icon-rose,
.icon-violet,
.icon-gold,
.icon-sky,
.icon-gray {
  color: #173d32;
  background: transparent;
}

.category-row {
  width: 100%;
  max-width: 100%;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  margin: 0 0 12px;
  padding: 0 0 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(197, 154, 22, 0.45) transparent;
  cursor: default;
  touch-action: pan-x pan-y;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
  user-select: auto;
}

.category-row::-webkit-scrollbar {
  display: block;
  height: 4px;
}

.category-row::-webkit-scrollbar-track {
  background: transparent;
}

.category-row::-webkit-scrollbar-thumb {
  background: rgba(197, 154, 22, 0.42);
  border-radius: 999px;
}

.category-row.dragging,
.admin-tabs.dragging {
  cursor: grabbing;
}

.chip {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  touch-action: manipulation;
  color: var(--muted);
  background: var(--surface);
  font-size: 0.82rem;
}

.chip.active {
  color: #fff;
  border-color: var(--primary);
  background: var(--primary);
}

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: color-mix(in srgb, #efe5d4 94%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.round-button,
.round-placeholder {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: #b1840e;
  background: #fffaf1;
  font-size: 1.2rem;
}

.search-entry {
  left: 18px;
  font-size: 1.7rem;
}

.settings-entry {
  right: 18px;
  font-size: 1.46rem;
}

.round-placeholder {
  visibility: hidden;
}

.header-title {
  display: grid;
  justify-items: center;
  gap: 2px;
  min-width: 0;
  text-align: center;
}

.header-title h1 {
  margin: 0;
  color: var(--ink);
  font-size: 1.13rem;
  font-weight: 900;
  line-height: 1.25;
}

.header-title-text {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.header-subtitle {
  margin: 0;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1.35;
}

.search,
.private-form input,
.private-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 13px;
  margin-bottom: 12px;
  outline: none;
}

.main-search {
  position: sticky;
  top: 0;
  z-index: 8;
}

.private-form {
  padding: 12px;
  margin-bottom: 12px;
}

.private-form-page {
  padding: 0;
}

.private-form label {
  display: block;
  margin: 0 2px 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.private-form textarea {
  min-height: 210px;
  resize: vertical;
  font-family: "Amiri", serif;
  font-size: 1.25rem;
  line-height: 2;
}

.add-private-button {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 0 12px;
  border: 1px solid #e0bc43;
  border-radius: 8px;
  color: #9b7415;
  background: #fffaf1;
  font-weight: 700;
}

.add-private-button span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #c49a16;
  line-height: 1;
}

.notice {
  border: 1px solid rgba(159, 122, 50, 0.28);
  border-right: 4px solid var(--accent);
  border-radius: 8px;
  padding: 12px;
  color: var(--muted);
  background: var(--accent-soft);
  line-height: 1.8;
}

.admin-error-message {
  border-color: rgba(163, 69, 54, 0.35);
  border-right-color: #a34536;
  color: #7f2d24;
  background: #fff5ef;
  direction: ltr;
  text-align: left;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.ward-button,
.primary-button,
.secondary-button {
  width: 100%;
  min-height: 48px;
  border-radius: 8px;
  border: 0;
  margin-bottom: 12px;
  color: #fff;
  background: #c49a16;
  font-weight: 700;
}

.ward-button:disabled {
  opacity: 0.45;
}

.secondary-button {
  color: #a4770a;
  border: 1px solid var(--line);
  background: var(--surface);
}

.admin-entry-button {
  width: 100%;
  min-height: 48px;
  display: grid;
  gap: 2px;
  place-items: center;
  border: 1px solid #e0bc43;
  border-radius: 8px;
  color: #9b7415;
  background: #fffaf1;
  font-weight: 800;
}

.admin-entry-button strong {
  color: #1f3d34;
  font-size: 0.95rem;
}

.admin-entry-button small {
  color: #9a7b39;
  font-size: 0.74rem;
}

.admin-panel {
  display: grid;
  gap: 12px;
}

.admin-heading {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid #ead58c;
  border-radius: 10px;
  background: #fffdf8;
}

.admin-heading-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: #123f33;
  background: transparent;
}

.admin-line-icon {
  width: 29px;
  height: 29px;
  stroke-width: 1.9;
}

.admin-heading strong {
  display: block;
  color: #1f3d34;
  font-size: 1rem;
  font-weight: 800;
}

.admin-heading small {
  color: #9a7b39;
  font-size: 0.78rem;
}

.admin-backup {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #ead58c;
  border-radius: 10px;
  background: #fffdf8;
}

.admin-backup h2 {
  margin: 0;
  color: #1f3d34;
  font-size: 0.95rem;
}

.admin-backup p {
  margin: 0;
  color: #9a7b39;
  font-size: 0.78rem;
  line-height: 1.7;
}

.admin-backup-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

.admin-backup-actions button {
  min-height: 40px;
  border: 1px solid #e0bc43;
  border-radius: 8px;
  color: #173d32;
  background: #fffaf1;
  font-weight: 800;
}

.admin-backup-actions button:first-child {
  color: #fff;
  background: #c49a16;
}

.admin-pin-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e0bc43;
  border-radius: 10px;
  background: #fffdf8;
}

.admin-pin-card label {
  color: #9a7b39;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 800;
}

.admin-pin-card input {
  width: 100%;
  min-height: 44px;
  border: 1px solid #e0bc43;
  border-radius: 8px;
  color: #1f3d34;
  background: #fffdf8;
  padding: 10px 12px;
  outline: none;
}

.admin-pin-card button {
  min-height: 42px;
  border: 1px solid #e0bc43;
  border-radius: 8px;
  color: #9a7414;
  background: #fffaf1;
  font-weight: 800;
}

.admin-tabs {
  width: 100%;
  max-width: 100%;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(197, 154, 22, 0.45) transparent;
  cursor: default;
  touch-action: pan-x pan-y;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
  user-select: auto;
}

.admin-tabs::-webkit-scrollbar {
  display: block;
  height: 4px;
}

.admin-tabs::-webkit-scrollbar-track {
  background: transparent;
}

.admin-tabs::-webkit-scrollbar-thumb {
  background: rgba(197, 154, 22, 0.42);
  border-radius: 999px;
}

.admin-tabs button {
  min-width: max-content;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #9b7415;
  background: #fffaf1;
  font-size: 0.84rem;
  font-weight: 800;
  white-space: nowrap;
}

.admin-tabs button.active {
  color: #173d32;
  border-color: #c49a16;
  background: #fff5cf;
}

.admin-form,
.admin-pin-form {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffdf8;
}

.admin-config-form {
  display: grid;
  gap: 10px;
}

.admin-config-form h2 {
  margin: 0;
  color: #1f3d34;
  font-size: 0.95rem;
}

.admin-config-form fieldset {
  margin: 0;
  min-width: 0;
  padding: 10px;
  border: 1px solid #ead58c;
  border-radius: 10px;
  background: #fffaf1;
}

.admin-config-form legend {
  padding: 0 6px;
  color: #1f3d34;
  font-weight: 800;
  font-size: 0.82rem;
}

.admin-config-form select,
.admin-config-form input,
.admin-config-form textarea {
  width: 100%;
  min-height: 38px;
  margin-top: 6px;
  border: 1px solid #e0bc43;
  border-radius: 8px;
  color: #1f3d34;
  background: #fffdf8;
  padding: 8px 10px;
  outline: none;
  resize: vertical;
}

.admin-inline-fields {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 8px;
}

.admin-sort-list {
  display: grid;
  gap: 9px;
}

.admin-sortable-card {
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.admin-sortable-card.dragging {
  border-color: #c49a16;
  background: #ffffff;
  box-shadow: 0 12px 24px rgba(139, 101, 20, 0.14);
  transform: scale(0.992);
}

.admin-section-row legend {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.admin-drag-handle {
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(196, 154, 22, 0.45);
  border-radius: 8px;
  color: #173d32;
  background: #fffdf8;
  font-size: 0.9rem;
  line-height: 1;
  cursor: grab;
  touch-action: none;
}

.admin-drag-handle:active {
  cursor: grabbing;
  color: #b1840e;
}

.admin-order-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  align-self: end;
}

.admin-order-buttons button,
.admin-category-card button {
  min-height: 34px;
  border: 1px solid #e0bc43;
  border-radius: 8px;
  color: #173d32;
  background: #fffdf8;
  font-weight: 800;
}

.admin-order-buttons button:disabled {
  opacity: 0.35;
}

.appearance-preset-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.appearance-preset-row button {
  min-height: 38px;
  border: 1px solid #e0bc43;
  border-radius: 10px;
  color: #173d32;
  background: #fffdf8;
  font-weight: 800;
}

.appearance-section-list {
  display: grid;
  gap: 10px;
}

.appearance-section-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #ead58c;
  border-radius: 12px;
  background: #fffdf8;
}

.appearance-section-card > strong {
  color: #173d32;
  font-size: 0.95rem;
}

.danger-soft {
  color: #9f3f36;
  border-color: #c7796f;
  background: #fff9f6;
}

.admin-category-sort-list {
  margin-top: 8px;
}

.admin-category-card {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto 74px;
  gap: 8px;
  align-items: center;
  padding: 9px;
  border: 1px solid rgba(224, 188, 67, 0.65);
  border-radius: 10px;
  background: #fffdf8;
}

.admin-category-card input {
  margin-top: 0;
}

.admin-category-card .admin-check-line {
  margin: 0;
  white-space: nowrap;
}

.admin-checks,
.admin-check-line {
  display: grid;
  gap: 8px;
  color: #4a3b2a;
  font-size: 0.82rem;
  font-weight: 700;
}

.admin-checks label,
.admin-check-line {
  display: flex;
  gap: 8px;
  align-items: center;
}

.admin-checks input,
.admin-check-line input {
  width: 18px;
  min-height: 18px;
  accent-color: #c49a16;
}

.admin-list {
  display: grid;
  gap: 8px;
}

.admin-list h2 {
  grid-column: 1 / -1;
  margin: 4px 0;
  color: #1f3d34;
  font-size: 0.9rem;
}

.admin-list > .empty {
  grid-column: 1 / -1;
}

.admin-content-tools {
  display: grid;
  gap: 10px;
  padding: 12px;
  margin: 10px 0;
  border: 1px solid rgba(224, 188, 67, 0.65);
  border-radius: 12px;
  background: #fffdf8;
}

.admin-content-tools > div {
  display: grid;
  gap: 5px;
}

.admin-content-tools label,
.admin-order-field span {
  color: #a9842a;
  font-size: 0.78rem;
  font-weight: 800;
}

.admin-content-tools input,
.admin-content-tools select,
.admin-order-field input {
  width: 100%;
  min-height: 38px;
  border: 1px solid #e0bc43;
  border-radius: 9px;
  color: #173d32;
  background: #fffaf1;
  padding: 7px 10px;
  outline: none;
}

.admin-content-tools small {
  color: #6c5b40;
  font-size: 0.76rem;
  line-height: 1.7;
}

.admin-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 92px;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffdf8;
}

.admin-item > .admin-drag-handle {
  align-self: start;
  width: 26px;
  min-height: 26px;
  height: 26px;
  padding: 0;
  border-color: rgba(196, 154, 22, 0.45);
  color: #173d32;
  background: #fffdf8;
}

.admin-item.is-hidden {
  opacity: 0.68;
}

.admin-item strong {
  display: block;
  margin-bottom: 5px;
  color: #1f3d34;
  font-size: 0.95rem;
}

.admin-item p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #4a3b2a;
  font: 1rem/1.8 "Amiri", serif;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.admin-status {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 4px;
  color: #a9842a;
  font-size: 0.7rem;
  line-height: 1.5;
}

.admin-status span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 1px 7px;
  border: 1px solid rgba(224, 188, 67, 0.45);
  border-radius: 999px;
  background: #fffaf1;
}

.admin-order-field {
  display: grid;
  grid-template-columns: auto 82px;
  gap: 8px;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  margin-top: 9px;
}

.admin-order-field input {
  min-height: 32px;
  padding-inline: 8px;
  text-align: center;
}

.admin-item-actions {
  display: grid;
  gap: 7px;
}

.admin-item button {
  min-height: 36px;
  width: 100%;
  padding: 0 10px;
  border: 1px solid #c7796f;
  border-radius: 8px;
  color: #9f3f36;
  background: #fff9f6;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.admin-item button:disabled {
  opacity: 0.35;
}

.admin-item button.edit {
  color: #173d32;
  border-color: #e0bc43;
  background: #fffaf1;
}

.name-detail-results {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.name-detail-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf8;
}

.name-detail-card strong {
  display: block;
  margin-bottom: 0;
  color: #1f3d34;
  font-size: 1rem;
}

.name-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.name-detail-card p {
  margin: 0 0 8px;
  color: #4a3b2a;
  font-size: 0.86rem;
  line-height: 1.8;
}

.name-detail-card p b {
  display: block;
  margin-bottom: 2px;
  color: #a9842a;
  font-size: 0.76rem;
}

.name-detail-card blockquote {
  margin: 8px 0 0;
  padding: 9px 10px;
  border: 1px solid #ead58c;
  border-radius: 10px;
  color: #a9842a;
  background: #fffaf1;
  font: 1.05rem/1.9 "Amiri", serif;
}

.name-detail-card button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #ead58c;
  border-radius: 10px;
  color: #a4770a;
  background: #fff7d7;
  padding: 0;
  font-weight: 800;
  line-height: 1;
}

button.share-icon-button,
.name-detail-card button.share-icon-button,
.inline-share.share-icon-button {
  color: #a4770a;
  background: #fff7d7;
  border-color: #ead58c;
  -webkit-appearance: none;
  appearance: none;
  font-size: 0;
}

.share-icon-button .line-icon,
.name-detail-card button.share-icon-button .line-icon {
  width: 20px;
  height: 20px;
  stroke-width: 2.15;
  color: currentColor;
  display: block;
}

.dua-list {
  display: grid;
  gap: 8px;
}

.sort-hint {
  margin: 0 0 10px;
  color: #9a7b39;
  font-size: 0.78rem;
  line-height: 1.7;
  text-align: center;
}

.fav-sort-list {
  touch-action: pan-y;
}

.dua-card,
.fav-row {
  display: grid;
  grid-template-columns: 1fr 34px;
  gap: 8px;
  padding: 13px;
  border-color: #ead58c;
  background: #fffdf8;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.fav-sort-card {
  grid-template-columns: 28px 1fr 34px;
  align-items: start;
}

.fav-sort-card.dragging {
  opacity: 0.72;
  border-color: #c49a16;
  background: #ffffff;
  box-shadow: 0 12px 24px rgba(139, 101, 20, 0.14);
  transform: scale(0.99);
}

.drag-handle {
  width: 28px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: #173d32;
  background: transparent;
  font-size: 1.05rem;
  line-height: 1;
  cursor: grab;
  touch-action: none;
}

.drag-handle:active {
  cursor: grabbing;
  color: #b1840e;
  background: #fff8e6;
}

.dua-card:hover,
.fav-row:hover,
.dua-card:focus-within,
.fav-row:focus-within {
  border-color: #c49a16;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(139, 101, 20, 0.1);
  transform: translateY(-1px);
}

.dua-card:active,
.fav-row:active {
  border-color: #b1840e;
  box-shadow: 0 4px 12px rgba(139, 101, 20, 0.18);
  transform: scale(0.992);
}

.dua-card:hover .fav,
.fav-row:hover .fav,
.dua-card:focus-within .fav,
.fav-row:focus-within .fav,
.dua-card:active .fav,
.fav-row:active .fav {
  color: #c49a16;
  border-color: #e0bc43;
  background: #fff5cf;
  transform: scale(1.06);
}

.dua-body {
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: right;
  padding: 0;
}

.dua-body h3 {
  margin: 0 0 7px;
  color: var(--section-title-color, var(--appearance-card-title-color, #1f3d34));
  font-size: var(--section-title-size, var(--appearance-card-title-size, 0.98rem));
  font-weight: var(--section-title-weight, var(--appearance-title-weight, 800));
}

.dua-body p {
  margin: 0;
  display: -webkit-box;
  overflow: hidden;
  color: var(--section-desc-color, #4a3b2a);
  font: var(--section-desc-size, 1.08rem)/2 "Amiri", serif;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
  font-size: 0.76rem;
  color: #a9842a;
}

.meta b {
  color: #a9842a;
}

.card-actions,
.sort-buttons {
  display: grid;
  gap: 6px;
  align-content: start;
  justify-items: center;
}

.fav,
.card-actions .edit,
.delete,
.sort-buttons button {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #b99122;
  background: #fff8e6;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.fav-order-actions button {
  width: 32px;
  height: 29px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #ead58c;
  border-radius: 8px;
  color: #173d32;
  background: #fffdf8;
  font-weight: 800;
}

.fav-order-actions button:disabled {
  opacity: 0.38;
}

.fav {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 0.98rem;
  line-height: 1;
}

.fav.active,
.active-star {
  color: #b99122;
}

.delete {
  color: var(--danger);
  font-size: 0.75rem;
}

.card-actions .edit {
  color: #173d32;
  font-size: 0.75rem;
  background: #fffdf8;
}

.journey-progress {
  margin-bottom: 16px;
}

.journey-card {
  height: 260px;
  display: grid;
  grid-template-rows: auto 1fr;
  align-content: stretch;
  gap: 14px;
  padding: 24px 18px;
  margin-bottom: 14px;
  text-align: center;
}

.journey-card h2 {
  color: var(--ink);
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.45;
}

.journey-copy {
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: center;
  gap: 12px;
  padding-inline: 4px;
}

.journey-card p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.9;
}

.journey-card blockquote,
.modal blockquote {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--primary);
  background: var(--surface-soft);
  font: 1.18rem/2.05 "Amiri", serif;
  max-height: 170px;
  overflow: auto;
}

.split-actions {
  display: flex;
  gap: 10px;
}

.names-list {
  display: grid;
  gap: 8px;
}

.name-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.name-chip {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 12px;
  border: 1px solid #ead58c;
  border-radius: 999px;
  color: #1f3d34;
  background: #fffdf8;
  font-family: "Cairo", sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.name-chip span {
  font-size: 0.76rem;
  line-height: 1;
}

.name-chip.selected {
  color: #fffdf8;
  border-color: #173d32;
  background: #173d32;
}

.name-chip:active {
  transform: scale(0.98);
}

.names-help {
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid #ead58c;
  border-radius: 12px;
  color: #9a7b39;
  background: #fffaf1;
  font-size: 0.84rem;
  line-height: 1.8;
}

.selected-names-card {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  margin-bottom: 0;
  padding: 14px;
  border: 1px solid #e0bc43;
  border-radius: 14px;
  background: linear-gradient(135deg, #fffdf8, #fff8e8);
}

.selected-names-head {
  display: grid;
  gap: 6px;
}

.selected-names-card span {
  color: #1f3d34;
  font-size: 0.95rem;
  font-weight: 900;
}

.selected-names-card p {
  margin: 0;
  color: #4a3b2a;
  font: 1.22rem/2 "Amiri", "Noto Naskh Arabic", serif;
}

.selected-names-card button {
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: #c49a16;
  font-weight: 900;
}

.selected-name-details {
  margin-top: 0;
}

.selected-name-details .name-detail-card {
  background: #fffdf8;
}

.name-card-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 36px;
  gap: 8px;
  align-items: start;
}

.name-card {
  width: 100%;
  display: grid;
  gap: 7px;
  padding: 14px;
  text-align: right;
  color: #4a3b2a;
  min-height: 0;
  border-color: #ead58c;
  background: #fffdf8;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.name-share-button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #ead58c;
  border-radius: 10px;
  color: #a4770a;
  background: #fff7d7;
  font-size: 1rem;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.name-card-row:hover .name-card,
.name-card:focus-visible,
.name-card:active {
  border-color: #c49a16;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(139, 101, 20, 0.1);
}

.name-card-row:hover .name-card,
.name-card:focus-visible {
  transform: translateY(-1px);
}

.name-card:active {
  transform: scale(0.992);
  box-shadow: 0 4px 12px rgba(139, 101, 20, 0.18);
}

.name-share-button:hover,
.name-share-button:focus-visible,
.name-share-button:active {
  border-color: #c49a16;
  background: #fff1bd;
  box-shadow: 0 8px 18px rgba(139, 101, 20, 0.14);
  transform: scale(1.06);
}

.name-card strong {
  color: #1f3d34;
  text-align: center;
  font: 700 1.75rem "Amiri", serif;
}

.name-card span {
  color: #4a3b2a;
  line-height: 1.75;
  font-size: 0.9rem;
}

.name-card small {
  color: #a9842a;
  line-height: 1.75;
  font-size: 0.82rem;
}

.name-card em {
  margin-top: 0;
  padding-top: 8px;
  border-top: 1px solid #f1dfaa;
  color: #4a3b2a;
  font: normal 1.08rem/1.9 "Amiri", serif;
}

.modal-brand {
  width: 150px;
  display: block;
  margin: 0 auto 8px;
}

.name-detail-modal .name-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 0;
  background: transparent;
}

.name-actions button {
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: #c49a16;
  font-weight: 700;
}

.settings-list {
  display: grid;
  gap: 12px;
}

.setting-row {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: #fffdf8;
}

.setting-row span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #1f3d34;
  font-weight: 800;
}

.setting-row span b {
  min-width: 34px;
  padding: 2px 9px;
  border: 1px solid #ead58c;
  border-radius: 999px;
  color: #9a7414;
  background: #fffaf1;
  text-align: center;
  font-size: 0.8rem;
}

.setting-toggle-row {
  grid-template-columns: 1fr auto;
}

.setting-toggle-row span {
  display: grid;
  gap: 2px;
}

.setting-toggle-row span small {
  color: #9a7b39;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.5;
}

.setting-row input[type="range"] {
  --range-fill: 50%;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  appearance: none;
  -webkit-appearance: none;
  direction: ltr;
  background:
    linear-gradient(90deg, #1f5a46 0 var(--range-fill), #efe4cc var(--range-fill) 100%);
  outline: none;
}

.setting-row input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: transparent;
}

.setting-row input[type="range"]::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  margin-top: -5px;
  border: 2px solid #fff8df;
  border-radius: 50%;
  background: #c49a16;
  box-shadow: 0 2px 8px rgba(121, 84, 24, 0.18);
  -webkit-appearance: none;
}

.setting-row input[type="range"]::-moz-range-track {
  height: 8px;
  border-radius: 999px;
  background: #efe4cc;
}

.setting-row input[type="range"]::-moz-range-progress {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #1f5a46, #2f7a5b);
}

.setting-row input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 2px solid #fff8df;
  border-radius: 50%;
  background: #c49a16;
  box-shadow: 0 2px 8px rgba(121, 84, 24, 0.18);
}

.reminders-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #ead58c;
  border-radius: 16px;
  background: #fffdf8;
}

.reminders-card-compact {
  padding: 10px 12px;
}

.reminders-title {
  display: grid;
  gap: 2px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0dfaa;
}

.reminders-title strong {
  color: #173d32;
  font-size: 1rem;
  font-weight: 900;
}

.reminders-title small,
.reminders-note {
  color: #9a7b39;
  font-size: 0.76rem;
  line-height: 1.7;
}

.reminders-note {
  margin: 0;
  padding: 9px 10px;
  border-radius: 10px;
  background: #fffaf1;
}

.compact-reminder-note {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  background: transparent;
  font-size: 0.78rem;
}

.compact-reminder-note .line-icon {
  width: 18px;
  height: 18px;
  color: #173d32;
}

.settings-links-list {
  display: grid;
  gap: 0;
  border: 1px solid #ead58c;
  border-radius: 14px;
  overflow: hidden;
  background: #fffdf8;
}

.settings-links-list button {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  border: 0;
  border-bottom: 1px solid #f0dfad;
  color: #173d32;
  background: #fffdf8;
  text-align: right;
  font-family: inherit;
}

.settings-links-list button:last-child {
  border-bottom: 0;
}

.settings-links-list button:active {
  background: #fff7df;
}

.settings-links-list span {
  font-size: 0.9rem;
  font-weight: 700;
}

.settings-links-list i {
  color: #b38a21;
  font-size: 1.1rem;
  font-style: normal;
  line-height: 1;
}

.app-version,
.app-copyright {
  margin: 0;
  text-align: center;
}

.app-version {
  color: #6f7568;
  font-size: 0.76rem;
  line-height: 1.5;
}

.app-copyright {
  color: #6d7b70;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.5;
}

.app-intention {
  margin: 4px 0 0;
  color: #7d857b;
  font-size: 0.66rem;
  line-height: 1.6;
  text-align: center;
}

.settings-info-modal .app-copyright {
  margin-top: 4px;
}

.settings-info-modal {
  display: grid;
  gap: 12px;
}

.settings-info-backdrop {
  z-index: 180;
}

.settings-info-text {
  color: #4a3b2a;
  line-height: 2;
  text-align: right;
  white-space: normal;
}

.feedback-form {
  display: grid;
  gap: 10px;
}

.settings-feedback-form {
  padding-top: 4px;
}

.feedback-form input,
.feedback-form select,
.feedback-form textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #ead58c;
  border-radius: 11px;
  color: #173d32;
  background: #fffdf8;
  font-family: inherit;
}

.feedback-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  min-width: 0;
}

.feedback-admin-card {
  width: 100%;
  max-width: 980px;
  margin-inline: auto;
  overflow: hidden;
}

.feedback-toolbar {
  display: grid;
  justify-items: start;
}

.feedback-toolbar .secondary-button {
  width: auto;
  min-width: 140px;
  padding-inline: 18px;
}

.feedback-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.feedback-stat {
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  border: 1px solid #ead58c;
  border-radius: 12px;
  color: #9a7b39;
  background: #fffdf8;
  font-family: inherit;
  text-align: center;
  cursor: pointer;
}

.feedback-stat.active {
  color: #173d32;
  border-color: #c49a16;
  background: #fff7df;
}

.feedback-stat span {
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.5;
}

.feedback-stat strong {
  color: inherit;
  font-size: 1rem;
  line-height: 1.3;
}

.feedback-ticket {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid #ead58c;
  border-radius: 14px;
  background: #fffdf8;
  direction: rtl;
  text-align: right;
  overflow: hidden;
}

.feedback-ticket-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  min-width: 0;
}

.feedback-ticket-header div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.feedback-ticket-kicker,
.feedback-message-block > span,
.feedback-field span {
  color: #9a7b39;
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.6;
}

.feedback-ticket-header strong {
  color: #173d32;
  font-size: 1rem;
  line-height: 1.6;
  direction: ltr;
  text-align: right;
  unicode-bidi: plaintext;
  overflow-wrap: break-word;
}

.feedback-status-pill {
  min-width: 88px;
  padding: 7px 10px;
  border-radius: 999px;
  color: #173d32;
  background: #f5ecd6;
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
}

.feedback-status-pill.status-in_progress {
  color: #835f10;
  background: #fff2c4;
}

.feedback-status-pill.status-resolved {
  color: #1e6245;
  background: #e7f3eb;
}

.feedback-status-pill.status-rejected {
  color: #9b3a2f;
  background: #fff0ea;
}

.feedback-ticket-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
}

.feedback-field {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid #f2e2af;
  border-radius: 11px;
  background: #fffaf0;
}

.feedback-field strong {
  min-width: 0;
  color: #4a3b2a;
  font-size: 0.9rem;
  line-height: 1.7;
  font-weight: 700;
  word-break: normal;
  overflow-wrap: break-word;
}

.feedback-message-block {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.feedback-message,
.feedback-details {
  min-width: 0;
}

.feedback-message {
  max-height: 240px;
  overflow: auto;
  padding: 12px 13px;
  border: 1px solid #f0dfad;
  border-radius: 12px;
  color: #4a3b2a;
  background: #fffdf8;
  line-height: 1.9;
  white-space: pre-wrap;
  word-break: normal;
  overflow-wrap: break-word;
}

.feedback-details summary {
  width: max-content;
  max-width: 100%;
  padding: 7px 12px;
  border: 1px solid #ead58c;
  border-radius: 999px;
  color: #9a7415;
  background: #fffaf0;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.feedback-details summary::-webkit-details-marker {
  display: none;
}

.feedback-details[open] summary {
  margin-bottom: 8px;
}

.feedback-message::-webkit-scrollbar {
  width: 4px;
}

.feedback-message::-webkit-scrollbar-thumb {
  background: rgba(196, 154, 22, 0.45);
  border-radius: 999px;
}

.feedback-admin-controls {
  display: grid;
  gap: 11px;
  padding-top: 2px;
  min-width: 0;
}

.feedback-admin-controls label {
  display: grid;
  gap: 6px;
  color: #9a7b39;
  font-size: 0.76rem;
  font-weight: 700;
}

.feedback-admin-controls select,
.feedback-admin-controls textarea {
  width: 100%;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid #ead58c;
  border-radius: 11px;
  color: #173d32;
  background: #fffdf8;
  font-family: inherit;
  font-size: 0.84rem;
  line-height: 1.7;
}

.feedback-admin-controls textarea {
  min-height: 96px;
  max-height: 180px;
  overflow: auto;
  resize: vertical;
  line-height: 1.8;
}

.feedback-ticket-footer {
  display: grid;
  gap: 11px;
  align-items: stretch;
  min-width: 0;
  padding-top: 2px;
}

.feedback-ticket-footer small {
  display: block;
  color: #9a7b39;
  font-size: 0.76rem;
  line-height: 1.6;
  text-align: right;
}

.feedback-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
}

.feedback-actions .secondary-button,
.feedback-actions .danger-button {
  width: 100%;
  min-height: 44px;
  margin: 0;
}

.danger-button {
  border: 1px solid rgba(163, 69, 54, 0.45);
  border-radius: 8px;
  color: #9b3a2f;
  background: #fff7f2;
  font-family: inherit;
  font-weight: 900;
  cursor: pointer;
}

@media (min-width: 620px) {
  .feedback-stats {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .feedback-ticket-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feedback-ticket-footer {
    grid-template-columns: minmax(0, 1fr);
  }

  .feedback-actions {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
    justify-content: start;
    max-width: 380px;
  }
}

@media (min-width: 1180px) {
  .feedback-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}

.reminder-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid #f2e6bf;
}

.reminder-row:last-of-type {
  border-bottom: 0;
}

.reminder-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.reminder-copy strong {
  color: #173d32;
  font-size: 0.94rem;
  font-weight: 900;
}

.reminder-copy small {
  color: #9a7b39;
  font-size: 0.76rem;
  line-height: 1.5;
}

.reminder-copy em {
  color: #4a3b2a;
  font-size: 0.72rem;
  font-style: normal;
  line-height: 1.5;
}

.reminder-controls {
  display: grid;
  justify-items: end;
  gap: 7px;
}

.toggle {
  width: 48px;
  height: 27px;
  padding: 3px;
  border: 1px solid #e0bc43;
  border-radius: 999px;
  background: #fffaf1;
}

.toggle i {
  width: 19px;
  height: 19px;
  display: block;
  border-radius: 50%;
  background: #cbbd99;
  transition: transform 0.2s ease, background 0.2s ease;
}

.toggle.active {
  background: #fff1c5;
}

.toggle.active i {
  background: #173d32;
  transform: translateX(-20px);
}

.reminder-controls input[type="time"] {
  width: 96px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid #ead58c;
  border-radius: 9px;
  color: #173d32;
  background: #ffffff;
  font-weight: 800;
}

.reminder-test {
  width: 96px;
  min-height: 32px;
  border: 1px solid #ead58c;
  border-radius: 9px;
  color: #173d32;
  background: #fffaf1;
  font-size: 0.78rem;
  font-weight: 800;
}

.reminder-controls input[type="time"]:disabled {
  opacity: 0.55;
  background: #f7f0df;
}

.app-version {
  margin: 2px 0 0;
  color: #7f8f86;
  text-align: center;
  font-size: 0.76rem;
  line-height: 1.7;
}

.reader-screen {
  position: fixed;
  inset: 0;
  z-index: 40;
  width: min(100%, var(--app-max));
  max-width: var(--app-max);
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: #ffffff;
  overflow: hidden;
  overflow-x: hidden;
}

.reader-screen.reader-header-hidden {
  grid-template-rows: 0 1fr auto;
}

.reader-focus {
  grid-template-rows: 1fr;
}

.reader-screen.reader-focus.reader-header-hidden {
  grid-template-rows: 1fr;
}

.reader-focus .reader-header,
.reader-focus .reader-nav {
  display: none;
}

.reader-focus .reader-window {
  grid-row: 1;
  height: 100%;
  max-height: 100dvh;
  padding: 62px 30px calc(88px + var(--bottom-safe));
  overflow-y: auto;
  overflow-x: hidden;
}

.reader-focus .reader-content {
  min-height: 0;
}

.reader-focus .stacked-dua,
.reader-focus .single-dua {
  padding-bottom: 18px;
}

.reader-focus .inline-share,
.reader-focus .reader-source,
.reader-focus .stacked-dua h2,
.reader-focus .single-reader-title {
  display: none !important;
}

.reader-focus .ward-count {
  margin-bottom: 16px;
  background: transparent;
  border-color: #ead58c;
  color: #b1840e;
}

.reader-focus .stacked-dua p,
.reader-focus .single-dua p {
  margin-top: 0;
}

.reader-focus .dua-separator {
  margin: 24px auto 18px;
}

.reader-focus .reader-focus-controls {
  position: fixed;
  right: max(12px, calc((100vw - var(--app-max)) / 2 + 12px));
  left: max(12px, calc((100vw - var(--app-max)) / 2 + 12px));
  bottom: 0;
  z-index: 45;
  width: auto;
  max-width: calc(var(--app-max) - 24px);
  margin-inline: auto;
  grid-template-columns: minmax(96px, 138px) minmax(74px, 96px);
  justify-content: center;
  align-items: center;
  align-content: center;
  justify-items: stretch;
  gap: 10px;
  padding: 8px 12px calc(10px + var(--bottom-safe));
}

.reader-focus .reader-focus-controls > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 0;
  height: 36px;
  min-height: 36px;
  max-height: 36px;
  padding-block: 0;
  align-self: center;
  justify-self: stretch;
  flex: 0 0 auto;
  white-space: nowrap;
  line-height: 1.2;
}

.reader-focus .reader-focus-controls > button:first-child {
  grid-column: 1;
  grid-row: 1;
  color: #17643e;
  border-color: #dbeee2;
  background: #eef8f1;
  font-weight: 700;
}

.reader-focus .reader-focus-controls > button:nth-child(2) {
  grid-column: 2;
  grid-row: 1;
  padding-inline: 8px;
}

.reader-header {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  gap: 8px;
  align-items: center;
  max-height: 96px;
  padding: calc(12px + var(--top-safe)) 14px 12px;
  color: var(--ink);
  background: #efe5d4;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 22px rgba(49, 37, 18, 0.18);
  overflow: hidden;
  transition: transform 0.22s ease, opacity 0.18s ease, max-height 0.22s ease, padding 0.22s ease, border 0.22s ease, box-shadow 0.22s ease;
}

.reader-header-hidden .reader-header {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-bottom: 0;
  box-shadow: none;
  opacity: 0;
  transform: translateY(-100%);
  pointer-events: none;
}

.reader-header button {
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  background: var(--surface-soft);
  color: #a4770a;
  font-size: 1.25rem;
}

.reader-header h1 {
  margin: 0;
  color: #9b7415;
  font-size: 1.02rem;
  text-align: center;
}

.reader-header span,
.reader-header small {
  display: block;
  color: var(--muted);
  text-align: center;
  font-size: 0.72rem;
}

.reader-window {
  overflow: auto;
  padding: 38px 28px;
  background: #ffffff;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  will-change: scroll-position;
}

.reader-content {
  will-change: transform;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
}

.ward-window {
  padding: 22px 26px 16px;
}

.reader-window p {
  margin: 0;
  text-align: center;
  white-space: pre-wrap;
  color: var(--ink);
  font-family: "Amiri", "Noto Naskh Arabic", serif;
  line-height: 2.75;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.stacked-dua {
  position: relative;
  padding: 0 0 34px;
  text-align: center;
}

.single-dua {
  position: relative;
}

.inline-share {
  position: absolute;
  top: 0;
  left: 0;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #ead58c;
  border-radius: 10px;
  color: #a4770a;
  background: #fff7d7;
  padding: 0;
  font-size: 1rem;
  z-index: 2;
}

.inline-share .line-icon {
  width: 20px;
  height: 20px;
}

.ward-count {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  height: 28px;
  margin: 0 auto 10px;
  padding: 0 10px;
  border: 1px solid #ead58c;
  border-radius: 999px;
  color: #b1840e;
  background: #fff7d7;
  font-size: 0.78rem;
}

.stacked-dua h2,
.single-reader-title {
  margin: 0;
  color: #c49a16;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
}

.stacked-dua h2::after,
.single-reader-title::after {
  content: "";
  display: block;
  width: min(148px, 45%);
  height: 1px;
  margin: 16px auto 24px;
  background: linear-gradient(90deg, transparent, #d9b543 18%, #ead58c 50%, #d9b543 82%, transparent);
}

.stacked-dua h2 + p,
.single-reader-title + p {
  margin-top: 0;
}

.reader-source {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  max-width: 92%;
  margin: 18px auto 0;
  padding: 5px 12px;
  border: 1px solid #ead58c;
  border-radius: 999px;
  color: #9a7b39;
  background: #fffaf1;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.8;
}

.inline-source-icon {
  width: 15px;
  height: 15px;
  color: #173d32;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.stacked-dua p {
  color: #14110b;
  font-family: "Amiri", "Noto Naskh Arabic", serif;
  line-height: 2.55;
}

.single-dua .inline-share + .single-reader-title {
  padding-top: 4px;
}

.single-dua .reader-source {
  display: flex;
  width: fit-content;
}

.dua-separator {
  display: grid;
  grid-template-columns: 1fr 28px 1fr;
  align-items: center;
  gap: 10px;
  margin: 42px auto 8px;
  color: #c49a16;
}

.dua-separator::before,
.dua-separator::after {
  content: "";
  height: 1px;
  background: #eee0b6;
}

.dua-separator svg {
  width: 20px;
  height: 20px;
}

.hidden {
  display: none !important;
}

.reader-tail {
  height: 72vh;
}

.ward-reader-tail {
  height: calc(100dvh - 84px);
  min-height: 520px;
  max-height: 780px;
}

.reader-focus .ward-reader-tail {
  height: calc(100dvh - 118px);
  min-height: 500px;
  max-height: 760px;
}

.reader-controls {
  display: grid;
  grid-template-columns: 44px 44px minmax(120px, 160px) 48px;
  justify-content: center;
  gap: 7px;
  padding: 7px 12px calc(9px + var(--bottom-safe));
  border-top: 1px solid var(--line);
  background: #fffdf8;
}

.reader-controls > button,
.speed-slider input {
  min-height: 36px;
}

.reader-controls > button {
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #a4770a;
  background: var(--surface);
  font-size: 0.86rem;
}

.reader-controls > button:first-child {
  grid-column: 3;
  grid-row: 1;
  color: #17643e;
  border-color: #dbeee2;
  background: #eef8f1;
  font-weight: 700;
}

.reader-controls > button:nth-child(2) {
  grid-column: 1;
  grid-row: 1;
}

.reader-controls > button:nth-child(3) {
  grid-column: 2;
  grid-row: 1;
}

.reader-controls > button:nth-child(4) {
  grid-column: 4;
  grid-row: 1;
  padding-inline: 6px;
}

.speed-slider {
  grid-column: 1 / -1;
  grid-row: 2;
  display: grid;
  grid-template-columns: auto 1fr 26px;
  align-items: center;
  gap: 9px;
  padding: 4px 8px 3px;
  color: #9a7b39;
  font-size: 0.76rem;
}

.speed-slider input {
  --range-fill: 35%;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  appearance: none;
  -webkit-appearance: none;
  direction: ltr;
  background: linear-gradient(90deg, #1f5a46 0 var(--range-fill), #efe4cc var(--range-fill) 100%);
  outline: none;
}

.speed-slider input::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: transparent;
}

.speed-slider input::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  margin-top: -5px;
  border: 2px solid #fff8df;
  border-radius: 50%;
  background: #c49a16;
  box-shadow: 0 2px 8px rgba(121, 84, 24, 0.18);
  -webkit-appearance: none;
}

.speed-slider input::-moz-range-track {
  height: 8px;
  border-radius: 999px;
  background: #efe4cc;
}

.speed-slider input::-moz-range-progress {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #1f5a46, #2f7a5b);
}

.speed-slider input::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 2px solid #fff8df;
  border-radius: 50%;
  background: #c49a16;
  box-shadow: 0 2px 8px rgba(121, 84, 24, 0.18);
}

.speed-slider b {
  color: #b1840e;
  font-weight: 700;
  text-align: center;
}

.completion-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(24, 19, 10, 0.42);
}

.completion-card {
  width: min(100%, 340px);
  display: grid;
  gap: 12px;
  padding: 22px 18px;
  border: 1px solid #e0bc43;
  border-radius: 18px;
  text-align: center;
  background: #fffdf8;
  box-shadow: 0 18px 50px rgba(24, 19, 10, 0.18);
}

.completion-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin: 0 auto 2px;
  border-radius: 50%;
  color: #c49a16;
  background: #fff5cf;
}

.completion-mark .line-icon {
  width: 28px;
  height: 28px;
}

.completion-card strong {
  color: #c49a16;
  font-size: 1.3rem;
}

.completion-card p {
  margin: 0;
  color: #5b4a27;
  line-height: 1.8;
}

.completion-card button {
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: #c49a16;
  font-weight: 700;
}

.completion-card .secondary-completion {
  color: #a4770a;
  border: 1px solid #ead58c;
  background: #fffaf1;
}

.share-backdrop {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  padding: 12px;
  background: rgba(24, 19, 10, 0.52);
}

.share-modal {
  width: min(100%, 390px);
  max-height: 94vh;
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #e0bc43;
  border-radius: 18px;
  background: #fffdf8;
  box-shadow: 0 18px 50px rgba(24, 19, 10, 0.2);
  overflow: auto;
}

.share-modal h2 {
  margin: 0;
  color: #9b7415;
  text-align: center;
  font-size: 1rem;
}

.share-canvas {
  width: min(100%, 330px);
  justify-self: center;
  max-height: calc(94vh - 150px);
  height: auto;
  border: 1px solid #ead58c;
  border-radius: 14px;
  background: #fffdf8;
  object-fit: contain;
}

.share-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.share-actions button {
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: #c49a16;
  font-weight: 700;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.55);
}

.modal-backdrop.settings-info-backdrop {
  z-index: 220;
  background: rgba(23, 35, 29, 0.42);
  backdrop-filter: blur(5px);
}

.modal {
  width: min(100%, var(--app-max));
  margin: 0 auto;
  max-height: calc(100dvh - 36px);
  overflow: auto;
  padding: 22px 18px;
  border-radius: 22px;
  background: var(--surface);
}

.modal-close {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  float: left;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: #173d32;
  background: #fffaf1;
  line-height: 0;
}

.modal-close .close-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.modal h2 {
  clear: both;
  margin: 0 0 16px;
  color: var(--primary);
  text-align: center;
  font: 700 2rem "Amiri", serif;
}

.modal div {
  margin-bottom: 12px;
  padding: 14px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.modal span {
  color: var(--accent);
  font-size: 0.78rem;
}

.modal p {
  margin: 4px 0 0;
  color: var(--ink);
  line-height: 1.8;
}

.soft-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  background: rgba(23, 35, 29, 0.28);
  backdrop-filter: blur(7px);
}

.search-overlay {
  align-items: flex-start;
  justify-content: center;
  padding: calc(8px + var(--top-safe)) 0 18px;
}

.settings-overlay {
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
}

.overlay-panel {
  width: min(100%, var(--app-max));
  border: 1px solid var(--line);
  background: #fffdf8;
  box-shadow: 0 16px 38px rgba(23, 35, 29, 0.16);
}

.search-panel {
  width: min(100%, var(--app-max));
  max-height: calc(100dvh - 28px - var(--top-safe));
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 0 0 18px 18px;
  overflow: hidden;
  animation: searchDrop 0.22s ease both;
}

.settings-panel {
  width: min(85vw, 390px);
  height: 100dvh;
  max-height: none;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: calc(16px + var(--top-safe)) 14px calc(16px + var(--bottom-safe));
  border-radius: 24px 0 0 24px;
  overflow: auto;
  animation: settingsSlideIn 0.24s ease both;
}

.overlay-close {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  justify-self: start;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fffaf1;
  color: var(--primary);
}

.overlay-close .close-icon {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.overlay-title {
  display: grid;
  gap: 2px;
  text-align: center;
}

.overlay-title span {
  color: #b38a21;
  font-size: 0.78rem;
}

.overlay-title h2 {
  margin: 0;
  color: #173d32;
  font-size: 1.28rem;
}

.overlay-search-input {
  margin: 0;
}

.search-bar-row {
  min-height: 52px;
  display: grid;
  grid-template-columns: 1fr 34px;
  gap: 8px;
  align-items: center;
}

.search-bar-row .overlay-close {
  justify-self: end;
}

.overlay-search-results {
  max-height: min(58dvh, 500px);
  overflow: auto;
  padding: 2px 0 4px;
}

.overlay-search-results .empty {
  margin: 2px 0 0;
  padding: 4px 2px;
  font-size: 0.82rem;
}

@keyframes searchDrop {
  from {
    opacity: 0;
    transform: translateY(-18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes settingsSlideIn {
  from {
    opacity: 0;
    transform: translateX(24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (min-width: 720px) {
  .search-overlay {
    align-items: flex-start;
    padding: calc(8px + var(--top-safe)) 0 18px;
  }

  .search-panel {
    width: min(100%, var(--tablet-max));
    border-radius: 0 0 22px 22px;
  }

  .settings-panel {
    width: 420px;
    border-radius: 24px 0 0 24px;
  }
}

.install-help-backdrop {
  align-items: end;
  padding: 14px;
}

.install-help-modal {
  width: min(100%, 430px);
  padding: 18px 16px calc(18px + var(--bottom-safe));
  border: 1px solid #ead58c;
  border-radius: 22px 22px 0 0;
  background: #fffdf8;
  box-shadow: 0 -10px 28px rgba(20, 30, 25, 0.14);
}

.install-help-heading {
  clear: both;
  display: grid;
  justify-items: center;
  margin: 0 0 14px;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.install-help-heading h2 {
  margin: 0;
  color: #173d32;
  text-align: center;
  font: 900 1.15rem "Cairo", "Tajawal", sans-serif;
}

.install-help-steps {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: install-step;
}

.install-help-steps li {
  counter-increment: install-step;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 11px;
  border: 1px solid rgba(196, 154, 22, 0.38);
  border-radius: 12px;
  color: #4a3b2a;
  background: #fffaf1;
  font-size: 0.9rem;
  line-height: 1.7;
}

.install-help-steps li::before {
  content: counter(install-step);
  width: 24px;
  min-width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #173d32;
  background: #fff8e7;
  font-size: 0.75rem;
  font-weight: 900;
}

.install-help-steps li > span:not(.install-step-icon) {
  flex: 1;
  min-width: 0;
  color: #4a3b2a;
  font-size: 0.9rem;
}

.install-step-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: #173d32;
}

.install-step-icon .line-icon {
  width: 20px;
  height: 20px;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(10px + var(--bottom-safe));
  z-index: 20;
  width: min(calc(100% - 24px), calc(var(--app-max) - 24px));
  max-width: calc(var(--app-max) - 24px);
  margin: 0 auto;
  transform: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 28px rgba(20, 30, 25, 0.12);
  overflow: hidden;
  contain: layout paint;
}

.bottom-nav button {
  display: grid;
  gap: 1px;
  place-items: center;
  min-height: 58px;
  border: 0;
  color: #9a7b39;
  background: transparent;
  font-size: 0.84rem;
  font-weight: 600;
}

.bottom-nav span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: #173d32;
  line-height: 1;
}

.bottom-nav .line-icon {
  width: 29px;
  height: 29px;
  stroke-width: 1.9;
}

.bottom-nav .nav-sunnah-icon .line-icon {
  width: 29px;
  height: 29px;
}

.bottom-nav button:first-child .line-icon {
  width: 29px;
  height: 29px;
}

.bottom-nav .active {
  color: #173d32;
  background: #fff5cf;
  font-weight: 700;
}

.bottom-nav .active span {
  color: #173d32;
}

.bottom-nav .active .line-icon {
  width: 29px;
  height: 29px;
}

.bottom-nav button:first-child.active .line-icon {
  width: 29px;
  height: 29px;
}

.bottom-nav .active .nav-sunnah-icon .line-icon {
  width: 29px;
  height: 29px;
}

.toast {
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  z-index: 120;
  width: max-content;
  max-width: calc(100% - 32px);
  margin: 0 auto;
  transform: none;
  padding: 10px 18px;
  border-radius: 999px;
  color: #fff;
  background: #c49a16;
  box-shadow: var(--shadow);
}

.empty {
  padding: 34px 8px;
  text-align: center;
  line-height: 1.8;
}

.empty small {
  display: block;
  margin-top: 4px;
  color: #6c5b40;
  font-size: 0.82rem;
}

@media (max-width: 360px) {
  :root {
    --page-pad: 16px;
  }

  .compact-hero {
    min-height: 138px;
    padding-inline: 56px;
  }

  .brand-stack {
    width: 200px;
  }

  .brand-logo {
    width: 190px;
    height: 82px;
  }

  .search-entry,
  .settings-entry {
    width: 42px;
    height: 42px;
    top: calc(45px + var(--top-safe));
  }

  .search-entry {
    left: 12px;
  }

  .settings-entry {
    right: 12px;
  }

  .today-dua-card,
  .sections-entry-card,
  .daily-ward-panel,
  .morning-zad-card,
  .tracker-card.compact-tracker-card {
    border-radius: 14px;
  }

  .reader-window {
    padding-inline: 20px;
  }

  .reader-controls {
    grid-template-columns: 40px 40px minmax(106px, 1fr) 46px;
    gap: 6px;
  }
}

@media (min-width: 431px) {
  .app {
    border-inline: 1px solid rgba(217, 181, 67, 0.18);
  }
}

.admin-logout-button {
  margin-inline-start: auto;
  min-width: 118px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(162, 75, 67, 0.35);
  border-radius: 10px;
  color: #8f3c34;
  background: #fff8f3;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

@media (max-width: 390px) {
  .tracker-card.compact-tracker-card {
    padding-inline: 11px;
  }

  .week-strip {
    gap: 4px;
  }

  .day-dot span {
    font-size: 0.72rem;
  }

  .day-dot i {
    width: 26px;
    height: 26px;
  }

  .admin-heading {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .admin-logout-button {
    grid-column: 1 / -1;
    width: 100%;
    margin-inline-start: 0;
  }

  .admin-item {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .admin-item-actions {
    grid-column: 2;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-category-card {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .admin-category-card .admin-check-line,
  .admin-category-card .admin-order-buttons {
    grid-column: 2;
  }
}

.analytics-help-card code {
  direction: ltr;
  display: inline-block;
  padding: 2px 6px;
  border-radius: 6px;
  color: #173d32;
  background: #fffdf8;
}

.analytics-status-grid {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.analytics-status-grid span,
.analytics-links a {
  display: block;
  padding: 10px 12px;
  border: 1px solid rgba(217, 181, 67, 0.45);
  border-radius: 10px;
  color: #173d32;
  background: #fffdf8;
  text-decoration: none;
}

.analytics-help-card ul {
  margin: 10px 20px;
  padding: 0;
  color: #6c5b40;
  line-height: 1.9;
}

.analytics-links {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

@media (min-width: 700px) and (max-width: 1180px) {
  :root {
    --app-max: min(92vw, 820px);
    --page-pad: clamp(24px, 5vw, 42px);
  }

  .app {
    box-shadow: 0 18px 42px rgba(70, 52, 18, 0.13);
  }

  .compact-hero {
    min-height: 190px;
    padding-inline: clamp(80px, 12vw, 128px);
  }

  .brand-logo {
    width: 280px;
    height: 118px;
  }

  .home-daily-content {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .home-daily-content > .install-prompt-card {
    width: min(100%, 420px);
    justify-self: center;
  }

  .home-daily-content > .today-dua-card,
  .home-daily-content > .daily-ward-card,
  .home-daily-content > .tracker-card,
  .home-daily-content > .sections-entry-card,
  .home-daily-content > .morning-zad-card {
    grid-column: 1 / -1;
  }

  .menu-grid,
  .sections-menu,
  .dua-list,
  .admin-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bottom-nav {
    max-width: min(92vw, 796px);
  }

  .reader-screen {
    width: min(100%, 820px);
    max-width: 820px;
  }

  .reader-controls {
    grid-template-columns: 56px 56px minmax(180px, 240px) 76px;
    justify-content: center;
    gap: 12px;
    padding: 10px 20px calc(12px + var(--bottom-safe));
  }

  .reader-controls > button,
  .speed-slider input {
    min-height: 40px;
  }

  .reader-controls > button {
    padding-inline: 14px;
    font-size: 0.9rem;
  }

  .speed-slider {
    grid-template-columns: auto minmax(320px, 1fr) 34px;
    max-width: 680px;
    width: 100%;
    justify-self: center;
    gap: 14px;
    padding: 7px 10px 5px;
  }

  .tracker-card.compact-tracker-card {
    padding: 15px 22px 16px;
  }

  .week-strip {
    gap: 12px;
    max-width: 620px;
    margin-inline: auto;
  }

  .day-dot span {
    font-size: 0.82rem;
  }

  .day-dot i {
    width: 31px;
    height: 31px;
  }
}

@media (min-width: 1181px) {
  :root {
    --app-max: 760px;
    --page-pad: 34px;
  }

  .menu-grid,
  .sections-menu,
  .dua-list,
  .admin-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bottom-nav {
    max-width: 736px;
  }

  .reader-screen {
    width: min(100%, 760px);
    max-width: 760px;
  }

  .reader-controls {
    grid-template-columns: 58px 58px minmax(190px, 250px) 82px;
    justify-content: center;
    gap: 12px;
    padding: 10px 22px calc(12px + var(--bottom-safe));
  }

  .reader-controls > button,
  .speed-slider input {
    min-height: 40px;
  }

  .reader-controls > button {
    padding-inline: 14px;
    font-size: 0.9rem;
  }

  .speed-slider {
    grid-template-columns: auto minmax(340px, 1fr) 34px;
    max-width: 690px;
    width: 100%;
    justify-self: center;
    gap: 14px;
    padding: 7px 10px 5px;
  }

  .home-daily-content > .install-prompt-card {
    width: min(100%, 420px);
    justify-self: center;
  }

  .week-strip {
    gap: 10px;
  }
}
/* Home cards repair */
.home-daily-content {
  display: grid;
  gap: 10px;
  padding-bottom: calc(100px + var(--bottom-safe));
}

.home-daily-content > .install-prompt-card,
.home-daily-content > .today-dua-card,
.home-daily-content > .daily-ward-card,
.home-daily-content > .morning-zad-card,
.home-daily-content > .sections-entry-card,
.home-daily-content > .tracker-card {
  width: 100%;
  margin: 0 0 10px;
}

.install-prompt-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 28px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #ead58c;
  border-radius: 14px;
  background: #fffdf8;
  direction: rtl;
}

.install-prompt-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.install-prompt-copy strong {
  color: #173d32;
  font-size: 0.92rem;
  font-weight: 900;
  line-height: 1.25;
}

.install-prompt-copy small {
  color: #9a7b39;
  font-size: 0.74rem;
  line-height: 1.35;
}

.install-prompt-action {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #c49a16;
  border-radius: 10px;
  color: #9b7415;
  background: #fffaf1;
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
}

.install-prompt-dismiss {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #ead58c;
  border-radius: 50%;
  color: #173d32;
  background: #fffdf8;
}

.install-prompt-dismiss .line-icon {
  width: 15px;
  height: 15px;
}

.today-dua-card,
.morning-zad-card,
.sections-entry-card,
.tracker-card.compact-tracker-card {
  border: 1px solid #ead58c;
  border-radius: 16px;
  background: linear-gradient(135deg, #fffdf8 0%, #fff9ed 100%);
  box-shadow: 0 8px 18px rgba(139, 101, 20, 0.07);
}

.today-dua-card {
  display: grid;
  gap: 4px;
  min-height: 72px;
  padding: 12px 14px;
  overflow: hidden;
  direction: rtl;
}

.today-dua-card strong {
  display: block;
  margin-bottom: 4px;
  color: #173d32;
  text-align: right;
  font-size: 0.94rem;
  font-weight: 900;
}

.today-dua-marquee {
  margin: 0;
  overflow: hidden;
  white-space: nowrap;
  color: #4a3b2a;
  font-size: 0.9rem;
  line-height: 1.7;
  direction: ltr;
}

.today-dua-marquee span {
  display: inline-block;
  min-width: 100%;
  direction: rtl;
}

.daily-ward-panel {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto auto auto;
  gap: 8px;
  padding: 12px 14px 11px;
  border: 1px solid #ead58c;
  border-radius: 16px;
  background: linear-gradient(135deg, #fffdf8 0%, #fff7e6 100%);
  box-shadow: 0 8px 18px rgba(139, 101, 20, 0.08);
  direction: rtl;
}

.daily-ward-panel .daily-ward-copy {
  display: grid;
  min-width: 0;
}

.daily-ward-panel h2 {
  margin: 0;
  text-align: right;
  color: var(--appearance-card-title-color, #173d32);
  font-size: var(--appearance-card-title-size, 1.18rem);
  font-weight: var(--appearance-title-weight, 900);
  line-height: 1.2;
}

.daily-ward-panel .daily-ward-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
  margin: 0;
  direction: rtl;
}

.daily-ward-panel .daily-ward-actions button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #c49a16;
  border-radius: 11px;
  color: #fff;
  background: #c49a16;
  font-size: 0.95rem;
  font-weight: 800;
}

.daily-ward-panel .daily-ward-actions button:last-child {
  color: #a4770a;
  border-color: #e0bc43;
  background: #fffdf8;
}

.daily-ward-panel .ward-progress-row {
  display: block;
  width: 100%;
  margin: 0;
}

.daily-ward-panel .ward-progress-row i {
  height: 8px;
  width: 100%;
  display: block;
  overflow: hidden;
  border-radius: 999px;
  background: #efe4cc;
}

.daily-ward-panel .ward-progress-row b {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, #1f5a46, #2f7a5b);
}

.daily-ward-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  direction: rtl;
}

.daily-ward-panel .daily-ward-hint {
  min-width: 0;
  margin: 0;
  color: var(--appearance-card-desc-color, #6c5b40);
  text-align: right;
  font-size: var(--appearance-card-desc-size, 0.8rem);
  line-height: 1.35;
}

.daily-ward-count {
  flex: 0 0 auto;
  color: #173d32;
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
}

.morning-zad-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 12px 14px;
  direction: rtl;
}

.morning-zad-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.morning-zad-icon,
.sections-entry-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: #173d32;
  flex: 0 0 30px;
}

.morning-zad-icon .line-icon,
.sections-entry-icon .line-icon {
  width: 25px;
  height: 25px;
}

.morning-zad-head h2,
.sections-entry-card strong {
  margin: 0;
  color: #173d32;
  font-size: 0.98rem;
  font-weight: 900;
  line-height: 1.25;
}

.morning-zad-head p,
.sections-entry-card small {
  margin: 2px 0 0;
  color: #9a7b39;
  font-size: 0.75rem;
  line-height: 1.45;
}

.morning-zad-text {
  display: none;
}

.morning-zad-button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #c49a16;
  border-radius: 10px;
  color: #9b7415;
  background: #fffdf8;
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.sections-entry-card {
  min-height: 72px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  color: inherit;
  text-align: right;
  direction: rtl;
}

.sections-entry-card i {
  color: #c49a16;
  font-style: normal;
  font-size: 1rem;
}

@media (max-width: 380px) {
  .daily-ward-meta-row {
    display: grid;
    gap: 2px;
  }

  .daily-ward-count {
    justify-self: end;
  }
}
/* End home cards repair */
/* Home modal and card correction */
.sections-entry-card > div,
.morning-zad-head > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.sections-entry-card strong,
.sections-entry-card small,
.morning-zad-head h2,
.morning-zad-head p {
  display: block;
}

.morning-zad-modal {
  width: min(100%, 430px);
  max-width: 430px;
  padding: 20px 16px 18px;
  border: 1px solid #ead58c;
  border-radius: 22px;
  background: #fffdf8;
}

.morning-zad-modal .modal-close {
  float: none;
  margin: 0;
  justify-self: start;
}

.morning-zad-modal h2 {
  clear: none;
  margin: 8px 0 6px;
  color: #c49a16;
  text-align: center;
  font: 700 1.7rem "Amiri", serif;
}

.morning-zad-modal-desc {
  margin: 0 0 12px !important;
  color: #4a3b2a !important;
  text-align: center;
  font-size: 0.88rem;
  line-height: 1.7 !important;
}

.morning-zad-list {
  display: grid;
  gap: 8px;
  margin: 0 0 12px !important;
  padding: 10px !important;
  border-radius: 10px !important;
  background: #f3ead9 !important;
}

.morning-zad-list article {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #ead58c;
  border-radius: 10px;
  background: #fffdf8;
}

.morning-zad-list article span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #c49a16;
  background: #fff8e6;
  font-size: 0.72rem;
  font-weight: 800;
}

.morning-zad-list article p {
  margin: 0 !important;
  color: #16130d;
  font-size: 0.9rem;
  line-height: 1.8;
}

.morning-zad-share {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: #c49a16;
  font-weight: 800;
}
/* End home modal and card correction */
/* Today dua ticker motion */
.today-dua-marquee span {
  display: inline-block;
  min-width: max-content;
  padding-inline: 0;
  direction: rtl;
  opacity: 0;
  transform: translateX(-100%);
  -webkit-transform: translateX(-100%);
  will-change: auto;
  contain: paint;
  font-kerning: normal;
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.today-dua-marquee span.ticker-moving {
  opacity: 1 !important;
  animation: duaTickerSlide var(--ticker-duration, 12000ms) linear forwards;
}

@keyframes duaTickerSlide {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(var(--ticker-end, 100%));
  }
}
/* End today dua ticker motion */
/* Final home visual consistency */
.today-dua-marquee,
.today-dua-marquee span {
  color: #a9842a !important;
}

.today-dua-marquee {
  line-height: 1.65 !important;
}

.today-dua-marquee span {
  transform: translateX(-100%);
  -webkit-transform: translateX(-100%);
  will-change: auto;
  contain: paint;
  font-kerning: normal;
}

.tracker-card.compact-tracker-card {
  min-height: 0 !important;
  height: auto !important;
  padding: 12px 14px 13px !important;
  gap: 9px !important;
  align-content: start !important;
}

.tracker-card.compact-tracker-card .tracker-title.centered {
  gap: 3px !important;
  margin: 0 !important;
}

.tracker-card.compact-tracker-card .tracker-title.centered span {
  font-size: 1.08rem !important;
  line-height: 1.12 !important;
}

.tracker-card.compact-tracker-card .tracker-title.centered small {
  font-size: 0.78rem !important;
  line-height: 1.15 !important;
  margin: 0 !important;
}

.tracker-card.compact-tracker-card .week-strip {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 3px 1px 0 !important;
  gap: 6px !important;
  align-items: start !important;
}

.tracker-card.compact-tracker-card .day-dot {
  gap: 6px !important;
}

.tracker-card.compact-tracker-card .day-dot span {
  font-size: 0.76rem !important;
  line-height: 1 !important;
}

.tracker-card.compact-tracker-card .day-dot i {
  width: 28px !important;
  height: 28px !important;
  font-size: 0.95rem !important;
  line-height: 1 !important;
}

@media (max-width: 390px) {
  .tracker-card.compact-tracker-card {
    padding: 11px 11px 12px !important;
  }

  .tracker-card.compact-tracker-card .week-strip {
    gap: 4px !important;
  }

  .tracker-card.compact-tracker-card .day-dot i {
    width: 26px !important;
    height: 26px !important;
  }
}
/* End final home visual consistency */
/* Weekly tracker final alignment */
.today-dua-card .today-dua-marquee,
.today-dua-card .today-dua-marquee span,
#duaTickerText {
  color: #a9842a !important;
  fill: #a9842a !important;
}

.tracker-card.compact-tracker-card {
  min-height: 0 !important;
  height: auto !important;
  overflow: visible !important;
  padding: 13px 14px 20px !important;
  gap: 10px !important;
  align-content: start !important;
}

.tracker-card.compact-tracker-card .tracker-title.centered {
  display: grid !important;
  justify-items: center !important;
  gap: 2px !important;
  margin: 0 !important;
  line-height: 1.1 !important;
}

.tracker-card.compact-tracker-card .tracker-title.centered span {
  font-size: 1.08rem !important;
  line-height: 1.12 !important;
  margin: 0 !important;
}

.tracker-card.compact-tracker-card .tracker-title.centered small {
  font-size: 0.78rem !important;
  line-height: 1.18 !important;
  margin: 0 !important;
}

.tracker-card.compact-tracker-card .week-strip {
  display: grid !important;
  grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 2px 0 0 !important;
  padding: 2px 1px 0 !important;
  gap: 6px !important;
  align-items: start !important;
  justify-items: stretch !important;
  min-height: 54px !important;
  box-sizing: border-box !important;
}

.tracker-card.compact-tracker-card .day-dot {
  display: grid !important;
  grid-template-rows: 16px 30px !important;
  align-content: start !important;
  justify-items: center !important;
  align-items: center !important;
  gap: 6px !important;
  min-height: 52px !important;
  height: 52px !important;
  margin: 0 !important;
  padding: 0 !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}

.tracker-card.compact-tracker-card .day-dot span {
  display: block !important;
  height: 16px !important;
  line-height: 16px !important;
  margin: 0 !important;
  color: #7f693c !important;
  font-size: 0.76rem !important;
  font-weight: 800 !important;
  text-align: center !important;
}

.tracker-card.compact-tracker-card .day-dot i {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  max-width: 28px !important;
  max-height: 28px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  margin: 0 !important;
  transform: none !important;
  font-size: 0.95rem !important;
  line-height: 1 !important;
  box-sizing: border-box !important;
}

.tracker-card.compact-tracker-card .day-dot.today i {
  outline-width: 2px !important;
  outline-offset: 2px !important;
}

.tracker-card.compact-tracker-card .day-dot.done i,
.tracker-card.compact-tracker-card .day-dot.missed i {
  font-size: 0.95rem !important;
  line-height: 1 !important;
}

@media (max-width: 390px) {
  .tracker-card.compact-tracker-card {
    padding: 12px 11px 18px !important;
  }

  .tracker-card.compact-tracker-card .week-strip {
    gap: 4px !important;
  }
}
/* End weekly tracker final alignment */
/* Final card controls cleanup */
.install-prompt-dismiss {
  font-size: 1.18rem !important;
  font-weight: 700 !important;
  line-height: 1 !important;
}

.install-prompt-dismiss span {
  display: block !important;
  width: 1em !important;
  height: 1em !important;
  color: #173d32 !important;
  line-height: 0.86 !important;
  text-align: center !important;
}

.today-dua-card.today-dua-card-titleless {
  min-height: 54px !important;
  padding: 10px 14px !important;
  align-items: center !important;
}

.today-dua-card.today-dua-card-titleless > div {
  min-width: 0 !important;
}

.today-dua-card.today-dua-card-titleless .today-dua-marquee {
  font-size: 0.95rem !important;
  line-height: 1.55 !important;
}

.morning-zad-entry-card {
  width: 100% !important;
  grid-template-columns: 32px minmax(0, 1fr) 18px !important;
  color: inherit !important;
  text-align: right !important;
  cursor: pointer !important;
}

.morning-zad-entry-card .morning-zad-head {
  display: contents !important;
}

.morning-zad-entry-card i {
  color: #c49a16 !important;
  font-style: normal !important;
  font-size: 1rem !important;
  line-height: 1 !important;
  justify-self: center !important;
}

.morning-zad-entry-card .morning-zad-button {
  display: none !important;
}
/* End final card controls cleanup */
/* Unified search buttons */
.search-button,
.round-button.search-button,
.search-entry.search-button {
  width: 46px !important;
  height: 46px !important;
  min-width: 46px !important;
  min-height: 46px !important;
  display: grid !important;
  place-items: center !important;
  padding: 0 !important;
  border: 1px solid #ead58c !important;
  border-radius: 50% !important;
  color: #173d32 !important;
  background: #fffdf8 !important;
  box-shadow: 0 8px 18px rgba(139, 101, 20, 0.12) !important;
  font-size: 0 !important;
  line-height: 1 !important;
  flex: 0 0 46px !important;
}

.search-button .line-icon,
.round-button.search-button .line-icon,
.search-entry.search-button .line-icon {
  width: 24px !important;
  height: 24px !important;
  stroke-width: 1.9 !important;
  color: #173d32 !important;
}

.header .search-button {
  justify-self: end !important;
}
/* End unified search buttons */

/* Safe area status bar background */
html {
  background: var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: max(var(--top-safe), 0px);
  background: var(--bg);
  pointer-events: none;
  z-index: 0;
}

#root,
.app {
  position: relative;
  z-index: 1;
}
/* End safe area status bar background */

/* Compact mobile top spacing */
@media (max-width: 699px) {
  .compact-hero {
    min-height: 120px !important;
    padding: calc(6px + var(--top-safe)) 62px 10px !important;
    align-items: start !important;
    place-items: start center !important;
  }

  .brand-stack {
    min-height: 0 !important;
    gap: 3px !important;
  }

  .brand-logo {
    width: 202px !important;
    height: 82px !important;
  }

  .brand-stack p {
    font-size: 0.78rem !important;
    line-height: 1.25 !important;
  }

  .search-entry,
  .settings-entry {
    top: calc(18px + var(--top-safe)) !important;
  }

  .compact-hero + .content {
    padding-top: 10px !important;
  }
}

@media (max-width: 360px) {
  .compact-hero {
    min-height: 112px !important;
    padding-inline: 56px !important;
  }

  .brand-logo {
    width: 184px !important;
    height: 76px !important;
  }

  .search-entry,
  .settings-entry {
    top: calc(16px + var(--top-safe)) !important;
  }
}
/* End compact mobile top spacing */

/* Global safe area page headers */
.header {
  padding-top: calc(8px + var(--top-safe)) !important;
  background: color-mix(in srgb, var(--bg) 94%, transparent) !important;
}

.header::before,
.reader-header::before,
.settings-panel::before,
.search-panel::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc(-1 * var(--top-safe));
  height: var(--top-safe);
  background: inherit;
  pointer-events: none;
}

.header,
.reader-header,
.settings-panel,
.search-panel {
  position: relative;
}

.reader-screen {
  background: var(--bg) !important;
}

.reader-header {
  padding-top: calc(8px + var(--top-safe)) !important;
  background: var(--bg) !important;
}

.search-overlay {
  padding-top: var(--top-safe) !important;
}

.search-panel {
  border-top: 0 !important;
}

.settings-panel {
  padding-top: calc(10px + var(--top-safe)) !important;
  background: var(--bg) !important;
}

.modal-backdrop,
.soft-overlay {
  background-color: rgba(23, 35, 29, 0.28);
}
/* End global safe area page headers */



/* Focus reader fullscreen controls */
.reader-screen.reader-focus {
  top: calc(-1 * var(--top-safe)) !important;
  bottom: 0 !important;
  height: calc(100dvh + var(--top-safe)) !important;
  min-height: calc(100dvh + var(--top-safe)) !important;
  max-height: none !important;
  overflow: visible !important;
  background: var(--bg) !important;
}

.reader-focus .reader-window {
  height: calc(100dvh + var(--top-safe)) !important;
  min-height: calc(100dvh + var(--top-safe)) !important;
  max-height: none !important;
  padding: 0 24px calc(76px + var(--bottom-safe)) !important;
  background: var(--bg) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

.reader-focus.reader-focus-controls-hidden .reader-window {
  padding-bottom: calc(12px + var(--bottom-safe)) !important;
}

.reader-focus .inline-share,
.reader-focus .reader-source,
.reader-focus .stacked-dua h2,
.reader-focus .single-reader-title,
.reader-focus .ward-count {
  display: none !important;
}

.reader-focus .stacked-dua,
.reader-focus .single-dua {
  padding-bottom: 4px !important;
}

.reader-focus .stacked-dua p,
.reader-focus .single-dua p {
  margin-top: 0 !important;
}

.reader-focus .dua-separator {
  margin: 6px auto 4px !important;
}

.reader-focus .reader-focus-controls {
  transition: none !important;
}

.reader-focus.reader-focus-controls-hidden .reader-focus-controls {
  opacity: 0;
  pointer-events: none;
  transform: translateY(calc(100% + var(--bottom-safe)));
}


/* Category top sheet */
.category-select-button {
  width: fit-content;
  max-width: 100%;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 0 10px auto;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: #173d32;
  font-weight: 700;
  font-size: 0.84rem;
}

.category-select-button b {
  color: #a9842a;
  font-size: 0.9rem;
  line-height: 1;
}

.category-sheet-backdrop {
  position: fixed;
  left: 0;
  right: 0;
  top: calc(60px + var(--top-safe));
  bottom: 0;
  z-index: 95;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 8px max(12px, calc((100vw - var(--app-max)) / 2 + 12px)) 0;
  background: rgba(23, 35, 29, 0.18);
  backdrop-filter: blur(4px);
}

.category-sheet {
  width: min(100%, var(--app-max));
  max-height: min(46dvh, 380px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 16px 34px rgba(49, 37, 18, 0.14);
  padding: 12px 14px 16px;
  animation: categoryTopSheetIn 180ms ease-out;
}

.category-sheet-handle {
  display: none;
}

.category-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.category-sheet-head h2 {
  margin: 0;
  color: #173d32;
  font-size: 0.92rem;
}

.category-sheet-head button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-soft);
  color: #173d32;
  font-size: 1.05rem;
  line-height: 1;
}

.category-sheet-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-sheet-option {
  min-height: 34px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffdf8;
  color: #4a3b2a;
  font-weight: 700;
  font-size: 0.82rem;
}

.category-sheet-option.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fffdf8;
}

@keyframes categoryTopSheetIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Compact section header tools */
.header.header-tools {
  grid-template-columns: 38px minmax(0, 1fr) auto !important;
  gap: 8px !important;
}

.header.header-tools .header-title {
  min-width: 0;
}

.section-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  min-width: 0;
}

.header .section-header-actions .search-button {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  flex-basis: 42px !important;
  box-shadow: none !important;
}

.header .section-header-actions .search-button .line-icon {
  width: 21px !important;
  height: 21px !important;
}

.header-category-select.category-select-button {
  width: auto;
  min-width: 0;
  max-width: 132px;
  min-height: 42px;
  height: 42px;
  margin: 0;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: none;
}

.header-category-select .category-select-icon {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  color: #173d32;
  flex: 0 0 18px;
}

.header-category-select .category-select-icon .line-icon {
  width: 18px;
  height: 18px;
  stroke-width: 1.9;
}

.header-category-select span:last-of-type {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.78rem;
  color: #173d32;
  font-weight: 800;
}

.section-info-button {
  width: 42px;
  height: 42px;
  min-width: 42px;
  display: grid;
  place-items: center;
  border: 1px solid #ead58c;
  border-radius: 50%;
  color: #173d32;
  background: #fffdf8;
  padding: 0;
}

.section-info-button .line-icon {
  width: 21px;
  height: 21px;
  stroke-width: 1.9;
}

.section-info-backdrop {
  z-index: 95;
}

.section-info-modal {
  max-width: min(360px, calc(100vw - 38px));
  padding: 28px 24px 22px;
  text-align: center;
}

.section-info-modal h2 {
  margin: 0 0 12px;
  color: #173d32;
  font-size: 1rem;
}

.section-info-modal p {
  margin: 0;
  color: #8b6c2e;
  line-height: 1.9;
  font-size: 0.9rem;
}

@media (max-width: 430px) {
  .header-category-select.category-select-button {
    max-width: 104px;
    padding-inline: 8px;
  }

  .section-info-button,
  .header .section-header-actions .search-button {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    flex-basis: 40px !important;
  }
}
/* End compact section header tools */
/* Section title info placement */
.header.header-tools .header-title h1 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  max-width: 100%;
}

.header-title-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.section-header-actions {
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

.section-header-actions > button {
  position: relative;
  z-index: 3;
  pointer-events: auto;
}

.section-title-info-button.section-info-button {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #9b7415;
  padding: 0;
  box-shadow: none;
  flex: 0 0 22px;
  vertical-align: middle;
}

.section-title-info-button.section-info-button .line-icon {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.section-title-info-button.section-info-button:focus-visible {
  outline: 2px solid rgba(196, 154, 22, 0.45);
  outline-offset: 2px;
}

@media (max-width: 430px) {
  .header.header-tools {
    grid-template-columns: 34px minmax(0, 1fr) auto !important;
    gap: 6px !important;
  }

  .section-header-actions {
    gap: 6px;
  }
}
/* End section title info placement */
/* Header tool click fixes */
.header.header-tools {
  isolation: isolate;
}

.header.header-tools .header-title,
.header.header-tools .header-title h1,
.section-title-info-button,
.section-header-actions,
.header-category-select,
.section-header-actions .search-button {
  pointer-events: auto !important;
}

.header.header-tools .header-title {
  position: relative;
  z-index: 2;
}

.section-title-info-button {
  position: relative;
  z-index: 4;
  cursor: pointer;
}

.header-category-select,
.section-header-actions .search-button {
  cursor: pointer;
}
/* End header tool click fixes */
/* Category option click target fix */
.category-sheet,
.category-sheet-options,
.category-sheet-option {
  pointer-events: auto !important;
}

.category-sheet-option {
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
}
/* End category option click target fix */
/* Start overview page */
.start-overview-content {
  display: grid;
  gap: 12px;
}

.start-overview-list {
  display: grid;
  gap: 10px;
}

.start-overview-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 8px 18px rgba(139, 101, 20, 0.06);
}

.start-overview-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(196, 154, 22, 0.45);
  border-radius: 50%;
  color: #173d32;
  background: #fffaf1;
}

.start-overview-icon .line-icon {
  width: 20px;
  height: 20px;
  stroke-width: 1.9;
}

.start-overview-card h2 {
  margin: 0 0 5px;
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.55;
}

.start-overview-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.8;
}

.start-overview-card blockquote {
  margin: 8px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--primary);
  background: var(--surface-soft);
  line-height: 1.8;
}

.start-overview-action {
  margin-top: 2px;
}
/* End start overview page */
/* My duas private card controls */
.my-card-actions {
  grid-template-columns: 34px;
  gap: 7px;
}

.my-card-actions button,
.my-card-actions .fav {
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  border-radius: 10px;
  padding: 0;
  font-size: 1rem;
  line-height: 1;
}

.my-card-actions .fav.active {
  color: #b99122;
  background: #fff7dc;
  border-color: #d6b13c;
}

.my-card-actions .my-edit-action {
  color: #173d32;
  background: #fffdf8;
}

.my-card-actions .my-delete-action {
  color: #9b3f34;
  border-color: rgba(169, 78, 63, 0.34);
  background: #fff8f3;
}

.my-action-svg {
  width: 17px;
  height: 17px;
  display: block;
}

.my-delete-backdrop {
  z-index: 260;
}

.my-delete-modal {
  width: min(330px, calc(100vw - 42px));
  padding: 22px 18px 18px;
  text-align: center;
}

.my-delete-modal p {
  margin: 0 0 18px;
  color: #173d32;
  font-weight: 800;
  font-size: 1rem;
}

.my-delete-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.my-delete-confirm-actions button {
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 800;
  border: 1px solid #ead58c;
  background: #fffdf8;
  color: #173d32;
}

.my-delete-confirm-actions .my-delete-confirm {
  border-color: rgba(169, 78, 63, 0.38);
  color: #9b3f34;
  background: #fff8f3;
}