/* ═══════════════════════════════════════════════
   WAQAF.CO v2.3 — FRESH BUILD
   Design: Charcoal & Sage
   ═══════════════════════════════════════════════ */

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

:root {
  /* Soft Cream */
  --charcoal:       #2C2C2A;
  --charcoal-mid:   #3F3F3C;
  --charcoal-soft:  #565653;
  /* Sage accent */
  --sage:           #5F7A6B;
  --sage-mid:       #7A9688;
  --sage-light:     #A8C5B5;
  --sage-bg:        #EDF2EE;
  --sage-border:    #C8D8CC;
  /* Warm neutrals */
  --bg:             #FAF8F5;
  --surface:        #FFFFFF;
  --surface2:       #F0EDE8;
  --border:         #E0DCD6;
  --text:           #2C2C2A;
  --text-mid:       #555250;
  --text-muted:     #8A8780;
  /* Semantic */
  --green:          #2D6A4F;
  --green-bg:       #EAF5EE;
  --green-border:   #B8D4C0;
  --gold:           #B8860B;
  --gold-bg:        #FDF6E3;
  --gold-border:    #E8D4A0;
  --red:            #C0392B;
  /* Panel — dark bg for headers with white text */
  --panel-bg:       #2C2C2A;
  /* Hero colors */
  --hero-default:   #2C2C2A;
  --hero-mosque:    #2C2C2A;
  --hero-jumaat:    #1A0F00;
  --hero-kubur:     #2D1A5C;
  --hero-hospital:  #0D3A52;
  --hero-musafir:   #0D2035;
  --hero-school-pagi:  #0F1F3D;
  --hero-school-ugama: #143D2B;
  --hero-tahajjud:  #100C20;
  --hero-mlm-jumaat:#1A0F00;
  --hero-iftar:     #4A2800;
  --hero-sahur:     #120C24;
  /* Fonts */
  --font-arabic:    'Amiri', serif;
  --font-ui:        'DM Sans', sans-serif;
  /* Radius */
  --r-sm:  8px;
  --r-md:  12px;
  --r-lg:  16px;
  --r-xl:  20px;
  /* Shadows */
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.06);
  --shadow-md: 0 2px 12px rgba(0,0,0,0.08);
}

html { font-size: 15px; }
body {
  font-family: var(--font-ui);
  background: #E8E4DC;
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── APP SHELL ── */
#app {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

/* ── SCREENS ── */
.screen {
  display: none;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
}
.screen.active { display: flex; }

/* ── SCROLLABLE CONTENT ── */
.screen-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 80px);
}

/* ═══════════════════════════════════════════════
   HOME SCREEN
   ═══════════════════════════════════════════════ */

/* Topbar */
.topbar {
  background: var(--surface);
  border-bottom: 0.5px solid var(--border);
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-brand {
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.topbar-jawi {
  font-family: var(--font-arabic);
  font-size: 24px;
  color: var(--sage);
  line-height: 1;
}
.topbar-dot {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0.6;
}
.topbar-loc {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--surface2);
  border-radius: 20px;
  padding: 5px 11px;
  cursor: pointer;
  max-width: 170px;
}
.loc-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
  transition: background 0.3s;
}
.loc-text {
  font-size: 11px;
  color: var(--text-mid);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Home scroll */
.home-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 14px 100px;
}

/* ── HERO ── */
.hero {
  border-radius: var(--r-lg);
  margin-bottom: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: opacity 0.15s;
}
.hero:active { opacity: 0.92; }
.hero-inner { padding: 18px; }

/* Dark hero */
.hero-dark { background: var(--panel-bg); color: #fff; }
.hero-dark .hero-eye { color: rgba(255,255,255,0.45); }
.hero-dark .hero-ar { color: var(--sage-light); }
.hero-dark .hero-title { color: #fff; }
.hero-dark .hero-sub { color: rgba(255,255,255,0.5); }
.hero-dark .hero-cta { background: var(--sage); color: #fff; }
.hero-dark .wstrip { background: rgba(255,255,255,0.06); }
.hero-dark .wp-cur { background: rgba(255,255,255,0.18); }
.hero-dark .wp-name { color: rgba(255,255,255,0.8); }
.hero-dark .wp-time { color: rgba(255,255,255,0.35); }
.hero-dark .wp-cur .wp-name { color: #fff; }
.hero-dark .wp-cur .wp-time { color: rgba(255,255,255,0.5); }
.hero-dark .wp-past .wp-name { opacity: 0.3; }
.hero-dark .wp-past .wp-time { opacity: 0.2; }

/* Light hero */
.hero-light { background: var(--surface); border: 0.5px solid var(--border); }
.hero-light .hero-eye { color: var(--sage); }
.hero-light .hero-ar { color: var(--charcoal); }
.hero-light .hero-title { color: var(--charcoal); }
.hero-light .hero-sub { color: var(--text-muted); }
.hero-light .hero-cta { background: var(--panel-bg); color: #fff; }
.hero-light .wstrip { background: var(--surface2); }
.hero-light .wp-cur { background: var(--panel-bg); }
.hero-light .wp-name { color: var(--text-mid); }
.hero-light .wp-time { color: var(--text-muted); }
.hero-light .wp-cur .wp-name { color: #fff; }
.hero-light .wp-cur .wp-time { color: rgba(255,255,255,0.5); }
.hero-light .wp-past .wp-name { opacity: 0.35; }
.hero-light .hero-pbar { background: var(--surface2); }
.hero-light .hero-pbar-fill { background: var(--panel-bg); }

/* Hero colour variants */
.hero-mosque    { background: var(--hero-mosque); }
.hero-jumaat    { background: var(--hero-jumaat); }
.hero-kubur     { background: var(--hero-kubur); }
.hero-hospital  { background: var(--hero-hospital); }
.hero-musafir   { background: var(--hero-musafir); }
.hero-school-pagi  { background: var(--hero-school-pagi); }
.hero-school-ugama { background: var(--hero-school-ugama); }
.hero-tahajjud  { background: var(--hero-tahajjud); }
.hero-mlm-jumaat { background: var(--hero-mlm-jumaat); }
.hero-iftar     { background: var(--hero-iftar); }
.hero-sahur     { background: var(--hero-sahur); }

.hero-eye {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 6px;
}
.hero-ar {
  font-family: var(--font-arabic);
  font-size: 26px;
  direction: rtl;
  text-align: right;
  line-height: 1.7;
  margin-bottom: 2px;
}
.hero-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 3px;
}
.hero-sub {
  font-size: 11px;
  line-height: 1.5;
  margin-bottom: 12px;
}
.hero-cta {
  display: inline-block;
  border: none;
  border-radius: var(--r-sm);
  padding: 8px 16px;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.3px;
}

/* Waktu strip */
.wstrip {
  display: flex;
  gap: 3px;
  margin-top: 12px;
  border-radius: var(--r-sm);
  padding: 4px;
}
.wp {
  flex: 1;
  padding: 4px 2px;
  border-radius: 5px;
  text-align: center;
}
.wp-cur { }
.wp-name { font-size: 11px; font-weight: 600; display: block; }
.wp-time { font-size: 11px; display: block; margin-top: 1px; }
.wp-countdown { font-size: 9px; display: block; font-weight: 700; color: var(--sage-light); margin-top: 2px; }
.wp-iqamah   { font-size: 9px; display: block; font-weight: 700; color: #FFD700; margin-top: 2px; animation: blink 1s infinite; }
.wp-soon     { font-size: 9px; display: block; color: rgba(255,255,255,0.45); margin-top: 2px; }
.hero-light .wp-countdown { color: var(--sage); }
.hero-light .wp-iqamah   { color: var(--gold); }
.hero-light .wp-soon     { color: var(--text-muted); }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.4} }

/* Prayer Timeline */
.prayer-timeline {
  padding: 8px 0 0;
}
.pt-dates {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 12px;
}
.pt-next {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 14px;
}
.pt-next strong {
  color: var(--sage-light);
  font-size: 14px;
}
.pt-track {
  position: relative;
  height: 3px;
  background: rgba(255,255,255,0.12);
  border-radius: 3px;
  margin: 0 10px;
}
.pt-fill {
  height: 100%;
  background: var(--sage-light);
  border-radius: 3px;
  transition: width 1s;
}
.pt-items {
  display: flex;
  justify-content: space-between;
  margin: 0 0px;
  position: relative;
  top: -8px;
}
.pt-item {
  text-align: center;
  flex: 1;
  min-width: 0;
}
.pt-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  margin: 0 auto 4px;
  position: relative;
}
.pt-dot.active {
  background: var(--sage-light);
  width: 10px; height: 10px;
  box-shadow: 0 0 6px rgba(168,197,181,0.5);
}
.pt-dot.past { background: rgba(255,255,255,0.35); }
.pt-icon { font-size: 12px; margin-bottom: 2px; display: block; }
.pt-name { font-size: 10px; color: rgba(255,255,255,0.5); display: block; text-transform: uppercase; letter-spacing: 0.5px; }
.pt-item.active .pt-name { color: var(--sage-light); font-weight: 600; }
.pt-item.past .pt-name { opacity: 0.4; }
.pt-time { font-size: 10px; color: rgba(255,255,255,0.35); display: block; }
.pt-item.active .pt-time { color: rgba(255,255,255,0.7); }

/* Light hero timeline */
.hero-light .pt-dates { color: var(--text-muted); }
.hero-light .pt-next { color: var(--text-mid); }
.hero-light .pt-next strong { color: var(--sage); }
.hero-light .pt-track { background: var(--surface2); }
.hero-light .pt-fill { background: var(--sage); }
.hero-light .pt-dot { background: var(--border); }
.hero-light .pt-dot.active { background: var(--sage); box-shadow: 0 0 6px rgba(95,122,107,0.3); }
.hero-light .pt-dot.past { background: var(--text-muted); }
.hero-light .pt-name { color: var(--text-muted); }
.hero-light .pt-item.active .pt-name { color: var(--sage); }
.hero-light .pt-time { color: var(--text-muted); }
.hero-light .pt-item.active .pt-time { color: var(--charcoal); }
.pt-end { font-size: 8px; color: rgba(255,255,255,0.3); display: block; font-weight: 400; }
.pt-item.active .pt-end { color: rgba(255,255,255,0.5); }
.hero-light .pt-end { color: var(--text-muted); opacity: 0.6; }
.hero-light .pt-item.active .pt-end { color: var(--sage); opacity: 1; font-weight: 600; }

/* Sudah Solat Tracker */
.solat-tracker {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--r-lg);
  margin: 8px 0 8px;
  padding: 14px;
  box-shadow: var(--shadow-sm);
}
.st-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.st-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.st-streak {
  font-size: 10px;
  font-weight: 600;
  color: var(--sage);
  background: var(--sage-bg);
  padding: 2px 8px;
  border-radius: 10px;
}
.st-circles {
  display: flex;
  justify-content: space-between;
  gap: 6px;
}
.st-item {
  flex: 1;
  text-align: center;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
.st-circle {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border);
  margin: 0 auto 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-muted);
  transition: all 0.2s;
}
.st-circle:active { transform: scale(0.9); }
.st-item.done .st-circle {
  border-color: var(--green);
  background: var(--green-bg);
  color: var(--green);
}
.st-name {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}
.st-item.done .st-name { color: var(--green); }
.st-time {
  font-size: 9px;
  color: var(--text-muted);
  opacity: 0.6;
}
.st-all-done {
  text-align: center;
  font-size: 11px;
  color: var(--green);
  font-weight: 600;
  margin-top: 8px;
}

/* Daily Zikir Card */
.zikir-daily-card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--r-lg);
  margin: 10px 0 12px;
  overflow: hidden;
  transition: opacity 0.3s, max-height 0.3s, margin 0.3s;
  max-height: 200px;
}

/* Puasa pill on home (under zikir) */
.puasa-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 12px;
  padding: 10px 12px;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-left: 3px solid var(--sage);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}
.puasa-pill:active { transform: scale(0.98); }
.puasa-pill.sunat { border-left-color: var(--sage); }
.puasa-pill.active { border-left-color: var(--gold); background: linear-gradient(to right, rgba(184,152,104,0.08), var(--surface)); }
.puasa-pill.done { border-left-color: var(--sage); opacity: 0.7; }
.puasa-pill.countdown { border-left-color: #7489A0; }
.puasa-pill.haram { border-left-color: #B07878; background: linear-gradient(to right, rgba(176,120,120,0.10), var(--surface)); }
.puasa-pill-ic {
  font-size: 22px;
  width: 30px;
  text-align: center;
  flex-shrink: 0;
}
.puasa-pill-body { flex: 1; min-width: 0; }
.puasa-pill-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--charcoal);
  line-height: 1.3;
}
.puasa-pill-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
  margin-top: 2px;
}
.puasa-pill-arr {
  color: var(--text-muted);
  font-size: 18px;
  flex-shrink: 0;
}

/* Puasa screen banner + tracker button — match niat-card width/padding */
.puasa-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  margin: 10px 14px 0;
  border-radius: var(--r-lg);
  border: 0.5px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.puasa-banner.sunat { border-left: 3px solid var(--sage); }
.puasa-banner.haram {
  border-left: 3px solid #B07878;
  background: linear-gradient(to right, rgba(176,120,120,0.12), var(--surface));
}
.puasa-banner-ic { font-size: 28px; flex-shrink: 0; }
.puasa-banner-title { font-size: 14px; font-weight: 700; color: var(--charcoal); }
.puasa-banner-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.puasa-track-btn {
  display: block;
  width: calc(100% - 28px);
  padding: 14px 16px;
  margin: 10px 14px 4px;
  background: var(--surface);
  border: 0.5px solid var(--sage);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  color: var(--sage);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.puasa-track-btn:active { transform: scale(0.98); }
.puasa-track-btn.active {
  background: var(--sage);
  color: #fff;
  border-color: var(--sage);
}

/* Grid red glow for haram days */
.grid-pulse.active.red::before { background: #B07878 !important; }
.zikir-daily-card.dismissed {
  opacity: 0;
  max-height: 0;
  margin: 0;
  overflow: hidden;
}
.zikir-daily-card.completed {
  opacity: 0;
  max-height: 0;
  margin: 0;
  transition: opacity 0.5s 0.5s, max-height 0.3s 0.8s, margin 0.3s 0.8s;
}
.zd-header {
  background: var(--sage);
  padding: 8px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.zd-day { font-size: 12px; font-weight: 600; color: #fff; }
.zd-dismiss { font-size: 10px; color: rgba(255,255,255,0.5); cursor: pointer; border: none; background: none; font-family: var(--font-ui); }
.zd-body {
  padding: 16px;
  text-align: center;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
.zd-body:active { opacity: 0.8; }
.zd-ar {
  font-family: var(--font-arabic);
  font-size: var(--ar-size, 24px);
  color: var(--charcoal);
  direction: rtl;
  line-height: 1.8;
  margin-bottom: 10px;
}
.zd-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px 12px;
}
.zd-bar { flex: 1; height: 3px; background: var(--surface2); border-radius: 3px; overflow: hidden; }
.zd-bar-fill { height: 100%; background: var(--sage); border-radius: 3px; transition: width 0.2s; }
.zd-count { font-size: 12px; font-weight: 600; color: var(--text-muted); min-width: 50px; text-align: right; }
.zd-tap-hint { font-size: 10px; color: var(--text-muted); opacity: 0.5; margin-top: 6px; text-align: center; }
.zd-done-msg { font-size: 12px; font-weight: 600; color: var(--sage); text-align: center; padding: 8px 0 4px; }
.zd-recommend { text-align: center; padding: 8px 0; border-top: 0.5px solid var(--border); margin-top: 6px; }
.zd-rec-lbl { font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-muted); margin-bottom: 6px; }
.zd-rec-ar { font-family: var(--font-arabic); font-size: var(--ar-size, 24px); color: var(--charcoal); direction: rtl; line-height: 1.8; }
.zd-rec-name { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.zd-rec-hint { font-size: 10px; color: var(--sage); font-weight: 600; margin-top: 8px; }

/* Smart Waktu Bar — below hero */
.waktu-bar-smart {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--r-lg);
  margin: 8px 0 0;
  padding: 10px 8px;
  box-shadow: var(--shadow-sm);
}
.waktu-bar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
.wb-item {
  text-align: center;
  padding: 6px 2px;
  border-radius: var(--r-sm);
  transition: all 0.2s;
}
.wb-item.past { opacity: 0.35; }
.wb-item.active {
  background: var(--panel-bg);
  color: #fff;
}
.wb-item.active .wb-name { color: #fff; }
.wb-item.active .wb-time { color: rgba(255,255,255,0.6); }
.wb-item.active .wb-status { color: var(--sage-light); }
.wb-name { font-size: 10px; font-weight: 600; color: var(--charcoal); display: block; }
.wb-time { font-size: 11px; color: var(--text-muted); display: block; margin-top: 1px; }
.wb-status { font-size: 9px; font-weight: 700; color: var(--sage); display: block; margin-top: 2px; min-height: 14px; }
.wb-status.iqamah { color: var(--gold); animation: blink 1s infinite; }
.wb-done { font-size: 9px; color: var(--green); }
.wb-iq-bar { height: 2px; background: var(--border); border-radius: 2px; margin-top: 3px; overflow: hidden; }
.wb-iq-fill { height: 100%; background: var(--gold); border-radius: 2px; transition: width 1s; }

/* Progress bar */
.hero-pbar {
  height: 3px;
  border-radius: 3px;
  background: rgba(255,255,255,0.15);
  margin-top: 10px;
  overflow: hidden;
}
.hero-pbar-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--sage-light);
  transition: width 0.4s;
}

/* Inline doa block */
.hero-doa {
  background: rgba(255,255,255,0.08);
  border-radius: var(--r-sm);
  padding: 9px 11px;
  margin-bottom: 10px;
}
.hero-doa-lbl {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
  margin-bottom: 4px;
}
.hero-doa-ar {
  font-family: var(--font-arabic);
  font-size: 22px;
  direction: rtl;
  text-align: right;
  color: var(--sage-light);
  line-height: 2;
}

/* Zikir ring */
.zring-wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}
.zring {
  width: 62px; height: 62px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: all 0.15s;
  flex-shrink: 0;
}
.zring:active { transform: scale(0.95); }
.zring.done { border-color: var(--green); background: var(--green-bg); }
.zring-num { font-size: 22px; font-weight: 700; color: var(--charcoal); line-height: 1; }
.zring.done .zring-num { color: var(--green); }
.zring-of { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

/* Musafir pills */
.msf-pills { display: flex; gap: 5px; margin-bottom: 10px; }
.msf-pill {
  flex: 1;
  background: rgba(255,255,255,0.1);
  border-radius: var(--r-sm);
  padding: 7px 5px;
  text-align: center;
}
.msf-pill-n { font-size: 12px; font-weight: 600; color: var(--sage-light); }
.msf-pill-s { font-size: 11px; color: rgba(255,255,255,0.35); margin-top: 1px; }

/* ── CONTEXT CARDS ── */
.ctx-card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 11px 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: opacity 0.15s;
}
.ctx-card:active { opacity: 0.8; }
.ctx-card.sage  { background: var(--sage-bg); border-color: var(--sage-border); }
.ctx-card.gold  { background: var(--gold-bg); border-color: var(--gold-border); }
.ctx-card.green { background: var(--green-bg); border-color: var(--green-border); }
.ctx-card.navy  { background: var(--surface); border-color: var(--border); }
.ctx-card.purple { background: var(--surface); border-color: var(--border); }

.ctx-title { font-size: 11px; font-weight: 600; color: var(--charcoal); }
.ctx-card.sage .ctx-title   { color: var(--green); }
.ctx-card.gold .ctx-title   { color: var(--gold); }
.ctx-card.green .ctx-title  { color: var(--green); }
.ctx-card.navy .ctx-title   { color: var(--charcoal); }
.ctx-card.purple .ctx-title { color: var(--charcoal); }

.ctx-sub { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.ctx-card.sage .ctx-sub   { color: var(--sage); }
.ctx-card.gold .ctx-sub   { color: var(--gold); }
.ctx-card.green .ctx-sub  { color: var(--green); }

.ctx-arr { font-size: 13px; color: var(--text-muted); margin-left: auto; flex-shrink: 0; }

/* School doa expand */
.school-doa {
  background: var(--sage-bg);
  border: 0.5px solid var(--sage-border);
  border-radius: var(--r-md);
  padding: 13px;
  margin-bottom: 6px;
}
.school-doa-hdr {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
}
.school-doa-icon {
  width: 28px; height: 28px;
  border-radius: 7px;
  background: var(--panel-bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; flex-shrink: 0;
}
.school-doa-title { font-size: 11px; font-weight: 600; color: var(--green); }
.school-doa-sub   { font-size: 11px; color: var(--sage); margin-top: 1px; }
.school-doa-close { margin-left: auto; font-size: 11px; color: var(--sage); font-weight: 600; cursor: pointer; }
.school-doa-item {
  background: var(--surface);
  border: 0.5px solid var(--sage-border);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  margin-bottom: 5px;
}
.school-doa-item:last-child { margin-bottom: 0; }
.school-doa-lbl { font-size: 11px; color: var(--sage); font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 4px; }
.school-doa-ar  { font-family: var(--font-arabic); font-size: var(--ar-size, 22px); direction: rtl; text-align: right; color: var(--charcoal); line-height: 2.1; }
.school-doa-tr  { font-size: 11px; color: var(--sage); line-height: 1.6; margin-top: 4px; font-style: italic; }
.school-doa-ms  { font-size: 11px; color: var(--text-muted); line-height: 1.6; margin-top: 4px; }

/* ── SECTION LABEL ── */
.sec-lbl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 2px 7px;
}
.sec-lbl-ms {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}
.sec-lbl-ar {
  font-family: var(--font-arabic);
  font-size: 20px;
  color: var(--text-muted);
}

/* ── 4-CARD GRID ── */
.home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}
.grid-card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: var(--shadow-sm);
}
.grid-card:active { opacity: 0.8; transform: scale(0.98); }
.grid-card-ar {
  font-family: var(--font-arabic);
  font-size: 24px;
  color: var(--sage);
  direction: rtl;
  margin-bottom: 4px;
  line-height: 1.4;
}
.grid-card-icon { font-size: 20px; margin-bottom: 5px; display: block; }
.grid-card-name { font-size: 12px; font-weight: 600; color: var(--charcoal); }
.grid-card-sub  { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.grid-card { position: relative; }
.grid-pulse {
  position: absolute;
  top: 10px; right: 10px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--sage);
  display: none;
}
.grid-pulse.active { display: block; animation: gpulse 1.5s ease-in-out infinite; }
.grid-pulse.gold { background: var(--gold); }
.grid-pulse.red { background: #C0392B; }
@keyframes gpulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.4;transform:scale(1.4)} }

/* ── SULHAFS AI ── */
.sulhafs {
  background: var(--panel-bg);
  border-radius: var(--r-lg);
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0.6;
  cursor: default;
  position: relative;
  margin-bottom: 8px;
}
.sulhafs-soon {
  position: absolute;
  top: 10px; right: 12px;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.35);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: 1px;
}
.sulhafs-icon {
  width: 38px; height: 38px;
  background: rgba(168,197,181,0.15);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sulhafs-title { font-size: 13px; font-weight: 600; color: #fff; margin-bottom: 2px; }
.sulhafs-sub   { font-size: 11px; color: rgba(255,255,255,0.4); }

/* ═══════════════════════════════════════════════
   BOTTOM NAV
   ═══════════════════════════════════════════════ */
.bnav {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%; max-width: 430px;
  background: var(--surface);
  border-top: 0.5px solid var(--border);
  display: flex;
  padding: 6px 0 calc(env(safe-area-inset-bottom, 0px) + 10px);
  z-index: 100;
}
.bnav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 5px 0;
  font-family: var(--font-ui);
  transition: opacity 0.15s;
}
.bnav-pip {
  width: 14px; height: 3px;
  border-radius: 2px;
  margin-bottom: 2px;
  background: transparent;
  transition: background 0.2s;
}
.bnav-item.active .bnav-pip { background: var(--sage); }
.bnav-icon { font-size: 18px; }
.bnav-lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}
.bnav-item.active .bnav-lbl { color: var(--charcoal); }

/* ═══════════════════════════════════════════════
   DEEP SCREEN HEADER
   ═══════════════════════════════════════════════ */
.deep-header {
  background: var(--panel-bg);
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px 20px;
  position: relative;
}
.deep-back {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 12px); left: 14px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: none;
  color: rgba(255,255,255,0.8);
  font-size: 16px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.deep-back:active { background: rgba(255,255,255,0.2); }
.deep-ar {
  font-family: var(--font-arabic);
  font-size: 32px;
  color: var(--sage-light);
  direction: rtl;
  text-align: center;
  line-height: 1.6;
  margin-bottom: 6px;
}
.deep-title {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  text-align: center;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.deep-sub {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  text-align: center;
  margin-top: 3px;
}
.deep-sub.thl-jump {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.15s;
  display: inline-block;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90%;
}
.deep-sub.thl-jump:active { background: rgba(255,255,255,0.08); }
.thl-jump-sec {
  color: rgba(255,255,255,0.75);
  font-weight: 600;
}
.thl-jump-hint {
  display: inline-block;
  font-size: 9.5px;
  color: rgba(255,255,255,0.35);
  margin-left: 4px;
  opacity: 0.85;
}

/* ── CREDIT / REFERENCE CHIP ── */
.credit-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 8px auto 0;
  background: rgba(255,255,255,0.08);
  border: 0.5px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.82);
  font-family: var(--font-ui);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.2px;
  padding: 5px 10px 5px 8px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}
.credit-chip:hover, .credit-chip:active {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.4);
}
.credit-chip-ic { font-size: 11px; line-height: 1; filter: grayscale(0.15); }

/* light variant for light headers */
.credit-chip.credit-chip-light {
  background: var(--sage-bg);
  border-color: var(--sage-border);
  color: var(--sage);
}
.credit-chip.credit-chip-light:hover, .credit-chip.credit-chip-light:active {
  background: #E2EBE4;
  border-color: var(--sage);
}

.credit-panel {
  background: var(--sage-bg);
  border-bottom: 0.5px solid var(--sage-border);
  padding: 14px 16px 16px;
  animation: creditFade 0.2s ease;
}
@keyframes creditFade {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.credit-card {
  background: #fff;
  border: 0.5px solid var(--sage-border);
  border-radius: 10px;
  padding: 16px 18px 14px;
  text-align: center;
  position: relative;
  max-width: 340px;
  margin: 0 auto;
}
.credit-crown {
  font-size: 22px;
  line-height: 1;
  margin-bottom: 6px;
  filter: grayscale(0.2);
}
.credit-head {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--sage);
  text-transform: uppercase;
}
.credit-divider {
  width: 40px;
  height: 1px;
  background: var(--sage-border);
  margin: 8px auto 10px;
}
.credit-body {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--text-mid);
  line-height: 1.5;
  margin-bottom: 10px;
}
.credit-ref {
  background: var(--sage-bg);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.credit-ref-book {
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 4px;
}
.credit-ref-org {
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--sage);
  margin-bottom: 2px;
}
.credit-ref-sub {
  font-family: var(--font-ui);
  font-size: 10.5px;
  color: var(--text-muted);
  line-height: 1.5;
}
.credit-foot {
  font-family: var(--font-ui);
  font-size: 10.5px;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 12px;
}
.credit-close {
  background: transparent;
  border: 0.5px solid var(--sage-border);
  color: var(--sage);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 999px;
  cursor: pointer;
}
.credit-close:hover { background: var(--sage-bg); }

/* ── BACKUP AWAN (cloud backup) ── */
.backup-code-lbl {
  font-family: var(--font-ui);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 6px;
}
.backup-code-box {
  font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
  font-size: 17px;
  font-weight: 700;
  color: var(--charcoal);
  background: var(--sage-bg);
  border: 0.5px dashed var(--sage-border);
  border-radius: 8px;
  padding: 11px 12px;
  text-align: center;
  letter-spacing: 2.5px;
  user-select: all;
  -webkit-user-select: all;
}
.backup-btn {
  flex: 1;
  background: var(--surface);
  border: 0.5px solid var(--border);
  color: var(--charcoal);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s;
}
.backup-btn:hover, .backup-btn:active { background: var(--surface2); }
.backup-warn {
  font-family: var(--font-ui);
  font-size: 10.5px;
  color: #8A5A5A;
  margin-top: 12px;
  padding: 9px 11px;
  background: rgba(176,120,120,0.08);
  border-radius: 6px;
  border-left: 2px solid #B07878;
  line-height: 1.55;
}

/* ── KREDIT PAGE (source list) ── */
.kredit-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
}
.kredit-ic {
  font-size: 20px;
  line-height: 1;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--sage-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  filter: grayscale(0.15);
}
.kredit-body { flex: 1; min-width: 0; }
.kredit-title {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--charcoal);
  line-height: 1.35;
  margin-bottom: 3px;
}
.kredit-org {
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--sage);
  margin-bottom: 2px;
}
.kredit-sub {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.kredit-use {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--text-mid);
  line-height: 1.5;
  padding-top: 6px;
  border-top: 0.5px dashed var(--border);
}

.i18n-float, .i18n-combo {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
}
.i18n-combo {
  display: inline-flex;
  align-items: center;
  border: 0.5px solid var(--border);
  border-radius: 16px;
  padding: 2px 4px;
  background: transparent;
}
.i18n-seg {
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 4px 9px;
  border-radius: 12px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.5;
  filter: grayscale(1);
  transition: all 0.15s ease;
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.i18n-seg.on {
  opacity: 1;
  filter: none;
  color: var(--sage);
}
.i18n-seg:active { transform: scale(0.9); }
.i18n-sep {
  width: 1px;
  height: 14px;
  background: var(--border);
  margin: 0 2px;
}
/* Legacy pill (kept for backward compat) */
.i18n-pill {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border: 0.5px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  opacity: 0.55;
  filter: grayscale(1);
  transition: all 0.15s ease;
  padding: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.i18n-pill.on {
  opacity: 1;
  filter: none;
  background: var(--sage-bg);
  border-color: var(--sage-border);
}
.i18n-pill:active { transform: scale(0.9); }

/* Light deep header variant */
.deep-header-light {
  background: var(--surface);
  border-bottom: 0.5px solid var(--border);
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px 16px;
  position: relative;
}
.deep-header-light .deep-back {
  background: var(--surface2);
  color: var(--charcoal);
}
.deep-header-light .deep-ar { color: var(--charcoal); }
.deep-header-light .deep-title { color: var(--charcoal); }
.deep-header-light .deep-sub { color: var(--text-muted); }

/* ── CONTENT CARD ── */
.content-card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--r-lg);
  margin: 10px 14px 0;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.content-card + .content-card { margin-top: 8px; }

.card-row {
  padding: 14px 16px;
  border-bottom: 0.5px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background 0.15s;
}
.card-row:last-child { border-bottom: none; }
.card-row:active { background: var(--bg); }
.card-row-ar {
  font-family: var(--font-arabic);
  font-size: 15px;
  color: var(--sage);
  flex-shrink: 0;
}
.card-row-body { flex: 1; }
.card-row-title { font-size: 13px; font-weight: 600; color: var(--charcoal); }
.card-row-sub   { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.card-row-arr   { font-size: 14px; color: var(--text-muted); }

/* Arabic content block */
.ar-block {
  font-family: var(--font-arabic);
  font-size: var(--ar-size, 24px);
  direction: rtl;
  text-align: right;
  color: var(--charcoal);
  line-height: 2.1;
  background: var(--bg);
  border-radius: var(--r-md);
  padding: 14px;
  margin: 10px 14px;
}
.ar-block-lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--sage);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 14px 14px 4px;
}
.ar-ms {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.7;
  font-style: italic;
  margin: 6px 14px 12px;
}

/* Niat section */
.niat-card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--r-lg);
  margin: 10px 14px 0;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.niat-toggle {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  border-bottom: 0.5px solid transparent;
  transition: all 0.2s;
}
.niat-toggle.open { border-bottom-color: var(--border); }
.niat-toggle-lbl  { font-size: 13px; font-weight: 600; color: var(--charcoal); }
.niat-toggle-chev { font-size: 12px; color: var(--text-muted); transition: transform 0.2s; }
.niat-toggle.open .niat-toggle-chev { transform: rotate(90deg); }
.niat-body { display: none; }
.niat-toggle.open + .niat-body { display: block; }

/* Section divider */
.sec-divider {
  padding: 16px 14px 6px;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
}
.badge-sage   { background: var(--sage-bg); color: var(--sage); }
.badge-gold   { background: var(--gold-bg); color: var(--gold); }
.badge-green  { background: var(--green-bg); color: var(--green); }

/* ═══════════════════════════════════════════════
   TETAPAN (SETTINGS) SCREEN
   ═══════════════════════════════════════════════ */
.tet-group {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--r-lg);
  margin: 8px 14px 0;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.tet-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 15px;
  border-bottom: 0.5px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}
.tet-row:last-child { border-bottom: none; }
.tet-row:active { background: var(--bg); }
.tet-icon {
  width: 32px; height: 32px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; flex-shrink: 0;
}
.tet-icon.sage   { background: var(--sage-bg); }
.tet-icon.navy   { background: var(--surface2); }
.tet-icon.green  { background: var(--green-bg); }
.tet-icon.purple { background: var(--surface2); }
.tet-icon.gold   { background: var(--gold-bg); }
.tet-name { font-size: 13px; font-weight: 600; color: var(--charcoal); }
.tet-sub  { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.tet-arr  { font-size: 14px; color: var(--text-muted); margin-left: auto; }

/* Toggle */
.tet-toggle {
  width: 40px; height: 24px;
  border-radius: 12px;
  background: var(--border);
  border: none;
  position: relative;
  cursor: pointer;
  margin-left: auto;
  flex-shrink: 0;
  transition: background 0.2s;
}
.tet-toggle.on { background: var(--panel-bg); }
.tet-toggle::after {
  content: '';
  position: absolute;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  top: 2px; left: 2px;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.tet-toggle.on::after { transform: translateX(16px); }

/* Font size picker */
.font-picker {
  display: flex;
  gap: 6px;
  padding: 12px 14px;
}
.font-opt {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 10px 5px;
  text-align: center;
  cursor: pointer;
  background: var(--surface);
  transition: all 0.15s;
}
.font-opt.on { border-color: var(--panel-bg); background: var(--panel-bg); }
.font-opt-ar { font-family: var(--font-arabic); color: var(--charcoal); }
.font-opt.on .font-opt-ar { color: var(--sage-light); }
.font-opt-lbl { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; margin-top: 3px; }
.font-opt.on .font-opt-lbl { color: rgba(255,255,255,0.45); }

/* About card */
.about-card {
  background: var(--panel-bg);
  border-radius: var(--r-lg);
  padding: 24px;
  text-align: center;
  margin: 8px 14px 0;
}
.about-jawi { font-family: var(--font-arabic); font-size: 48px; color: var(--sage-light); line-height: 1; }
.about-name { font-size: 11px; color: rgba(255,255,255,0.3); margin-top: 6px; letter-spacing: 0.5px; }
.about-ver  { font-size: 11px; color: rgba(255,255,255,0.18); margin-top: 3px; }
.about-hadith { font-family: var(--font-arabic); font-size: 13px; direction: rtl; color: rgba(255,255,255,0.2); margin-top: 12px; line-height: 1.9; }
.about-ded { font-family: var(--font-arabic); font-size: 12px; direction: rtl; color: rgba(255,255,255,0.12); margin-top: 5px; }

/* ═══════════════════════════════════════════════
   TAHLIL SCREEN
   ═══════════════════════════════════════════════ */
.tahlil-progress {
  margin: 10px 14px;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
}
.tahlil-pbar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.tahlil-pbar-bg {
  flex: 1;
  height: 4px;
  background: var(--surface2);
  border-radius: 4px;
  overflow: hidden;
}
.tahlil-pbar-fill {
  height: 100%;
  background: var(--sage);
  border-radius: 4px;
  transition: width 0.4s;
}
.tahlil-pct { font-size: 11px; font-weight: 600; color: var(--sage); min-width: 32px; text-align: right; }

.tahlil-section {
  margin: 8px 14px 0;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.tahlil-section-hdr {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  border-bottom: 0.5px solid transparent;
  background: var(--bg);
  transition: background 0.15s;
}
.tahlil-section-hdr:active { background: var(--surface2); }
.tahlil-section-hdr.open { border-bottom-color: var(--border); background: var(--surface); }
.tahlil-sec-title { font-size: 12px; font-weight: 600; color: var(--charcoal); }
.tahlil-sec-meta  { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.tahlil-sec-chev  { font-size: 12px; color: var(--text-muted); transition: transform 0.2s; }
.tahlil-section-hdr.open .tahlil-sec-chev { transform: rotate(90deg); }
.tahlil-section-body { display: none; }
.tahlil-section-hdr.open + .tahlil-section-body { display: block; }

/* ═══════════════════════════════════════════════
   SEMBAHYANG (SOLAT) SCREEN
   ═══════════════════════════════════════════════ */
/* ── PRAYER TIMETABLE ── */
.wt-table {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--r-lg);
  margin: 12px 14px 12px;
  overflow: hidden;
}
.wt-date {
  display: flex;
  justify-content: space-between;
  padding: 10px 14px;
  font-size: 11px;
  color: var(--text-muted);
  border-bottom: 0.5px solid var(--border);
  font-weight: 500;
}
.wt-row {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 0.5px solid var(--border);
  transition: background 0.15s;
}
.wt-row:last-child { border-bottom: none; }
.wt-row:not(.fardhu) { opacity: 0.5; }
.wt-row.past { opacity: 0.35; }
.wt-row.active {
  background: var(--sage-bg, rgba(95,122,107,0.08));
  opacity: 1;
}
.wt-row.selected {
  background: var(--sage-bg, rgba(95,122,107,0.12));
}
.wt-row.active .wt-row-name,
.wt-row.active .wt-row-time {
  color: var(--sage);
  font-weight: 700;
}
.wt-row-icon {
  font-size: 16px;
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}
.wt-row-name {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: var(--charcoal);
}
.wt-row-time {
  font-size: 13px;
  font-weight: 600;
  color: var(--charcoal);
  font-variant-numeric: tabular-nums;
}

.solat-section {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--r-lg);
  margin: 10px 14px 0;
  overflow: hidden;
}
.solat-row {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 0.5px solid var(--border);
  cursor: pointer;
  gap: 12px;
  transition: background 0.15s;
}
.solat-row:last-child { border-bottom: none; }
.solat-row:active { background: var(--bg); }
.solat-row-ar   { font-family: var(--font-arabic); font-size: 16px; color: var(--sage); flex-shrink: 0; }
.solat-row-name { font-size: 13px; font-weight: 600; color: var(--charcoal); }
.solat-row-sub  { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.solat-row-arr  { margin-left: auto; font-size: 14px; color: var(--text-muted); }

/* ═══════════════════════════════════════════════
   DOA & ZIKIR SCREEN
   ═══════════════════════════════════════════════ */
/* Compact topbar for doa */
.doa-topbar {
  background: var(--surface);
  border-bottom: 0.5px solid var(--border);
  padding: calc(env(safe-area-inset-top, 0px) + 8px) 14px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}
.doa-topbar-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--charcoal);
}

/* Featured daily doa */
.doa-featured {
  margin: 12px 14px 0;
  background: var(--sage-bg);
  border: 0.5px solid var(--sage-border);
  border-radius: var(--r-lg);
  padding: 16px;
  cursor: pointer;
}
.doa-featured-lbl {
  font-size: 9px;
  font-weight: 600;
  color: var(--sage);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.doa-featured-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 8px;
}
.doa-featured-ar {
  font-family: var(--font-arabic);
  font-size: var(--ar-size, 24px);
  direction: rtl;
  text-align: right;
  color: var(--charcoal);
  line-height: 2;
}
.doa-featured-ms {
  font-size: 11px;
  color: var(--sage);
  margin-top: 8px;
  line-height: 1.5;
}

/* Wrap chips */
.doa-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 14px;
}

/* Section wrapper */
.doa-sec {
  margin: 0 14px 4px;
}
.doa-sec-hdr {
  font-size: 12px;
  font-weight: 600;
  color: var(--charcoal);
  padding: 14px 0 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.doa-sec-icon { font-size: 14px; }
.doa-sec .doa-card {
  margin: 0 0 6px;
  border-radius: var(--r-md);
}

.doa-chips {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}
.doa-chip {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.doa-chip.active {
  border-color: var(--panel-bg);
  background: var(--panel-bg);
  color: #fff;
}
.doa-copy {
  border: none;
  background: var(--surface2);
  color: var(--text-muted);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 10px;
  font-family: var(--font-ui);
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
}
.doa-copy:active { background: var(--sage-bg); color: var(--sage); }
.doa-daily {
  border-left: 3px solid var(--sage);
}
.doa-daily-badge {
  display: inline-block;
  background: var(--sage-bg);
  color: var(--sage);
  font-size: 9px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.doa-zikir-ring {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 2px solid var(--border);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: all 0.15s;
  margin: 8px auto;
  font-size: 18px;
  font-weight: 700;
  color: var(--charcoal);
}
.doa-zikir-ring:active { transform: scale(0.93); }
.doa-zikir-ring.done { border-color: var(--green); background: var(--green-bg); color: var(--green); }
.doa-card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--r-lg);
  margin: 10px 14px 0;
  overflow: hidden;
}
.doa-card-hdr {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  border-bottom: 0.5px solid transparent;
  transition: border-color 0.2s;
}
.doa-card-hdr.open { border-bottom-color: var(--border); }
.doa-card-title { font-size: 13px; font-weight: 600; color: var(--charcoal); }
.doa-card-sub   { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.doa-card-chev  { font-size: 12px; color: var(--text-muted); transition: transform 0.2s; flex-shrink: 0; }
.doa-card-hdr.open .doa-card-chev { transform: rotate(180deg); }
.doa-card-body { display: none; padding: 14px 16px; }
.doa-card-hdr.open + .doa-card-body { display: block; }
.doa-ar { font-family: var(--font-arabic); font-size: var(--ar-size, 24px); direction: rtl; text-align: right; line-height: 2.1; color: var(--charcoal); background: var(--bg); border-radius: var(--r-md); padding: 14px; margin-bottom: 10px; }
.doa-ms-lbl { font-size: 11px; font-weight: 600; color: var(--sage); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 4px; }
.doa-ms { font-size: 12px; color: var(--text-mid); line-height: 1.7; }
.doa-en { font-size: 11px; color: var(--text-muted); line-height: 1.7; font-style: italic; margin-top: 6px; }

/* ═══════════════════════════════════════════════
   MUSAFIR SCREEN
   ═══════════════════════════════════════════════ */
.msf-loc-bar {
  background: var(--sage-bg);
  border: 0.5px solid var(--sage-border);
  border-radius: var(--r-md);
  margin: 10px 14px 0;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.msf-loc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sage); flex-shrink: 0; }
.msf-loc-text { font-size: 12px; font-weight: 500; color: var(--green); flex: 1; }
.msf-loc-dist { font-size: 11px; color: var(--sage); font-weight: 600; }

.msf-days-card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--r-lg);
  margin: 8px 14px 0;
  padding: 14px 16px;
}
.msf-days-lbl { font-size: 12px; font-weight: 600; color: var(--charcoal); margin-bottom: 10px; }
.msf-date-row {
  display: flex;
  gap: 10px;
}
.msf-date-field {
  flex: 1;
}
.msf-date-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  display: block;
  margin-bottom: 4px;
}
.msf-date-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 13px;
  font-family: var(--font-ui);
  color: var(--charcoal);
  background: var(--bg);
  box-sizing: border-box;
}
.msf-date-input:focus {
  outline: none;
  border-color: var(--sage);
}
.msf-days-result {
  margin-top: 10px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--charcoal);
  padding: 8px;
  background: var(--sage-bg);
  border-radius: var(--r-sm);
}
.msf-warn {
  background: var(--gold-bg);
  border: 0.5px solid var(--gold-border);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  font-size: 11px;
  color: var(--gold);
  margin-top: 8px;
  display: none;
}
.msf-warn.show { display: block; }
.msf-reset-btn {
  background: var(--sage);
  border: none;
  color: #fff;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}
.msf-reset-btn:hover, .msf-reset-btn:active {
  background: var(--charcoal);
}

/* Syarat info */
.msf-info-note {
  margin: 0 14px 10px;
  padding: 12px 14px;
  background: var(--sage-bg);
  border: 0.5px solid var(--sage-border);
  border-radius: var(--r-lg);
}
.msf-info-title {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  color: var(--sage);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
}
.msf-info-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--charcoal);
  line-height: 1.5;
}
.msf-info-item:last-child { margin-bottom: 0; }
.msf-info-num {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--sage);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

/* Destination input */
.msf-dest-row { margin-bottom: 10px; }
.msf-dest-input {
  width: 100%;
  background: var(--bg);
  border: 0.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 9px 12px;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--charcoal);
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.msf-dest-input:focus { border-color: var(--sage); }

/* Jenis picker */
.msf-jenis-row { margin-bottom: 12px; }
.msf-jenis-pick {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}
.msf-jenis-btn {
  flex: 1;
  background: var(--bg);
  border: 0.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 8px 4px;
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}
.msf-jenis-btn.active {
  background: var(--sage-bg);
  border-color: var(--sage);
  color: var(--sage);
}

/* Quick niat card */
.msf-niat-card {
  margin: 0 14px 10px;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--sage-bg), #E4EFE8);
  border: 0.5px solid var(--sage);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: transform 0.1s;
}
.msf-niat-card:active { transform: scale(0.995); }
.msf-niat-head {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 700;
  color: var(--sage);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.msf-niat-ar {
  font-family: var(--font-arabic);
  font-size: var(--ar-size, 22px);
  direction: rtl;
  text-align: center;
  color: var(--charcoal);
  line-height: 2;
  margin-bottom: 8px;
}
.msf-niat-tr, .msf-niat-ms {
  padding: 0;
  margin-bottom: 4px;
  text-align: center;
  font-size: 11.5px;
}
.msf-niat-tr { color: var(--sage); font-style: italic; }
.msf-niat-ms { color: var(--text-mid); }
.msf-niat-foot {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  color: var(--sage);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 0.5px dashed var(--sage-border);
}

/* History cards */
.msf-history-card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--r-md);
  margin: 0 14px 6px;
  padding: 10px 12px;
}
.msf-history-row { display: flex; align-items: center; gap: 10px; }
.msf-history-ic {
  font-size: 20px;
  line-height: 1;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--sage-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.msf-history-body { flex: 1; min-width: 0; }
.msf-history-dest {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--charcoal);
}
.msf-history-meta {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.msf-history-del {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  padding: 2px 8px;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.msf-history-del:hover, .msf-history-del:active {
  background: var(--red-bg, rgba(200,100,100,0.1));
  color: var(--red);
}
.msf-history-empty {
  text-align: center;
  padding: 24px 16px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.6;
  margin: 0 14px;
}

/* ═══════════════════════════════════════════════
   ARWAH SCREEN
   ═══════════════════════════════════════════════ */
.arwah-gender-btn {
  flex: 1;
  padding: 8px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}
.arwah-gender-btn.active {
  border-color: var(--panel-bg);
  background: var(--panel-bg);
  color: #fff;
}
.arwah-input-wrap {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.arwah-input {
  flex: 1;
  height: 44px;
  border: 0.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 0 12px;
  font-family: var(--font-ui);
  font-size: 13px;
  background: var(--surface);
  color: var(--charcoal);
  outline: none;
}
.arwah-input:focus { border-color: var(--sage); }
.arwah-add-btn {
  height: 44px;
  padding: 0 16px;
  border: none;
  background: var(--panel-bg);
  color: #fff;
  border-radius: var(--r-md);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.arwah-list { margin: 8px 14px 0; }
.arwah-item {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.arwah-item-name { font-size: 13px; font-weight: 500; color: var(--charcoal); flex:1; }
.arwah-item-prefix { font-size: 11px; color: var(--sage); font-weight: 600; display: block; margin-bottom: 1px; }
.arwah-remove {
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.15s;
}
.arwah-remove:hover { color: var(--red); }

/* ═══════════════════════════════════════════════
   UTILITIES
   ═══════════════════════════════════════════════ */
.pad14 { padding: 0 14px; }
.mt8 { margin-top: 8px; }
.mt14 { margin-top: 14px; }
.pb100 { padding-bottom: 100px; }

.toast {
  position: fixed;
  bottom: 90px;
  left: 50%; transform: translateX(-50%);
  background: var(--panel-bg);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: 20px;
  display: none;
  z-index: 200;
  pointer-events: none;
}

.loading {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 13px;
}

/* ═══════════════════════════════════════════════
   DOA SELEPAS — SWIPEABLE CARDS
   ═══════════════════════════════════════════════ */
.dss-viewport {
  flex: 1;
  overflow: hidden;
  position: relative;
  touch-action: pan-y;
}
.dss-track {
  display: flex;
  /* Firm spring snap — faster + slight overshoot for tactile feel */
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
  min-height: 100%;
}
.dss-track.dragging { transition: none; }
.dss-card {
  min-width: 100%;
  padding: 18px 16px calc(env(safe-area-inset-bottom, 0px) + 70px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Tahlil 6-section left-edge color strip */
#thl-track .dss-card[data-sec] {
  position: relative;
}
#thl-track .dss-card[data-sec]::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 3px;
  background: var(--sage);
  opacity: 0.85;
}
#thl-track .dss-card[data-sec="1"]::before { background: #5F7A6B; } /* Pembukaan — sage */
#thl-track .dss-card[data-sec="2"]::before { background: #7489A0; } /* Surah Pendek — dusty blue */
#thl-track .dss-card[data-sec="3"]::before { background: #B89868; } /* Al-Baqarah — warm tan */
#thl-track .dss-card[data-sec="4"]::before { background: #9681A3; } /* Selawat & Ayat — muted plum */
#thl-track .dss-card[data-sec="5"]::before { background: #6B9696; } /* Tasbih & Zikir — muted teal */
#thl-track .dss-card[data-sec="6"]::before { background: #B07878; } /* Doa Penutup — rose */
#thl-track .dss-card[data-sec="7"]::before { background: #7AA085; } /* Selesai — bright sage */
.dss-card-num {
  font-size: 10px;
  font-weight: 600;
  color: var(--sage);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 6px;
}
.dss-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 14px;
}
.dss-ar {
  font-family: var(--font-arabic);
  font-size: var(--ar-size, 24px);
  direction: rtl;
  text-align: right;
  color: var(--charcoal);
  line-height: 2.2;
  background: var(--bg);
  border-radius: var(--r-md);
  padding: 16px;
  margin-bottom: 12px;
}
.dss-translit {
  font-size: 13px;
  color: var(--sage);
  line-height: 1.8;
  font-style: italic;
  padding: 0 4px;
  margin-bottom: 12px;
  display: none;
}
.dss-translit.show { display: block; }
.dss-malay {
  font-size: 12px;
  color: var(--text-mid);
  line-height: 1.8;
  padding: 0 4px;
  margin-bottom: 12px;
  display: none;
}
.dss-malay.show { display: block; }

/* ── IBADAH SEKARANG (SOLAT SCREEN) ── */
.ibn-pills {
  margin: 8px 14px 14px;
  background: var(--sage-bg, rgba(95,122,107,0.08));
  border: 1px solid var(--sage-border, rgba(95,122,107,0.15));
  border-radius: var(--r-lg);
  padding: 12px 14px;
}
.ibn-pills-hdr {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.ibn-pills-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sage);
  animation: ibn-pulse 2s infinite;
}
@keyframes ibn-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.ibn-pills-lbl {
  font-size: 13px;
  font-weight: 700;
  color: var(--sage);
}
.ibn-pills-sub {
  font-size: 10px;
  color: var(--text-muted);
  margin-left: auto;
}
.ibn-pills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.ibn-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: transform 0.1s;
}
.ibn-pill:active { transform: scale(0.96); }
.ibn-pill-icon { font-size: 16px; flex-shrink: 0; }
.ibn-pill-text { min-width: 0; }
.ibn-pill-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--charcoal);
  line-height: 1.3;
}
.ibn-pill-desc {
  font-size: 9px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* ── MOSQUE LIST (HOME) ── */
.msq-list {
  margin: 0 0 6px;
  padding: 12px 14px;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--r-lg);
}
.msq-list-hdr {
  font-size: 13px;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 10px;
}
.msq-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 0.5px solid var(--border);
}
.msq-item:last-child { border-bottom: none; }
.msq-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sage);
  flex-shrink: 0;
  opacity: 0.6;
}
.msq-info { flex: 1; min-width: 0; }
.msq-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--charcoal);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.msq-dist {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.msq-toggle {
  font-size: 14px;
  color: var(--text-muted);
  opacity: 0.5;
}

/* ── SOLAT SCREEN — CARD LIST ── */
.sol-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 14px 6px;
  padding: 12px 14px;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: transform 0.1s;
}
.sol-card:active { transform: scale(0.98); }
.sol-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.sol-info {
  flex: 1;
  min-width: 0;
}
.sol-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--charcoal);
  line-height: 1.3;
}
.sol-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.sol-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--sage);
  background: var(--sage-bg, rgba(95,122,107,0.08));
  padding: 3px 8px;
  border-radius: 10px;
  flex-shrink: 0;
  letter-spacing: 0.3px;
}
.sol-chev {
  font-size: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
  opacity: 0.4;
}
.sol-credit {
  margin: 0 14px 10px;
  padding: 10px 12px;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--r-md);
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
}
.sol-credit strong { color: var(--charcoal); }

/* ── PANDUAN OVERVIEW & STEP CARDS ── */
.pdn-overview {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.pdn-ov-ar {
  font-family: var(--font-arabic);
  font-size: 32px;
  color: var(--sage);
  margin-bottom: 4px;
}
.pdn-ov-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 4px;
}
.pdn-ov-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.pdn-roadmap {
  width: 100%;
  text-align: left;
  max-height: 50vh;
  overflow-y: auto;
}
.pdn-rm-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 0.5px solid var(--border);
}
.pdn-rm-step:last-child { border-bottom: none; }
.pdn-rm-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.pdn-rm-text {
  font-size: 12px;
  color: var(--charcoal);
  font-weight: 500;
}
/* Step card header */
.pdn-step-hdr {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}
.pdn-step-badge {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.pdn-step-meta {
  flex: 1;
  min-width: 0;
}
.pdn-step-meta .dss-card-title {
  margin-bottom: 0;
}
.pdn-step-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding: 4px 8px;
  background: rgba(0,0,0,0.03);
  border-radius: 6px;
  line-height: 1.5;
}
/* Type-specific card accents */
.pdn-type-niat { border-left: 3px solid var(--sage); }
.pdn-type-doa { border-left: 3px solid var(--gold, #c4973b); }
.pdn-type-salam { border-left: 3px solid var(--sage); }
.pdn-type-info { border-left: 3px solid var(--text-muted); }
/* Progress dots */
.pdn-dots {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 0.5px solid var(--border);
}
.pdn-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
}
.pdn-dot.active {
  background: var(--sage);
  width: 16px;
  border-radius: 3px;
}
.pdn-dot.done {
  background: var(--sage);
  opacity: 0.4;
}

.dss-ms {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.7;
  padding: 0 4px;
}

/* Navigation bar */
.dss-nav {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%; max-width: 430px;
  background: var(--surface);
  border-top: 0.5px solid var(--border);
  padding: 10px 16px calc(env(safe-area-inset-bottom, 0px) + 10px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 150;
}
.dss-dots {
  display: flex;
  gap: 5px;
  justify-content: center;
  flex: 1;
}
.dss-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--border);
  transition: all 0.2s;
}
.dss-dot.active {
  width: 18px;
  border-radius: 3px;
  background: var(--sage);
}
.dss-btn {
  border: none;
  background: var(--surface2);
  color: var(--charcoal);
  border-radius: var(--r-sm);
  padding: 8px 14px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  min-width: 60px;
  text-align: center;
}
.dss-btn:active { opacity: 0.7; }
.dss-btn.disabled { opacity: 0.3; pointer-events: none; }

/* ═══════════════════════════════════════════════
   TAHLIL COUNTER CARDS
   ═══════════════════════════════════════════════ */
.thl-counter {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0;
}
.thl-ring {
  width: 100px; height: 100px;
  border-radius: 50%;
  border: 3px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: all 0.15s;
  margin-bottom: 8px;
}
.thl-ring:active { transform: scale(0.93); }
.thl-ring.done { border-color: var(--green); background: var(--green-bg); }
.thl-ring-num { font-size: 32px; font-weight: 700; color: var(--charcoal); line-height: 1; }
.thl-ring.done .thl-ring-num { color: var(--green); }
.thl-ring-of { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.thl-ring-lbl { font-size: 11px; color: var(--text-muted); }
.thl-pbar { width: 120px; height: 3px; border-radius: 3px; background: var(--surface2); margin-top: 6px; overflow: hidden; }
.thl-pbar-fill { height: 100%; border-radius: 3px; background: var(--sage); transition: width 0.2s; }
.thl-reset { border: none; background: none; color: var(--text-muted); font-size: 11px; cursor: pointer; margin-top: 8px; font-family: var(--font-ui); }
.thl-reset:active { color: var(--charcoal); }

/* Large counter for Tahlil 100× */
.thl-ring.lg { width: 130px; height: 130px; }
.thl-ring.lg .thl-ring-num { font-size: 42px; }

/* Counter completion bloom ✓ */
.thl-ring-check {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%) scale(0);
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 32px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(95,122,107,0.4);
  animation: thlCheckBloom 900ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  pointer-events: none;
  z-index: 2;
}
@keyframes thlCheckBloom {
  0%   { transform: translate(-50%,-50%) scale(0); opacity: 0; }
  25%  { transform: translate(-50%,-50%) scale(1.15); opacity: 1; }
  55%  { transform: translate(-50%,-50%) scale(1); opacity: 1; }
  85%  { transform: translate(-50%,-50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%,-50%) scale(0.8); opacity: 0; }
}
.thl-ring { position: relative; }

/* Completion card */
.thl-complete-badge {
  width: 88px; height: 88px;
  border-radius: 50%;
  background: var(--sage-bg);
  border: 2px solid var(--sage);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: thlCompletePulse 600ms ease-out;
}
.thl-complete-check {
  font-size: 46px;
  font-weight: 700;
  color: var(--sage);
  line-height: 1;
}
@keyframes thlCompletePulse {
  0%   { transform: scale(0.6); opacity: 0; }
  60%  { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* Arwah empty-state prompt */
.arwah-prompt {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #F5EDDB, #EFE3C4);
  border: 0.5px solid #D9C99D;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 14px;
  cursor: pointer;
  transition: background 0.15s;
}
.arwah-prompt:active { background: linear-gradient(135deg, #EFE3C4, #E5D3A5); }
.arwah-prompt-ic {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
}
.arwah-prompt-body { flex: 1; min-width: 0; }
.arwah-prompt-title {
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 700;
  color: #8A6D2A;
  line-height: 1.3;
}
.arwah-prompt-sub {
  font-family: var(--font-ui);
  font-size: 10.5px;
  color: #A08247;
  line-height: 1.4;
  margin-top: 2px;
}
.arwah-prompt-arr {
  font-size: 18px;
  color: #B89759;
  font-weight: 600;
  flex-shrink: 0;
}

@media (max-width: 430px) {
  #app { max-width: 100%; }
  .bnav { max-width: 100%; }
}

/* ═══════════════════════════════════════════════
   TV MODE — FULLSCREEN PRESENTATION
   ═══════════════════════════════════════════════ */
.tv-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100vh;
  background: #E8E4DC;
  z-index: 999;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.tv-overlay.active { display: flex; }
.tv-content {
  width: 100%;
  max-width: 900px;
  padding: 40px;
  text-align: center;
  overflow-y: auto;
  max-height: calc(100vh - 120px);
}
.tv-num {
  font-size: 12px;
  color: rgba(255,255,255,0.25);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
  font-family: var(--font-ui);
}
.tv-title {
  font-size: 16px;
  color: rgba(255,255,255,0.4);
  font-family: var(--font-ui);
  font-weight: 600;
  margin-bottom: 24px;
}
.tv-ar {
  font-family: var(--font-arabic);
  font-size: 36px;
  color: #FFFFFF;
  direction: rtl;
  text-align: right;
  line-height: 2.4;
}
.tv-ar div { margin-bottom: 8px; }
.tv-translit {
  font-size: 16px;
  color: rgba(168,197,181,0.6);
  font-style: italic;
  line-height: 1.8;
  margin-top: 24px;
  display: none;
}
.tv-translit.show { display: block; }
.tv-ms {
  font-size: 15px;
  color: rgba(255,255,255,0.35);
  line-height: 1.8;
  margin-top: 16px;
  display: none;
}
.tv-ms.show { display: block; }
.tv-nav {
  position: fixed;
  bottom: 0; left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px calc(env(safe-area-inset-bottom, 0px) + 16px);
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
}
.tv-btn {
  border: none;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.6);
  border-radius: 8px;
  padding: 10px 18px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.tv-btn:active { background: rgba(255,255,255,0.2); }
.tv-btn.disabled { opacity: 0.2; pointer-events: none; }
.tv-counter {
  font-size: 13px;
  color: rgba(255,255,255,0.3);
  font-family: var(--font-ui);
  font-weight: 600;
}
.tv-close {
  position: fixed;
  top: 16px; right: 16px;
  border: none;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.5);
  border-radius: 50%;
  width: 40px; height: 40px;
  font-size: 18px;
  cursor: pointer;
  z-index: 1000;
}
.tv-close:active { background: rgba(255,255,255,0.2); }
.tv-auto {
  position: fixed;
  top: 16px; left: 16px;
  border: none;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.5);
  border-radius: 20px;
  padding: 8px 14px;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  z-index: 1000;
}
.tv-auto.on { background: rgba(168,197,181,0.3); color: #A8C5B5; }

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


  /* ── THEME PICKER ── */
  .theme-opt {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--r-md);
    padding: 10px;
    cursor: pointer;
    transition: all 0.15s;
    flex: 1;
    min-width: 0;
  }
  .theme-opt.on { border-color: var(--charcoal); }
  .theme-swatches {
    display: flex;
    gap: 3px;
    margin-bottom: 6px;
    border-radius: 6px;
    overflow: hidden;
    height: 28px;
  }
  .theme-swatch { flex: 1; }
  .theme-name {
    font-size: 9px;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .theme-opt.on .theme-name { color: var(--charcoal); }


  /* ── ONBOARDING ── */
  .onboarding {
    position: fixed;
    top: 0; left: 50%; transform: translateX(-50%);
    width: 100%; max-width: 430px;
    height: 100vh;
    z-index: 999;
    background: #1A1714;
    display: none;
    flex-direction: column;
    overflow: hidden;
  }
  .onboarding.active { display: flex; }

  .ob-slides {
    display: flex;
    flex: 1;
    transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
    width: 300%;
    overflow: hidden;
  }
  .ob-slide {
    width: 33.3333%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: calc(env(safe-area-inset-top, 0px) + 14px) 24px calc(env(safe-area-inset-bottom, 0px) + 12px);
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #1A1714;
  }

  /* Slide 0 — Welcome */
  .ob-glow {
    position: absolute;
    width: 300px; height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(196,165,77,0.12) 0%, transparent 70%);
    top: 60px; left: 50%; transform: translateX(-50%);
    pointer-events: none;
  }
  .ob-arabic {
    font-family: var(--font-arabic);
    font-size: 22px;
    direction: rtl;
    text-align: center;
    color: #D4B96A;
    line-height: 1.8;
    margin-bottom: 12px;
    margin-top: 16px;
  }
  .ob-quote {
    font-size: 12.5px;
    color: rgba(255,255,255,0.55);
    text-align: center;
    line-height: 1.6;
    margin-bottom: 4px;
  }
  .ob-source {
    font-size: 11px;
    color: rgba(255,255,255,0.3);
    margin-bottom: 12px;
  }
  .ob-desc {
    font-size: 12.5px;
    color: rgba(255,255,255,0.6);
    text-align: center;
    line-height: 1.6;
    margin-bottom: 14px;
  }
  .ob-desc strong { color: rgba(255,255,255,0.9); }
  .ob-waqaf {
    font-family: var(--font-arabic);
    font-size: 40px;
    color: #C4A54D;
    line-height: 1;
    margin-bottom: 2px;
    margin-top: auto;
  }
  .ob-brand {
    font-size: 9px;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.2);
    text-transform: uppercase;
    margin-bottom: 14px;
  }
  .ob-btn-mulakan {
    width: 100%;
    padding: 15px;
    background: #C4A54D;
    color: #1A1714;
    border: none;
    border-radius: var(--r-lg);
    font-family: var(--font-ui);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.3px;
  }
  .ob-restore-link {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 10px;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.5);
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    transition: color 0.15s;
  }
  .ob-restore-link:hover, .ob-restore-link:active {
    color: rgba(255,255,255,0.85);
  }
  .ob-backup-hint {
    margin-top: 4px;
    padding: 7px 11px;
    background: rgba(95,122,107,0.12);
    border: 0.5px solid rgba(95,122,107,0.25);
    border-radius: 8px;
    color: rgba(255,255,255,0.55);
    font-family: var(--font-ui);
    font-size: 10.5px;
    line-height: 1.45;
    text-align: center;
    max-width: 340px;
  }
  .ob-arwah-visual {
    font-size: 56px;
    margin-top: 40px;
    margin-bottom: 14px;
    line-height: 1;
    filter: grayscale(0.15);
  }
  .ob-gender-btn {
    flex: 1;
    background: rgba(255,255,255,0.06);
    border: 0.5px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.5);
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 600;
    padding: 8px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
  }
  .ob-gender-btn.active {
    background: rgba(95,122,107,0.25);
    border-color: var(--sage);
    color: #fff;
  }

  /* Steps */
  .ob-dots {
    display: flex;
    gap: 6px;
    margin-bottom: 28px;
  }
  .ob-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    transition: background 0.2s;
  }
  .ob-dot.active { background: #C4A54D; width: 18px; border-radius: 3px; }
  .ob-dot.done   { background: rgba(196,165,77,0.4); }

  .ob-icon {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: rgba(196,165,77,0.12);
    border: 1.5px solid rgba(196,165,77,0.3);
    display: flex; align-items: center; justify-content: center;
    font-size: 30px;
    margin-bottom: 20px;
  }
  .ob-step-lbl {
    font-size: 9px;
    font-weight: 600;
    color: #C4A54D;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
  }
  .ob-title {
    font-size: 22px;
    font-weight: 600;
    color: #fff;
    text-align: center;
    margin-bottom: 8px;
  }
  .ob-sub {
    font-size: 13px;
    color: rgba(255,255,255,0.45);
    text-align: center;
    margin-bottom: 24px;
    line-height: 1.6;
  }

  /* Language cards */
  .ob-lang-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--r-md);
    border: 1.5px solid rgba(255,255,255,0.1);
    margin-bottom: 10px;
    cursor: pointer;
    width: 100%;
    background: rgba(255,255,255,0.04);
    transition: all 0.15s;
  }
  .ob-lang-card.on {
    border-color: #C4A54D;
    background: rgba(196,165,77,0.12);
  }
  .ob-lang-name { font-size: 14px; font-weight: 600; color: #fff; }
  .ob-lang-native { font-family: var(--font-arabic); font-size: 13px; color: rgba(255,255,255,0.4); margin-top: 2px; }
  .ob-lang-check { margin-left: auto; font-size: 14px; color: #C4A54D; opacity: 0; }
  .ob-lang-card.on .ob-lang-check { opacity: 1; }

  /* GPS features */
  .ob-gps-visual {
    position: relative;
    width: 100px; height: 100px;
    margin: 0 auto 24px;
    display: flex; align-items: center; justify-content: center;
  }
  .ob-gps-ring {
    position: absolute;
    border-radius: 50%;
    border: 1.5px solid rgba(196,165,77,0.3);
    animation: gpsExpand 2s ease-out infinite;
  }
  .ob-gps-ring:nth-child(1){ width:40px;height:40px; animation-delay:0s; }
  .ob-gps-ring:nth-child(2){ width:65px;height:65px; animation-delay:0.5s; }
  .ob-gps-ring:nth-child(3){ width:90px;height:90px; animation-delay:1s; }
  @keyframes gpsExpand { 0%{opacity:0.6;transform:scale(0.8)} 100%{opacity:0;transform:scale(1.2)} }
  .ob-gps-center { font-size: 28px; position: relative; z-index: 1; }

  .ob-feat {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 0.5px solid rgba(255,255,255,0.06);
    width: 100%;
  }
  .ob-feat:last-child { border-bottom: none; }
  .ob-feat-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
  .ob-feat-text { font-size: 12px; color: rgba(255,255,255,0.55); line-height: 1.5; }
  .ob-feat-text strong { color: rgba(255,255,255,0.85); }

  /* Buttons */
  .ob-btn {
    width: 100%;
    padding: 14px;
    border-radius: var(--r-lg);
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    margin-top: 8px;
  }
  .ob-btn-primary { background: #C4A54D; color: #1A1714; }
  .ob-btn-ghost { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.5); }

/* NEW badge */
.new-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  background: var(--red);
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  vertical-align: middle;
  margin-left: 4px;
  animation: newPulse 2s ease-in-out infinite;
}
@keyframes newPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ═══════════════════════════════════════════
   TARAWIH GUIDE
   ═══════════════════════════════════════════ */
.trw-controls {
  padding: 8px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.trw-role-pick, .trw-malam-pick {
  display: flex;
  gap: 6px;
}
.trw-role, .trw-malam {
  flex: 1;
  padding: 7px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  text-align: center;
}
.trw-role.active {
  background: var(--panel-bg);
  color: #fff;
  border-color: var(--panel-bg);
}
.trw-malam.active {
  background: var(--sage);
  color: #fff;
  border-color: var(--sage);
}
/* Tarawih card overrides */
#scr-tarawih .dss-card {
  padding: 14px 12px 20px;
  border-left: 3px solid transparent;
  border-image: linear-gradient(to bottom, var(--sage), var(--border)) 1;
  background: var(--bg);
}
#scr-tarawih .dss-card-num {
  font-size: 9px;
  letter-spacing: 2px;
  color: #fff;
  background: var(--sage);
  display: inline-block;
  padding: 3px 12px;
  border-radius: 20px;
  margin-bottom: 6px;
}
#scr-tarawih .dss-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 8px;
  text-align: center;
}
#scr-tarawih .dss-ar {
  background: none;
  padding: 4px 0;
  margin-bottom: 4px;
  text-align: center;
  border-radius: 0;
  line-height: 1.9;
}
.dss-ar.trw-flow {
  text-align: justify;
  text-align-last: center;
  direction: rtl;
  padding: 12px 10px;
  background: none;
  border-radius: 0;
  border: none;
  box-shadow: none;
  margin: 0;
  font-size: var(--ar-size, 22px);
  line-height: 2.2;
  color: var(--charcoal);
}

/* Surah card (like Zikir Harian) */
.trw-surah-card {
  border-radius: var(--r-md);
  border: 0.5px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin: 6px 0;
}
.trw-surah-hdr {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--sage);
  border-bottom: 0.5px solid var(--border);
}
.trw-surah-icon {
  font-size: 14px;
  flex-shrink: 0;
}
.trw-surah-hdr-text {
  display: flex;
  flex-direction: column;
}
.trw-surah-name {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}
.trw-surah-sub {
  font-size: 10px;
  color: rgba(255,255,255,0.7);
  margin-top: 1px;
}
.trw-surah-body {
  padding: 10px 10px 6px;
}
.dss-card.surah-reader-card {
  padding: 14px 14px calc(env(safe-area-inset-bottom, 0px) + 70px);
  display: flex;
  flex-direction: column;
}
.dss-card.surah-reader-card .trw-surah-card {
  margin-top: 36px;
  margin-bottom: auto;
}
.dss-card.surah-reader-card .dss-card-num {
  margin-top: 22px;
}
#scr-tarawih .dss-ar.trw-bilal {
  color: var(--sage);
}
#scr-tarawih .dss-ar.trw-jemaah {
  color: var(--red);
}

/* Ayat numbers */
.trw-bismillah {
  display: block;
  text-align: center;
  direction: rtl;
  font-family: var(--font-arabic);
  color: var(--charcoal);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 0.5px solid var(--sage-border);
}
.trw-ayat {
  display: inline-block;
  font-size: 0.45em;
  color: var(--sage);
  font-family: var(--font-arabic);
  min-width: 2em;
  height: 2em;
  line-height: 2em;
  text-align: center;
  vertical-align: middle;
  margin: 0 1px;
  position: relative;
  opacity: 0.7;
}
.trw-ayat::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px; right: -1px; bottom: -1px;
  border: 1.5px solid var(--sage);
  border-radius: 50%;
}
.trw-ayat::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px; right: 2px; bottom: 2px;
  border: 1px solid var(--sage);
  border-radius: 50%;
  opacity: 0.5;
}

/* Ornamental divider */
.trw-orn {
  text-align: center;
  color: var(--sage);
  font-size: 12px;
  margin: 6px 0;
  opacity: 0.3;
  letter-spacing: 6px;
}

/* Surah label */
.trw-surah-lbl {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  font-style: italic;
  color: var(--sage);
  margin: 4px 0;
  letter-spacing: 0.3px;
}

/* Bilal/Jemaah tags */
.trw-btag {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 2px 10px;
  border-radius: 3px;
  margin: 6px 0 0;
}
.trw-btag-bilal {
  background: var(--sage-bg);
  color: var(--sage);
  border-left: 3px solid var(--sage);
}
.trw-btag-jemaah {
  background: var(--surface2);
  color: var(--red);
  border-left: 3px solid var(--red);
}
.trw-btag-both {
  background: var(--surface2);
  color: var(--charcoal);
  border-left: 3px solid var(--charcoal);
}

/* Salam divider */
.trw-salam {
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  color: var(--sage);
  margin: 6px 0;
  padding: 4px 0;
  border-top: 1px solid var(--sage);
  border-bottom: 1px solid var(--sage);
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.5;
}

/* Malay translation */
.trw-ms {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
  font-style: italic;
  margin: 2px 0 6px;
  padding: 4px 10px;
  border-left: 2px solid var(--border);
}
.trw-tr {
  font-size: 12px;
  color: var(--sage);
  line-height: 1.6;
  font-style: italic;
  margin: 2px 0 6px;
  padding: 4px 10px;
  border-left: 2px solid var(--sage-border);
}

/* Info note */
.trw-info {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
  margin: 6px 0;
  padding: 6px;
  background: var(--surface);
  border-radius: var(--r-md);
  line-height: 1.4;
}

