:root {
  --bg: #F8F6F1;
  --surface: #FFFFFF;
  --surface-2: #F1EEE6;
  --border: #E4E0D4;
  --mint: #1B5E3F;
  --mint-soft: #3E8A63;
  --gold: #C9A227;
  --gold-soft: #E3C766;
  --text: #1F2620;
  --muted: #6B7568;
  --danger: #C0392B;
  --on-accent: #FFFFFF;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: 84px;
  position: relative;
}

.hidden { display: none !important; }

.view { padding: 22px 18px 20px; }

.top-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 4px;
  font-size: 12px;
  color: var(--mint);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.top-header h1 { margin: 0; font-size: 23px; color: var(--text); }

/* HOME: JOURNEY + PRIORITY */
.home-motivation { margin: 0 0 14px; font-size: 14px; color: var(--muted); }

.priority-card { border-color: var(--gold-soft); }

.priority-checkin-text { font-size: 14.5px; line-height: 1.6; margin: 0 0 14px; }
.priority-checkin-buttons { display: flex; gap: 8px; flex-wrap: wrap; }

.priority-done-text { font-size: 15px; font-weight: 700; color: var(--mint); text-align: center; margin: 8px 0 4px; }

#priority-adjustment-note { background: var(--surface-2); border: 1px dashed var(--border); border-radius: 10px; padding: 10px 12px; margin: 0 0 12px; }

.priority-title { font-size: 18px; font-weight: 700; margin: 0 0 6px; color: var(--text); }
.priority-why { font-size: 13px; color: var(--muted); margin: 0 0 16px; line-height: 1.5; }

.priority-change-link {
  display: block;
  width: 100%;
  text-align: center;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 12.5px;
  text-decoration: underline;
  cursor: pointer;
  padding: 10px 6px 0;
  font-family: inherit;
}

.preset-plan-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.preset-plan-chip {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
}
.preset-plan-chip:active { border-color: var(--mint); color: var(--mint); }
.preset-plan-chip.active-chip { border-color: var(--mint); color: var(--mint); background: rgba(27, 94, 63, 0.08); }

.priority-custom-row { display: flex; gap: 8px; }
.priority-custom-row .text-input { margin-bottom: 0; flex: 1; }

/* PICKER SUB-STEPS (study duration, fitness body part/duration, salah setup) */
.picker-step-back {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 12.5px;
  cursor: pointer;
  padding: 0 0 10px;
  font-family: inherit;
}
.picker-step-title { font-size: 14px; font-weight: 600; margin: 0 0 10px; }

/* SALAH */
.salah-next-label { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin: 0 0 2px; }
.salah-next-name { font-size: 22px; font-weight: 700; margin: 0 0 4px; }
.salah-next-clock { font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.salah-countdown { font-size: 32px; font-weight: 700; text-align: center; margin: 6px 0 16px; color: var(--mint); font-variant-numeric: tabular-nums; }
.salah-day-list { display: flex; justify-content: space-between; gap: 6px; margin: 14px 0 16px; }
.salah-day-item { flex: 1; text-align: center; padding: 8px 2px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.salah-day-item.done { border-color: var(--mint); background: rgba(27, 94, 63, 0.08); }
.salah-day-item.current { border-color: var(--gold); }
.salah-day-name { display: block; font-size: 10.5px; color: var(--muted); margin-bottom: 3px; }
.salah-day-mark { display: block; font-size: 13px; }
.salah-setup-text { font-size: 13.5px; line-height: 1.6; margin: 0 0 14px; color: var(--muted); }
.salah-recovery-note { font-size: 12.5px; color: var(--mint-soft); margin: 0 0 12px; }

/* FITNESS */
.fitness-warmup-list { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.fitness-warmup-list li { font-size: 13.5px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; }
.fitness-meta-line { font-size: 12.5px; color: var(--muted); margin: 0 0 12px; }

/* CHECKLISTS (study prep, sleep prep) */
.checklist { display: flex; flex-direction: column; gap: 8px; margin: 0 0 16px; }
.checklist-item { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font-size: 13.5px; cursor: pointer; }
.checklist-item input { width: 18px; height: 18px; accent-color: var(--mint); flex-shrink: 0; }

/* PROGRESS DETAILS SHEET */
.progress-detail-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.progress-detail-row:last-child { border-bottom: none; }
.progress-detail-label { color: var(--muted); }
.progress-detail-value { font-weight: 700; }

.avatar-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1.5px solid var(--mint);
  color: var(--mint);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
}

.card h2 { margin: 0; font-size: 15px; color: var(--text); }

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

.count-badge {
  background: var(--surface-2);
  color: var(--mint);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  white-space: nowrap;
}

.muted-line { color: var(--muted); font-size: 13px; margin: 0; }

.pending-note {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
  background: var(--surface-2);
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 0;
}

.next-action-card { border-color: var(--mint); }
.next-action-text { margin: 0; font-size: 15px; font-weight: 600; }

.btn {
  border: none;
  border-radius: 12px;
  padding: 13px 16px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.btn-full { width: 100%; margin-bottom: 8px; }
.btn-full:last-child { margin-bottom: 0; }

.btn-primary { background: var(--mint); color: var(--on-accent); }
.btn-primary:active { background: var(--mint-soft); }

.btn-outline {
  background: transparent;
  color: var(--mint);
  border: 1.5px solid var(--mint);
}
.btn-outline:active { background: var(--surface-2); }

.btn-danger { color: var(--danger); border-color: var(--danger); }

.btn-shield {
  background: var(--surface-2);
  color: var(--mint);
  border: 1.5px solid var(--border);
  margin-top: 4px;
}

.action-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.action-btn.primary { border-color: var(--mint); color: var(--mint); }
.action-btn.warn { border-color: var(--danger); color: var(--danger); }

.chat-action-btn {
  display: inline-block;
  margin-top: 4px;
  background: var(--mint);
  color: var(--on-accent);
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.text-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  font-size: 14.5px;
  margin-bottom: 14px;
  font-family: inherit;
  background: var(--surface-2);
  color: var(--text);
}
.text-input::placeholder { color: var(--muted); }

/* FOCUS TIMER */
.focus-duration-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 2px;
}
.duration-chip {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.duration-chip.active { background: var(--mint); color: var(--on-accent); border-color: var(--mint); }
.duration-chip:disabled { opacity: 0.4; cursor: not-allowed; }
.duration-custom-input {
  width: 68px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12.5px;
  font-family: inherit;
}
.duration-custom-input::placeholder { color: var(--muted); }
.duration-custom-input:disabled { opacity: 0.4; cursor: not-allowed; }
.focus-clock {
  font-size: 40px;
  font-weight: 700;
  text-align: center;
  margin: 10px 0;
  color: var(--mint);
  font-variant-numeric: tabular-nums;
}
.focus-controls { display: flex; flex-direction: column; }

/* NAV */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
  z-index: 50;
}

.nav-btn {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--muted);
  font-size: 10.5px;
  font-family: inherit;
  padding: 6px 4px;
  cursor: pointer;
}
.nav-btn svg { fill: none; stroke: currentColor; stroke-width: 2; }
.nav-btn.active { color: var(--mint); }
.nav-btn.active svg { fill: var(--mint); stroke: var(--mint); }

/* MODALS */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 16, 0.65);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
}

.modal-sheet {
  background: var(--bg);
  width: 100%;
  max-width: 480px;
  border-radius: 20px 20px 0 0;
  padding: 22px 20px calc(24px + env(safe-area-inset-bottom));
  max-height: 85vh;
  overflow-y: auto;
  border-top: 1px solid var(--border);
}

.modal-sheet h2 { margin: 0 0 6px; color: var(--text); }
.modal-sub { margin: 0 0 14px; font-size: 14px; color: var(--muted); }

.modal-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.icon-btn {
  background: none;
  border: none;
  font-size: 15px;
  color: var(--text);
  cursor: pointer;
  padding: 4px 8px;
}

/* SUNNAH SUBTABS */
.subtab-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin-bottom: 14px;
  padding-bottom: 2px;
}
.subtab {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  font-family: inherit;
}
.subtab.active { background: var(--mint); color: var(--on-accent); border-color: var(--mint); }

.sunnah-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 10px;
  overflow: hidden;
}
.sunnah-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  font-family: inherit;
  text-align: left;
  color: var(--text);
}
.sunnah-section-title { display: flex; align-items: center; gap: 10px; }
.sunnah-section-title h3 { margin: 0; font-size: 14px; }
.sunnah-section-chevron { transition: transform 0.15s ease; color: var(--muted); }
.sunnah-section.open .sunnah-section-chevron { transform: rotate(90deg); }
.sunnah-section-body { padding: 0 16px 14px; display: flex; flex-direction: column; gap: 8px; }
.sunnah-section-body.hidden { display: none; }

.habit-list { display: flex; flex-direction: column; gap: 8px; }
.habit-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 13px;
}
.habit-item .name { font-size: 13.5px; }
.habit-toggle {
  border: 1.5px solid var(--mint);
  background: transparent;
  color: var(--mint);
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.habit-toggle.done { background: var(--mint); color: var(--on-accent); }

/* VERSE */
.verse-box { background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 16px; text-align: center; }
.verse-ref { margin: 0 0 8px; font-size: 12px; color: var(--mint); font-weight: 600; }
.verse-arabic { margin: 0 0 10px; font-size: 21px; line-height: 2; color: var(--text); direction: rtl; unicode-bidi: isolate; font-family: "Traditional Arabic", "Scheherazade New", "Noto Naskh Arabic", serif; }
.verse-source { margin: 0; font-size: 11px; color: var(--muted); }

/* DUAS */
.duas-search-row { display: flex; gap: 8px; margin-bottom: 10px; align-items: center; }
.duas-search-row .text-input { margin-bottom: 0; flex: 1; }

.chip-toggle {
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  color: var(--muted);
  border-radius: 999px;
  padding: 11px 14px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.chip-toggle[aria-pressed="true"] { background: var(--mint); color: var(--on-accent); border-color: var(--mint); }

.duas-back-row { margin-bottom: 10px; }

.dua-category-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.dua-category-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
}
.dua-category-card .cat-name { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }

/* DUNIYA */
.duniya-area-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.duniya-area-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
}
.duniya-area-icon { font-size: 20px; margin-bottom: 6px; display: block; }
.duniya-area-title { display: block; font-size: 13.5px; font-weight: 700; margin-bottom: 4px; }
.duniya-area-sub { display: block; font-size: 11px; color: var(--muted); line-height: 1.4; }
.duniya-area-progress { display: block; font-size: 10.5px; color: var(--mint); font-weight: 600; margin-top: 6px; }

.duniya-goal-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 13px;
  margin-bottom: 8px;
}
.duniya-goal-item .name { font-size: 13.5px; }

/* PLAN MY DAY */
.plan-progress-summary { display: flex; gap: 10px; margin-bottom: 14px; }
.plan-progress-tile { flex: 1; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; text-align: center; }
.plan-progress-tile .big { font-size: 18px; font-weight: 700; color: var(--mint); display: block; }
.plan-progress-tile .lbl { font-size: 10.5px; color: var(--muted); }
.plan-progress-track { background: var(--surface-2); border-radius: 999px; height: 10px; overflow: hidden; margin-bottom: 6px; }
.plan-progress-fill { background: var(--mint); height: 100%; border-radius: 999px; transition: width 0.3s ease; }

.plan-conflict-banner { background: rgba(192, 57, 43, 0.1); border: 1px solid var(--danger); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; font-size: 12.5px; color: var(--danger); }

.plan-timeline { display: flex; flex-direction: column; }
.plan-timeline-item { display: flex; gap: 10px; padding-bottom: 16px; position: relative; }
.plan-timeline-item::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 16px;
  bottom: 0;
  width: 1px;
  background: var(--border);
}
.plan-timeline-item:last-child::before { display: none; }
.plan-timeline-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--surface-2); border: 2px solid var(--mint); flex-shrink: 0; margin-top: 4px; }
.plan-timeline-dot.filled { background: var(--mint); }
.plan-timeline-dot.free { border-color: var(--border); }
.plan-timeline-dot.deen { border-color: var(--gold); }
.plan-timeline-body { flex: 1; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.plan-timeline-body.done { opacity: 0.6; }
.plan-timeline-time { font-size: 11px; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.plan-timeline-name { font-size: 14px; font-weight: 600; }
.plan-timeline-name.done { text-decoration: line-through; }
.plan-timeline-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.plan-timeline-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.plan-timeline-free { background: none; border: 1px dashed var(--border); border-radius: 12px; padding: 10px 12px; color: var(--muted); font-size: 12.5px; }

.plan-form-row { display: flex; gap: 8px; margin-bottom: 8px; }
.plan-form-row .text-input { margin-bottom: 0; }
.plan-form-label { font-size: 11.5px; color: var(--muted); margin: 0 0 4px; }
.plan-unfit-list { background: rgba(192, 57, 43, 0.08); border: 1px solid var(--danger); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; font-size: 12.5px; }

/* RECOVERY */
.rec-week-row { display: flex; gap: 6px; align-items: flex-end; height: 76px; margin: 8px 0 4px; }
.rec-bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.rec-bar { width: 100%; max-width: 22px; border-radius: 5px 5px 0 0; background: var(--surface-2); height: 4px; }
.rec-bar.clean { background: var(--mint); height: 56px; }
.rec-bar.slip { background: var(--gold); height: 24px; }
.rec-label { font-size: 10px; color: var(--muted); margin-top: 5px; }
.rec-action { display: block; width: 100%; text-align: left; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 10px; font-size: 16px; color: var(--text); }
.rec-action.done { border-color: var(--mint); color: var(--mint); }
.rec-timer { font-size: 44px; font-weight: 700; text-align: center; color: var(--mint); margin: 8px 0; }
.rec-note { background: rgba(27, 94, 63, 0.08); border: 1px solid var(--mint); border-radius: 12px; padding: 12px 14px; margin: 12px 0; font-size: 13.5px; }
.rec-check-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.rec-check-row .btn { flex: 1; min-width: 140px; margin-bottom: 0; }
.rec-textarea { width: 100%; min-height: 90px; resize: vertical; }

/* MONEY HABITS */
.money-goal-block { margin-bottom: 18px; }
.money-goal-name { font-size: 15px; font-weight: 700; margin: 4px 0 2px; }
.money-goal-amount { font-size: 20px; font-weight: 700; color: var(--mint); margin: 2px 0 8px; }
.money-stat-grid { display: flex; gap: 8px; margin-bottom: 12px; }
.money-stat-tile { flex: 1; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 6px; text-align: center; }
.money-stat-tile .big { font-size: 15px; font-weight: 700; color: var(--mint); display: block; }
.money-stat-tile .lbl { font-size: 10px; color: var(--muted); }
.money-avoided-total { font-size: 13px; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 4px; }
.money-avoided-total strong { color: var(--gold); }
.money-habit-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px; margin-bottom: 10px; }
.money-habit-card .name { font-weight: 700; font-size: 14px; margin: 0 0 2px; }
.money-habit-card .cost-line { font-size: 12px; color: var(--muted); margin: 0 0 2px; }
.money-quick-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.money-cost-breakdown { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin: 10px 0; }
.money-cost-breakdown .row { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; }
.money-cost-breakdown .row.highlight { font-weight: 700; color: var(--gold); font-size: 14.5px; border-top: 1px solid var(--border); margin-top: 4px; padding-top: 8px; }
.money-quantity-stepper { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 14px 0; }
.money-quantity-stepper button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface-2); font-size: 20px; color: var(--text); }
.money-quantity-stepper button:active { border-color: var(--mint); color: var(--mint); }
.money-quantity-stepper .value { font-size: 22px; font-weight: 700; min-width: 44px; text-align: center; }
.money-result-banner { background: rgba(27, 94, 63, 0.08); border: 1px solid var(--mint); border-radius: 12px; padding: 16px; text-align: center; margin: 14px 0; }
.money-result-banner.neutral { background: var(--surface-2); border-color: var(--border); }
.money-result-banner .amount { font-size: 22px; font-weight: 700; color: var(--mint); margin: 0 0 4px; }
.money-checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin: 10px 0; }
.money-wait-banner { background: rgba(201, 162, 39, 0.1); border: 1px solid var(--gold); border-radius: 12px; padding: 12px; margin-bottom: 14px; font-size: 13px; }
.dua-category-card .cat-count { font-size: 11.5px; color: var(--muted); }
.dua-category-card.empty .cat-count { color: var(--muted); }

.dua-list { display: flex; flex-direction: column; gap: 8px; }
.dua-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 14px;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  text-align: left;
  width: 100%;
}
.dua-list-item .dua-list-title { font-size: 14px; font-weight: 600; }
.dua-list-item .dua-list-cat { font-size: 11.5px; color: var(--muted); display: block; margin-top: 2px; }
.dua-list-fav { color: var(--mint); font-size: 16px; background: none; border: none; cursor: pointer; padding: 4px; }

.dua-detail-card { border-color: var(--mint); }
.dua-fav-btn { font-size: 20px; color: var(--muted); background: none; border: none; cursor: pointer; }
.dua-fav-btn.active { color: var(--mint); }
.dua-arabic { font-size: 26px; line-height: 2.1; color: var(--text); direction: rtl; unicode-bidi: isolate; text-align: right; font-family: "Traditional Arabic", "Scheherazade New", "Noto Naskh Arabic", serif; margin: 10px 0 14px; }
.dua-translit { font-size: 13.5px; color: var(--mint-soft); font-style: italic; margin: 0 0 12px; line-height: 1.6; }
.dua-meaning { font-size: 14.5px; line-height: 1.6; margin: 0 0 16px; }
.dua-detail-actions { display: flex; gap: 8px; }
.dua-detail-actions .btn { flex: 1; margin-bottom: 0; }

/* FULL QURAN */
.panel-subnote { color: var(--muted); font-size: 11.5px; line-height: 1.5; margin: 4px 0 12px; }
.quran-surah-search {
  width: 100%;
  box-sizing: border-box;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
}
.quran-surah-search::placeholder { color: var(--muted); }
.quran-surah-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--mint);
  color: var(--mint);
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  margin-right: 10px;
}
.quran-surah-row { display: flex; align-items: center; }
.quran-surah-names { flex: 1; }
.quran-surah-arabic-name { font-size: 15px; direction: rtl; font-family: "Traditional Arabic", "Scheherazade New", "Noto Naskh Arabic", serif; }

.quran-surah-header-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; }
.quran-surah-header-arabic { font-size: 24px; font-family: "Traditional Arabic", "Scheherazade New", "Noto Naskh Arabic", serif; color: var(--mint-soft); }
.quran-surah-header-meta { font-size: 12px; color: var(--muted); }

.quran-ayah-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
}
.quran-ayah-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.quran-ayah-num { font-size: 11.5px; color: var(--mint); font-weight: 700; }
.quran-ayah-ruku { font-size: 11px; color: var(--muted); }
.quran-ayah-arabic { font-size: 21px; line-height: 2; color: var(--text); direction: rtl; unicode-bidi: isolate; text-align: right; font-family: "Traditional Arabic", "Scheherazade New", "Noto Naskh Arabic", serif; margin: 0 0 10px; }
.quran-ayah-translation { font-size: 13.5px; line-height: 1.6; margin: 0 0 6px; }
.quran-ayah-translation-label { color: var(--mint); font-weight: 600; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.04em; margin-right: 4px; }
.quran-ayah-urdu { direction: rtl; unicode-bidi: isolate; text-align: right; font-family: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", serif; font-size: 15.5px; }
.quran-loading-note, .quran-error-note { color: var(--muted); font-size: 13px; text-align: center; padding: 20px 10px; }
.quran-error-note { color: var(--danger); }

.dua-empty-state { color: var(--muted); font-size: 13px; background: var(--surface-2); border: 1px dashed var(--border); border-radius: 12px; padding: 16px; text-align: center; }

/* VAULT */
.vault-textarea { min-height: 160px; resize: vertical; line-height: 1.6; font-family: inherit; }
.vault-body-text { white-space: pre-wrap; }
.vault-entry-preview { color: var(--muted); font-size: 12px; margin-top: 2px; }
.vault-entry-date { color: var(--muted); font-size: 11px; }

.sunnah-item-wrap { display: flex; flex-direction: column; gap: 0; }
.sunnah-item-expand-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--mint);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  margin-right: 6px;
  white-space: nowrap;
}
.sunnah-item-detail {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 12px 12px;
  padding: 14px;
  margin-top: -1px;
}
.sunnah-item-detail.hidden { display: none; }
.sunnah-item-ruku {
  margin: 0 0 4px;
  font-size: 11.5px;
  color: var(--mint);
  font-weight: 600;
  text-align: right;
}

.sunnah-item-arabic {
  font-size: 20px;
  line-height: 1.9;
  color: var(--text);
  direction: rtl;
  unicode-bidi: isolate;
  text-align: right;
  font-family: "Traditional Arabic", "Scheherazade New", "Noto Naskh Arabic", serif;
  margin: 0 0 8px;
}
.sunnah-item-divider { border-top: 1px dashed var(--border); margin: 12px 0; }

/* HADITH */
.hadith-source { margin: 0 0 10px; font-size: 12px; color: var(--mint); font-weight: 600; }
.hadith-arabic { margin: 0 0 10px; font-size: 19px; line-height: 1.9; color: var(--text); direction: rtl; unicode-bidi: isolate; font-family: "Traditional Arabic", "Scheherazade New", "Noto Naskh Arabic", serif; }
.hadith-text { font-size: 14px; line-height: 1.6; margin: 0 0 10px; }
.hadith-explain { font-size: 13px; color: var(--muted); line-height: 1.6; margin: 0 0 16px; }

/* TASBIH COUNTER */
.tasbih-counter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 10px 4px;
  margin: 4px 0 6px;
  border-top: 1px dashed var(--border);
}
.tasbih-phase-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.tasbih-tap-circle {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  border: none;
  background: conic-gradient(var(--mint) 0%, var(--surface-2) 0%);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  transition: transform 0.08s ease;
  position: relative;
}
.tasbih-tap-circle::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
}
.tasbih-tap-circle:active { transform: scale(0.94); }
.tasbih-tap-circle.tasbih-pulse { animation: tasbih-pulse 0.35s ease; }
@keyframes tasbih-pulse {
  0% { box-shadow: 0 0 0 0 rgba(27, 94, 63, 0.45); }
  100% { box-shadow: 0 0 0 14px rgba(27, 94, 63, 0); }
}
.tasbih-count-num, .tasbih-count-target {
  position: relative;
  z-index: 1;
  font-weight: 700;
  color: var(--text);
}
.tasbih-count-num { font-size: 26px; }
.tasbih-count-target { font-size: 13px; color: var(--muted); font-weight: 600; margin-left: 2px; }
.tasbih-tap-circle-free .tasbih-count-num { font-size: 24px; }
.tasbih-controls { display: flex; gap: 10px; }
.tasbih-reset-link {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  padding: 4px 6px;
}
.tasbih-done-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--mint);
  margin: 6px 0 0;
}

.quiz-option {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}
.quiz-option.correct { border-color: var(--mint); background: rgba(27, 94, 63, 0.1); }
.quiz-option.wrong { border-color: var(--danger); background: rgba(192, 57, 43, 0.08); }
.quiz-feedback { font-size: 13.5px; margin-top: 10px; line-height: 1.6; }

/* CHAT */
.chat-options { display: flex; flex-direction: column; gap: 8px; }
.chat-option-btn {
  text-align: left;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  color: var(--text);
  border-radius: 12px;
  padding: 13px 15px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}
.chat-response-line { font-size: 14px; line-height: 1.6; margin: 0 0 10px; }
.chat-input-row { display: flex; gap: 8px; margin-top: 12px; }
.chat-input-row .text-input { flex: 1; min-width: 0; margin: 0; }
.chat-user-line { font-size: 13px; color: var(--muted); margin: 0 0 10px; font-style: italic; }
.chat-context-line { font-size: 12px; color: var(--muted); margin: 12px 0 0; }
.chat-confirm-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.chat-confirm-row .chat-response-line { flex-basis: 100%; margin: 0; }

/* MORE */
.coins-line { font-size: 22px; font-weight: 700; color: var(--mint); margin: 0 0 10px; }
.status-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.status-list li { font-size: 13px; display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.status-tag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.status-tag.implemented { background: rgba(27, 94, 63, 0.12); color: var(--mint); }
.status-tag.partial { background: rgba(180, 83, 9, 0.12); color: #B45309; }
.status-tag.planned { background: var(--surface-2); color: var(--muted); }

/* SHIELD */
.shield-clock { font-size: 36px; font-weight: 700; text-align: center; margin: 14px 0; color: var(--mint); font-variant-numeric: tabular-nums; }
.shield-grounding { font-size: 14px; line-height: 1.6; background: var(--surface-2); border-radius: 12px; padding: 12px 14px; margin: 0 0 16px; }

.toast {
  position: fixed;
  bottom: 96px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--mint);
  color: var(--on-accent);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  z-index: 200;
  box-shadow: 0 4px 14px rgba(27, 94, 63, 0.25);
}

/* ===================================================================
   HOME — rebuilt 2026-09-25. Scoped to #view-home / the priority card
   so no other screen changes. Palette: warm ivory, deep forest, muted
   sage, warm gold. Depth comes from tinted surfaces + soft shadows.
   =================================================================== */
html.on-home, html.on-home body { background: #F7F4EC; }

#view-home { position: relative; padding-top: 18px; }
#view-home > *:not(.home-atmosphere) { position: relative; z-index: 1; }

.home-atmosphere {
  position: absolute; left: 0; right: 0; top: 0; height: 380px; z-index: 0; pointer-events: none;
  background:
    radial-gradient(420px 260px at 92% -40px, rgba(201, 154, 61, 0.30), transparent 70%),
    radial-gradient(360px 240px at 0% 0, rgba(23, 76, 60, 0.10), transparent 70%),
    linear-gradient(180deg, #F0E8D2 0%, rgba(247, 244, 236, 0) 100%);
}
.home-atmosphere::before {
  content: ""; position: absolute; inset: 0; opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23174C3C' stroke-width='1'%3E%3Crect x='16' y='16' width='32' height='32'/%3E%3Crect x='16' y='16' width='32' height='32' transform='rotate(45 32 32)'/%3E%3C/g%3E%3C/svg%3E");
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}

/* header */
.hh-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.hh-date { margin: 0 0 3px; font-size: 12.5px; font-weight: 600; letter-spacing: 0.02em; color: #6B6650; }
.hh-greeting { margin: 0; font-size: 22px; line-height: 1.2; font-weight: 700; color: #18251F; }
.hh-context { margin: 7px 0 0; font-size: 13px; color: #5F6B62; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hh-day-pill { font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; color: #8A6A1B; background: rgba(201, 154, 61, 0.16); border-radius: 999px; padding: 3px 9px; }
.hh-avatar { flex: none; width: 42px; height: 42px; background: linear-gradient(140deg, #1F5D49, #174C3C); color: #F3E3B5; border: 2px solid rgba(201, 154, 61, 0.6); box-shadow: 0 4px 12px rgba(23, 76, 60, 0.25); }
.hh-eyebrow { margin: 0 0 8px; font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: #6E6240; }

/* RIGHT NOW hero */
.hero {
  position: relative; overflow: hidden; border-radius: 26px; padding: 20px 18px 16px; margin-bottom: 14px; color: #F4F1E6;
  background:
    radial-gradient(240px 160px at 92% 0%, rgba(233, 196, 106, 0.30), transparent 70%),
    linear-gradient(155deg, #1F5F4B 0%, #174C3C 55%, #0E3327 100%);
  box-shadow: 0 14px 30px rgba(15, 51, 39, 0.28), 0 1px 0 rgba(255, 255, 255, 0.08) inset;
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.10;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23F3E3B5' stroke-width='1'%3E%3Crect x='16' y='16' width='32' height='32'/%3E%3Crect x='16' y='16' width='32' height='32' transform='rotate(45 32 32)'/%3E%3C/g%3E%3C/svg%3E");
  -webkit-mask-image: radial-gradient(260px 200px at 100% 0%, #000, transparent 75%);
  mask-image: radial-gradient(260px 200px at 100% 0%, #000, transparent 75%);
}
.hero > * { position: relative; }
.hero-enter { animation: heroIn 0.6s ease both; }
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hero-label { margin: 0; font-size: 11px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: #E8C77A; }
.hero-pill { font-size: 11.5px; font-weight: 700; padding: 5px 11px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); color: #F4F1E6; }
.hero-pill.is-done { background: rgba(233, 196, 106, 0.24); color: #F8E3A6; }
.hero-pill.pop { animation: pop 0.55s cubic-bezier(0.2, 1.6, 0.4, 1); }
.hero-name { margin: 10px 0 2px; font-size: 44px; line-height: 1.05; font-weight: 800; letter-spacing: -0.01em; color: #fff; }
.hero-time { margin: 0 0 16px; font-size: 14px; color: rgba(244, 241, 230, 0.78); }
.hero .hero-cta {
  display: block; width: 100%; border: 0; border-radius: 14px; padding: 14px; font-size: 15.5px; font-weight: 800; color: #3A2A08;
  background: linear-gradient(180deg, #F2D386, #D9A94B); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25), 0 1px 0 rgba(255, 255, 255, 0.5) inset;
  transition: transform 0.12s ease;
}
.hero .hero-cta:active { transform: scale(0.98); }
.hero .hero-cta-ghost { display: block; width: 100%; margin-top: 8px; background: rgba(255, 255, 255, 0.10); color: #F4F1E6; border: 1px solid rgba(255, 255, 255, 0.28); }
.hero-link { background: none; border: 0; color: rgba(244, 241, 230, 0.75); font: inherit; font-size: 13px; text-decoration: underline; padding: 10px 0 0; cursor: pointer; }
.hero-next { margin-top: 16px; padding-top: 13px; border-top: 1px solid rgba(255, 255, 255, 0.14); }
.hero-next-row { display: flex; align-items: baseline; gap: 8px; }
.hero-next-label { font-size: 10.5px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: #E8C77A; }
.hero-next-name { font-size: 15px; font-weight: 600; color: #F4F1E6; }
.hero-countdown { margin: 4px 0 0; font-size: 13px; color: rgba(244, 241, 230, 0.72); font-variant-numeric: tabular-nums; }
.hero-bar { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.16); margin-top: 10px; overflow: hidden; }
.hero-bar-fill { height: 100%; width: 0; border-radius: 4px; background: linear-gradient(90deg, #E8C77A, #F6E2A6); transition: width 1s linear; }
.hero-earlier { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.hero-earlier-label { font-size: 11.5px; color: rgba(244, 241, 230, 0.62); }
.hero-chip { background: rgba(255, 255, 255, 0.10); border: 1px solid rgba(255, 255, 255, 0.24); color: #F4F1E6; border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.hero-chip:active { background: rgba(255, 255, 255, 0.22); }
.hero-setup-title { margin: 8px 0 6px; font-size: 21px; line-height: 1.25; font-weight: 800; color: #fff; }
.hero-setup-text { margin: 0 0 14px; font-size: 13.5px; line-height: 1.5; color: rgba(244, 241, 230, 0.78); }
.hero .hero-input { display: block; width: 100%; margin: 0 0 8px; background: rgba(255, 255, 255, 0.95); border-color: transparent; }
.sk { border-radius: 10px; background: linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.sk-title { height: 44px; width: 55%; margin: 14px 0 8px; }
.sk-line { height: 14px; width: 75%; margin-bottom: 18px; }
.sk-strip { height: 46px; width: 100%; }

/* companion note */
.hamdard-now { display: flex; gap: 12px; align-items: flex-start; padding: 14px; margin-bottom: 14px; border-radius: 20px; background: linear-gradient(135deg, #E6EEDF, #F2F1E2); border: 1px solid #D3DEC6; box-shadow: 0 6px 16px rgba(23, 76, 60, 0.08); }
.hn-in { animation: fadeUp 0.45s ease both; }
.hn-avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #2F7A5E, #174C3C); color: #F3E3B5; font-weight: 800; font-size: 15px; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 3px rgba(201, 154, 61, 0.28); }
.hn-body { min-width: 0; }
.hn-label { margin: 0 0 2px; font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: #4E6B57; }
.hn-text { margin: 0; font-size: 14.5px; line-height: 1.45; color: #1E2B24; }
.hamdard-now .hn-cta { margin-top: 10px; padding: 9px 18px; font-size: 13.5px; font-weight: 700; background: #174C3C; color: #F3E3B5; border-radius: 999px; box-shadow: 0 3px 8px rgba(23, 76, 60, 0.25); transition: transform 0.12s ease; }
.hamdard-now .hn-cta:active { transform: scale(0.97); }

/* Today's Priority (also used, unchanged in behaviour, inside Duniya tools) */
#priority-card-el { border-radius: 22px; border: 1px solid #EAD9AC; background: linear-gradient(180deg, #FFFBEF 0%, #FBF3DC 100%); box-shadow: 0 10px 22px rgba(160, 120, 40, 0.14); padding: 16px 16px 14px; }
#priority-card-el .card-row { margin-bottom: 12px; }
#priority-card-el .card-row h2 { font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: #8A6A1B; }
.pc-title-row { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.pc-icon { flex: none; width: 46px; height: 46px; border-radius: 15px; display: flex; align-items: center; justify-content: center; font-size: 23px; background: linear-gradient(145deg, #F8E6B0, #E9C46A); box-shadow: 0 4px 10px rgba(180, 130, 30, 0.25); }
.pc-title-text { min-width: 0; }
#priority-card-el .priority-title { margin: 0; font-size: 18px; line-height: 1.25; color: #1E2B24; }
.pc-meta { margin: 2px 0 0; font-size: 13px; color: #7A6A45; }
#priority-card-el .priority-why { margin: 10px 0 14px; font-size: 12.5px; color: #8C8365; font-style: italic; }
.pc-note { margin: 0 0 4px; font-size: 13px; color: #7A6A45; }
.pc-empty { text-align: center; padding: 4px 4px 2px; }
.pc-empty-icon { display: inline-flex; width: 52px; height: 52px; border-radius: 18px; align-items: center; justify-content: center; font-size: 26px; background: linear-gradient(145deg, #F8E6B0, #E9C46A); box-shadow: 0 4px 10px rgba(180, 130, 30, 0.25); }
.pc-empty-title { margin: 12px 0 4px; font-size: 17px; line-height: 1.3; font-weight: 700; color: #1E2B24; }
.pc-empty-sub { margin: 0; font-size: 13px; color: #7A6A45; }
#priority-card-el .pc-cta { display: block; width: 100%; margin-top: 14px; border: 0; border-radius: 14px; padding: 13px; font-size: 15px; font-weight: 800; background: linear-gradient(180deg, #1F6650, #174C3C); color: #F6E8BE; box-shadow: 0 6px 14px rgba(23, 76, 60, 0.28); transition: transform 0.12s ease; }
#priority-card-el .pc-cta:active { transform: scale(0.98); }
#priority-card-el .focus-clock { font-size: 44px; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; color: #174C3C; margin: 4px 0 12px; }
#priority-card-el .focus-controls .btn-outline { border-color: #C9B27A; color: #6B5A2A; }
#priority-card-el .priority-checkin-text { color: #1E2B24; }

.preset-tile { display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px 11px; background: #fff; border: 1px solid #E9DFC3; border-radius: 15px; box-shadow: 0 3px 8px rgba(120, 90, 30, 0.08); font-weight: 600; transition: transform 0.12s ease; }
.preset-tile:active { transform: scale(0.97); }
.pt-icon { flex: none; width: 34px; height: 34px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 18px; background: #F6EBCB; }
.preset-tile:nth-child(3n+2) .pt-icon { background: #DDE9D3; }
.preset-tile:nth-child(3n+3) .pt-icon { background: #EBDFC6; }
.pt-text { min-width: 0; }
.pt-label { display: block; font-size: 13px; font-weight: 700; color: #1E2B24; line-height: 1.25; }
.pt-sub { display: block; font-size: 11px; font-weight: 500; color: #7A7460; margin-top: 1px; line-height: 1.25; }

/* Today's Progress */
.hh-progress { border-radius: 22px; padding: 16px; margin-bottom: 14px; background: linear-gradient(180deg, #F0EEE3, #EAE8DC); border: 1px solid #DFDCCB; }
.hp-body { display: flex; align-items: center; gap: 16px; }
.hp-ring { position: relative; width: 88px; height: 88px; flex: none; }
.hp-ring-svg { width: 88px; height: 88px; transform: rotate(-90deg); }
.hp-ring-track { fill: none; stroke: rgba(23, 76, 60, 0.12); stroke-width: 9; }
.hp-ring-fill { fill: none; stroke: url(#hp-grad); stroke-width: 9; stroke-linecap: round; transition: stroke-dashoffset 0.9s cubic-bezier(0.3, 0.8, 0.3, 1); }
.hp-pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 19px; font-weight: 800; color: #174C3C; }
.hp-text { min-width: 0; }
.hp-text .hh-eyebrow { margin-bottom: 4px; }
.hp-main { margin: 0; font-size: 16px; line-height: 1.25; font-weight: 700; color: #1E2B24; }
.hp-sub { margin: 2px 0 8px; font-size: 12.5px; color: #6A7268; }
.hp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hp-chip { display: inline-flex; gap: 6px; align-items: center; font-size: 11.5px; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.72); border: 1px solid #DAD6C2; color: #4C564E; }
.hp-chip-count { font-weight: 800; color: #174C3C; font-variant-numeric: tabular-nums; }
.hp-chip.is-full { background: rgba(201, 154, 61, 0.18); border-color: #E2C983; }
.hp-link { display: block; margin: 12px 0 0; background: none; border: 0; padding: 0; font: inherit; font-size: 13px; font-weight: 700; color: #174C3C; cursor: pointer; text-align: left; }
.hh-progress.is-empty .hp-pct { color: #9A9578; }

/* quick actions */
.hh-actions { margin-bottom: 8px; }
.ha-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ha-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-height: 118px; text-align: left; border: 1px solid var(--tb, #E4DFC9); border-radius: 18px; padding: 12px; font-family: inherit; cursor: pointer; background: linear-gradient(160deg, var(--t1, #FFFDF6), var(--t2, #F6F1DE)); box-shadow: 0 6px 14px rgba(70, 60, 30, 0.09); transition: transform 0.12s ease, box-shadow 0.12s ease; }
.ha-tile:active { transform: scale(0.97); box-shadow: 0 2px 6px rgba(70, 60, 30, 0.10); }
.ha-icon { width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; background: var(--ti, #EFE7C9); }
.ha-text { display: block; min-width: 0; }
.ha-title { display: block; font-size: 14.5px; font-weight: 700; color: #1E2B24; }
.ha-sub { display: block; margin-top: 2px; font-size: 12px; line-height: 1.3; color: #6A7268; }
.ha-cta { margin-top: auto; font-size: 12px; font-weight: 800; padding: 5px 13px; border-radius: 999px; background: #174C3C; color: #F3E3B5; }
.ha-tile.is-done { opacity: 0.88; }
.ha-tile.is-done .ha-cta { background: rgba(23, 76, 60, 0.12); color: #174C3C; }
.tint-amber { --t1: #FFF9E8; --t2: #F7E9C4; --tb: #EBD9A6; --ti: #F3DDA0; }
.tint-sage { --t1: #F4F8EF; --t2: #E4EDDB; --tb: #CFDCC3; --ti: #CBDDBE; }
.tint-forest { --t1: #EEF4EF; --t2: #DBE8E0; --tb: #BFD4C7; --ti: #B9D3C3; }
.tint-sand { --t1: #FBF6EE; --t2: #F1E7D6; --tb: #E3D5BC; --ti: #EADDBF; }

@keyframes heroIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(0.6); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
  .hero-enter, .hn-in, .hero-pill.pop, .sk { animation: none; }
  .hp-ring-fill, .hero-bar-fill, .ha-tile, .preset-tile, .hero .hero-cta { transition: none; }
}

/* ===================================================================
   DAILY FLOW + LIFE GRID — same palette as Home (ivory, forest, sage,
   warm gold). Quiet cells, no red, no streak pressure.
   =================================================================== */
#view-flow { position: relative; padding-top: 14px; }

.fl-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.fl-back { background: none; border: 0; padding: 8px 6px; font: inherit; font-size: 14px; font-weight: 700; color: #174C3C; cursor: pointer; min-height: 40px; }
.fl-title { margin: 0; font-size: 22px; font-weight: 800; color: #18251F; }

.fl-tabs { display: flex; gap: 6px; padding: 4px; background: rgba(23, 76, 60, 0.08); border-radius: 14px; margin-bottom: 14px; }
.fl-tab { flex: 1; border: 0; background: none; padding: 10px; border-radius: 11px; font: inherit; font-size: 14px; font-weight: 700; color: #4C564E; cursor: pointer; min-height: 40px; }
.fl-tab.active { background: #174C3C; color: #F6E8BE; box-shadow: 0 3px 8px rgba(23, 76, 60, 0.25); }

.fl-note { position: sticky; top: 8px; z-index: 5; margin: 0 0 12px; padding: 10px 14px; border-radius: 14px; font-size: 14px; font-weight: 600; color: #3A2A08; background: linear-gradient(180deg, #F6E3A8, #EBCB78); box-shadow: 0 6px 14px rgba(120, 90, 30, 0.2); }
.fl-note-in { animation: fadeUp 0.35s ease both; }

.fl-eyebrow { margin: 0 0 6px; font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: #6E6240; }

.fl-summary { border-radius: 22px; padding: 16px; margin-bottom: 14px; background: linear-gradient(160deg, #1F5F4B 0%, #174C3C 60%, #0E3327 100%); color: #F4F1E6; box-shadow: 0 12px 26px rgba(15, 51, 39, 0.25); transition: box-shadow 0.4s ease; }
.fl-summary .fl-eyebrow { color: #E8C77A; }
.fl-summary.is-complete { box-shadow: 0 12px 26px rgba(15, 51, 39, 0.25), 0 0 0 3px rgba(232, 199, 122, 0.45); }
.fl-sum-line { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.fl-sum-big { font-size: 30px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.fl-sum-text { font-size: 14px; color: rgba(244, 241, 230, 0.8); flex: 1; }
.fl-sum-pct { font-size: 15px; font-weight: 800; color: #F6DFA0; }
.fl-bar { height: 8px; border-radius: 8px; background: rgba(255, 255, 255, 0.16); margin: 12px 0 8px; overflow: hidden; }
.fl-bar-fill { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, #E8C77A, #F6E2A6); transition: width 0.7s cubic-bezier(0.3, 0.8, 0.3, 1); }
.fl-sum-sub { margin: 0; font-size: 12.5px; color: rgba(244, 241, 230, 0.75); }
.fl-sum-empty { margin: 0; font-size: 15px; color: rgba(244, 241, 230, 0.85); }

.fl-section { margin-bottom: 14px; }
.fl-sec-head { display: flex; align-items: center; justify-content: space-between; margin: 0 2px 8px; }
.fl-sec-title { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: #6E6240; }
.fl-section.is-current .fl-sec-title { color: #174C3C; }
.fl-section.is-current .fl-sec-title::after { content: "  ·  now"; color: #B98A2E; letter-spacing: 0.1em; }
.fl-sec-count { font-size: 12px; font-weight: 700; color: #8C8365; font-variant-numeric: tabular-nums; }
.fl-section.is-complete .fl-sec-count { color: #174C3C; }
.fl-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }

.fl-row { display: flex; align-items: flex-start; gap: 4px; padding: 10px 6px 10px 4px; border-radius: 16px; background: #FFFDF6; border: 1px solid #E8E0C8; box-shadow: 0 3px 8px rgba(70, 60, 30, 0.06); transition: background 0.25s ease, opacity 0.25s ease; }
.fl-row.is-done { background: #F1F2E8; border-color: #DCE3D3; box-shadow: none; }
.fl-row.is-done .fl-name { color: #6A7268; }
.fl-row.is-now { border-color: #D9B25A; background: linear-gradient(180deg, #FFF9E6, #FBEFC9); }
.fl-row.is-next { border-color: #E3D6A8; }
.fl-row.pulse { animation: flPulse 0.7s ease; }
@keyframes flPulse { 0% { box-shadow: 0 0 0 0 rgba(23, 76, 60, 0.35); } 100% { box-shadow: 0 0 0 14px rgba(23, 76, 60, 0); } }

.fl-check { flex: none; width: 44px; height: 44px; margin: -4px 0 -4px -2px; padding: 0; background: none; border: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.fl-box { width: 26px; height: 26px; border-radius: 9px; border: 2px solid #A9B7A6; background: #fff; color: #fff; font-size: 16px; font-weight: 800; line-height: 1; display: flex; align-items: center; justify-content: center; transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease; }
.fl-check.is-done .fl-box { background: #174C3C; border-color: #174C3C; }
.fl-check.is-partial .fl-box { border-color: #174C3C; background: linear-gradient(90deg, #BBD3C2 50%, #fff 50%); }
.fl-row.pulse .fl-box { animation: pop 0.45s cubic-bezier(0.2, 1.6, 0.4, 1); }
.fl-check:active .fl-box { transform: scale(0.9); }

.fl-mid { flex: 1; min-width: 0; padding-top: 2px; }
.fl-name-row { display: flex; align-items: center; gap: 8px; }
.fl-name { font-size: 15.5px; font-weight: 700; color: #1E2B24; overflow-wrap: anywhere; }
.fl-tag { flex: none; font-size: 10px; font-weight: 800; letter-spacing: 0.1em; color: #8A6A1B; background: rgba(201, 154, 61, 0.2); border-radius: 999px; padding: 2px 8px; }
.fl-meta { margin: 2px 0 0; font-size: 12.5px; color: #6A7268; }
.fl-measure { margin-top: 8px; }
.fl-mbar { height: 6px; border-radius: 6px; background: rgba(23, 76, 60, 0.12); overflow: hidden; margin-bottom: 8px; }
.fl-mbar-fill { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #2F7A5E, #C99A3D); transition: width 0.5s ease; }
.fl-stepper { display: flex; gap: 8px; }
.fl-step { min-width: 44px; height: 38px; padding: 0 12px; border-radius: 12px; border: 1px solid #D5CDB0; background: #fff; font: inherit; font-size: 16px; font-weight: 700; color: #174C3C; cursor: pointer; }
.fl-step-wide { font-size: 13px; padding: 0 16px; }
.fl-step:active { background: #EEE9D6; }
.fl-more { flex: none; width: 40px; height: 40px; margin-top: -3px; background: none; border: 0; font-size: 20px; color: #8C8365; cursor: pointer; border-radius: 12px; }
.fl-more:active { background: rgba(0, 0, 0, 0.05); }

.fl-aside { margin: 4px 0 14px; padding: 12px 14px; border-radius: 16px; background: rgba(23, 76, 60, 0.05); border: 1px dashed #CFCBB5; }
.fl-aside-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 14px; }
.fl-aside-name { flex: 1; color: #4C564E; }
.fl-aside-state { font-size: 12px; color: #8C8365; }
.fl-link { background: none; border: 0; font: inherit; font-size: 13px; font-weight: 700; color: #174C3C; text-decoration: underline; cursor: pointer; padding: 8px 4px; }

.btn.fl-cta { display: block; width: 100%; margin: 6px 0 14px; border: 0; border-radius: 14px; padding: 14px; font-size: 15px; font-weight: 800; background: linear-gradient(180deg, #1F6650, #174C3C); color: #F6E8BE; box-shadow: 0 6px 14px rgba(23, 76, 60, 0.28); }

.fl-first { text-align: center; padding: 22px 16px 10px; border-radius: 22px; background: linear-gradient(180deg, #FFFBEF, #FBF3DC); border: 1px solid #EAD9AC; box-shadow: 0 10px 22px rgba(160, 120, 40, 0.12); }
.fl-first-icon { display: inline-flex; width: 56px; height: 56px; border-radius: 19px; align-items: center; justify-content: center; font-size: 28px; background: linear-gradient(145deg, #F8E6B0, #E9C46A); box-shadow: 0 4px 10px rgba(180, 130, 30, 0.25); }
.fl-first-title { margin: 12px 0 4px; font-size: 20px; font-weight: 800; color: #1E2B24; }
.fl-first-sub { margin: 0 0 4px; font-size: 13.5px; line-height: 1.5; color: #6A6244; }
.fl-first-or { margin: 6px 0 10px; font-size: 12px; color: #8C8365; }
.fl-first .fl-chips { justify-content: center; margin-bottom: 14px; }

.fl-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.fl-chip { min-height: 40px; padding: 8px 14px; border-radius: 999px; border: 1px solid #D5CDB0; background: #fff; font: inherit; font-size: 13.5px; font-weight: 600; color: #2B372F; cursor: pointer; }
.fl-chip.is-on { background: #174C3C; border-color: #174C3C; color: #F6E8BE; }
.fl-day { min-width: 40px; padding: 8px 0; text-align: center; }
.fl-form-label { margin: 4px 0 6px; font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: #6E6240; }
.fl-pickrow { display: flex; gap: 8px; margin-bottom: 8px; }
.fl-pickrow .text-input { flex: 1; margin-bottom: 0; }
.fl-cell-state { margin: 0 0 8px; font-size: 18px; font-weight: 800; color: #174C3C; }
.fl-typebox .text-input { margin-bottom: 10px; }

/* week */
.fl-weeknav { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.fl-navbtn { width: 44px; height: 44px; border-radius: 14px; border: 1px solid #D5CDB0; background: #fff; font-size: 22px; font-weight: 700; color: #174C3C; cursor: pointer; }
.fl-navbtn:disabled { opacity: 0.35; }
.fl-weeklabel { flex: 1; height: 44px; border-radius: 14px; border: 0; background: rgba(23, 76, 60, 0.08); font: inherit; font-size: 14px; font-weight: 700; color: #174C3C; cursor: pointer; }
.fl-weeksum { margin-bottom: 14px; padding: 14px 16px; border-radius: 18px; background: linear-gradient(180deg, #F0EEE3, #EAE8DC); border: 1px solid #DFDCCB; }
.fl-weeksum-main { margin: 0 0 4px; font-size: 16px; font-weight: 800; color: #1E2B24; }
.fl-weeksum-line { margin: 4px 0 0; font-size: 13.5px; line-height: 1.45; color: #4C564E; }
.fl-empty-week { text-align: center; color: #6A7268; font-size: 14px; padding: 18px 0; }

.fl-gridwrap { overflow-x: auto; padding: 4px 0 6px; margin: 0 -4px; -webkit-overflow-scrolling: touch; }
.fl-grid { display: grid; grid-template-columns: minmax(74px, 1.5fr) repeat(7, minmax(28px, 1fr)); gap: 5px 3px; align-items: center; padding: 0 4px; }
.fl-gh { text-align: center; padding: 4px 0; border-radius: 10px; }
.fl-gh-l { display: block; font-size: 11px; font-weight: 800; color: #6E6240; }
.fl-gh-d { display: block; font-size: 11px; color: #8C8365; font-variant-numeric: tabular-nums; }
.fl-gh.is-today { background: rgba(201, 154, 61, 0.22); }
.fl-gh.is-today .fl-gh-l, .fl-gh.is-today .fl-gh-d { color: #7A5A12; }
.fl-rl { min-width: 0; padding-right: 4px; }
.fl-rl-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12.5px; line-height: 1.2; font-weight: 700; color: #1E2B24; overflow-wrap: anywhere; }
.fl-rl-sub { display: block; font-size: 11px; color: #8C8365; }
.fl-cell { width: 100%; height: 40px; padding: 0; border-radius: 11px; border: 1px solid transparent; background: none; font: inherit; font-size: 15px; font-weight: 800; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.fl-cell:disabled { cursor: default; }
.c-done { background: #CBDFD0; border-color: #9DBFA9; color: #174C3C; }
.c-part { background: linear-gradient(90deg, #CBDFD0 50%, #F6F1DF 50%); border-color: #B7CDBB; color: #174C3C; }
.c-open { background: #FCF7E7; border: 1px dashed #D9B25A; color: #8A6A1B; }
.c-miss { background: #F2EEE1; border-color: #E4DEC8; color: #A9A38A; font-size: 22px; }
.c-skip { border: 1px dashed #CFCBB5; color: #8C8365; }
.c-rs { background: #EFE9DA; border-color: #E0D6BB; color: #7A6A45; }
.c-future { border: 1px dotted #DDD6BD; }
.c-na { background: none; border: 0; }
.fl-cell.is-today { box-shadow: inset 0 0 0 2px rgba(201, 154, 61, 0.55); }
.fl-cell.just { animation: cellFill 0.5s ease; }
@keyframes cellFill { 0% { transform: scale(0.6); opacity: 0.4; } 60% { transform: scale(1.12); } 100% { transform: scale(1); opacity: 1; } }
.fl-legend { margin: 10px 2px 14px; font-size: 11.5px; color: #8C8365; line-height: 1.6; }

.fl-reflect { margin-top: 6px; padding: 16px; border-radius: 20px; background: linear-gradient(180deg, #FFFBEF, #FBF3DC); border: 1px solid #EAD9AC; }
.fl-ref-main { margin: 0 0 6px; font-size: 17px; font-weight: 800; color: #1E2B24; }
.fl-ref-line { margin: 2px 0; font-size: 14px; color: #4C564E; }
.fl-ref-q { margin: 12px 0 8px; font-size: 13px; color: #6A6244; }

/* Home: compact week strip and links inside the progress card */
.hp-week { display: flex; justify-content: space-between; gap: 4px; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(23, 76, 60, 0.12); }
.hp-day { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; background: none; border: 0; padding: 4px 0; font: inherit; cursor: pointer; min-height: 40px; }
.hp-day-dot { width: 20px; height: 20px; border-radius: 7px; border: 1.5px solid #D5CFB8; background: rgba(255, 255, 255, 0.6); }
.hp-day-l { font-size: 10.5px; font-weight: 700; color: #8C8365; }
.hp-day.lv-0 .hp-day-dot { background: #F2EEE1; }
.hp-day.lv-1 .hp-day-dot { background: #DDE8DC; border-color: #B7CDBB; }
.hp-day.lv-2 .hp-day-dot { background: #BBD3C2; border-color: #9DBFA9; }
.hp-day.lv-3 .hp-day-dot { background: #7FA98D; border-color: #6A9A7A; }
.hp-day.lv-4 .hp-day-dot { background: #174C3C; border-color: #174C3C; }
.hp-day.is-future .hp-day-dot { border-style: dotted; background: none; }
.hp-day.is-today .hp-day-l { color: #7A5A12; }
.hp-day.is-today .hp-day-dot { box-shadow: 0 0 0 2px rgba(201, 154, 61, 0.55); }
.hp-links { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.hp-links .hp-link { margin: 0; padding: 8px 0; min-height: 40px; }
.hp-link-quiet { font-weight: 600; color: #6A7268; text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  .fl-row.pulse, .fl-row.pulse .fl-box, .fl-cell.just, .fl-note-in { animation: none; }
  .fl-bar-fill, .fl-mbar-fill, .fl-box { transition: none; }
}
.fl-cell.c-na.is-today { box-shadow: none; }
.modal-sheet .fl-sticky { position: sticky; bottom: 0; z-index: 2; margin-top: 10px; box-shadow: 0 -12px 12px -4px var(--bg); }

/* ---- custom goal: hint, saved confirmation, optional idea, priority card control ---- */
.fl-hint { margin: -4px 0 10px; font-size: 12.5px; line-height: 1.45; color: #6A6244; }
.fl-saved-name { margin: 0 0 4px; font-size: 20px; font-weight: 800; color: #174C3C; }
.fl-idea { margin: 14px 0 12px; padding: 12px 14px; border-radius: 14px; background: rgba(201, 154, 61, 0.12); border: 1px solid rgba(201, 154, 61, 0.35); }
.fl-idea-text { margin: 0 0 8px; font-size: 14px; line-height: 1.45; color: #2B372F; }
.fl-idea-row { display: flex; flex-wrap: wrap; gap: 8px; }
.fl-idea-row .btn { min-height: 40px; }
.pc-goal { margin-top: 4px; }
.pc-goal .fl-stepper { margin: 0 0 10px; }
.fl-cell.c-na { color: #BDB595; font-weight: 400; cursor: default; }
