
:root {
  color-scheme: dark;
  --ink: #f4f6f8;
  --muted: #aeb8c1;
  --cyan: #54c7d7;
  --cyan-bright: #72dbea;
  --paper: #222a33;
  --card: #171e23;
  --line: #3a4650;
  --gold: #cbb477;
  --shadow: 0 18px 48px rgba(0, 0, 0, .22);
  --sans: 'IBM Plex Sans Arabic', 'Noto Sans Arabic', sans-serif;
  --serif: 'Amiri', 'Noto Naskh Arabic', serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--paper); }
body {
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
.page-shell {
  width: min(720px, calc(100% - 26px));
  min-height: 100vh;
  margin-inline: auto;
  padding-bottom: 116px;
}
.site-header {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
}
.site-brand { display: inline-flex; align-items: center; gap: 11px; }
.site-brand img { width: 45px; height: 45px; }
.brand-copy { display: grid; gap: 1px; }
.brand-copy strong { color: var(--ink); font-size: 20px; line-height: 1.2; font-weight: 700; }
.brand-copy small { color: var(--muted); font-size: 12px; }
.header-motto { color: var(--muted); font-size: 13px; }
.main-content { padding-top: 38px; }
.welcome-row {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 25px;
}
.section-kicker { color: var(--cyan-bright); font-size: 13px; font-weight: 600; }
.welcome-row h1 { margin: 6px 0 0; color: var(--ink); font-size: clamp(25px, 4vw, 31px); line-height: 1.45; }
.welcome-mark { color: var(--cyan); font-family: var(--serif); font-size: 37px; opacity: .8; }
.category-tabs-wrapper {
  position: relative;
}
.category-tabs-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 18px;
  width: 48px;
  background: linear-gradient(to left, transparent, var(--paper));
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s ease;
  z-index: 2;
}
.category-tabs-wrapper.has-overflow::after {
  opacity: 1;
}
.category-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
}
.category-tabs.is-grabbing { cursor: grabbing; }
.category-tabs::-webkit-scrollbar { display: none; }
.category-tab {
  flex: 0 0 auto;
  min-height: 49px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 17px;
  border: 1px solid #414c55;
  border-radius: 10px;
  background: #1c242b;
  color: #d5dce1;
  font-size: 16px;
  white-space: nowrap;
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}
.category-tab:hover { border-color: var(--cyan); color: var(--ink); }
.category-tab.is-selected {
  border-color: var(--cyan);
  background: #253c45;
  box-shadow: inset 0 0 0 1px rgba(84, 199, 215, .12);
  color: #fff;
}
.dhikr-section { padding-top: 27px; }
.category-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 17px; }
.category-heading h2 { margin: 4px 0 0; color: var(--ink); font-size: 27px; line-height: 1.35; }
.dhikr-list { display: grid; gap: 16px; }
.dhikr-card {
  position: relative;
  overflow: hidden;
  padding: 21px 24px 23px;
  border: 1px solid #3b454c;
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.dhikr-card::after {
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: linear-gradient(180deg, transparent, rgba(84, 199, 215, .5), transparent);
  content: '';
  opacity: .6;
}
.dhikr-meta { display: flex; align-items: center; justify-content: flex-start; margin-bottom: 13px; }
.repeat-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 3px 19px;
  border: 1px solid #344353;
  border-radius: 999px;
  background: #273342;
  color: #f0f4f7;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
.dhikr-text {
  margin: 0;
  color: #f4f6f8;
  font-family: var(--serif);
  font-size: clamp(29px, 4vw, 36px);
  font-weight: 700;
  line-height: 2.05;
  text-align: center;
  overflow-wrap: anywhere;
}
.empty-state {
  min-height: 240px;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 28px;
  border: 1px dashed #46535d;
  border-radius: 18px;
  background: #1a2229;
  text-align: center;
}
.empty-rosette {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  background: #253d46;
  color: var(--cyan-bright);
  font-family: var(--serif);
  font-size: 31px;
}
.empty-state h3 { margin: 14px 0 4px; color: #f2f5f7; font-size: 18px; }
.empty-state p { max-width: 440px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.9; }
.bottom-nav {
  position: fixed;
  z-index: 5;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px max(10px, env(safe-area-inset-bottom));
  border-top: 1px solid #39434c;
  background: rgba(27, 34, 41, .97);
  box-shadow: 0 -8px 28px rgba(0, 0, 0, .2);
  backdrop-filter: blur(14px);
}
.bottom-link {
  width: min(190px, 44vw);
  min-height: 51px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 12px;
  color: #c5cdd3;
  font-size: 14px;
  font-weight: 600;
  transition: background .18s ease, color .18s ease;
}
.bottom-link.is-active { background: #263b44; color: var(--cyan-bright); }
.nav-icon { font-family: var(--serif); font-size: 21px; line-height: 1; }
.nav-about { font-size: 17px; }
.about-view { display: flex; flex-direction: column; align-items: center; padding: 23px 0 12px; text-align: center; }
.about-emblem {
  width: 122px;
  height: 122px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 50%;
  background: radial-gradient(circle, #293e46 0 38%, #222a33 72%);
}
.about-emblem img { width: 98px; height: 98px; }
.about-view h1 { margin: 9px 0 5px; color: #f4f6f8; font-size: clamp(26px, 4vw, 32px); }
.about-copy { max-width: 550px; margin: 4px 0 24px; color: var(--muted); font-size: 16px; line-height: 2; }
.dua-card {
  width: 100%;
  min-height: 130px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid #3c4b52;
  border-radius: 18px;
  background: linear-gradient(145deg, #202b31, #172126);
  box-shadow: var(--shadow);
}
.dua-card p { margin: 0; color: #f3f6f7; font-family: var(--serif); font-size: clamp(25px, 4vw, 34px); font-weight: 700; line-height: 1.9; }
.dua-ornament { flex: 0 0 auto; color: var(--gold); font-size: 16px; }
.about-signature { margin: 19px 0 0; color: var(--muted); font-size: 14px; }

@media (max-width: 560px) {
  .page-shell { width: calc(100% - 22px); padding-bottom: 105px; }
  .site-header { min-height: 75px; }
  .site-brand img { width: 41px; height: 41px; }
  .header-motto { font-size: 12px; }
  .main-content { padding-top: 24px; }
  .welcome-row { min-height: 72px; margin-bottom: 18px; }
  .welcome-row h1 { font-size: 24px; }
  .welcome-mark { font-size: 30px; }
  .category-tab { min-height: 44px; padding-inline: 13px; font-size: 15px; }
  .category-tabs { gap: 7px; padding-bottom: 14px; }
  .dhikr-section { padding-top: 21px; }
  .category-heading h2 { font-size: 24px; }
  .dhikr-card { padding: 17px 15px 18px; border-radius: 13px; }
  .repeat-pill { min-height: 38px; padding-inline: 16px; font-size: 23px; }
  .dhikr-text { font-size: clamp(27px, 7.2vw, 32px); line-height: 1.95; }
  .empty-state { min-height: 215px; padding: 23px 16px; }
  .dua-card { min-height: 118px; padding: 15px 12px; gap: 9px; }
  .dua-card p { font-size: clamp(24px, 6.6vw, 30px); }
  .about-copy { font-size: 15px; }
}
