/* ==========================================================================
   Lunas Hutang — PWA amalan Yasin 41 & Shalawat Munjiyat
   Palet: hijau tua (dark emerald) + emas, ornamen geometris Islami
   ========================================================================== */

@font-face {
  font-family: 'Amiri';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/amiri-arabic-400.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: 'Amiri';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/amiri-latin-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}

:root {
  --emerald-900: #05261a;
  --emerald-850: #062f20;
  --emerald-800: #073b28;
  --emerald-700: #0d4f3c;
  --emerald-600: #14654c;
  --gold: #d4af37;
  --gold-light: #f0d680;
  --gold-line: rgba(212, 175, 55, 0.28);
  --gold-faint: rgba(212, 175, 55, 0.12);
  --cream: #f6f1dd;
  --ink: #eef7f2;
  --ink-strong: #ffffff;
  --ink-dim: rgba(238, 247, 242, 0.66);
  --ink-faint: rgba(238, 247, 242, 0.42);
  --danger: #e0685f;
  --surface: rgba(9, 58, 42, 0.72);
  --surface-solid: #0a3f2e;
  --ar-size: 27px;
  --radius: 20px;
  --radius-lg: 26px;
  --shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.85);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--ink);
  background: var(--emerald-900);
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(120% 80% at 50% -10%, #12654c 0%, #0a3d2c 42%, #05261a 100%);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url('../images/pattern.svg');
  background-size: 220px 220px;
  opacity: 0.055;
  pointer-events: none;
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
  touch-action: manipulation;
}

a {
  color: var(--gold-light);
}

h1,
h2,
h3,
p {
  margin: 0;
}

.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
}

.view {
  display: none;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
}

.view.is-active {
  display: flex;
  animation: viewIn 0.32s var(--ease);
}

@keyframes viewIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ---------- Topbar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: linear-gradient(to bottom, rgba(5, 38, 26, 0.96), rgba(5, 38, 26, 0.82) 70%, rgba(5, 38, 26, 0));
  backdrop-filter: blur(6px);
}

.topbar__title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.topbar__sub {
  font-size: 11.5px;
  color: var(--ink-dim);
  letter-spacing: 0.04em;
}

.topbar__spacer {
  flex: 1;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--gold-light);
  background: rgba(7, 59, 40, 0.6);
  border: 1px solid var(--gold-faint);
  transition: transform 0.18s var(--ease), background 0.18s;
}

.icon-btn:active {
  transform: scale(0.92);
  background: rgba(20, 101, 76, 0.8);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Home ---------- */

.home {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 8px;
  padding: 4px 18px 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.home > * {
  flex-shrink: 0;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding-top: 6px;
}

.brand__name {
  font-family: 'Amiri', serif;
  font-size: clamp(20px, 5.6vw, 25px);
  line-height: 1.25;
  letter-spacing: 0.03em;
  white-space: nowrap;
  color: var(--cream);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
}

.ornament-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(240px, 74%);
  color: var(--gold);
  opacity: 0.75;
}

.ornament-divider::before,
.ornament-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-line), transparent);
}

.ornament-divider span {
  font-size: 9px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.quote {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 11px 14px 13px;
  border-radius: var(--radius);
  border: 1px solid var(--gold-line);
  background:
    linear-gradient(155deg, rgba(20, 101, 76, 0.28), rgba(5, 38, 26, 0.72)),
    var(--surface-solid);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: quoteFade 1.1s var(--ease) both;
}

.quote::before {
  content: '\201C';
  position: absolute;
  top: -18px;
  right: 12px;
  font-family: 'Amiri', serif;
  font-size: 110px;
  color: var(--gold);
  opacity: 0.14;
  line-height: 1;
}

@keyframes quoteFade {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.quote__ar {
  font-family: 'Amiri', serif;
  font-size: calc(var(--ar-size) * 0.60);
  line-height: 1.68;
  text-align: right;
  direction: rtl;
  color: #fffaf0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.quote.is-expanded .quote__ar {
  -webkit-line-clamp: unset;
  display: block;
}

.quote__id {
  font-size: 12.2px;
  line-height: 1.5;
  color: var(--ink-dim);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.quote.is-expanded .quote__id {
  -webkit-line-clamp: unset;
  display: block;
}

.quote__src {
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--gold-light);
  text-transform: uppercase;
}

.quote__tap {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.quote > * {
  position: relative;
  z-index: 1;
}

.quote__hint {
  position: absolute;
  right: 14px;
  bottom: 10px;
  z-index: 1;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
}

.menu {
  display: grid;
  gap: 10px;
}

.menu-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px;
  text-align: left;
  border-radius: var(--radius);
  border: 1px solid var(--gold-line);
  background: linear-gradient(140deg, rgba(19, 92, 70, 0.55), rgba(6, 45, 31, 0.85));
  box-shadow: var(--shadow);
  transition: transform 0.16s var(--ease), border-color 0.2s;
  overflow: hidden;
}

.menu-card:active {
  transform: scale(0.985);
  border-color: rgba(212, 175, 55, 0.55);
}

.menu-card__icon {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid var(--gold-faint);
}

.menu-card__icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.menu-card__title {
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--cream);
}

.menu-card__desc {
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--ink-dim);
  line-height: 1.32;
}

.menu-card__side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  align-self: stretch;
  flex: 0 0 auto;
}

.menu-card__badge {
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--emerald-900);
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
}

.menu-card__go svg {
  width: 18px;
  height: 18px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.8;
}

.menu-card__progress {
  display: block;
  margin-top: 7px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.menu-card__progress i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transition: width 0.5s var(--ease);
}

/* Kartu amalan: fokus utama beranda */

.menu--primary {
  gap: 12px;
}

.menu--primary .menu-card {
  padding: 14px 14px 14px 16px;
  min-height: 102px;
  gap: 13px;
  border-color: rgba(212, 175, 55, 0.46);
  background:
    linear-gradient(135deg, rgba(30, 128, 96, 0.68), rgba(9, 68, 48, 0.92) 58%, rgba(6, 45, 31, 0.96));
  box-shadow:
    0 22px 46px -26px rgba(0, 0, 0, 0.95),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.menu--primary .menu-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(to bottom, transparent, var(--gold), transparent);
}

.menu--primary .menu-card:active {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(38, 148, 112, 0.78), rgba(12, 82, 58, 0.95) 58%, rgba(6, 45, 31, 0.96));
}

.menu--primary .menu-card__icon {
  flex-basis: 58px;
  width: 58px;
  height: 58px;
  border-radius: 17px;
  background: linear-gradient(150deg, rgba(212, 175, 55, 0.26), rgba(212, 175, 55, 0.08));
  border-color: rgba(212, 175, 55, 0.4);
  box-shadow: inset 0 0 16px rgba(212, 175, 55, 0.12);
}

.menu--primary .menu-card__icon svg {
  width: 30px;
  height: 30px;
  stroke-width: 1.7;
}

.menu--primary .menu-card__title {
  font-size: 19px;
  letter-spacing: 0.02em;
  color: #fffaf0;
}

.menu--primary .menu-card__desc {
  margin-top: 4px;
  font-size: 12.5px;
  color: rgba(238, 247, 242, 0.72);
}

.menu--primary .menu-card__progress {
  margin-top: 11px;
  height: 6px;
}

.menu--primary .menu-card__badge {
  padding: 5px 11px;
  font-size: 12px;
}

.home__note {
  position: relative;
  margin: 0;
  padding: 10px 13px 10px 16px;
  border-radius: 16px;
  border: 1px solid var(--gold-line);
  background:
    linear-gradient(160deg, rgba(20, 101, 76, 0.26), rgba(5, 38, 26, 0.68)),
    var(--surface-solid);
  box-shadow: 0 14px 30px -24px rgba(0, 0, 0, 0.9);
  font-size: 11.5px;
  line-height: 1.5;
  text-align: left;
  color: var(--ink-dim);
}

.home__note::before {
  content: ';
  position: absolute;
  left: 6px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--gold), rgba(212, 175, 55, 0.08));
}

.home__note strong,
.field__hint strong {
  color: var(--gold-light);
  font-weight: 600;
}

/* Layar pendek: rapatkan lagi agar tombol Pasang & Donasi tetap terlihat */
@media (max-height: 760px) {
  .home {
    gap: 7px;
    padding-bottom: 8px;
  }

  .menu {
    gap: 7px;
  }

  .menu-card {
    padding: 11px;
  }

  .quote {
    padding: 10px 13px 12px;
  }

  .home__note {
    font-size: 11px;
    line-height: 1.45;
    padding: 9px 12px 9px 15px;
  }
}

/* Layar sangat pendek: rapatkan lagi supaya tombol tetap terlihat */
@media (max-height: 700px) {
  .home {
    gap: 4px;
    padding-bottom: 6px;
  }

  .menu {
    gap: 5px;
  }

  .menu--primary .menu-card {
    min-height: 88px;
    padding: 10px 12px;
  }

  .menu-card__icon {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

  .quote {
    padding: 9px 12px 10px;
  }

  /* Terjemahan quote disembunyikan; teks Arab + sumber tetap tampil */
  .quote__id {
    display: none;
  }

  .home__note {
    font-size: 11px;
    line-height: 1.45;
    padding: 8px 11px 8px 14px;
  }
}

@media (max-height: 600px) {
  .quote {
    display: none;
  }

  .home {
    gap: 4px;
  }

  .menu--primary .menu-card {
    min-height: 80px;
    padding: 9px 11px;
  }

  .home__actions .btn {
    padding: 10px 8px;
    font-size: 12.5px;
  }

  .home__note {
    font-size: 10.5px;
    line-height: 1.4;
  }
}

.home__actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  margin-top: auto;
}

.home__actions .btn {
  flex: 1 1 0;
  min-width: 0;
  padding: 12px 10px;
  font-size: 13px;
  white-space: nowrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 18px;
  border-radius: 14px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid var(--gold-faint);
  transition: transform 0.16s var(--ease), filter 0.2s;
}

.btn:active {
  transform: scale(0.97);
}

.btn svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn--ghost {
  flex: 1;
  color: var(--gold-light);
  background: rgba(7, 59, 40, 0.5);
}

.btn--gold {
  color: var(--emerald-900);
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  border-color: transparent;
}

.btn--danger {
  color: #fff;
  background: rgba(224, 104, 95, 0.16);
  border-color: rgba(224, 104, 95, 0.5);
}

.btn--block {
  width: 100%;
}

/* ---------- Progress bar (global) ---------- */

.progress {
  padding: 0 16px 12px;
}

.progress__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 11.5px;
  color: var(--ink-dim);
  margin-bottom: 6px;
  letter-spacing: 0.03em;
}

.progress__meta b {
  color: var(--gold-light);
  font-size: 13px;
}

.progress__track {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
}

.progress__fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--emerald-600), var(--gold));
  transition: width 0.45s var(--ease);
}

/* ---------- Yasin ---------- */

.scroll-area {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 0 16px 28px;
}

.surah-head {
  text-align: center;
  padding: 6px 10px 20px;
}

.surah-head__bismillah {
  font-family: 'Amiri', serif;
  font-size: calc(var(--ar-size) * 1.02);
  color: #fffaf0;
  direction: rtl;
  line-height: 2;
}

.surah-head__name {
  margin-top: 4px;
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}

.ayat {
  position: relative;
  padding: 14px 15px;
  margin-bottom: 10px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  background: rgba(7, 52, 37, 0.55);
}

.ayat__no {
  position: absolute;
  top: 10px;
  left: 12px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--gold);
  opacity: 0.8;
}

.ayat__ar {
  font-family: 'Amiri', serif;
  font-size: var(--ar-size);
  line-height: 2.08;
  text-align: right;
  direction: rtl;
  color: #fdfaf1;
  padding-top: 6px;
}

.ayat__latin {
  margin-top: 8px;
  font-size: 12px;
  font-style: italic;
  line-height: 1.6;
  color: rgba(212, 175, 55, 0.78);
}

.ayat__id {
  margin-top: 6px;
  font-size: 12.8px;
  line-height: 1.6;
  color: var(--ink-dim);
}

.ayat--amal {
  border-color: rgba(212, 175, 55, 0.42);
  background:
    linear-gradient(160deg, rgba(212, 175, 55, 0.09), rgba(7, 52, 37, 0.72)),
    rgba(7, 52, 37, 0.72);
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.08), var(--shadow);
}

.ayat--amal .ayat__ar {
  font-size: calc(var(--ar-size) * 1.08);
}

.ayat--done {
  border-color: rgba(120, 200, 150, 0.35);
}

/* Amalan counter */

.amal {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px dashed var(--gold-line);
}

.amal__head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.amal__head span:last-child {
  margin-left: auto;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--ink-dim);
  font-size: 11.5px;
}

.amal__value {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  margin: 8px 0 4px;
  font-variant-numeric: tabular-nums;
}

.amal__now {
  font-size: 38px;
  font-weight: 700;
  color: var(--cream);
  line-height: 1;
}

.amal__of {
  font-size: 15px;
  color: var(--ink-faint);
}

.amal__tap {
  position: relative;
  display: grid;
  place-items: center;
  gap: 2px;
  width: 100%;
  min-height: 84px;
  margin-top: 8px;
  border-radius: 16px;
  border: 1px solid rgba(212, 175, 55, 0.4);
  background: radial-gradient(circle at 50% 120%, rgba(212, 175, 55, 0.22), rgba(20, 101, 76, 0.42));
  color: var(--cream);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  user-select: none;
  transition: min-height 0.4s var(--ease), background 0.25s;
}

.amal.is-active .amal__tap {
  min-height: 128px;
  background: radial-gradient(circle at 50% 120%, rgba(212, 175, 55, 0.3), rgba(20, 101, 76, 0.55));
}

.amal__tap:active {
  background: radial-gradient(circle at 50% 120%, rgba(212, 175, 55, 0.42), rgba(20, 101, 76, 0.7));
}

.amal__tap small {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.amal__tap.bump .amal__now,
.amal__now.bump {
  animation: bump 0.24s var(--ease);
}

@keyframes bump {
  0% { transform: scale(1); }
  45% { transform: scale(1.16); }
  100% { transform: scale(1); }
}

.amal__actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.amal__actions .btn {
  flex: 1;
  padding: 10px 12px;
  font-size: 12px;
}

.amal__done {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 12.5px;
  color: #b8e6c8;
}

.ayat--done .amal__done {
  display: flex;
}

.ayat--done .amal__tap {
  display: none;
}

.ayat--done .amal__actions .btn--undo {
  display: none;
}

.check-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(120, 200, 150, 0.18);
  border: 1px solid rgba(120, 200, 150, 0.5);
  color: #b8e6c8;
  font-size: 10px;
}

/* ---------- Dzikir ---------- */

.tabs {
  display: flex;
  gap: 6px;
  margin: 0 16px 14px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--gold-faint);
  background: rgba(5, 38, 26, 0.6);
}

.tab {
  flex: 1;
  padding: 9px 8px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-dim);
  transition: color 0.2s, background 0.2s;
}

.tab.is-active {
  color: var(--emerald-900);
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
}

.dz-text {
  margin: 0 16px 0;
  padding: 14px 15px;
  border-radius: var(--radius);
  border: 1px solid var(--gold-line);
  background: linear-gradient(160deg, rgba(20, 101, 76, 0.35), rgba(6, 45, 31, 0.8));
}

.dz-text__ar {
  font-family: 'Amiri', serif;
  font-size: calc(var(--ar-size) * 0.96);
  line-height: 1.85;
  text-align: right;
  direction: rtl;
  color: #fdfaf1;
}

.dz-text__latin {
  margin-top: 8px;
  font-size: 12px;
  font-style: italic;
  line-height: 1.6;
  color: rgba(212, 175, 55, 0.8);
}

.dz-text__id {
  margin-top: 8px;
  font-size: 12.6px;
  line-height: 1.62;
  color: var(--ink-dim);
}

.dz-text details {
  margin-top: 8px;
  border-top: 1px dashed var(--gold-line);
  padding-top: 6px;
}

.dz-text summary {
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  cursor: pointer;
}

.dz-text details p,
.dz-text details li {
  font-size: 12.4px;
  line-height: 1.6;
  color: var(--ink-dim);
}

.dz-text details ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.dz-text details p {
  margin-top: 8px;
}

.dz-counter {
  position: -webkit-sticky;
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin-top: 10px;
  padding: 10px 16px calc(10px + var(--safe-bottom));
  border-top: 1px solid var(--gold-faint);
  background: linear-gradient(to top, #05261a 0%, #062d1f 46%, #063021 100%);
  box-shadow: 0 -14px 24px -18px rgba(0, 0, 0, 0.9);
}

.dz-tap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 100%;
  min-height: 108px;
  padding: 11px;
  border-radius: 18px;
  border: 1px solid rgba(212, 175, 55, 0.42);
  background: radial-gradient(circle at 50% 130%, rgba(212, 175, 55, 0.26), rgba(20, 101, 76, 0.42) 62%);
  color: var(--cream);
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.14s var(--ease), background 0.22s;
}

.dz-tap:active {
  transform: scale(0.988);
  background: radial-gradient(circle at 50% 130%, rgba(212, 175, 55, 0.42), rgba(20, 101, 76, 0.62) 62%);
}

.dz-tap__count {
  font-size: clamp(34px, 11.5vw, 46px);
  font-weight: 700;
  line-height: 1.02;
  font-variant-numeric: tabular-nums;
  color: #fffaf0;
}

.dz-tap__count.bump {
  animation: bump 0.24s var(--ease);
}

.dz-tap__target {
  font-size: 13px;
  color: var(--ink-dim);
  letter-spacing: 0.03em;
}

.dz-tap__pct {
  margin-top: 2px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

.dz-tap__hint {
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.dz-progress {
  height: 6px;
  margin-top: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
}

.dz-progress i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--emerald-600), var(--gold));
  transition: width 0.4s var(--ease);
}

.chips {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  min-width: 56px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--gold-light);
  border: 1px solid var(--gold-line);
  background: rgba(7, 59, 40, 0.6);
  transition: transform 0.15s var(--ease), background 0.2s;
}

.chip:active {
  transform: scale(0.94);
  background: rgba(20, 101, 76, 0.8);
}

.dz-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 2px 14px;
  margin-top: 6px;
}

.dz-meta {
  display: flex;
  justify-content: center;
  gap: 12px;
  font-size: 11.5px;
  color: var(--ink-faint);
}

.dz-meta b {
  color: var(--ink-dim);
  font-weight: 600;
}

.dz-links {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.link-btn {
  font-size: 11.5px;
  color: var(--gold);
  text-decoration: underline;
  text-decoration-color: var(--gold-line);
  text-underline-offset: 3px;
}

/* ---------- Sheet / modal ---------- */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(2, 16, 11, 0.62);
  backdrop-filter: blur(3px);
  animation: fadeIn 0.2s linear;
}

.backdrop--center {
  align-items: center;
  padding: 20px;
}

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

.sheet {
  width: 100%;
  max-width: 520px;
  max-height: 88dvh;
  overflow-y: auto;
  padding: 18px 18px calc(20px + var(--safe-bottom));
  border-radius: 24px 24px 0 0;
  border: 1px solid var(--gold-line);
  border-bottom: 0;
  background: linear-gradient(180deg, #0a4532, #052e1f);
  animation: sheetUp 0.28s var(--ease);
}

.backdrop--center .sheet {
  border-radius: 24px;
  border-bottom: 1px solid var(--gold-line);
  animation: popIn 0.24s var(--ease);
}

@keyframes sheetUp {
  from { transform: translateY(100%); }
  to { transform: none; }
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: none; }
}

.sheet__grip {
  width: 44px;
  height: 4px;
  border-radius: 99px;
  margin: 0 auto 14px;
  background: rgba(255, 255, 255, 0.18);
}

.sheet__title {
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--cream);
}

.sheet__desc {
  margin-top: 6px;
  font-size: 12.6px;
  line-height: 1.6;
  color: var(--ink-dim);
}

.sheet__body {
  margin-top: 14px;
}

.sheet__actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.sheet__actions .btn {
  flex: 1;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.field label {
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
}

.field input[type='number'],
.field input[type='text'] {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--gold-line);
  background: rgba(5, 38, 26, 0.7);
  color: var(--cream);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.field input:focus {
  outline: 2px solid rgba(212, 175, 55, 0.4);
  outline-offset: 1px;
}

.field input[type='range'] {
  width: 100%;
  accent-color: var(--gold);
}

.field__hint {
  font-size: 11.5px;
  color: var(--ink-faint);
  line-height: 1.5;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13.5px;
}

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

.switch {
  position: relative;
  width: 46px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  transition: background 0.22s;
}

.switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #dfeee7;
  transition: transform 0.22s var(--ease);
}

.switch.is-on {
  background: rgba(212, 175, 55, 0.85);
}

.switch.is-on::after {
  transform: translateX(20px);
  background: #fff;
}

.qris {
  display: block;
  width: 100%;
  max-width: 260px;
  margin: 4px auto 0;
  border-radius: 16px;
  background: #fff;
  padding: 10px;
}

.qris-missing {
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 26px 18px;
  border-radius: 16px;
  border: 1px dashed var(--gold-line);
  text-align: center;
  font-size: 12.4px;
  color: var(--ink-dim);
}

.celebration {
  text-align: center;
}

.celebration__mark {
  width: 68px;
  height: 68px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold-line);
  background: radial-gradient(circle, rgba(212, 175, 55, 0.2), transparent 70%);
}

.celebration__mark svg {
  width: 32px;
  height: 32px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.celebration__title {
  font-family: 'Amiri', serif;
  font-size: 24px;
  color: var(--cream);
}

.celebration__text {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-dim);
}

.celebration__doa {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--gold-faint);
  background: rgba(5, 38, 26, 0.6);
  font-family: 'Amiri', serif;
  font-size: 20px;
  line-height: 1.9;
  direction: rtl;
  color: #fffaf0;
}

.steps {
  margin: 10px 0 0;
  padding-left: 20px;
  font-size: 13px;
  line-height: 1.85;
  color: var(--ink);
}

.steps li::marker {
  color: var(--gold);
  font-weight: 700;
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(22px + var(--safe-bottom));
  z-index: 90;
  transform: translate(-50%, 20px);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--emerald-900);
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.8);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s, transform 0.22s var(--ease);
}

.toast.is-shown {
  opacity: 1;
  transform: translate(-50%, 0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Layout helpers ---------- */

.home__top {
  position: relative;
  display: flex;
  justify-content: center;
}

.home__settings {
  position: absolute;
  top: 4px;
  right: 0;
}

.menu-card__title,
.menu-card__desc,
.menu-card__progress {
  display: block;
}

.surah-tail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 26px 8px 30px;
  text-align: center;
}

.surah-tail__doa {
  font-family: 'Amiri', serif;
  font-size: calc(var(--ar-size) * 0.94);
  line-height: 2;
  color: #fffaf0;
}

.surah-tail__text {
  font-size: 12.4px;
  line-height: 1.65;
  color: var(--ink-faint);
  max-width: 34ch;
}

.dz-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0;
}

/* ---------- Bacaan pembuka di halaman amalan ---------- */

.pembuka {
  margin: 0 0 6px;
}

.pembuka__wrap {
  border-radius: var(--radius);
  border: 1px solid var(--gold-line);
  background: linear-gradient(160deg, rgba(20, 101, 76, 0.3), rgba(6, 45, 31, 0.78));
  overflow: hidden;
}

.pembuka__wrap > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 15px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  cursor: pointer;
  list-style: none;
}

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

.pembuka__wrap > summary em {
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: none;
  color: var(--ink-faint);
}

.pembuka__wrap[open] > summary {
  border-bottom: 1px dashed var(--gold-line);
}

.pembuka__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 15px 15px;
}

.pembuka__item {
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(5, 38, 26, 0.5);
}

.pembuka__item--lipat {
  padding: 0;
}

.pembuka__item--lipat > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--gold-light);
  cursor: pointer;
  list-style: none;
}

.pembuka__item--lipat > summary::-webkit-details-marker {
  display: none;
}

.pembuka__item--lipat > summary em {
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}

.pembuka__item--lipat[open] > summary {
  border-bottom: 1px dashed var(--gold-line);
}

.pembuka__item--lipat > p {
  padding: 0 12px;
}

.pembuka__item--lipat > p:last-child {
  padding-bottom: 12px;
}

.pembuka__title {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--gold-light);
}

.pembuka__ar {
  margin-top: 6px;
  font-family: 'Amiri', serif;
  font-size: calc(var(--ar-size) * 0.92);
  line-height: 1.9;
  text-align: right;
  direction: rtl;
  color: #fffaf0;
  white-space: pre-line;
}

.pembuka__latin {
  margin-top: 6px;
  font-size: 12px;
  font-style: italic;
  line-height: 1.55;
  color: rgba(212, 175, 55, 0.8);
  white-space: pre-line;
}

.pembuka__id {
  margin-top: 5px;
  font-size: 12.3px;
  line-height: 1.58;
  color: var(--ink-dim);
}

.pembuka__src {
  margin-top: 4px;
  font-size: 11px;
  font-style: italic;
  color: var(--ink-faint);
}

/* ---------- Ayat 1000 Dinar (multi langkah) ---------- */

.step-tabs {
  display: flex;
  gap: 6px;
  margin: 0 16px 12px;
  padding: 4px;
  border-radius: 14px;
  border: 1px solid var(--gold-faint);
  background: rgba(5, 38, 26, 0.6);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.step-tabs::-webkit-scrollbar {
  display: none;
}

.step-tab {
  flex: 1 0 auto;
  min-width: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 9px;
  border-radius: 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-dim);
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}

.step-tab__no {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-faint);
  background: rgba(255, 255, 255, 0.08);
}

.step-tab.is-done .step-tab__no {
  color: #b8e6c8;
  background: rgba(120, 200, 150, 0.22);
}

.step-tab.is-active {
  color: var(--emerald-900);
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
}

.step-tab.is-active .step-tab__no {
  color: var(--emerald-900);
  background: rgba(5, 38, 26, 0.18);
}

.dinar-step {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 6px;
}

.dinar-step__title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 17px;
  font-weight: 700;
  color: var(--cream);
}

.dinar-step__no {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  color: var(--emerald-900);
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
}

.dinar-step__desc {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-dim);
}

.dinar-bacaan {
  padding: 15px;
  border-radius: var(--radius);
  border: 1px solid var(--gold-line);
  background: linear-gradient(160deg, rgba(20, 101, 76, 0.32), rgba(6, 45, 31, 0.82));
}

.dinar-bacaan__ar {
  font-family: 'Amiri', serif;
  font-size: calc(var(--ar-size) * 0.98);
  line-height: 1.95;
  text-align: right;
  direction: rtl;
  color: #fdfaf1;
}

.dinar-bacaan__latin {
  margin-top: 9px;
  font-size: 12.2px;
  font-style: italic;
  line-height: 1.6;
  color: rgba(212, 175, 55, 0.8);
}

.dinar-bacaan__id {
  margin-top: 7px;
  font-size: 12.6px;
  line-height: 1.62;
  color: var(--ink-dim);
}

.dinar-bacaan__note {
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px dashed var(--gold-line);
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--ink-faint);
}

.dinar-more {
  border-radius: 12px;
  border: 1px solid rgba(212, 175, 55, 0.2);
  background: rgba(5, 38, 26, 0.5);
}

.dinar-more > summary {
  padding: 10px 13px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--gold);
  cursor: pointer;
  list-style: none;
}

.dinar-more > summary::-webkit-details-marker {
  display: none;
}

.dinar-more__item {
  padding: 0 13px 12px;
}

.dinar-more__no {
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.dinar-more__ar {
  margin-top: 2px;
  font-size: calc(var(--ar-size) * 0.82);
  line-height: 1.9;
}

.dinar-counter,
.dinar-doa {
  padding: 0;
}

.dinar-target {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 10px 13px;
  border-radius: 12px;
  border: 1px solid var(--gold-faint);
  background: rgba(5, 38, 26, 0.5);
  font-size: 12.5px;
  color: var(--ink-dim);
}

.dinar-target select {
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid var(--gold-line);
  background: rgba(5, 38, 26, 0.9);
  color: var(--cream);
  font-size: 13px;
  font-weight: 600;
}

.dinar-links {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

.dinar-doa__hint {
  margin-bottom: 10px;
  font-size: 12.4px;
  line-height: 1.6;
  color: var(--ink-faint);
  text-align: center;
}

.step-nav {
  display: flex;
  gap: 10px;
  padding: 10px 16px calc(10px + var(--safe-bottom));
  border-top: 1px solid var(--gold-faint);
  background: linear-gradient(to top, #05261a 0%, #062d1f 60%, #063021 100%);
}

.step-nav .btn {
  flex: 1;
  padding: 12px 10px;
  font-size: 13px;
}

.step-nav .btn:disabled {
  opacity: 0.38;
  pointer-events: none;
}

/* ---------- Panduan (tata cara) ---------- */

.guide__intro {
  margin-bottom: 14px;
  font-size: 12.8px;
  line-height: 1.62;
  color: var(--ink-dim);
}

.guide {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.guide__step {
  padding: 13px 14px;
  border-radius: 16px;
  border: 1px solid rgba(212, 175, 55, 0.22);
  background: rgba(7, 52, 37, 0.55);
}

.guide__step-title {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--cream);
}

.guide__num {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--emerald-900);
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
}

.guide__list {
  margin: 8px 0 0;
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.8px;
  line-height: 1.6;
  color: var(--ink-dim);
}

.guide__list li {
  position: relative;
  padding-left: 14px;
}

.guide__list li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.7;
}

.guide__list li.is-sub {
  margin-left: 8px;
  padding-left: 16px;
  color: var(--ink-faint);
}

.guide__list li.is-sub::before {
  left: 4px;
  top: 7px;
  width: 4px;
  height: 4px;
  border-radius: 1px;
  background: rgba(212, 175, 55, 0.55);
}

.guide__more {
  margin-top: 10px;
  border-top: 1px dashed var(--gold-line);
  padding-top: 8px;
}

.guide__more summary {
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  cursor: pointer;
}

.guide__ar {
  margin-top: 8px;
  font-family: 'Amiri', serif;
  font-size: 21px;
  line-height: 1.95;
  direction: rtl;
  text-align: right;
  color: #fffaf0;
  white-space: pre-line;
}

.guide__latin {
  margin-top: 6px;
  font-size: 12px;
  font-style: italic;
  line-height: 1.6;
  color: rgba(212, 175, 55, 0.8);
  white-space: pre-line;
}

.guide__id {
  margin-top: 6px;
  font-size: 12.2px;
  line-height: 1.6;
  color: var(--ink-dim);
  white-space: pre-line;
}

.guide__bacaan-title {
  margin-top: 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--gold-light);
}

/* ---------- Layar darurat (bila skrip gagal) ---------- */

.boot-error[hidden] {
  display: none !important;
}

.boot-error {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  text-align: center;
  background: #05261a;
  color: var(--ink);
}

.boot-error h2 {
  font-size: 17px;
  color: var(--cream);
}

.boot-error p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-dim);
  max-width: 32ch;
}

.boot-error button {
  margin-top: 6px;
  padding: 11px 22px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--emerald-900);
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
}

@media (min-width: 560px) {
  body::before,
  body::after {
    background-attachment: fixed;
  }

  #view-home .home {
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
  }

  .app {
    max-width: 520px;
    margin: 0 auto;
    border-left: 1px solid var(--gold-faint);
    border-right: 1px solid var(--gold-faint);
    box-shadow: 0 0 60px -20px rgba(0, 0, 0, 0.9);
  }
}

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

@media (min-height: 900px) {
  .quote {
    min-height: 170px;
  }
}
