:root {
  --bg: #f5ede2;
  --bg-2: #efe1d0;
  --card: rgba(255, 250, 244, 0.86);
  --card-2: #fff8f1;
  --text: #3d2c22;
  --muted: #7b6453;
  --line: rgba(96, 69, 49, 0.14);
  --accent: #8e745b;
  --accent-2: #b99a7b;
  --good: #6f8d62;
  --shadow: 0 14px 40px rgba(100, 73, 51, 0.12);
  --radius: 22px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.7), transparent 28%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  min-height: 100vh;
}

.app-shell {
  max-width: 920px;
  margin: 0 auto;
  padding: 18px 18px 100px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.eyebrow {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}

h1, h2, h3, p { margin: 0; }
h1 { font-size: 32px; }

.icon-button {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(10px);
  width: 46px;
  height: 46px;
  border-radius: 16px;
  font-size: 20px;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.hero-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255,248,241,0.95), rgba(234,217,198,0.92));
  box-shadow: var(--shadow);
  border: 1px solid rgba(129, 98, 72, 0.12);
  margin-bottom: 18px;
}
.hero-pattern {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% 15%, rgba(255,255,255,0.45), transparent 16%),
    radial-gradient(circle at 15% 85%, rgba(184,154,123,0.18), transparent 18%),
    linear-gradient(135deg, transparent 0 55%, rgba(142,116,91,0.08) 55% 57%, transparent 57% 100%);
}
.hero-content {
  position: relative;
  padding: 26px;
}
.hero-kicker {
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 8px;
}
.hero-content h2 {
  font-size: 28px;
  margin-bottom: 10px;
}
.hero-content p {
  color: var(--muted);
  line-height: 1.55;
}
.home-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.primary-pill {
  border: none;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  padding: 14px 20px;
  font-size: 16px;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.primary-pill.secondary {
  background: #a98a6b;
}

.content {
  display: grid;
  gap: 14px;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin: 6px 2px 4px;
}
.section-head h2 {
  font-size: 24px;
}
.section-head p {
  color: var(--muted);
  font-size: 14px;
}

.azkar-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.azkar-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.badge {
  background: rgba(142,116,91,0.12);
  color: var(--accent);
  padding: 7px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
}
.source {
  color: var(--muted);
  font-size: 13px;
}
.arabic {
  direction: rtl;
  font-size: 28px;
  line-height: 1.9;
  margin: 8px 0 16px;
  font-family: "Amiri", "Scheherazade New", serif;
}
.block-title {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.transcription,
.translation {
  line-height: 1.7;
}
.translation-wrap,
.transcription-wrap {
  background: var(--card-2);
  border-radius: 18px;
  padding: 14px;
  border: 1px solid rgba(129, 98, 72, 0.08);
  margin-top: 12px;
}
.counter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  background: rgba(185,154,123,0.1);
  border: 1px solid rgba(129, 98, 72, 0.08);
  border-radius: 20px;
  padding: 12px 14px;
}
.counter-status {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.counter-status strong {
  font-size: 18px;
}
.counter-actions {
  display: flex;
  gap: 8px;
}
.counter-btn {
  border: none;
  border-radius: 14px;
  padding: 12px 14px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  min-width: 48px;
  font-size: 16px;
}
.counter-btn.ghost {
  background: rgba(61,44,34,0.08);
  color: var(--text);
}
.done {
  color: var(--good);
  font-weight: 700;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 14px;
  width: min(92vw, 560px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: rgba(255, 250, 244, 0.84);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 10px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}
.nav-btn {
  border: none;
  background: transparent;
  border-radius: 18px;
  padding: 12px;
  cursor: pointer;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 16px;
}
.nav-btn.active {
  background: rgba(142,116,91,0.12);
  color: var(--text);
  font-weight: 700;
}
.nav-btn span { font-size: 13px; }

.drawer {
  position: fixed;
  inset: 0;
  display: none;
}
.drawer.open { display: block; }
.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(34, 24, 18, 0.25);
}
.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(88vw, 340px);
  height: 100%;
  background: linear-gradient(180deg, #fdf7f0, #efe3d5);
  padding: 20px;
  box-shadow: -10px 0 30px rgba(61,44,34,0.12);
  border-left: 1px solid var(--line);
}
.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.contact-card {
  background: rgba(255,255,255,0.65);
  border-radius: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  margin-bottom: 12px;
}
.contact-label {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}
.contact-value {
  font-size: 18px;
  font-weight: 700;
}
.drawer-note {
  color: var(--muted);
  line-height: 1.6;
  margin-top: 16px;
}

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 36px 16px 10px;
}

@media (max-width: 640px) {
  h1 { font-size: 28px; }
  .hero-content h2 { font-size: 24px; }
  .arabic { font-size: 24px; }
  .counter { align-items: stretch; flex-direction: column; }
  .counter-actions { width: 100%; }
  .counter-btn { flex: 1; }
}
