:root {
  --bg: #f1f6f4;
  --bg-glow: radial-gradient(circle at 18% 0%, rgba(16, 122, 101, 0.1) 0%, rgba(241, 246, 244, 0) 52%);
  --surface: #ffffff;
  --surface-subtle: #f6faf8;
  --border: #dfeae5;
  --text: #11211c;
  --text-muted: #586e67;
  --accent: #0d5c4d;
  --accent-light: #e3f3ee;
  --accent-mid: #167a65;
  --hero-from: #083b32;
  --hero-via: #0e5a4b;
  --hero-to: #167a65;
  --hero-text: #ffffff;
  --hero-muted: rgba(236, 253, 245, 0.8);
  --syuruk-bg: #fef9ed;
  --syuruk-border: #f2dfb3;
  --syuruk-accent: #b27216;
  --friday-bg: #dff3ec;
  --friday-text: #0b5345;
  --shadow-sm: 0 2px 12px rgba(10, 46, 38, 0.045);
  --shadow-md: 0 16px 38px rgba(9, 60, 51, 0.22);
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

[data-theme="mutiara"] {
  --bg: #f6f3ee;
  --bg-glow: radial-gradient(circle at 20% 0%, rgba(184, 139, 58, 0.11) 0%, rgba(246, 243, 238, 0) 55%);
  --surface: #fffefb;
  --surface-subtle: #f8f5ef;
  --border: #e8e1d5;
  --text: #221e1a;
  --text-muted: #72685c;
  --accent: #9a6f28;
  --accent-light: #f6edd9;
  --accent-mid: #b88b3a;
  --hero-from: #231f1c;
  --hero-via: #352f29;
  --hero-to: #504538;
  --hero-text: #fdfaf5;
  --hero-muted: rgba(245, 235, 215, 0.78);
  --syuruk-bg: #fdf7e9;
  --syuruk-border: #ebd7ab;
  --syuruk-accent: #a66c19;
  --friday-bg: #f5ebd4;
  --friday-text: #855e1c;
  --shadow-sm: 0 2px 12px rgba(35, 31, 28, 0.05);
  --shadow-md: 0 16px 38px rgba(35, 31, 28, 0.22);
}

[data-theme="dark"] {
  --bg: #080f0e;
  --bg-glow: radial-gradient(circle at 22% 0%, rgba(16, 185, 129, 0.13) 0%, rgba(8, 15, 14, 0) 54%);
  --surface: #101b19;
  --surface-subtle: #152320;
  --border: #1e312d;
  --text: #edf7f4;
  --text-muted: #86a199;
  --accent: #34d399;
  --accent-light: rgba(52, 211, 153, 0.13);
  --accent-mid: #10b981;
  --hero-from: #0a2e27;
  --hero-via: #0f463b;
  --hero-to: #156051;
  --hero-text: #f3fcf9;
  --hero-muted: rgba(209, 250, 229, 0.76);
  --syuruk-bg: rgba(245, 158, 11, 0.09);
  --syuruk-border: rgba(251, 191, 36, 0.24);
  --syuruk-accent: #fbbf24;
  --friday-bg: rgba(52, 211, 153, 0.15);
  --friday-text: #6ee7b7;
  --shadow-sm: 0 2px 14px rgba(0, 0, 0, 0.34);
  --shadow-md: 0 18px 42px rgba(0, 0, 0, 0.52);
}

[data-theme="senja"] {
  --bg: #fbf4ec;
  --bg-glow: radial-gradient(circle at 20% 0%, rgba(217, 119, 6, 0.13) 0%, rgba(251, 244, 236, 0) 55%);
  --surface: #fffdfb;
  --surface-subtle: #faf1e7;
  --border: #eddac7;
  --text: #27160f;
  --text-muted: #7f5f4e;
  --accent: #b84414;
  --accent-light: #fdebd8;
  --accent-mid: #d97706;
  --hero-from: #712310;
  --hero-via: #a83c14;
  --hero-to: #d97706;
  --hero-text: #fffdf9;
  --hero-muted: rgba(255, 243, 224, 0.84);
  --syuruk-bg: #fff8e8;
  --syuruk-border: #f3d598;
  --syuruk-accent: #b45309;
  --friday-bg: #fdebd8;
  --friday-text: #9a3412;
  --shadow-sm: 0 2px 12px rgba(124, 45, 18, 0.06);
  --shadow-md: 0 16px 38px rgba(124, 45, 18, 0.24);
}

[data-theme="langit"] {
  --bg: #eef4fb;
  --bg-glow: radial-gradient(circle at 20% 0%, rgba(2, 132, 199, 0.12) 0%, rgba(238, 244, 251, 0) 55%);
  --surface: #ffffff;
  --surface-subtle: #f3f7fc;
  --border: #d8e5f3;
  --text: #0f1f38;
  --text-muted: #566c8c;
  --accent: #1d4ed8;
  --accent-light: #e0ecff;
  --accent-mid: #0284c7;
  --hero-from: #0f2757;
  --hero-via: #1d4ed8;
  --hero-to: #0284c7;
  --hero-text: #ffffff;
  --hero-muted: rgba(224, 242, 254, 0.84);
  --syuruk-bg: #fef9ec;
  --syuruk-border: #f3dea6;
  --syuruk-accent: #b47415;
  --friday-bg: #e0ecff;
  --friday-text: #1e40af;
  --shadow-sm: 0 2px 12px rgba(15, 39, 87, 0.06);
  --shadow-md: 0 16px 38px rgba(15, 39, 87, 0.22);
}

[data-theme="ungu"] {
  --bg: #0c0817;
  --bg-glow: radial-gradient(circle at 22% 0%, rgba(139, 92, 246, 0.16) 0%, rgba(12, 8, 23, 0) 55%);
  --surface: #151024;
  --surface-subtle: #1c1630;
  --border: #2c2348;
  --text: #f5f1ff;
  --text-muted: #a195c2;
  --accent: #b794f6;
  --accent-light: rgba(167, 139, 250, 0.15);
  --accent-mid: #8b5cf6;
  --hero-from: #2b0f5e;
  --hero-via: #4c1d95;
  --hero-to: #7c3aed;
  --hero-text: #faf5ff;
  --hero-muted: rgba(237, 233, 254, 0.8);
  --syuruk-bg: rgba(245, 158, 11, 0.1);
  --syuruk-border: rgba(251, 191, 36, 0.26);
  --syuruk-accent: #fbbf24;
  --friday-bg: rgba(167, 139, 250, 0.18);
  --friday-text: #d8b4fe;
  --shadow-sm: 0 2px 14px rgba(0, 0, 0, 0.36);
  --shadow-md: 0 18px 42px rgba(43, 15, 94, 0.5);
}

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

html,
body {
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--bg);
  background-image: var(--bg-glow);
  background-attachment: fixed;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body {
  display: flex;
  justify-content: center;
  padding: 24px 16px 40px;
}

.app-shell {
  width: 100%;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hidden {
  display: none !important;
}

/* Header */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 2px;
}

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

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: var(--accent-light);
  color: var(--accent);
  display: grid;
  place-items: center;
}

.brand-title {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.brand-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 2px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-picker-wrap {
  position: relative;
}

.theme-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 174px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 8px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 3px;
  animation: popIn 0.16s ease;
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.theme-popover-title {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 4px 8px 6px;
}

.theme-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.15s ease;
}

.theme-option:hover {
  background: var(--surface-subtle);
}

.theme-option.is-active {
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 600;
}

.swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.icon-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.icon-btn:active {
  transform: translateY(0);
}

.icon-btn.loading svg {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Hero Card */
.hero-card {
  background: linear-gradient(135deg, var(--hero-from) 0%, var(--hero-via) 55%, var(--hero-to) 100%);
  color: var(--hero-text);
  border-radius: var(--radius-lg);
  padding: 22px 22px 20px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-card::before {
  content: "";
  position: absolute;
  bottom: -60px;
  left: -40px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}

.hero-card::after {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}

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

.location-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  color: var(--hero-text);
}

.city-select {
  background: transparent;
  border: none;
  color: var(--hero-text);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  padding-right: 4px;
  outline: none;
}

.city-select option {
  color: #16231e;
  background: #ffffff;
}

.live-clock {
  font-size: 0.88rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--hero-muted);
  letter-spacing: 0.02em;
}

.countdown-block {
  text-align: left;
  margin-bottom: 18px;
}

.countdown-label {
  font-size: 0.84rem;
  font-weight: 400;
  color: var(--hero-muted);
  margin-bottom: 4px;
}

.countdown-label strong {
  color: #ffffff;
  font-weight: 600;
}

.countdown-time {
  font-size: 2.35rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.countdown-sub {
  font-size: 0.78rem;
  color: var(--hero-muted);
  margin-top: 6px;
}

.progress-track {
  height: 5px;
  width: 100%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  transition: width 0.8s ease;
}

/* Date Navigation */
.date-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  box-shadow: var(--shadow-sm);
}

.date-nav-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: none;
  background: var(--surface-subtle);
  color: var(--text-muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.18s ease;
}

.date-nav-btn:hover {
  background: var(--accent-light);
  color: var(--accent);
}

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

.date-today-trigger {
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 2px 8px;
  border-radius: 8px;
}

.gregorian-date {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.hijri-date {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 1px;
}

/* Schedule Card */
.schedule-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 16px 16px;
  box-shadow: var(--shadow-sm);
}

.schedule-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 0 6px 12px;
}

.schedule-title {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.schedule-hint {
  font-size: 0.71rem;
  color: var(--text-muted);
  opacity: 0.85;
  margin-top: 2px;
}

.friday-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--friday-bg);
  color: var(--friday-text);
}

.prayer-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.prayer-item {
  display: flex;
  flex-direction: column;
  padding: 13px 14px;
  border-radius: 15px;
  border: 1px solid transparent;
  background: var(--surface-subtle);
  cursor: pointer;
  user-select: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.prayer-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(15, 45, 36, 0.06);
  border-color: var(--border);
}

.prayer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
}

.prayer-left {
  display: flex;
  align-items: center;
  gap: 13px;
}

.prayer-icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--surface);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid var(--border);
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
  overflow: hidden;
}

.prayer-item:hover .prayer-icon {
  transform: scale(1.08) rotate(-2deg);
}

/* Per-prayer colorful icon badges */
.icon-subuh {
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  border-color: #c7d2fe;
}
.icon-syuruk {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border-color: #fde68a;
}
.icon-dzuhur {
  background: linear-gradient(135deg, #fefce8, #fef08a);
  border-color: #fde047;
}
.icon-jumat {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border-color: #6ee7b7;
}
.icon-ashar {
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  border-color: #fed7aa;
}
.icon-maghrib {
  background: linear-gradient(135deg, #fff1f2, #ffe4e6);
  border-color: #fecdd3;
}
.icon-isya {
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  border-color: #c7d2fe;
}

[data-theme="dark"] .icon-subuh,
[data-theme="ungu"] .icon-subuh {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(167, 139, 250, 0.14));
  border-color: rgba(129, 140, 248, 0.3);
}
[data-theme="dark"] .icon-syuruk,
[data-theme="ungu"] .icon-syuruk {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(249, 115, 22, 0.14));
  border-color: rgba(251, 191, 36, 0.3);
}
[data-theme="dark"] .icon-dzuhur,
[data-theme="ungu"] .icon-dzuhur {
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.2), rgba(245, 158, 11, 0.14));
  border-color: rgba(250, 204, 21, 0.3);
}
[data-theme="dark"] .icon-jumat,
[data-theme="ungu"] .icon-jumat {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(5, 150, 105, 0.14));
  border-color: rgba(52, 211, 153, 0.35);
}
[data-theme="dark"] .icon-ashar,
[data-theme="ungu"] .icon-ashar {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.2), rgba(59, 130, 246, 0.14));
  border-color: rgba(251, 146, 60, 0.3);
}
[data-theme="dark"] .icon-maghrib,
[data-theme="ungu"] .icon-maghrib {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.2), rgba(251, 146, 60, 0.14));
  border-color: rgba(251, 113, 133, 0.3);
}
[data-theme="dark"] .icon-isya,
[data-theme="ungu"] .icon-isya {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.22), rgba(67, 56, 202, 0.16));
  border-color: rgba(129, 140, 248, 0.32);
}

/* Interactive SVG micro-animations */
.p-svg .svg-spin {
  transform-origin: 12px 12px;
  transition: transform 0.6s ease;
}
.p-svg .svg-sun-rise,
.p-svg .svg-sun-set,
.p-svg .svg-cloud,
.p-svg .svg-moon,
.p-svg .svg-sun-rays {
  transform-origin: center;
  transition: transform 0.4s ease;
}

.prayer-item:hover .svg-spin,
.prayer-item.is-next .svg-spin {
  animation: slowSpin 10s linear infinite;
}

.prayer-item:hover .svg-sun-rise,
.prayer-item.is-next .svg-sun-rise {
  animation: gentleRise 2.4s ease-in-out infinite;
}

.prayer-item:hover .svg-sun-set,
.prayer-item.is-next .svg-sun-set {
  animation: gentleSet 2.4s ease-in-out infinite;
}

.prayer-item:hover .svg-sun-rays,
.prayer-item.is-next .svg-sun-rays {
  animation: pulseRays 2.2s ease-in-out infinite;
}

.prayer-item:hover .svg-cloud,
.prayer-item.is-next .svg-cloud {
  animation: floatCloud 2.8s ease-in-out infinite;
}

.prayer-item:hover .svg-moon,
.prayer-item.is-next .svg-moon {
  animation: tiltMoon 3s ease-in-out infinite;
}

.prayer-item:hover .svg-star,
.prayer-item.is-next .svg-star {
  animation: twinkle 1.8s ease-in-out infinite;
}

.prayer-item:hover .svg-star-delay,
.prayer-item.is-next .svg-star-delay {
  animation: twinkle 1.8s ease-in-out 0.6s infinite;
}

@keyframes slowSpin {
  to { transform: rotate(360deg); }
}
@keyframes gentleRise {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-1.8px); }
}
@keyframes gentleSet {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(1.6px); }
}
@keyframes pulseRays {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.65; transform: scale(1.08); }
}
@keyframes floatCloud {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(1.8px); }
}
@keyframes tiltMoon {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-7deg); }
}
@keyframes twinkle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.75); }
}

.prayer-meta {
  display: flex;
  flex-direction: column;
}

.prayer-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.prayer-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.prayer-tag {
  font-size: 0.67rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.prayer-tag.next {
  background: var(--accent);
  color: #ffffff;
}

.prayer-tag.syuruk {
  background: var(--syuruk-border);
  color: var(--syuruk-accent);
}

.prayer-tag.jumat {
  background: var(--friday-bg);
  color: var(--friday-text);
}

.prayer-desc {
  font-size: 0.73rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.prayer-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.prayer-chevron {
  color: var(--text-muted);
  opacity: 0.65;
  transition: transform 0.22s ease, opacity 0.2s ease;
  flex-shrink: 0;
}

.prayer-item:hover .prayer-chevron {
  opacity: 1;
}

.prayer-item.is-open .prayer-chevron {
  transform: rotate(180deg);
  opacity: 1;
  color: var(--accent);
}

.prayer-hadith-panel {
  display: none;
  margin-top: 10px;
  padding: 11px 12px 10px;
  border-radius: 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: default;
  animation: fadeSlide 0.2s ease;
}

.prayer-item.is-open .prayer-hadith-panel {
  display: block;
}

.prayer-item.is-syuruk .prayer-hadith-panel {
  background: rgba(255, 255, 255, 0.7);
  border-color: var(--syuruk-border);
}

[data-theme="dark"] .prayer-item.is-syuruk .prayer-hadith-panel,
[data-theme="ungu"] .prayer-item.is-syuruk .prayer-hadith-panel {
  background: rgba(0, 0, 0, 0.24);
}

@keyframes fadeSlide {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.hadith-title {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--accent);
}

.prayer-item.is-syuruk .hadith-title {
  color: var(--syuruk-accent);
}

.hadith-counter {
  font-size: 0.67rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface-subtle);
  padding: 2px 7px;
  border-radius: 999px;
  flex-shrink: 0;
}

.hadith-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.hadith-track::-webkit-scrollbar {
  display: none;
}

.hadith-slide {
  flex: 0 0 100%;
  width: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  padding-right: 2px;
}

.hadith-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 9px;
  padding-top: 7px;
  border-top: 1px solid var(--border);
}

.hadith-nav-btn {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  color: var(--text-muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.hadith-nav-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-light);
}

.hadith-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hadith-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  border: none;
  padding: 0;
  background: var(--border);
  cursor: pointer;
  transition: width 0.2s ease, background-color 0.2s ease;
}

.hadith-dot.is-active {
  width: 18px;
  background: var(--accent);
}

.prayer-item.is-syuruk .hadith-dot.is-active {
  background: var(--syuruk-accent);
}

.prayer-time {
  font-size: 1.02rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

/* States */
.prayer-item.is-next {
  background: var(--accent-light);
  border-color: var(--accent);
}

.prayer-item.is-next .prayer-icon {
  box-shadow: 0 0 0 2px var(--accent);
}

.prayer-item.is-next .prayer-name,
.prayer-item.is-next .prayer-time {
  color: var(--accent);
}

.prayer-item.is-passed {
  opacity: 0.68;
}

.prayer-item.is-syuruk {
  background: var(--syuruk-bg);
  border: 1px dashed var(--syuruk-border);
  padding-top: 12px;
  padding-bottom: 12px;
}

.prayer-item.is-syuruk .prayer-name {
  font-size: 0.92rem;
  font-weight: 600;
}

.prayer-item.is-syuruk .prayer-time {
  font-size: 0.98rem;
  color: var(--syuruk-accent);
}

/* Syuruk Safe Time & Hadith Note */
.syuruk-extra {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--syuruk-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.syuruk-safe-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.76rem;
  line-height: 1.45;
  color: var(--text);
  background: rgba(255, 255, 255, 0.65);
  padding: 7px 10px;
  border-radius: 10px;
}

[data-theme="dark"] .syuruk-safe-note,
[data-theme="ungu"] .syuruk-safe-note {
  background: rgba(0, 0, 0, 0.22);
}

.safe-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  margin-top: 5px;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.syuruk-safe-note strong {
  color: var(--accent);
  font-weight: 600;
}

.safe-muted {
  color: var(--text-muted);
}

.hadith-box {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--syuruk-border);
  border-radius: 11px;
  padding: 8px 11px;
}

[data-theme="dark"] .hadith-box {
  background: rgba(0, 0, 0, 0.18);
}

.hadith-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--syuruk-accent);
  user-select: none;
}

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

.hadith-chevron {
  flex-shrink: 0;
  transition: transform 0.22s ease;
}

.hadith-box[open] .hadith-chevron {
  transform: rotate(180deg);
}

.hadith-text {
  font-size: 0.74rem;
  line-height: 1.55;
  color: var(--text);
  margin-top: 7px;
  font-style: italic;
}

.hadith-source {
  display: inline-block;
  margin-top: 5px;
  font-size: 0.69rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* Footer */
.app-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  font-size: 0.73rem;
  color: var(--text-muted);
  padding-top: 8px;
}

.support-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 15px;
  margin-bottom: 4px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-size: 0.77rem;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, border-color 0.18s ease, color 0.18s ease, background-color 0.18s ease;
}

.support-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
  transform: translateY(-1px);
}

.footer-copy {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--text-muted);
  opacity: 0.85;
}

/* Main Navigation Tabs */
.main-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 5px;
  box-shadow: var(--shadow-sm);
}

.main-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 10px;
  border: none;
  border-radius: 11px;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.main-tab:hover {
  color: var(--text);
}

.main-tab.is-active {
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.tab-view {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Dzikir Pagi, Petang & Ba'da Sholat */
.dzikir-switcher {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.dzikir-mode-btn {
  padding: 9px 8px;
  border-radius: 13px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}

.dzikir-mode-btn.is-active {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.dzikir-hero {
  background: linear-gradient(135deg, var(--hero-from) 0%, var(--hero-via) 55%, var(--hero-to) 100%);
  color: var(--hero-text);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.dzikir-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.dzikir-hero-title {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.25;
}

.dzikir-hero-sub {
  font-size: 0.74rem;
  color: var(--hero-muted);
  margin-top: 3px;
}

.dzikir-reset-btn {
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  color: var(--hero-text);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.18s ease;
}

.dzikir-reset-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

.dzikir-progress-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--hero-muted);
  margin-bottom: 6px;
}

.dzikir-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 9px 12px;
  box-shadow: var(--shadow-sm);
}

.font-size-group,
.toggle-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ctrl-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-right: 2px;
}

.ctrl-btn {
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  color: var(--text);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ctrl-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.toggle-chip {
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.toggle-chip.is-on {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.dzikir-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dzikir-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s ease, opacity 0.2s ease;
}

.dzikir-card.is-done {
  border-color: var(--accent);
  background: var(--surface-subtle);
}

.dzikir-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.dzikir-title-wrap {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.dzikir-num {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.dzikir-title {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}

.dzikir-count-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent-light);
  color: var(--accent);
  flex-shrink: 0;
}

.dzikir-arabic {
  font-family: "Amiri", "Traditional Arabic", "Geeza Pro", serif;
  font-size: var(--arabic-size, 1.55rem);
  line-height: 2.15;
  text-align: right;
  direction: rtl;
  color: var(--text);
  padding: 6px 2px;
}

.dzikir-latin {
  font-size: 0.79rem;
  line-height: 1.6;
  color: var(--accent);
  font-style: italic;
}

.dzikir-translation {
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--text);
}

.dzikir-hadith-box {
  background: var(--surface-subtle);
  border-left: 3px solid var(--accent);
  border-radius: 0 11px 11px 0;
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dzikir-hadith-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.dzikir-hadith-text {
  font-size: 0.74rem;
  line-height: 1.55;
  color: var(--text);
}

.dzikir-hadith-source {
  font-size: 0.69rem;
  font-weight: 500;
  color: var(--text-muted);
}

.dzikir-tap-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  color: var(--text);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s ease, background-color 0.2s ease, border-color 0.2s ease;
  user-select: none;
}

.dzikir-tap-btn:active {
  transform: scale(0.985);
}

.dzikir-tap-btn:hover {
  border-color: var(--accent);
}

.dzikir-card.is-done .dzikir-tap-btn {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.dzikir-tap-count {
  font-variant-numeric: tabular-nums;
}

@media (max-width: 420px) {
  body {
    padding: 14px 12px 28px;
  }

  .countdown-time {
    font-size: 2rem;
  }
}
