/* ==========================================================================
   MabrurBroh — Mobile-First Stylesheet
   Dirancang khusus untuk keterbacaan tinggi di bawah terik matahari Tanah Suci
   dan ramah bagi jemaah haji segala usia (termasuk lansia).
   ========================================================================== */

:root {
  /* Color Palette - Light Mode (Default: High Contrast Warm Emerald) */
  --bg-page: #f3f1ec;
  --bg-surface: #ffffff;
  --bg-surface-soft: #f8f6f0;
  --bg-emerald-deep: #064e3b;
  --bg-emerald-primary: #065f46;
  --bg-emerald-light: #ecfdf5;
  --bg-gold-soft: #fffbeb;
  --bg-danger-soft: #fef2f2;

  --text-primary: #111827;
  --text-secondary: #374151;
  --text-muted: #6b7280;
  --text-emerald: #065f46;
  --text-gold: #b45309;
  --text-danger: #b91c1c;

  --border-subtle: #e5e7eb;
  --border-emerald: #a7f3d0;
  --border-gold: #fde68a;

  --accent-emerald: #059669;
  --accent-gold: #d97706;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(6, 78, 59, 0.08);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.14);

  /* Font Scale Variables (Adjusted dynamically via data-font-scale) */
  --arabic-font-size: 1.75rem;
  --arabic-line-height: 2.35;
  --latin-font-size: 0.98rem;
  --translation-font-size: 0.95rem;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
}

html[data-theme="dark"] {
  --bg-page: #0b1311;
  --bg-surface: #13201c;
  --bg-surface-soft: #1a2b25;
  --bg-emerald-deep: #042f24;
  --bg-emerald-primary: #065f46;
  --bg-emerald-light: #133329;
  --bg-gold-soft: #2b2110;
  --bg-danger-soft: #2d1619;

  --text-primary: #f3f4f6;
  --text-secondary: #d1d5db;
  --text-muted: #9ca3af;
  --text-emerald: #34d399;
  --text-gold: #fbbf24;
  --text-danger: #f87171;

  --border-subtle: #263832;
  --border-emerald: #065f46;
  --border-gold: #78350f;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Font Scales for Elderly Accessibility */
html[data-font-scale="normal"] {
  --arabic-font-size: 1.75rem;
  --latin-font-size: 0.98rem;
  --translation-font-size: 0.95rem;
}

html[data-font-scale="large"] {
  --arabic-font-size: 2.1rem;
  --latin-font-size: 1.1rem;
  --translation-font-size: 1.05rem;
}

html[data-font-scale="xlarge"] {
  --arabic-font-size: 2.45rem;
  --latin-font-size: 1.22rem;
  --translation-font-size: 1.16rem;
}

html[data-font-scale="jumbo"] {
  --arabic-font-size: 2.85rem;
  --latin-font-size: 1.35rem;
  --translation-font-size: 1.28rem;
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button,
input {
  font-family: inherit;
}

.hidden {
  display: none !important;
}

/* Mobile App Shell Wrapper */
.app-shell {
  max-width: 560px;
  min-height: 100vh;
  margin: 0 auto;
  background-color: var(--bg-page);
  position: relative;
  padding-bottom: 86px; /* Space for fixed bottom nav */
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.08);
}

/* Sticky Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: linear-gradient(135deg, var(--bg-emerald-deep) 0%, var(--bg-emerald-primary) 100%);
  color: #ffffff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-md);
}

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

.brand-icon {
  font-size: 1.65rem;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-text h1 {
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.brand-text p {
  font-size: 0.74rem;
  opacity: 0.88;
}

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

.icon-btn {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.icon-btn:hover,
.icon-btn:active {
  background: rgba(255, 255, 255, 0.28);
}

/* Main Content Area */
.app-main {
  padding: 14px 12px 24px;
}

.tab-panel {
  display: none;
  animation: fadeIn 0.2s ease;
}

.tab-panel.active {
  display: block;
}

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

/* Scheme Selector Card (Gelombang I vs Gelombang Akhir) */
.scheme-selector-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
}

.scheme-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.scheme-label {
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.link-btn {
  background: none;
  border: none;
  color: var(--text-emerald);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.scheme-toggle-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.scheme-option-btn {
  background-color: var(--bg-surface-soft);
  border: 2px solid var(--border-subtle);
  border-radius: 12px;
  padding: 10px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: all 0.15s ease;
  color: var(--text-primary);
}

.scheme-option-btn.active {
  background-color: var(--bg-emerald-light);
  border-color: var(--accent-emerald);
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.15);
}

.scheme-option-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-emerald);
  letter-spacing: 0.02em;
}

.scheme-option-title {
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.25;
}

.scheme-option-desc {
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

/* Sub-Opsi Bandara Kedatangan (Landing Madinah vs Landing Jeddah) */
.landing-subselector {
  background-color: var(--bg-gold-soft);
  border: 1.5px solid var(--border-gold);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 12px;
}

.landing-subselector-title {
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--text-gold);
  margin-bottom: 8px;
}

.landing-subselector-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.landing-btn {
  background-color: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: 10px;
  padding: 9px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: var(--text-primary);
  transition: all 0.15s ease;
}

.landing-btn.active {
  background-color: var(--bg-emerald-light);
  border-color: var(--accent-emerald);
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.14);
}

.landing-btn-tag {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-emerald);
  text-transform: uppercase;
}

.landing-btn strong {
  font-size: 0.82rem;
  font-weight: 800;
}

.landing-btn span {
  font-size: 0.71rem;
  color: var(--text-secondary);
  line-height: 1.32;
}

/* Active Scheme Banner & Progress */
.scheme-banner {
  background-color: var(--bg-surface-soft);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 12px;
}

.scheme-banner-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text-emerald);
  margin-bottom: 4px;
}

.scheme-banner-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.scheme-meta-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 0.77rem;
}

.scheme-meta-item {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 7px 9px;
}

.scheme-meta-item strong {
  color: var(--text-primary);
  display: block;
  margin-bottom: 1px;
}

.progress-box {
  margin-top: 8px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.76rem;
  font-weight: 700;
  margin-bottom: 5px;
}

.progress-track {
  height: 8px;
  background-color: var(--border-subtle);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-emerald), #10b981);
  border-radius: 999px;
  transition: width 0.25s ease;
}

/* Filter Chips & Toolbar */
.stages-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.filter-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-chips.horizontal-scroll {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 12px;
  scrollbar-width: none;
}

.filter-chips.horizontal-scroll::-webkit-scrollbar {
  display: none;
}

.chip {
  background-color: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip.active {
  background-color: var(--bg-emerald-primary);
  color: #ffffff;
  border-color: var(--bg-emerald-primary);
}

.text-action-btn {
  background: none;
  border: none;
  color: var(--text-emerald);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 6px;
}

/* Steps Timeline Cards */
.steps-timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step-card {
  background-color: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease;
}

.step-card.completed {
  border-color: var(--accent-emerald);
}

.step-card-header {
  width: 100%;
  background: none;
  border: none;
  padding: 14px;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--text-primary);
}

.step-number-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background-color: var(--bg-emerald-light);
  color: var(--text-emerald);
  font-weight: 800;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--border-emerald);
}

.step-card.completed .step-number-badge {
  background-color: var(--accent-emerald);
  color: #ffffff;
  border-color: var(--accent-emerald);
}

.step-header-content {
  flex: 1;
  min-width: 0;
}

.step-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 5px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
}

.badge-hukum {
  background-color: var(--bg-gold-soft);
  color: var(--text-gold);
  border: 1px solid var(--border-gold);
}

.badge-timing {
  background-color: var(--bg-surface-soft);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.badge-prep-status {
  background-color: var(--bg-emerald-light);
  color: var(--text-emerald);
}

.step-title {
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 3px;
}

.step-subtitle {
  font-size: 0.79rem;
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.step-location {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 600;
}

.step-chevron {
  font-size: 1rem;
  color: var(--text-muted);
  transition: transform 0.2s ease;
  margin-top: 4px;
}

.step-card.expanded .step-chevron {
  transform: rotate(180deg);
}

/* Step Body Details */
.step-card-body {
  display: none;
  padding: 0 14px 16px;
  border-top: 1px solid var(--border-subtle);
}

.step-card.expanded .step-card-body {
  display: block;
}

.step-overview {
  background-color: var(--bg-surface-soft);
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 12px 0;
  border-left: 3.5px solid var(--accent-emerald);
}

.step-sub-block {
  margin-top: 16px;
}

.sub-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
}

.sub-block-title {
  font-size: 0.86rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-emerald);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Preparation Interactive Checklist */
.prep-checklist {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.prep-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background-color: var(--bg-surface-soft);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.prep-item.checked {
  background-color: var(--bg-emerald-light);
  border-color: var(--border-emerald);
}

.prep-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--accent-emerald);
  flex-shrink: 0;
  cursor: pointer;
}

.prep-item-text {
  flex: 1;
}

.prep-item-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-primary);
  display: block;
  margin-bottom: 2px;
}

.prep-item.checked .prep-item-title {
  text-decoration: line-through;
  opacity: 0.85;
}

.prep-item-detail {
  font-size: 0.78rem;
  color: var(--text-secondary);
  display: block;
}

/* Execution Ordered List */
.execution-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.execution-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-primary);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 10px 12px;
}

.execution-num {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background-color: var(--bg-emerald-primary);
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Important Notes Alert Box */
.notes-box {
  background-color: var(--bg-gold-soft);
  border: 1px solid var(--border-gold);
  border-radius: 10px;
  padding: 11px 12px;
  margin-top: 14px;
}

.notes-box-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-gold);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.notes-list {
  padding-left: 18px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* Prayer Cards (Arabic, Indonesian Latin Transliteration, Indonesian Meaning) */
.prayers-stack,
.prayers-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.prayer-card {
  background-color: var(--bg-surface);
  border: 1.5px solid var(--border-emerald);
  border-radius: 14px;
  padding: 14px;
  box-shadow: var(--shadow-sm);
}

.prayer-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.prayer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 4px;
}

.prayer-category-tag {
  background-color: var(--bg-emerald-light);
  color: var(--text-emerald);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
}

.prayer-repeat-tag {
  background-color: var(--bg-gold-soft);
  color: var(--text-gold);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
}

.prayer-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
}

.prayer-moment {
  font-size: 0.77rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  font-style: italic;
}

.prayer-arabic {
  font-family: 'Scheherazade New', 'Amiri', 'Traditional Arabic', 'Geeza Pro', serif;
  font-size: var(--arabic-font-size);
  line-height: var(--arabic-line-height);
  direction: rtl;
  text-align: right;
  color: var(--text-primary);
  background-color: var(--bg-surface-soft);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
  border: 1px solid var(--border-subtle);
  word-spacing: 2px;
}

.prayer-latin-block {
  margin-bottom: 10px;
}

.prayer-block-label {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-emerald);
  display: block;
  margin-bottom: 3px;
}

.prayer-latin {
  font-size: var(--latin-font-size);
  font-weight: 600;
  color: var(--text-gold);
  line-height: 1.6;
}

.prayer-translation-block {
  border-top: 1px dashed var(--border-subtle);
  padding-top: 9px;
}

.prayer-translation {
  font-size: var(--translation-font-size);
  color: var(--text-secondary);
  line-height: 1.6;
}

.prayer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.prayer-action-btn {
  background-color: var(--bg-surface-soft);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 7px 11px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.prayer-action-btn:hover,
.prayer-action-btn:active {
  background-color: var(--bg-emerald-light);
  border-color: var(--accent-emerald);
  color: var(--text-emerald);
}

/* Step Footer Buttons */
.step-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

.primary-btn {
  background-color: var(--bg-emerald-primary);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 11px 16px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1;
  transition: opacity 0.15s ease;
}

.primary-btn.done {
  background-color: var(--accent-emerald);
}

.secondary-btn {
  background-color: var(--bg-surface-soft);
  color: var(--text-emerald);
  border: 1.5px solid var(--border-emerald);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.83rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* Section Hero & Search Box */
.section-hero {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 12px;
}

.section-hero h2 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-emerald);
  margin-bottom: 4px;
}

.section-hero p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.search-box {
  position: relative;
  margin-top: 10px;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  font-size: 0.9rem;
}

.search-box input {
  width: 100%;
  padding: 10px 36px 10px 36px;
  border-radius: 10px;
  border: 1.5px solid var(--border-subtle);
  background-color: var(--bg-surface-soft);
  color: var(--text-primary);
  font-size: 0.88rem;
}

.search-box input:focus {
  outline: none;
  border-color: var(--accent-emerald);
}

.clear-search-btn {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  cursor: pointer;
}

/* Interactive Tool Tab (Tawaf, Sa'i, Jumrah Counters) */
.tool-selector-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.tool-tab-btn {
  background-color: var(--bg-surface);
  color: var(--text-secondary);
  border: 1.5px solid var(--border-subtle);
  border-radius: 10px;
  padding: 10px 8px;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.tool-tab-btn.active {
  background-color: var(--bg-emerald-primary);
  color: #ffffff;
  border-color: var(--bg-emerald-primary);
}

.counter-card {
  background-color: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 14px;
  text-align: center;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}

.counter-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-emerald);
  margin-bottom: 4px;
}

.counter-subtitle {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.counter-ring {
  width: 140px;
  height: 140px;
  margin: 0 auto 14px;
  border-radius: 999px;
  background-color: var(--bg-emerald-light);
  border: 5px solid var(--accent-emerald);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.counter-number {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--text-emerald);
  line-height: 1;
}

.counter-max {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-top: 4px;
}

.counter-status-pill {
  display: inline-block;
  background-color: var(--bg-gold-soft);
  color: var(--text-gold);
  border: 1px solid var(--border-gold);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.counter-controls {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.counter-btn-main {
  background-color: var(--bg-emerald-primary);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 14px 22px;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  flex: 2;
}

.counter-btn-sub {
  background-color: var(--bg-surface-soft);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 14px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.lap-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 14px;
}

.lap-dot {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background-color: var(--bg-surface-soft);
  border: 1.5px solid var(--border-subtle);
  font-size: 0.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.lap-dot.active {
  background-color: var(--accent-emerald);
  color: #ffffff;
  border-color: var(--accent-emerald);
}

/* Guide & Comparison Cards */
.guide-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.guide-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}

.guide-card h3 {
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--text-emerald);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.comparison-table {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comparison-row {
  background-color: var(--bg-surface-soft);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 10px;
}

.comparison-aspect {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-gold);
  margin-bottom: 6px;
}

.comparison-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 0.78rem;
}

.comparison-col {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 8px;
}

.comparison-col strong {
  display: block;
  font-size: 0.72rem;
  color: var(--text-emerald);
  margin-bottom: 2px;
}

.guide-list {
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.84rem;
  color: var(--text-secondary);
}

/* Bottom Navigation Bar */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 560px;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
  z-index: 45;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
}

.nav-item {
  background: none;
  border: none;
  padding: 6px 4px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--text-muted);
  transition: all 0.15s ease;
}

.nav-item.active {
  color: var(--text-emerald);
  background-color: var(--bg-emerald-light);
}

.nav-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.nav-label {
  font-size: 0.7rem;
  font-weight: 700;
}

/* Modals (Font Settings & Fullscreen Focus Mode) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.55);
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.modal-sheet {
  width: 100%;
  max-width: 560px;
  background-color: var(--bg-surface);
  border-radius: 20px 20px 0 0;
  padding: 18px 16px 28px;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.modal-header h3 {
  font-size: 1rem;
  font-weight: 800;
}

.close-modal-btn {
  background-color: var(--bg-surface-soft);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  width: 36px;
  height: 36px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

.setting-group {
  margin-bottom: 16px;
}

.setting-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.font-size-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.font-size-btn {
  background-color: var(--bg-surface-soft);
  color: var(--text-primary);
  border: 1.5px solid var(--border-subtle);
  border-radius: 8px;
  padding: 9px 4px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.font-size-btn.active {
  background-color: var(--bg-emerald-primary);
  color: #ffffff;
  border-color: var(--bg-emerald-primary);
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.toggle-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--accent-emerald);
}

/* Fullscreen Prayer Focus Modal */
.modal-fullscreen {
  width: 100%;
  max-width: 560px;
  height: 100vh;
  background-color: var(--bg-surface);
  display: flex;
  flex-direction: column;
}

.focus-modal-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.focus-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-emerald);
  background-color: var(--bg-emerald-light);
  padding: 2px 8px;
  border-radius: 6px;
  margin-bottom: 3px;
}

.focus-header-info h3 {
  font-size: 1rem;
  font-weight: 800;
}

.focus-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 16px;
}

.focus-modal-footer {
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border-subtle);
  display: flex;
  gap: 8px;
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 94px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #111827;
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  z-index: 80;
  box-shadow: var(--shadow-lg);
}
