/* ==========================================================================
   Ruang Ibadah — panel jadwal hari ini, kompas kiblat hidup, tasbih, dan
   pembaca Al-Qur'an. Berkas ini hanya dimuat oleh ibadah.html, jadi warna
   dan ritmenya khusus untuk satu halaman: panel biru tua (navy—biru terang,
   sama seperti halaman lain) untuk data, emas sebagai aksen, dan krem untuk
   mushaf supaya mata tidak lelah saat membaca panjang.
   ========================================================================== */

.ibadah-page {
  --ib-night: #061a2e;
  --ib-deep: #0a2340;
  --ib-blue: #123c63;
  --ib-hair: rgb(255 255 255 / 13%);
  --ib-sky: #cfe2f2;
  --ib-gold: #f2c14e;
  --ib-amber: #e79a35;
  --ib-cream: #fbf7ee;
  --ib-paper: #f4ebd9;
  --ib-cocoa: #3a2c1c;
  --ib-shadow: 0 18px 40px rgb(6 26 46 / 22%);
  --ib-arabic: "Traditional Arabic", "Scheherazade New", "Amiri", "Noto Naskh Arabic", serif;
}

/* ------------------------------------------------------ panel "hari ini" */

.ib-panel {
  position: relative;
  margin: clamp(10px, 2.4vw, 22px) clamp(10px, 2.6vw, 26px) 0;
  padding: clamp(16px, 3.6vw, 26px) clamp(13px, 3.4vw, 24px) clamp(18px, 3.4vw, 26px);
  border-radius: 28px;
  background:
    radial-gradient(120% 80% at 90% -12%, rgb(242 193 78 / 20%), transparent 58%),
    radial-gradient(80% 60% at 4% 0%, rgb(23 109 168 / 28%), transparent 62%),
    linear-gradient(168deg, #14496f 0%, #0a2340 58%, #061a2e 100%);
  color: #f2f8fe;
  box-shadow: var(--ib-shadow);
}

.ib-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 18px;
}

.ib-dates {
  min-width: 0;
}

.ib-panel-head h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.3rem, 5.2vw, 2rem);
  line-height: 1.16;
  letter-spacing: -.03em;
}

.ib-hijri {
  margin: 5px 0 0;
  color: var(--ib-gold);
  font-size: .88rem;
  font-weight: 700;
}

.ib-place {
  min-width: 0;
  text-align: right;
}

.ib-place-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-height: 44px;
  border: 1px solid var(--ib-hair);
  border-radius: 999px;
  padding: 8px 14px;
  background: rgb(255 255 255 / 9%);
  color: #fff;
  font: inherit;
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease;
}

.ib-place-chip:hover {
  border-color: rgb(242 193 78 / 60%);
  background: rgb(255 255 255 / 14%);
}

/* Sedang membaca lokasi: pin berdenyut, teks kota tetap terbaca. */
.ib-place-chip.is-busy {
  border-color: rgb(242 193 78 / 55%);
  cursor: progress;
}

.ib-place-chip.is-busy svg {
  animation: ib-pin-pulse 1s ease-in-out infinite;
  stroke: var(--ib-gold);
}

@keyframes ib-pin-pulse {
  0%, 100% { opacity: 1; transform: translateY(0); }
  50% { opacity: .45; transform: translateY(-2px); }
}

.ib-place-chip:disabled {
  opacity: .85;
}

.ib-place-chip svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--ib-sky);
  stroke-width: 1.8;
}

.ib-place-chip span {
  overflow: hidden;
  max-width: 44vw;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ib-place-chip i {
  font-style: normal;
  color: var(--ib-sky);
}

.ib-place-sub {
  margin: 7px 0 0;
  color: #a9cfe8;
  font-size: .71rem;
}

/* ------------------------------------------------------------ hitung mundur */

.ib-next {
  --ib-next-x: 16px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid rgb(242 193 78 / 34%);
  border-radius: 18px;
  padding: 13px var(--ib-next-x) 17px;
  background: linear-gradient(112deg, rgb(242 193 78 / 17%), rgb(255 255 255 / 5%));
}

.ib-next .eyebrow {
  margin: 0 0 3px;
  color: #bfdcf1;
  font-size: .64rem;
  letter-spacing: .14em;
}

.ib-next b {
  color: #fff;
  font-size: 1.2rem;
  letter-spacing: -.02em;
}

.ib-next-right {
  display: grid;
  justify-items: end;
  gap: 3px;
}

.ib-next-right strong {
  color: var(--ib-gold);
  font-size: clamp(1.45rem, 6.2vw, 1.95rem);
  line-height: 1;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

.ib-next-right small {
  color: #cfe2f2;
  font-size: .69rem;
  text-align: right;
}

/* Rentang waktu sholat berjalan → sholat berikutnya. Lebarnya dihitung
   ibadah.js dari jadwal asli, jadi bar ini tidak pernah menghias angka. */
.ib-next-bar {
  position: absolute;
  right: var(--ib-next-x);
  bottom: 6px;
  left: var(--ib-next-x);
  height: 4px;
  border-radius: 999px;
  background: rgb(255 255 255 / 14%);
}

.ib-next-bar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--ib-gold), #ffe6a8);
  box-shadow: 0 0 10px rgb(242 193 78 / 45%);
  transition: width .5s ease;
}

/* ------------------------------------------------------------------ pencarian */

.ib-search {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
  border: 1px solid var(--ib-hair);
  border-radius: 14px;
  padding: 0 12px;
  background: rgb(255 255 255 / 7%);
  transition: border-color .18s ease, box-shadow .18s ease;
}

.ib-search svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: none;
  stroke: #a9cfe8;
  stroke-width: 1.9;
}

.ib-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 12px 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: .92rem;
}

.ib-search input::placeholder {
  color: #8fbde0;
}

.ib-search input:focus-visible {
  outline: none;
}

.ib-search:focus-within {
  border-color: var(--ib-gold);
  box-shadow: 0 0 0 3px rgb(242 193 78 / 18%);
}

.city-results {
  display: grid;
  gap: 3px;
  margin: 10px 0 0;
  padding: 6px;
  list-style: none;
  border: 1px solid var(--ib-hair);
  border-radius: 14px;
  background: rgb(5 22 40 / 55%);
}

.city-results[hidden] {
  display: none;
}

.city-results button {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
  background: transparent;
  color: #f2f8fe;
  font: inherit;
  font-size: .89rem;
  text-align: left;
  cursor: pointer;
}

.city-results button:hover {
  background: rgb(255 255 255 / 10%);
}

.city-empty {
  padding: 10px 12px;
  color: #a9cfe8;
  font-size: .82rem;
}

.ib-note {
  margin: 10px 2px 0;
  color: #a9cfe8;
  font-size: .75rem;
}

/* ---------------------------------------------------------------- baris waktu */

.ib-rows {
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.ib-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  border: 1px solid rgb(255 255 255 / 9%);
  border-radius: 15px;
  padding: 10px 13px;
  background: rgb(255 255 255 / 5%);
  transition: background .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.ib-dot {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  border: 1.6px solid rgb(255 255 255 / 26%);
  border-radius: 50%;
  color: transparent;
  font-size: .68rem;
  font-weight: 800;
}

.ib-name {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: #eaf4fc;
  font-size: .93rem;
  font-weight: 700;
}

.ib-emoji {
  font-style: normal;
  font-size: 1rem;
}

.ib-time {
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
}

.ib-chip {
  max-width: 46vw;
  overflow: hidden;
  border-radius: 999px;
  padding: 4px 9px;
  background: rgb(255 255 255 / 10%);
  color: #bfdcf1;
  font-size: .66rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ib-row.is-past {
  background: rgb(255 255 255 / 2%);
  border-color: rgb(255 255 255 / 6%);
}

.ib-row.is-past .ib-name,
.ib-row.is-past .ib-time {
  color: #8fb4d6;
}

.ib-row.is-past .ib-dot {
  border-color: var(--ib-gold);
  background: var(--ib-gold);
  color: #0c2a4a;
}

.ib-row.is-next {
  border-color: rgb(242 193 78 / 58%);
  background: linear-gradient(100deg, rgb(242 193 78 / 18%), rgb(255 255 255 / 5%));
  box-shadow: 0 12px 26px rgb(0 0 0 / 22%);
}

.ib-row.is-next .ib-chip {
  background: var(--ib-gold);
  color: #0c2a4a;
}

/* -------------------------------------------------------------------- adzan */

.ib-adzan {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 16px;
  border-top: 1px solid var(--ib-hair);
  padding-top: 14px;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #dcecf9;
  font-size: .84rem;
  font-weight: 700;
  cursor: pointer;
}

.switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.switch-track {
  position: relative;
  display: block;
  width: 46px;
  height: 27px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgb(255 255 255 / 18%);
  transition: background .2s ease;
}

.switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  display: block;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #fff;
  transition: transform .2s ease;
}

.switch input:checked + .switch-track {
  background: var(--ib-gold);
}

.switch input:checked + .switch-track .switch-thumb {
  transform: translateX(19px);
}

.switch input:focus-visible + .switch-track {
  outline: 3px solid #79bfff;
  outline-offset: 3px;
}

.ib-adzan-play {
  min-height: 44px;
  border: 1px solid var(--ib-hair);
  border-radius: 12px;
  padding: 10px 15px;
  background: rgb(255 255 255 / 8%);
  color: #fff;
  font: inherit;
  font-size: .84rem;
  font-weight: 700;
  cursor: pointer;
}

.ib-adzan-play[aria-pressed="true"] {
  border-color: var(--ib-gold);
  background: var(--ib-gold);
  color: #0c2a4a;
}

.ib-adzan-note {
  flex: 1 1 100%;
  margin: 0;
  color: #a9cfe8;
  font-size: .74rem;
}

/* ------------------------------------------------------------------ ubin cepat */

.ib-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.ib-tile {
  display: grid;
  justify-items: center;
  gap: 5px;
  min-height: 92px;
  padding: 12px 8px;
  border: 1px solid var(--ib-hair);
  border-radius: 18px;
  background: linear-gradient(180deg, rgb(255 255 255 / 11%), rgb(255 255 255 / 4%));
  color: #f2f8fe;
  text-align: center;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.ib-tile:hover {
  border-color: rgb(242 193 78 / 55%);
  box-shadow: 0 12px 26px rgb(0 0 0 / 24%);
}

.ib-tile:active {
  transform: scale(.97);
}

.ib-tile-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: rgb(242 193 78 / 16%);
  color: var(--ib-gold);
}

.ib-tile-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.ib-tile b {
  font-size: .78rem;
  line-height: 1.2;
}

.ib-tile small {
  color: #a9cfe8;
  font-size: .65rem;
  line-height: 1.2;
}

/* ----------------------------------------------------------------- kompas */

.qibla-section {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, .95fr);
  align-items: center;
  gap: clamp(22px, 4vw, 54px);
  padding-block: clamp(40px, 6vw, 78px);
}

.qibla-copy h2 {
  color: var(--navy);
}

.qibla-copy p:not(.eyebrow, .qibla-meta) {
  max-width: 560px;
  color: #435268;
}

.qibla-meta {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: .8rem;
}

.qibla-steps {
  display: grid;
  gap: 9px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.qibla-steps li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #435268;
  font-size: .86rem;
}

.qibla-steps b {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--ib-blue);
  color: #fff;
  font-size: .7rem;
}

.compass-card {
  display: grid;
  justify-items: center;
  gap: 12px;
  border-radius: 28px;
  padding: clamp(16px, 3vw, 26px);
  background: linear-gradient(168deg, #14496f, #061a2e);
  box-shadow: var(--ib-shadow);
  transition: box-shadow .25s ease;
}

.compass-stage {
  position: relative;
  width: min(320px, 76vw);
}

.qibla-compass {
  display: block;
  width: 100%;
  height: auto;
}

.cs-face {
  fill: url(#csFace);
}

.cs-ring {
  fill: none;
  stroke: rgb(255 255 255 / 15%);
  stroke-width: 1.5;
  transition: stroke .25s ease, stroke-width .25s ease;
}

.cs-ticks line {
  stroke: rgb(255 255 255 / 24%);
  stroke-width: 1;
}

.cs-ticks line.is-major {
  stroke: rgb(255 255 255 / 46%);
  stroke-width: 1.7;
}

.cs-cardinal text {
  fill: #d7e9f7;
  font-family: Inter, 'Segoe UI', sans-serif;
  font-size: 13px;
  font-weight: 800;
  text-anchor: middle;
}

#qiblaRose {
  transform-box: view-box;
  transform-origin: 110px 110px;
  transition: transform .14s linear;
}

#qiblaMark {
  transform-box: view-box;
  transform-origin: 110px 110px;
}

.cs-ray {
  stroke: var(--ib-gold);
  stroke-width: 3;
  stroke-linecap: round;
}

.cs-kaaba rect {
  fill: #0d0d0d;
  stroke: var(--ib-gold);
  stroke-width: 1.4;
}

.cs-kaaba .cs-band {
  stroke: var(--ib-gold);
  stroke-width: 2.6;
  fill: none;
}

.cs-top {
  fill: #fff;
}

.cs-hub {
  fill: var(--ib-night);
  stroke: rgb(255 255 255 / 38%);
  stroke-width: 1.5;
}

.compass-read {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 2px;
  text-align: center;
  pointer-events: none;
}

.compass-read strong {
  color: #fff;
  font-size: 1.55rem;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

.compass-read span {
  max-width: 60%;
  color: var(--ib-sky);
  font-size: .7rem;
}

.compass-status {
  min-height: 2.5em;
  margin: 0;
  color: #d7e9f7;
  font-size: .8rem;
  text-align: center;
}

.compass-card.is-live .cs-ring {
  stroke: rgb(255 255 255 / 30%);
}

.compass-card.is-aligned {
  box-shadow: 0 0 0 3px rgb(242 193 78 / 45%), var(--ib-shadow);
}

.compass-card.is-aligned .cs-ring {
  stroke: var(--ib-gold);
  stroke-width: 3;
}

.compass-card.is-aligned .compass-status {
  color: var(--ib-gold);
  font-weight: 700;
}

.qibla-manual {
  display: grid;
  gap: 6px;
  width: 100%;
  color: #d7e9f7;
  font-size: .76rem;
}

.qibla-manual[hidden] {
  display: none;
}

.qibla-manual input {
  width: 100%;
}

/* ------------------------------------------------------------------ tasbih */

.tasbih-section {
  padding-block: clamp(30px, 5vw, 62px);
}

.tasbih-card {
  display: grid;
  gap: 14px;
  max-width: 520px;
  margin: auto;
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: clamp(16px, 4vw, 26px);
  background: linear-gradient(180deg, #fff, #f5fafd);
  box-shadow: 0 18px 40px rgb(16 43 73 / 8%);
}

.tasbih-head h2 {
  margin: 0;
  color: var(--navy);
  font-size: 1.28rem;
  letter-spacing: -.03em;
}

.tasbih-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dhikr-chip {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  background: #fff;
  color: var(--navy);
  font: inherit;
  font-size: .79rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.dhikr-chip[aria-pressed="true"] {
  border-color: var(--ib-blue);
  background: var(--ib-blue);
  color: #fff;
}

.tasbih-count {
  display: grid;
  width: min(268px, 74vw);
  aspect-ratio: 1;
  place-content: center;
  justify-items: center;
  gap: 3px;
  margin: 4px auto 0;
  border: 2px solid rgb(23 109 168 / 45%);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, #e8f3fd, #fff 70%);
  color: var(--navy);
  font: inherit;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .2s ease, border-color .2s ease;
}

.tasbih-count:active {
  transform: scale(.965);
}

.tasbih-count.is-goal {
  border-color: var(--ib-blue);
  box-shadow: 0 0 0 6px rgb(23 109 168 / 12%);
}

.tasbih-arab {
  color: #14496f;
  font-family: var(--ib-arabic);
  font-size: 1.45rem;
  line-height: 1.9;
}

.tasbih-count strong {
  color: var(--ib-blue);
  font-size: 2.5rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.tasbih-count small {
  color: #4d5f70;
  font-size: .78rem;
}

.tasbih-meaning {
  color: var(--muted);
  font-size: .72rem;
}

.tasbih-target {
  margin-top: 2px;
  color: var(--blue);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .04em;
}

.tasbih-foot {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tasbih-progress {
  flex: 1;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eff6;
}

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

.tasbih-reset {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 8px 14px;
  background: #fff;
  color: var(--navy);
  font: inherit;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
}

.tasbih-note {
  margin: 0;
  color: var(--muted);
  font-size: .76rem;
}

/* -------------------------------------------------------------- daftar surat */

.quran-section {
  padding-block: clamp(34px, 5vw, 72px);
}

.quran-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  max-width: 780px;
  margin-bottom: 22px;
}

.quran-bar h2 {
  color: var(--navy);
}

.quran-bar p:not(.eyebrow) {
  color: var(--muted);
}

.quran-layout {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.surah-panel {
  position: sticky;
  top: 96px;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 12px;
  background: #fff;
  box-shadow: 0 16px 36px rgb(16 43 73 / 7%);
}

.surah-panel input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 11px 13px;
  background: #f7fbfe;
  color: var(--ink);
  font: inherit;
  font-size: .92rem;
}

.surah-panel input:focus-visible {
  outline: none;
  border-color: var(--ib-blue);
  box-shadow: 0 0 0 3px rgb(23 109 168 / 15%);
}

.surah-list {
  display: grid;
  gap: 7px;
  max-height: min(66vh, 640px);
  margin: 11px 0 0;
  padding: 2px;
  overflow: auto;
  overscroll-behavior: contain;
  list-style: none;
  scrollbar-width: thin;
}

.surah-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  border: 1px solid #eef2f6;
  border-radius: 15px;
  padding: 9px 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.surah-item:hover {
  border-color: #c6dbef;
  background: #f7fafd;
}

.surah-item:active {
  transform: scale(.99);
}

.surah-item[aria-current="true"] {
  border-color: var(--ib-blue);
  background: #f1f7fd;
  box-shadow: inset 3px 0 0 var(--ib-blue);
}

.surah-no {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  background: #f2f6fa;
  color: var(--ib-blue);
  font-size: .79rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.surah-name {
  display: grid;
  min-width: 0;
}

.surah-name b {
  overflow: hidden;
  color: var(--ink);
  font-size: .92rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.surah-name small {
  overflow: hidden;
  color: var(--muted);
  font-size: .71rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.surah-ayah {
  color: var(--muted);
  font-size: .68rem;
  font-weight: 700;
  white-space: nowrap;
}

.surah-empty {
  padding: 10px 12px;
  color: var(--muted);
  font-size: .86rem;
}

/* ------------------------------------------------------------- pembaca mushaf */

.quran-reader,
.quran-sheet {
  background: var(--ib-cream);
  color: var(--ib-cocoa);
}

.quran-reader {
  min-height: 320px;
  border: 1px solid #e6dcc4;
  border-radius: 22px;
  padding: clamp(14px, 3vw, 26px);
}

.quran-reader .muted {
  color: #7d6a4d;
}

.reader-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  border-bottom: 1px solid #e3d8bf;
  padding-bottom: 14px;
}

.reader-head h3 {
  margin: 0;
  color: #12314f;
  font-size: 1.3rem;
}

.reader-head p {
  margin: 2px 0 0;
  color: #7d6a4d;
  font-size: .79rem;
}

/* Bingkai surat: nama Latin + arti, dituliskan seperti kepala halaman mushaf. */
.sheet-cover {
  margin: 4px 0 18px;
  border: 1px solid #e0d3b3;
  border-radius: 18px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #fffaf0, var(--ib-paper));
  text-align: center;
}

.sheet-cover b {
  display: block;
  color: #123a5e;
  font-size: 1.22rem;
  letter-spacing: -.01em;
}

.sheet-cover small {
  display: block;
  margin-top: 3px;
  color: #7a6134;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.basmalah {
  margin: 2px auto 16px;
  border: 1px solid rgb(16 48 82 / 16%);
  border-radius: 14px;
  padding: 9px 14px;
  background: linear-gradient(rgb(255 255 255 / 62%), rgb(244 235 217 / 42%));
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 55%);
  color: #10304e;
  font-family: var(--ib-arabic);
  font-size: var(--quran-basmalah-size, clamp(1.45rem, 4.4vw, 1.75rem));
  line-height: 2.2;
  text-align: center;
}

.ayah {
  border-bottom: 1px dashed #ded2b6;
  padding: 16px 0;
}

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

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

.ayah-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 12px;
  background: #ece0c6;
  color: #5b4a2e;
  font-size: .72rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.ayah-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid #d9cbab;
  border-radius: 999px;
  padding: 6px 13px;
  background: #fff;
  color: #12314f;
  font: inherit;
  font-size: .74rem;
  font-weight: 800;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.ayah-play:hover {
  border-color: #b9a87f;
  background: #fffaf0;
}

.ayah-play.is-playing {
  border-color: var(--ib-blue);
  background: var(--ib-blue);
  color: #fff;
}

.ayah-arab {
  margin: 0 0 10px;
  color: #10304e;
  font-family: var(--ib-arabic);
  font-size: var(--quran-arabic-size, clamp(1.5rem, 4.6vw, 1.95rem));
  line-height: 2.35;
  text-align: right;
}

.ayah-medallion {
  display: inline-grid;
  min-width: 32px;
  height: 32px;
  margin-inline-start: 8px;
  place-items: center;
  border: 1.5px solid #c9b98f;
  border-radius: 50%;
  background: #fffdf7;
  color: #8a6c25;
  font-family: Inter, 'Segoe UI', sans-serif;
  font-size: .74rem;
  font-weight: 700;
  vertical-align: middle;
}

.ayah-text {
  margin: 0;
  color: #4a3a25;
  font-size: var(--quran-translation-size, .93rem);
}

/* Cara baca Latin ditaruh di antara mushaf dan terjemahan, persis urutan
   yang dipakai buku panduan sholat: Arab — Latin — arti. */
.ayah-latin {
  margin: 9px 0 0;
  color: #1d5f96;
  font-size: calc(var(--quran-translation-size, .93rem) * .95);
  font-style: italic;
  line-height: 1.8;
}

.ayah-tafsir {
  margin-top: 10px;
  color: #5b4a2e;
  font-size: var(--quran-tafsir-size, .85rem);
}

.ayah-tafsir summary {
  color: #7a6134;
  font-weight: 700;
  cursor: pointer;
}

.reader-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
  border-top: 1px dashed #ded2b6;
  padding-top: 14px;
}

.reader-pager button {
  min-height: 44px;
  border: 1px solid #d9cbab;
  border-radius: 12px;
  padding: 9px 14px;
  background: #fff;
  color: #3a2c1c;
  font: inherit;
  font-size: .79rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.reader-pager button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.reader-pager button:not(:disabled):hover {
  border-color: var(--ib-blue);
  background: #f1f7fd;
}

.reader-pages {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.reader-pages button {
  min-width: 44px;
  padding: 9px 11px;
}

.reader-pages button.is-current {
  border-color: var(--ib-blue);
  background: var(--ib-blue);
  color: #fff;
}

.resume-card {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 26px 18px;
  text-align: center;
}

.resume-card b {
  color: #12314f;
  font-size: 1.3rem;
}

.resume-card small {
  color: #7d6a4d;
  font-size: .8rem;
}

.resume-card .button {
  margin-top: 10px;
}

/* ------------------------------------------------------------- layar penuh */

.quran-sheet {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  visibility: hidden;
  transform: translateY(100%);
  transition: transform .3s cubic-bezier(.22, .61, .36, 1), visibility .3s;
}

.quran-sheet.is-open {
  visibility: visible;
  transform: none;
}

.quran-sheet-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(env(safe-area-inset-top) + 8px) 12px 10px;
  background: linear-gradient(120deg, #14496f, #061a2e);
  color: #fff;
}

.quran-sheet-back {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: 50%;
  background: rgb(255 255 255 / 10%);
  color: #fff;
  font: inherit;
  font-size: 1.1rem;
  cursor: pointer;
}

.quran-sheet-back:active {
  transform: scale(.94);
}

.quran-sheet-title {
  flex: 1;
  min-width: 0;
  display: grid;
}

.quran-sheet-title b {
  overflow: hidden;
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quran-sheet-title small {
  overflow: hidden;
  color: var(--ib-sky);
  font-size: .69rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quran-sheet-audio {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: 50%;
  background: rgb(255 255 255 / 10%);
  color: #fff;
  cursor: pointer;
  transition: transform .16s ease, background .2s ease, color .2s ease;
}

.quran-sheet-tools {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
}

.quran-text-adjust {
  display: grid;
  width: 36px;
  height: 40px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: 12px;
  background: rgb(255 255 255 / 10%);
  color: #fff;
  font: inherit;
  font-size: .78rem;
  font-weight: 800;
  cursor: pointer;
}

.quran-text-adjust:active {
  transform: scale(.94);
}

/* Tombol Latin tinggal di dua tempat: bilah halaman yang terang dan baris
   alat sheet yang gelap, jadi warna aktifnya didefinisikan dua kali. */
.quran-latin-toggle {
  flex: 0 0 auto;
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font: inherit;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.quran-latin-toggle.is-aktif {
  border-color: var(--ib-blue);
  background: var(--ib-blue);
  color: #fff;
}

.quran-sheet-tools .quran-latin-toggle {
  height: 40px;
  padding: 0 12px;
  border-color: rgb(255 255 255 / 22%);
  background: rgb(255 255 255 / 10%);
  color: #fff;
}

.quran-sheet-tools .quran-latin-toggle.is-aktif {
  border-color: #fff;
  background: #fff;
  color: var(--navy);
}

.quran-sheet-audio svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.quran-sheet-audio:active {
  transform: scale(.94);
}

.quran-sheet-audio.is-audio-on {
  border-color: var(--ib-gold);
  background: linear-gradient(135deg, var(--ib-gold), var(--ib-amber));
  color: #0c2a4a;
  animation: qp-pulse 2.4s ease-out infinite;
}

.quran-sheet-body {
  flex: 1 1 auto;
  padding: 16px clamp(14px, 4.4vw, 26px) 22px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.quran-sheet-foot {
  flex: 0 0 auto;
  border-top: 1px solid #e3d8bf;
  padding: 8px clamp(12px, 4vw, 22px) calc(env(safe-area-inset-bottom) + 8px);
  background: var(--ib-cream);
}

.quran-sheet-foot .reader-pager {
  margin: 0;
  border: 0;
  padding: 0;
}

/* ---------- pemutar murattal: kartu melayang di dasar pembaca ---------- */

.quran-player-host {
  flex: 0 0 auto;
  padding: 0 clamp(12px, 4vw, 22px) 10px;
  background: linear-gradient(180deg, rgb(251 247 238 / 0%), var(--ib-cream) 42%);
}

.quran-player {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  border: 1px solid #e5d9bd;
  border-radius: 18px;
  padding: 8px 10px;
  background: linear-gradient(180deg, #fffdf6, #fff);
  box-shadow: 0 14px 30px rgb(58 44 28 / 16%);
}

.quran-player[hidden] {
  display: none;
}

.quran-reader .quran-player {
  margin: 2px 0 16px;
}

.qp-toggle {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #14496f, #176da8);
  color: #fff;
  font: inherit;
  font-size: .78rem;
  letter-spacing: -.08em;
  cursor: pointer;
  box-shadow: 0 8px 18px rgb(20 73 111 / 24%);
  transition: transform .16s ease, box-shadow .16s ease;
}

.qp-toggle:active {
  transform: scale(.94);
}

.qp-toggle.is-live {
  box-shadow: 0 10px 24px rgb(231 154 53 / 40%);
}

.qp-main {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.qp-label {
  overflow: hidden;
  margin: 0;
  color: #12314f;
  font-size: .74rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qp-seek {
  position: relative;
  height: 22px;
}

.qp-seek::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 5px;
  border-radius: 999px;
  background: #e7dcc2;
  transform: translateY(-50%);
}

.qp-seek i {
  position: absolute;
  top: 50%;
  left: 0;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, #14496f, var(--ib-gold));
  transform: translateY(-50%);
}

.qp-seek input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.qp-seek:has(input:focus-visible) {
  outline: 3px solid #79bfff;
  outline-offset: 2px;
  border-radius: 999px;
}

.qp-time {
  color: #6f5c3a;
  font-size: .72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.qp-close {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid #e5d9bd;
  border-radius: 50%;
  background: #fff;
  color: #7d6a4d;
  font: inherit;
  font-size: .78rem;
  cursor: pointer;
}

.qp-close:hover {
  border-color: #c9b98f;
  color: #12314f;
}

/* Tombol pemilih kota, navigator ayat, dan penutup pembaca: warna dan garis
   kini berpindah halus. Ukuran elemen tetap supaya kompas dan pembaca ayat
   yang diukur ibadah.js tidak bergeser. */
.city-results button,
.reader-pager button:not(:disabled),
.qp-close {
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

@keyframes qp-pulse {
  50% {
    box-shadow: 0 0 0 10px rgb(242 193 78 / 0%);
  }
}

/* --------------------------------------------------------------- responsif */

@media (max-width: 1024px) {
  .quran-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .surah-panel {
    position: static;
  }

  .surah-list {
    max-height: 420px;
  }

  .qibla-section {
    grid-template-columns: minmax(0, 1fr);
  }

  .compass-stage {
    width: min(320px, 82vw);
  }
}

@media (max-width: 680px) {
  .ib-panel {
    margin: 10px 10px 0;
    border-radius: 24px;
  }

  .ib-place {
    text-align: left;
  }

  .ib-tiles {
    gap: 8px;
  }

  .ib-row {
    padding: 9px 11px;
  }

  .quran-reader {
    padding: 14px;
  }

  .ayah-arab {
    line-height: 2.2;
  }
}

@media (max-width: 380px) {
  .ib-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ib-chip {
    max-width: 34vw;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ib-panel,
  .ib-row,
  .ib-tile,
  .surah-item,
  .quran-sheet,
  .tasbih-count,
  #qiblaRose,
  .quran-player,
  .quran-sheet-audio,
  .city-results button,
  .reader-pager button,
  .qp-close,
  .ib-next-bar i {
    transition: none;
  }

  .quran-sheet-audio.is-audio-on {
    animation: none;
  }
}

/* ----------------------------------------------------------- ruang ibadah app */

.ibadah-page {
  display: flex;
  height: 100dvh;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
}

.ibadah-page > .site-header {
  position: relative;
  z-index: 20;
  flex: 0 0 auto;
}

.ibadah-page > footer {
  display: none;
}

.ibadah-app {
  display: grid;
  width: min(1360px, 100%);
  min-height: 0;
  flex: 1 1 auto;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  margin: 0 auto;
  padding: 14px 20px 18px;
}

.ib-app-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.ib-app-tabs .ib-tile {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-color: #e6eef6;
  border-radius: 17px;
  padding: 8px 14px;
  background: #fff;
  color: var(--navy);
  text-decoration: none;
}

.ib-app-tabs .ib-tile-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
}

.ib-app-tabs .ib-tile b {
  font-size: .86rem;
}

.ib-app-tabs .ib-tile small {
  display: none;
}

.ib-app-tabs .ib-tile.is-active,
.ib-app-tabs .ib-tile[aria-selected="true"] {
  border-color: #176da8;
  background: linear-gradient(135deg, #176da8, #0f3f66);
  box-shadow: 0 9px 22px rgb(20 73 111 / 18%);
  color: #fff;
}

.ib-app-tabs .ib-tile.is-active .ib-tile-icon,
.ib-app-tabs .ib-tile[aria-selected="true"] .ib-tile-icon {
  background: rgb(255 255 255 / 13%);
  color: var(--ib-gold);
}

.ib-app-tabs .ib-tile:focus-visible {
  outline: 3px solid #79bfff;
  outline-offset: 3px;
}

.ib-app-panels {
  min-height: 0;
  overflow: hidden;
}

.ib-app-panels > [role="tabpanel"] {
  height: 100%;
  min-height: 0;
}

.ib-app-panels > [role="tabpanel"][hidden] {
  display: none;
}

.ib-panel {
  height: 100%;
  /* Panel harus ikut digulir. Selama ini dipatok hidden, sehingga di layar
     pendek (kurang dari 700px) bagian bawah jadwal sholat dan hampir seluruh
     kalkulator zakat terpotong tanpa ada jalan untuk membukanya. */
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  margin: 0;
  border-radius: 26px;
  padding: clamp(16px, 2vw, 26px);
}

.ib-panel-head {
  gap: 6px 16px;
  margin-bottom: 12px;
}

.ib-panel-head h1 {
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
}

.ib-place {
  font-size: .78rem;
}

.ib-next {
  --ib-next-x: 14px;
  margin-bottom: 10px;
  padding: 10px var(--ib-next-x) 15px;
}

.ib-search {
  margin-bottom: 8px;
}

.ib-rows {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.ib-row {
  min-height: 44px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 7px;
  padding: 7px 9px;
}

.ib-name {
  gap: 4px;
  font-size: .82rem;
}

.ib-time {
  font-size: .9rem;
}

.ib-chip {
  display: none;
}

.ib-adzan {
  gap: 8px 12px;
  margin-top: 10px;
  padding-top: 10px;
}

.ib-adzan-note {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.ib-note,
.ib-place-sub {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.qibla-section {
  height: 100%;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, .9fr);
  gap: clamp(18px, 4vw, 48px);
  overflow-y: auto;
  padding: clamp(14px, 2vw, 24px);
}

.qibla-copy h2 {
  margin-bottom: 8px;
  font-size: clamp(1.35rem, 2.5vw, 1.8rem);
}

.qibla-steps {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.qibla-steps li {
  font-size: .75rem;
}

.compass-card {
  gap: 7px;
  padding: 12px;
}

.compass-stage {
  width: min(270px, 38vh);
}

.tasbih-section {
  display: grid;
  height: 100%;
  align-content: center;
  overflow-y: auto;
  padding: 14px;
}

.tasbih-card {
  width: min(100%, 560px);
  grid-template-columns: minmax(0, 1fr) minmax(180px, 230px);
  align-items: center;
  gap: 12px 20px;
  max-width: 720px;
}

.tasbih-head,
.tasbih-picker,
.tasbih-foot,
.tasbih-note {
  grid-column: 1;
}

.tasbih-count {
  width: min(100%, 220px);
  grid-column: 2;
  grid-row: 1 / span 4;
  margin: 0 auto;
}

.tasbih-card .tasbih-target {
  display: block;
}

.quran-section {
  display: flex;
  height: 100%;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  padding: 14px;
}

.quran-bar {
  flex: 0 0 auto;
  margin-bottom: 10px;
}

.quran-bar h2 {
  margin-bottom: 2px;
  font-size: 1.4rem;
}

.quran-bar p:not(.eyebrow) {
  margin-bottom: 0;
  font-size: .82rem;
}

.quran-layout {
  min-height: 0;
  flex: 1 1 auto;
  grid-template-columns: minmax(245px, 310px) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.surah-panel {
  display: flex;
  min-height: 0;
  flex-direction: column;
  padding: 9px;
}

.surah-list {
  min-height: 0;
  max-height: none;
  flex: 1 1 auto;
}

.quran-reader {
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  padding: 14px;
}

@media (max-width: 1024px) {
  .qibla-section {
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
    gap: 12px;
  }

  .qibla-copy {
    text-align: center;
  }

  .qibla-copy p:not(.eyebrow, .qibla-meta) {
    margin-inline: auto;
  }

  .qibla-steps {
    max-width: 800px;
    margin-inline: auto;
    text-align: left;
  }

  .compass-card {
    width: min(100%, 520px);
    justify-self: center;
  }

  .compass-stage {
    width: min(250px, 31vh);
  }

  .quran-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(140px, 34%) minmax(0, 1fr);
  }

  .surah-panel {
    min-height: 0;
  }

  .surah-list {
    display: flex;
    gap: 8px;
    overflow: auto;
  }

  .surah-item {
    grid-template-columns: 34px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-content: center;
    min-width: 220px;
    min-height: 58px;
  }

  .surah-name b {
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
  }

  .surah-ayah {
    grid-column: 2;
  }
}

@media (max-width: 680px) {
  .ibadah-app {
    gap: 9px;
    padding: 9px 10px 8px;
  }

  .ib-app-tabs {
    gap: 6px;
  }

  .ib-app-tabs .ib-tile {
    min-height: 54px;
    gap: 5px;
    border-radius: 15px;
    padding: 6px 3px;
  }

  .ib-app-tabs .ib-tile-icon {
    width: 25px;
    height: 25px;
    border-radius: 9px;
  }

  .ib-app-tabs .ib-tile-icon svg {
    width: 17px;
    height: 17px;
  }

  .ib-app-tabs .ib-tile b {
    font-size: .68rem;
  }

  .ib-panel {
    border-radius: 22px;
    padding: 13px;
  }

  .ib-panel-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    margin-bottom: 9px;
  }

  .ib-panel-head h1 {
    max-width: 46vw;
    font-size: clamp(1rem, 4.2vw, 1.28rem);
    line-height: 1.08;
  }

  .ib-hijri {
    max-width: 46vw;
    margin-top: 3px;
    font-size: .67rem;
  }

  .ib-place-chip {
    min-height: 38px;
    gap: 5px;
    padding: 6px 9px;
    font-size: .72rem;
  }

  .ib-place-chip span {
    max-width: 31vw;
  }

  .ib-place-chip i {
    display: none;
  }

  .ib-next {
    --ib-next-x: 11px;
    gap: 4px;
    padding: 9px var(--ib-next-x) 14px;
  }

  .ib-next-right strong {
    font-size: clamp(1.25rem, 6vw, 1.65rem);
  }

  .ib-search input {
    min-height: 40px;
  }

  .ib-rows {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .ib-row {
    min-height: 40px;
    gap: 6px;
    padding: 6px 7px;
  }

  .ib-dot {
    width: 18px;
    height: 18px;
  }

  .ib-name {
    font-size: .76rem;
  }

  .ib-emoji {
    display: none;
  }

  .ib-time {
    font-size: .84rem;
  }

  .ib-adzan {
    margin-top: 8px;
    padding-top: 8px;
  }

  .ib-adzan-play {
    min-height: 40px;
    padding: 8px 11px;
  }

  .qibla-section {
    gap: 8px;
    padding: 12px;
  }

  .qibla-copy h2 {
    margin: 0 0 4px;
    font-size: 1.3rem;
  }

  .qibla-copy p:not(.eyebrow, .qibla-meta) {
    margin-block: 4px;
    font-size: .78rem;
    line-height: 1.45;
  }

  .qibla-steps {
    display: none;
  }

  .compass-card {
    gap: 5px;
    padding: 8px;
  }

  .compass-stage {
    width: min(220px, 27vh);
  }

  .compass-status {
    min-height: 1.5em;
    font-size: .73rem;
  }

  .tasbih-card {
    width: min(100%, 430px);
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 14px;
  }

  .tasbih-head,
  .tasbih-picker,
  .tasbih-foot,
  .tasbih-note,
  .tasbih-count {
    grid-column: 1;
    grid-row: auto;
  }

  .tasbih-count {
    width: min(190px, 48vw);
  }

  .tasbih-arab {
    font-size: 1.2rem;
  }

  .tasbih-count strong {
    font-size: 2.1rem;
  }

  .quran-section {
    padding: 10px;
  }

  .quran-bar {
    margin-bottom: 8px;
  }

  .quran-bar h2 {
    font-size: 1.2rem;
  }

  .quran-bar p:not(.eyebrow) {
    font-size: .74rem;
  }

  .quran-layout {
    grid-template-rows: minmax(126px, 30%) minmax(0, 1fr);
  }

  .surah-item {
    min-height: 64px;
  }

  .quran-reader {
    padding: 10px;
  }
}

@media (max-width: 380px) {
  .ib-app-tabs .ib-tile {
    flex-direction: column;
    gap: 2px;
  }

  .ib-app-tabs .ib-tile-icon {
    width: 22px;
    height: 22px;
  }
}

@media (max-height: 760px) and (max-width: 680px) {
  .ibadah-app {
    gap: 6px;
    padding-top: 6px;
  }

  .ib-app-tabs .ib-tile {
    min-height: 46px;
  }

  .ib-panel {
    padding: 10px;
  }

  .ib-panel-head {
    margin-bottom: 6px;
  }

  .ib-hijri {
    display: none;
  }

  .ib-next {
    --ib-next-x: 8px;
    margin-top: 8px;
    margin-bottom: 6px;
    gap: 6px;
    padding: 6px var(--ib-next-x) 13px;
  }

  .ib-next .eyebrow {
    font-size: .58rem;
  }

  .ib-next-main b {
    font-size: .98rem;
  }

  .ib-next-right strong {
    font-size: 1.15rem;
  }

  .ib-next-right small {
    max-width: 32vw;
    font-size: .58rem;
    line-height: 1.2;
  }

  .ib-search {
    margin-top: 8px;
    margin-bottom: 6px;
    padding-inline: 9px;
  }

  .ib-search input {
    min-height: 36px;
    padding-block: 6px;
  }

  .ib-rows {
    margin-top: 8px;
  }

  .ib-row {
    min-height: 32px;
    padding: 3px 6px;
  }

  .ib-dot {
    width: 16px;
    height: 16px;
  }

  .ib-adzan {
    flex-wrap: nowrap;
    gap: 4px;
    margin-top: 5px;
    padding-top: 5px;
  }

  .switch {
    gap: 5px;
    font-size: .69rem;
  }

  .switch-track {
    width: 40px;
    height: 24px;
  }

  .switch-thumb {
    width: 18px;
    height: 18px;
  }

  .ib-adzan-play {
    min-height: 34px;
    padding: 6px 7px;
    font-size: .66rem;
    white-space: nowrap;
  }

  .qibla-section {
    gap: 6px;
    padding: 8px;
  }

  .qibla-copy .eyebrow,
  .qibla-copy p:not(.eyebrow, .qibla-meta) {
    display: none;
  }

  .qibla-copy h2 {
    margin: 0;
    font-size: 1rem;
  }

  .qibla-actions .button {
    min-height: 34px;
    padding: 6px 10px;
    font-size: .75rem;
  }

  .qibla-meta {
    display: -webkit-box;
    margin: 4px 0 0;
    overflow: hidden;
    font-size: .65rem;
    line-height: 1.3;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .compass-card {
    gap: 4px;
    padding: 6px;
  }

  .compass-stage {
    width: min(150px, 23vh);
  }

  .tasbih-section {
    padding: 8px;
  }

  .tasbih-card {
    gap: 7px;
    padding: 10px;
  }

  .tasbih-head .eyebrow {
    margin-bottom: 0;
  }

  .tasbih-head h2 {
    font-size: 1rem;
  }

  .tasbih-picker {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .dhikr-chip {
    min-width: 0;
    min-height: 32px;
    overflow: hidden;
    padding: 5px 6px;
    border-radius: 11px;
    font-size: .62rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .tasbih-count {
    width: min(128px, 38vw);
  }

  .tasbih-arab {
    font-size: 1rem;
    line-height: 1.5;
  }

  .tasbih-count strong {
    font-size: 1.8rem;
  }

  .tasbih-note {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
}

/* ------------------------------------------- hadis, zakat, masjid, hijriah */

.ib-app-tabs {
  grid-template-columns: repeat(8, minmax(0, 1fr));
}

.ib-feature-head {
  flex: 0 0 auto;
  margin-bottom: 12px;
}

.ib-feature-head h2 {
  margin-bottom: 4px;
  font-size: clamp(1.2rem, 2.1vw, 1.6rem);
}

.ib-feature-head p:not(.eyebrow) {
  margin-bottom: 0;
  font-size: .82rem;
  color: #5d6f80;
}

.hadis-section,
.zakat-section,
.masjid-section,
.hijriah-section {
  display: flex;
  height: 100%;
  min-height: 0;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: 26px;
  padding: clamp(14px, 2vw, 24px);
  background: #fff;
}

/* --------------------------------------------------------------------- hadis */

.hd-books {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.hd-books button {
  display: grid;
  flex: 0 0 auto;
  gap: 1px;
  border: 1px solid #e6eef6;
  border-radius: 13px;
  padding: 7px 13px;
  background: #f8fafc;
  color: var(--navy);
  cursor: pointer;
  text-align: left;
}

.hd-books button b {
  font-size: .78rem;
  white-space: nowrap;
}

.hd-books button small {
  font-size: .64rem;
  color: #7f8b96;
}

.hd-books button.is-active {
  border-color: #176da8;
  background: linear-gradient(135deg, #176da8, #0f3f66);
  color: #fff;
}

.hd-books button.is-active small {
  color: rgb(255 255 255 / 76%);
}

.hd-nav {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  margin: 12px 0 10px;
}

.hd-ref {
  flex: 1 1 auto;
  margin: 0;
  font-size: .78rem;
  font-weight: 600;
  color: #0f3f66;
  text-align: center;
}

.hd-step,
.hd-random {
  border: 1px solid #e6eef6;
  border-radius: 12px;
  padding: 8px 12px;
  background: #f8fafc;
  color: var(--navy);
  font-size: .78rem;
  cursor: pointer;
}

.hd-random {
  border-color: var(--ib-gold);
  background: #fffaf0;
  font-weight: 700;
}

.hd-card {
  flex: 1 1 auto;
  border: 1px solid #e6eef6;
  border-radius: 20px;
  padding: clamp(14px, 2.4vw, 22px);
  background: #fcfdfe;
}

.hd-arabic {
  margin: 0 0 12px;
  font-family: "Amiri", "Scheherazade New", "Noto Naskh Arabic", serif;
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  line-height: 2.1;
  color: #0f3f66;
  text-align: right;
}

.hd-text {
  margin: 0;
  font-size: .95rem;
  line-height: 1.8;
}

.hd-note {
  margin: 12px 0 0;
  font-size: .74rem;
  color: #7f8b96;
}

/* --------------------------------------------------------------------- zakat */

.zk-prices {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.zk-prices p {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  border: 1px solid #e6eef6;
  border-radius: 14px;
  padding: 9px 12px;
  background: #f8fafc;
}

.zk-prices span {
  font-size: .66rem;
  text-transform: uppercase;
  color: #7f8b96;
}

.zk-prices b {
  font-size: .92rem;
  color: #0f3f66;
}

.zk-status {
  flex: 0 0 auto;
  margin: 0 0 12px;
  font-size: .74rem;
  color: #5d6f80;
}

.zk-form {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  align-items: end;
}

.zk-field {
  display: grid;
  gap: 5px;
}

.zk-field span {
  font-size: .72rem;
  font-weight: 600;
  color: #2f4a63;
}

.zk-field select,
.zk-field input {
  width: 100%;
  border: 1px solid #d9e5f0;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  color: var(--navy);
  font-size: .92rem;
}

.zk-field select:focus-visible,
.zk-field input:focus-visible {
  outline: 3px solid #79bfff;
  outline-offset: 2px;
}

.zk-haul {
  align-self: center;
  font-size: .78rem;
}

.zk-result {
  flex: 0 0 auto;
  margin-top: 14px;
  border-radius: 20px;
  padding: clamp(14px, 2.2vw, 20px);
  background: linear-gradient(135deg, #176da8, #0f3f66);
  color: #fff;
}

.zk-result .eyebrow {
  color: var(--ib-gold);
}

.zk-result b {
  display: block;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  line-height: 1.2;
}

.zk-result small {
  display: block;
  margin-top: 6px;
  font-size: .78rem;
  line-height: 1.6;
  color: rgb(255 255 255 / 84%);
}

.zk-note {
  flex: 0 0 auto;
  margin: 10px 0 0;
  font-size: .72rem;
  color: #7f8b96;
}

/* -------------------------------------------------------------------- masjid */

.ms-tools {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.ms-radius {
  display: flex;
  gap: 6px;
}

.ms-radius button,
.ms-locate {
  border: 1px solid #e6eef6;
  border-radius: 12px;
  padding: 8px 12px;
  background: #f8fafc;
  color: var(--navy);
  font-size: .76rem;
  cursor: pointer;
}

.ms-radius button.is-active {
  border-color: #176da8;
  background: #176da8;
  color: #fff;
}

.ms-locate {
  border-color: var(--ib-gold);
  background: #fffaf0;
  font-weight: 700;
}

.ms-locate:disabled {
  opacity: .6;
  cursor: progress;
}

.ms-status {
  flex: 0 0 auto;
  margin: 10px 0 8px;
  font-size: .76rem;
  color: #5d6f80;
}

.ms-list {
  flex: 1 1 auto;
  display: grid;
  gap: 8px;
  align-content: start;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ms-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #e9eff5;
  border-radius: 15px;
  padding: 10px 12px;
  background: #fcfdfe;
}

.ms-mark {
  font-size: 1.1rem;
}

.ms-body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.ms-body b {
  font-size: .85rem;
  color: var(--navy);
}

.ms-body small {
  font-size: .7rem;
  color: #7f8b96;
}

.ms-distance {
  display: grid;
  gap: 1px;
  justify-items: end;
  font-size: .8rem;
  font-weight: 700;
  color: #0f3f66;
  white-space: nowrap;
}

.ms-distance small {
  font-size: .62rem;
  font-weight: 500;
  color: #7f8b96;
}

.ms-empty {
  border: 1px dashed #d9e5f0;
  border-radius: 15px;
  padding: 16px;
  font-size: .8rem;
  color: #5d6f80;
  text-align: center;
}

/* ------------------------------------------------------------------- hijriah */

.hj-nav {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.hj-nav b {
  flex: 1 1 auto;
  font-size: .92rem;
  color: #0f3f66;
  text-align: center;
}

.hj-step,
.hj-today {
  border: 1px solid #e6eef6;
  border-radius: 12px;
  padding: 8px 12px;
  background: #f8fafc;
  color: var(--navy);
  font-size: .78rem;
  cursor: pointer;
}

.hj-today {
  border-color: var(--ib-gold);
  background: #fffaf0;
  font-weight: 700;
}

.hj-week,
.hj-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.hj-week {
  flex: 0 0 auto;
  margin-bottom: 6px;
}

.hj-week span {
  font-size: .64rem;
  font-weight: 700;
  color: #7f8b96;
  text-align: center;
  text-transform: uppercase;
}

.hj-grid {
  flex: 0 0 auto;
}

.hj-blank {
  min-height: 58px;
}

.hj-cell {
  display: grid;
  gap: 1px;
  place-content: center;
  min-height: 58px;
  border: 1px solid #e9eff5;
  border-radius: 13px;
  background: #fcfdfe;
  text-align: center;
}

.hj-cell b {
  font-size: .95rem;
  color: var(--navy);
}

.hj-cell i {
  font-size: .72rem;
  font-style: normal;
  font-weight: 700;
  color: #176da8;
}

.hj-cell small {
  font-size: .58rem;
  color: #94a2ae;
  text-transform: uppercase;
}

.hj-cell.is-today {
  border-color: #176da8;
  background: linear-gradient(135deg, #176da8, #0f3f66);
}

.hj-cell.is-today b,
.hj-cell.is-today i,
.hj-cell.is-today small {
  color: #fff;
}

.hj-cell.is-today i {
  color: var(--ib-gold);
}

.hj-status {
  flex: 0 0 auto;
  margin: 10px 0 0;
  font-size: .74rem;
  color: #5d6f80;
}

@media (max-width: 1024px) {
  .ib-app-tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .ib-app-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .ib-app-tabs::-webkit-scrollbar {
    display: none;
  }

  .ib-app-tabs .ib-tile {
    flex: 0 0 auto;
    width: 92px;
    min-height: 52px;
  }

  .hadis-section,
  .zakat-section,
  .masjid-section,
  .hijriah-section {
    border-radius: 22px;
    padding: 13px;
  }

  .hd-nav {
    flex-wrap: wrap;
  }

  .hd-ref {
    order: -1;
    flex: 1 1 100%;
  }

  .hd-step,
  .hd-random {
    flex: 1 1 0;
  }

  .hj-cell {
    min-height: 46px;
    border-radius: 11px;
  }

  .hj-cell b {
    font-size: .84rem;
  }

  .hj-cell i {
    font-size: .66rem;
  }

  .hj-cell small {
    display: none;
  }

  .hj-blank {
    min-height: 46px;
  }

  .ms-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .ms-distance {
    grid-column: 2;
    justify-items: start;
  }
}
