@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,500&family=Plus+Jakarta+Sans:wght@400;500;600;700&family=Amiri:wght@400;700&display=swap');

/* ---------- Token ---------- */
:root {
  --ink: #12241F;
  --teal: #145C4E;
  --teal-deep: #0B3A31;
  --gold: #B3853B;
  --gold-soft: #D9B876;
  --parchment: #E8E1CD;
  --surface: #FBF9F1;
  --muted: #9C927C;
  --line: #D8CFB8;
  --danger-muted: #8C3F2E;

  --font-display: 'Fraunces', serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --font-arab: 'Amiri', serif;

  --radius-arch: 88px 88px 14px 14px;
  --nav-height: 68px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--parchment);
  color: var(--ink);
  line-height: 1.55;
  padding-bottom: calc(var(--nav-height) + 18px);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0 0 0.4em;
  line-height: 1.2;
}

p { margin: 0 0 1em; }
a { color: inherit; }

button {
  font-family: var(--font-body);
  cursor: pointer;
}

.arab {
  font-family: var(--font-arab);
  direction: rtl;
  text-align: right;
  unicode-bidi: plain-text;
}

/* Reduced motion respected everywhere */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* Visible keyboard focus */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ---------- Layout shell ---------- */
.top-bar {
  background: var(--teal-deep);
  color: var(--surface);
  padding: 22px 20px 26px;
  position: relative;
  overflow: hidden;
}

.top-bar__pattern {
  position: absolute;
  inset: 0;
  opacity: 0.14;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23D9B876' stroke-width='1'%3E%3Cpath d='M28 2 L34 22 L54 28 L34 34 L28 54 L22 34 L2 28 L22 22 Z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 56px 56px;
  pointer-events: none;
}

.top-bar__inner {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.brand span {
  color: var(--gold-soft);
  font-style: italic;
}

.top-bar__tagline {
  font-size: 0.82rem;
  color: var(--parchment);
  opacity: 0.75;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 18px 16px 8px;
}

.page-heading {
  margin-bottom: 18px;
}

.page-heading h1 {
  font-size: 1.5rem;
}

.page-heading p {
  color: var(--teal-deep);
  opacity: 0.75;
  font-size: 0.95rem;
}

/* ---------- Bottom nav ---------- */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--nav-height);
  background: var(--surface);
  border-top: 1px solid var(--line);
  display: flex;
  z-index: 40;
}

.bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 500;
  padding-top: 4px;
}

.bottom-nav a svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
}

.bottom-nav a.active {
  color: var(--teal);
}

.bottom-nav a.active svg {
  stroke: var(--gold);
}

/* ---------- Hero jadwal (index) ---------- */
.hero-jadwal {
  background: var(--teal);
  color: var(--surface);
  border-radius: var(--radius-arch);
  padding: 30px 24px 26px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-jadwal::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23FBF9F1' stroke-width='0.8'%3E%3Cpath d='M32 4 L38 26 L60 32 L38 38 L32 60 L26 38 L4 32 L26 26 Z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 72px 72px;
  opacity: 0.08;
  pointer-events: none;
}

.hero-jadwal__tanggal {
  position: relative;
  font-size: 0.82rem;
  opacity: 0.85;
  margin-bottom: 14px;
}

.hero-jadwal__label {
  position: relative;
  font-size: 0.85rem;
  text-transform: none;
  opacity: 0.8;
  margin-bottom: 2px;
}

.hero-jadwal__nama {
  position: relative;
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-style: italic;
  margin-bottom: 4px;
}

.hero-jadwal__countdown {
  position: relative;
  font-size: 1rem;
  color: var(--gold-soft);
  font-weight: 500;
}

.hero-jadwal__lokasi {
  position: relative;
  margin-top: 16px;
  font-size: 0.78rem;
  opacity: 0.75;
}

.hero-jadwal__lokasi button {
  background: none;
  border: none;
  color: var(--gold-soft);
  text-decoration: underline;
  font-size: inherit;
  padding: 0;
}

/* ---------- Timeline strip waktu sholat ---------- */
.timeline {
  display: flex;
  overflow-x: auto;
  gap: 0;
  margin: 18px 0 6px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.timeline__item {
  flex: 1 0 auto;
  min-width: 78px;
  text-align: center;
  padding: 12px 6px;
  border-right: 1px solid var(--line);
}

.timeline__item:last-child { border-right: none; }

.timeline__item.current {
  background: var(--surface);
}

.timeline__item.current .timeline__waktu {
  color: var(--teal);
  font-weight: 700;
}

.timeline__nama {
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.timeline__waktu {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
}

/* ---------- Lokasi form (manual fallback) ---------- */
.lokasi-form {
  display: none;
  gap: 8px;
  margin-top: 14px;
  position: relative;
}

.lokasi-form.tampil { display: flex; }

.lokasi-form input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-family: var(--font-body);
  font-size: 0.9rem;
  background: var(--surface);
}

.btn {
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid var(--teal);
  background: var(--teal);
  color: var(--surface);
  font-weight: 600;
  font-size: 0.88rem;
  white-space: nowrap;
}

.btn:hover { background: var(--teal-deep); }

.btn--ghost {
  background: transparent;
  color: var(--teal);
}

.btn--ghost:hover { background: var(--parchment); }

.status-msg {
  font-size: 0.82rem;
  padding: 10px 12px;
  border-radius: 10px;
  margin-top: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  display: none;
}

.status-msg.tampil { display: block; }

.status-msg.error {
  border-color: var(--danger-muted);
  color: var(--danger-muted);
}

/* ---------- Ringkasan checklist mini (index) ---------- */
.ringkasan-checklist {
  margin-top: 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  text-decoration: none;
  color: var(--ink);
}

.ringkasan-checklist__ring {
  flex-shrink: 0;
}

.ringkasan-checklist__teks h3 {
  font-size: 1rem;
  margin-bottom: 2px;
}

.ringkasan-checklist__teks p {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
}

/* ---------- Checklist page ---------- */
.date-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}

.date-nav button {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.date-nav__tengah {
  text-align: center;
  flex: 1;
}

.date-nav__tanggal {
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.date-nav__hari-ini {
  font-size: 0.75rem;
  color: var(--teal);
  text-decoration: underline;
  background: none;
  border: none;
  width: auto;
  height: auto;
}

.checklist-progress {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 14px;
}

.checklist-group {
  margin-bottom: 22px;
}

.checklist-group h3 {
  font-size: 0.82rem;
  color: var(--teal);
  font-weight: 600;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.checklist-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
}

.checklist-row:last-child { border-bottom: none; }

.checklist-row label {
  flex: 1;
  font-size: 0.95rem;
}

.check-star {
  position: relative;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.check-star input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.check-star svg {
  width: 26px;
  height: 26px;
  stroke: var(--muted);
  stroke-width: 1.6;
  fill: none;
}

.check-star input:checked ~ svg {
  stroke: var(--gold);
  fill: var(--gold-soft);
}

.riwayat-strip {
  display: flex;
  gap: 6px;
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.riwayat-strip__hari {
  flex: 1;
  text-align: center;
}

.riwayat-strip__bar {
  height: 46px;
  border-radius: 6px;
  background: var(--line);
  position: relative;
  overflow: hidden;
  margin-bottom: 4px;
}

.riwayat-strip__isi {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--teal);
}

.riwayat-strip__label {
  font-size: 0.65rem;
  color: var(--muted);
}

/* ---------- Doa page ---------- */
.tab-kategori {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.tab-kategori a {
  padding: 10px 14px;
  font-size: 0.85rem;
  text-decoration: none;
  color: var(--muted);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.tab-kategori a.active {
  color: var(--teal);
  border-bottom-color: var(--gold);
  font-weight: 600;
}

.doa-entry {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.doa-entry:last-child { border-bottom: none; }

.doa-entry__judul {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}

.doa-entry__judul h3 {
  font-size: 1.02rem;
  margin: 0;
}

.doa-entry__catatan {
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
}

.doa-entry__arab {
  font-size: 1.35rem;
  line-height: 2.1;
  margin-bottom: 10px;
  color: var(--teal-deep);
}

.doa-entry__latin {
  font-style: italic;
  font-size: 0.88rem;
  color: var(--teal);
  margin-bottom: 8px;
}

.doa-entry__arti {
  font-size: 0.88rem;
  color: var(--ink);
  opacity: 0.85;
  margin: 0;
}

/* ---------- Panduan sholat ---------- */
.panduan-intro {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 0.85rem;
  margin-bottom: 22px;
}

.langkah {
  display: flex;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.langkah:last-child { border-bottom: none; }

.langkah__no {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.9rem;
}

.langkah__isi h3 {
  font-size: 1rem;
  margin-bottom: 5px;
}

.langkah__keterangan {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.langkah__arab {
  font-size: 1.2rem;
  line-height: 1.9;
  color: var(--teal-deep);
  margin-bottom: 8px;
}

.langkah__latin {
  font-style: italic;
  font-size: 0.85rem;
  color: var(--teal);
  margin-bottom: 6px;
}

.langkah__arti {
  font-size: 0.85rem;
  opacity: 0.85;
  margin: 0;
}

/* ---------- Al-Qur'an ---------- */
.cari-surah {
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-family: var(--font-body);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.surah-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 2px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
}

.surah-item__nomor {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.82rem;
}

.surah-item__tengah {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.surah-item__latin {
  font-family: var(--font-display);
  font-size: 0.98rem;
}

.surah-item__arti {
  font-size: 0.78rem;
  color: var(--muted);
}

.surah-item__kanan {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.surah-item__arab {
  font-size: 1.15rem;
  color: var(--teal-deep);
}

.surah-item__meta {
  font-size: 0.68rem;
  color: var(--muted);
}

.link-kembali {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--teal);
  text-decoration: none;
  margin-bottom: 16px;
}

.surah-header {
  text-align: center;
  padding: 22px 16px;
  background: var(--teal);
  color: var(--surface);
  border-radius: var(--radius-arch);
  margin-bottom: 8px;
}

.surah-header__nama-arab {
  font-size: 1.8rem;
  margin-bottom: 8px;
  color: var(--gold-soft);
}

.surah-header__nama-latin {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-style: italic;
}

.surah-header__arti {
  font-size: 0.85rem;
  opacity: 0.85;
  margin-top: 2px;
}

.surah-header__meta {
  font-size: 0.75rem;
  opacity: 0.7;
  margin-top: 10px;
}

.ayat-row {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.ayat-row:last-child { border-bottom: none; }

.ayat-row--bismillah {
  text-align: center;
  border-bottom: 1px dashed var(--gold);
  padding-bottom: 22px;
  margin-bottom: 4px;
}

.ayat-row--bismillah .ayat-row__arab {
  font-size: 1.5rem;
}

.ayat-row__nomor {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--parchment);
  color: var(--teal-deep);
  font-size: 0.7rem;
  font-family: var(--font-display);
  margin-bottom: 10px;
}

.ayat-row__arab {
  font-size: 1.35rem;
  line-height: 2.1;
  color: var(--teal-deep);
  margin-bottom: 8px;
}

.ayat-row__arti {
  font-size: 0.88rem;
  opacity: 0.85;
  margin: 0;
}

.surah-nav {
  display: flex;
  justify-content: space-between;
  padding: 20px 0 8px;
  font-size: 0.85rem;
}

.surah-nav a {
  color: var(--teal);
  text-decoration: none;
  font-weight: 600;
}

/* ---------- Zakat (nuansa ledger) ---------- */
.zakat-tab {
  display: flex;
  gap: 4px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px;
  background: var(--surface);
}

.zakat-tab button {
  flex: 1;
  padding: 9px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.zakat-tab button.active {
  background: var(--teal);
  color: var(--surface);
}

.zakat-panel { display: none; }
.zakat-panel.active { display: block; }

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.field .hint {
  font-size: 0.74rem;
  color: var(--muted);
  font-weight: 400;
  display: block;
  margin-top: 4px;
}

.field input, .field select {
  width: 100%;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--surface);
}

.ledger {
  margin-top: 24px;
  border-top: 2px dashed var(--line);
  padding-top: 16px;
}

.ledger__baris {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line);
}

.ledger__baris span:last-child {
  font-weight: 600;
}

.ledger__total {
  display: flex;
  justify-content: space-between;
  padding-top: 14px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--teal-deep);
}

.ledger__vonis {
  margin-top: 10px;
  font-size: 0.85rem;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.ledger__vonis.wajib {
  color: var(--teal-deep);
  border-color: var(--gold);
  background: #FBF3E3;
}

/* ---------- Util ---------- */
.disclaimer {
  font-size: 0.74rem;
  color: var(--muted);
  margin-top: 26px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

/* =====================================================================
   Fitur baru (diadopsi sebagian dari daleel.id -- lihat README).
   Catatan: .surah-item, .surah-header, .surah-nav, .cari-surah, dan
   .link-kembali di atas SENGAJA dipakai ulang apa adanya di halaman
   hadits/ulama/pustaka di bawah -- itu pola "daftar bernomor + teks
   Arab rata kanan" yang generik, bukan spesifik Qur'an, jadi tidak
   perlu diduplikasi jadi class baru cuma buat beda nama.
   ===================================================================== */

/* ---------- Menu "Lainnya" ---------- */
.menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 2px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
}

.menu-item__ikon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--parchment);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal-deep);
}

.menu-item__ikon svg {
  width: 21px;
  height: 21px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
}

.menu-item__teks { flex: 1; min-width: 0; }

.menu-item__judul { font-family: var(--font-display); font-size: 1rem; }

.menu-item__desc {
  font-size: 0.76rem;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.4;
}

.menu-item__panah { flex-shrink: 0; color: var(--line); }

.menu-section-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 22px 2px 6px;
}

.menu-section-label:first-child { margin-top: 2px; }

/* ---------- Stepper (penghitung ahli waris) ---------- */
.stepper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  gap: 10px;
}

.stepper label { font-size: 0.88rem; flex: 1; }

.stepper__kontrol { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }

.stepper__btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: var(--surface);
  color: var(--gold);
  font-size: 1.15rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
}

.stepper__btn:active { background: var(--gold); color: var(--surface); }

.stepper__angka {
  min-width: 18px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.ahli-waris-group h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gold);
  margin: 22px 0 4px;
}

.ahli-waris-group h3:first-child { margin-top: 4px; }

.waris-hasil-baris {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}

.waris-hasil-baris__nama { font-weight: 600; font-size: 0.9rem; }
.waris-hasil-baris__dasar { font-size: 0.72rem; color: var(--muted); margin-top: 2px; }
.waris-hasil-baris__kanan { text-align: right; flex-shrink: 0; }
.waris-hasil-baris__pecahan { font-family: var(--font-display); color: var(--teal-deep); }
.waris-hasil-baris__rupiah { font-size: 0.8rem; color: var(--muted); margin-top: 2px; }

.catatan-fiqh {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #FBF3E3;
  border: 1px solid var(--gold-soft);
  font-size: 0.78rem;
  line-height: 1.5;
}

.catatan-fiqh:not(:last-child) { margin-bottom: 8px; }

/* ---------- Badge kecil (genre, era, jumlah) ---------- */
.badge {
  display: inline-block;
  font-size: 0.68rem;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--parchment);
  color: var(--teal-deep);
  border: 1px solid var(--line);
}

/* ---------- Sumber / atribusi (Tanya AI, Pustaka Kitab) ---------- */
.sumber-list {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sumber-item {
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.5;
}

.sumber-item b { color: var(--ink); font-weight: 600; }

/* ---------- Tanya AI (chat) ---------- */
.chat-thread {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 92px; /* ruang buat input bar fixed di bawah */
}

.chat-bubble {
  max-width: 90%;
  padding: 12px 14px;
  border-radius: 16px;
  font-size: 0.89rem;
  line-height: 1.55;
}

.chat-bubble--user {
  align-self: flex-end;
  background: var(--teal);
  color: var(--surface);
  border-bottom-right-radius: 4px;
}

.chat-bubble--ai {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
  width: 90%;
}

.chat-bubble--kosong { color: var(--muted); font-style: italic; }

.chat-bubble--error { border-color: var(--danger-muted); color: var(--danger-muted); }

.chat-tak-grounded {
  margin-top: 8px;
  font-size: 0.74rem;
  color: var(--danger-muted);
  font-style: italic;
}

.chat-intro {
  text-align: center;
  padding: 26px 10px;
  color: var(--muted);
  font-size: 0.85rem;
}

.chat-input-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: var(--nav-height);
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 10px 16px;
  display: flex;
  gap: 10px;
  align-items: flex-end;
  max-width: 640px;
  margin: 0 auto;
}

.chat-input-bar textarea {
  flex: 1;
  resize: none;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  max-height: 90px;
  background: var(--parchment);
}

.chat-input-bar button {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--teal);
  color: var(--surface);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-input-bar button:disabled { opacity: 0.5; }

.chat-input-bar button svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ---------- Kiblat ---------- */
.kiblat-wrap { display: flex; flex-direction: column; align-items: center; padding: 10px 0 20px; }

.kiblat-kompas { width: min(72vw, 260px); height: min(72vw, 260px); position: relative; }

.kiblat-kompas svg { width: 100%; height: 100%; }

.kiblat-arah-angka {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--teal-deep);
  margin-top: 18px;
}

.kiblat-arah-label { font-size: 0.8rem; color: var(--muted); }

.kiblat-toggle-live {
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--teal);
  background: none;
  border: 1px solid var(--teal);
  padding: 8px 16px;
  border-radius: 999px;
}

@media (min-width: 640px) {
  .hero-jadwal__nama { font-size: 2.6rem; }
  .doa-entry__arab { font-size: 1.55rem; }
}

/* ===================================================================
   Fitur tambahan (malaikat, dzikir, adab, dst) — islamic-json
   =================================================================== */

/* --- Tab kategori (dzikir, rukun islam, adab, puasa, kalender) --- */
.tab-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 16px;
  -webkit-overflow-scrolling: touch;
}
.tab-row::-webkit-scrollbar { display: none; }
.tab-pill {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.tab-pill.aktif {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

/* --- Referensi accordion (malaikat, nabi, kitab suci, rukun iman) --- */
.ref-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 10px;
  overflow: hidden;
  background: var(--surface);
}
.ref-item__head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-body);
}
.ref-item__nama {
  font-weight: 700;
  color: var(--teal-deep);
}
.ref-item__arab {
  font-size: 1.2rem;
  color: var(--gold);
  flex-shrink: 0;
}
.ref-item__body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease, padding 0.25s ease;
  padding: 0 16px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}
.ref-item.terbuka .ref-item__body {
  max-height: 600px;
  padding: 0 16px 16px;
}
.ref-item__referensi {
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--teal);
}

/* --- Kartu bacaan (dzikir, sholat sunnah, niat rukun islam) --- */
.bacaan-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
  background: var(--surface);
}
.bacaan-card__judul {
  font-weight: 700;
  color: var(--teal-deep);
  margin-bottom: 4px;
}
.bacaan-card__konteks {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 10px;
}
.bacaan-card__arab {
  font-size: 1.35rem;
  line-height: 2.1;
  text-align: right;
  color: var(--teal-deep);
  margin-bottom: 10px;
}
.bacaan-card__latin {
  font-style: italic;
  color: var(--gold-soft);
  font-size: 0.85rem;
  margin-bottom: 8px;
}
.bacaan-card__arti {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}
.bacaan-card__extra {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 0.82rem;
  color: var(--muted);
}
.bacaan-card__extra h2 { font-size: 0.85rem; color: var(--teal); margin: 0 0 4px; }
.bacaan-card__extra ol, .bacaan-card__extra ul { padding-left: 18px; margin: 4px 0; }

/* --- Kartu edukasi (adab, puasa) --- */
.edukasi-card {
  border-left: 3px solid var(--gold);
  padding: 10px 14px;
  margin-bottom: 10px;
  background: var(--surface);
  border-radius: 0 10px 10px 0;
}
.edukasi-card__judul {
  font-weight: 700;
  color: var(--teal-deep);
  margin-bottom: 4px;
  font-size: 0.92rem;
}
.edukasi-card__deskripsi {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

/* --- Grid Asmaul Husna --- */
.asma-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.asma-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: var(--surface);
  text-align: center;
}
.asma-card__nomor {
  font-size: 0.7rem;
  color: var(--muted);
}
.asma-card__arab {
  font-size: 1.3rem;
  color: var(--teal-deep);
  margin: 4px 0;
}
.asma-card__latin {
  font-size: 0.78rem;
  font-style: italic;
  color: var(--gold-soft);
}
.asma-card__arti {
  font-size: 0.76rem;
  color: var(--muted);
  margin-top: 2px;
}

/* --- Kartu tempat islami --- */
.tempat-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
  background: var(--surface);
}
.tempat-card__nama {
  font-weight: 700;
  color: var(--teal-deep);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}
.tempat-card__arab {
  color: var(--gold);
  font-size: 1.05rem;
}
.tempat-card__lokasi {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 2px 0 8px;
}
.tempat-card__deskripsi {
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 10px;
}
.tempat-card__peta {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
}

/* --- Kartu bulan hijriah --- */
.bulan-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
  background: var(--surface);
}
.bulan-card__nama {
  font-weight: 700;
  color: var(--teal-deep);
  display: flex;
  justify-content: space-between;
}
.bulan-card__arab { color: var(--gold); }
.bulan-card__deskripsi { font-size: 0.85rem; color: var(--muted); margin-top: 4px; line-height: 1.55; }

.acara-card {
  display: flex;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
  background: var(--surface);
}
.acara-card__tanggal {
  flex-shrink: 0;
  width: 52px;
  text-align: center;
  background: var(--parchment);
  border-radius: 10px;
  padding: 6px 4px;
  font-size: 0.72rem;
  color: var(--teal-deep);
  font-weight: 700;
}
.acara-card__judul { font-weight: 700; color: var(--teal-deep); }
.acara-card__deskripsi { font-size: 0.84rem; color: var(--muted); margin-top: 2px; line-height: 1.5; }

/* --- Halaman Apresiasi (QRIS) --- */
.qris-wrap {
  text-align: center;
  padding: 20px 0;
}
.qris-wrap__gambar {
  max-width: 220px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 20px;
  border: 1px solid var(--line);
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.qris-wrap__ket {
  margin-top: 14px;
  font-size: 0.82rem;
  color: var(--muted);
}
