:root {
  --bg: #07131a;
  --bg-accent: #102733;
  --panel: rgba(10, 27, 37, 0.82);
  --panel-border: rgba(146, 197, 183, 0.14);
  --text: #eff8f2;
  --muted: #9fc0b7;
  --green: #4fce84;
  --green-soft: rgba(79, 206, 132, 0.16);
  --red: #ff7262;
  --red-soft: rgba(255, 114, 98, 0.16);
  --gold: #f0c56b;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: 'Manrope', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(79, 206, 132, 0.18), transparent 30%),
    radial-gradient(circle at top right, rgba(240, 197, 107, 0.16), transparent 24%),
    linear-gradient(180deg, #081019 0%, #050b10 100%);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.8), transparent 90%);
  pointer-events: none;
}

.page-shell {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0 3rem;
}

.hero-panel,
.panel,
.focus-card {
  backdrop-filter: blur(18px);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
}

.hero-panel {
  display: grid;
  gap: 1.5rem;
  padding: 1.5rem;
  border-radius: calc(var(--radius) + 8px);
}

.eyebrow,
.section-label,
.meta-label,
.panel-note {
  color: var(--muted);
}

.eyebrow,
.section-label {
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.72rem;
  margin: 0 0 0.5rem;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1;
}

.hero-copy,
.focus-card p,
.panel-note,
.card-subtitle {
  margin: 0;
  line-height: 1.7;
}

.hero-copy {
  max-width: 60ch;
  color: #d6e8e1;
}

.hero-meta,
.status-grid,
.cards-grid {
  display: grid;
  gap: 1rem;
}

.meta-card,
.time-card {
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(18, 38, 49, 0.94), rgba(9, 21, 29, 0.88));
}

.meta-card {
  padding: 1rem;
}

.location-panel {
  margin-top: 0;
}

/* Keep visible spacing when location panel appears before the hero. */
.location-panel + .hero-panel {
  margin-top: 1.2rem;
}

.location-controls {
  display: grid;
  gap: 1rem;
}

.control-group {
  display: grid;
  gap: 0.45rem;
}

.control-button,
.control-group input {
  width: 100%;
  min-height: 52px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.9rem 1rem;
  font: inherit;
}

.control-button {
  background: linear-gradient(135deg, rgba(28, 93, 63, 0.95), rgba(10, 42, 33, 0.95));
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.control-button-secondary {
  background: linear-gradient(135deg, rgba(34, 55, 70, 0.95), rgba(13, 24, 34, 0.95));
}

.control-group input {
  background: rgba(9, 21, 29, 0.9);
  color: var(--text);
}

.control-group input::placeholder {
  color: var(--muted);
}

.meta-card strong,
.time-value {
  display: block;
  margin-top: 0.45rem;
}

.status-grid {
  margin-top: 1.2rem;
}

.focus-card,
.panel {
  border-radius: calc(var(--radius) + 4px);
}

.focus-card {
  padding: 1.4rem;
}

.current-card {
  background: linear-gradient(135deg, rgba(19, 54, 39, 0.92), rgba(8, 28, 24, 0.92));
}

.current-card.makrooh-active {
  background: linear-gradient(135deg, rgba(67, 25, 20, 0.95), rgba(28, 11, 11, 0.95));
  border-color: rgba(255, 114, 98, 0.45);
}

.current-card.makrooh-active #currentPrayer {
  color: #ffd6d1;
}

.current-card.makrooh-active #currentPrayerWindow {
  color: #ffd6d1;
}

.countdown-card {
  background: linear-gradient(135deg, rgba(50, 38, 12, 0.92), rgba(22, 17, 8, 0.92));
}

#countdownTimer {
  font-size: clamp(2rem, 5vw, 3.4rem);
  margin: 0.45rem 0 0.35rem;
}

#currentPrayer {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin: 0.45rem 0 0.35rem;
}

.panel {
  margin-top: 1.2rem;
  padding: 1.25rem;
}

.panel-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.cards-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.cards-grid-tight {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.time-card {
  position: relative;
  overflow: hidden;
  min-height: 150px;
  padding: 1rem;
}

.time-card::after {
  content: '';
  position: absolute;
  inset: auto -30px -50px auto;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1), transparent 70%);
}

.time-card-title {
  margin: 0.55rem 0 0.35rem;
  padding: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0;
  word-spacing: normal;
  text-wrap: pretty;
}

.time-value {
  font-size: 1.5rem;
  font-weight: 800;
}

.time-card.active {
  border-color: rgba(79, 206, 132, 0.55);
  background: linear-gradient(180deg, rgba(17, 66, 43, 0.95), rgba(10, 28, 20, 0.95));
}

.time-card.active .time-value {
  color: var(--green);
}

.time-card.makrooh {
  border-color: rgba(255, 114, 98, 0.45);
  background: linear-gradient(180deg, rgba(67, 25, 20, 0.95), rgba(28, 11, 11, 0.95));
}

.time-card.makrooh .time-value,
.time-card.makrooh .card-subtitle {
  color: #ffd6d1;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.pill.green {
  background: var(--green-soft);
  color: var(--green);
}

.pill.red {
  background: var(--red-soft);
  color: var(--red);
}

.error-banner {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  background: var(--red-soft);
  border: 1px solid rgba(255, 114, 98, 0.35);
  color: #ffd8d3;
}

.hidden {
  display: none !important;
}

.site-footer {
  margin-top: 3rem;
  border-top: 1px solid var(--panel-border);
  padding: 2rem 0 2.5rem;
}

.footer-inner {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.footer-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.footer-tagline {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.9rem;
  border-radius: 40px;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  backdrop-filter: blur(10px);
}

.footer-link:hover {
  color: var(--text);
  border-color: var(--green);
  background: var(--green-soft);
}

.footer-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

@media (min-width: 720px) {
  .hero-panel {
    grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.9fr);
    align-items: center;
    padding: 2rem;
  }

  .location-controls {
    grid-template-columns: minmax(220px, 1fr) 0.9fr;
    align-items: end;
  }

  .status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 719px) {
  /* Flex column enables CSS order-based resequencing of sections */
  [data-page="home"] {
    width: min(100% - 2rem, 1120px);
    padding-top: 1rem;
    display: flex;
    flex-direction: column;
  }

  /* Priority order: location → dates → current prayer → timings → makrooh */
  .location-panel { order: 1; }
  .hero-panel    { order: 2; }
  .status-grid   { order: 3; }
  .prayer-panel  { order: 4; }
  .makrooh-panel { order: 5; }
  #errorMessage  { order: 6; }

  /* Compact hero: hide decorative title + description on Home only, keep date/status cards */
  [data-page="home"] .hero-panel > div:first-child { display: none; }
  [data-page="home"] .hero-panel { padding: 0.75rem; }
  .hero-meta { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
  .location-card { grid-column: 1 / -1; }
  .meta-card { padding: 0.65rem 0.75rem; }

  .panel-header {
    flex-direction: column;
    align-items: start;
    margin-bottom: 0.65rem;
  }

  /* 3-column grid: 12 cards in 4 rows instead of 6 */
  .cards-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
  }
  .time-card {
    min-height: 92px;
    padding: 0.65rem 0.6rem;
  }
  .time-card h4  { font-size: 0.78rem; }
  .time-value    { font-size: 1.05rem; }
  .card-subtitle { font-size: 0.7rem; }
  .pill          { font-size: 0.65rem; padding: 0.2rem 0.45rem; }

  /* Makrooh: 2 columns */
  .cards-grid-tight { grid-template-columns: repeat(2, 1fr); }

  .panel { padding: 0.9rem; }
}

/* ── Navbar ──────────────────────────────────────────────────────────── */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(7, 19, 26, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--panel-border);
}

.site-nav {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1rem;
  height: 60px;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav-brand-icon {
  width: 26px;
  height: 26px;
  color: var(--green);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  display: block;
  padding: 0.45rem 0.75rem;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.nav-link-active {
  color: var(--green);
  background: var(--green-soft);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  padding: 6px;
  background: transparent;
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--muted);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

/* ── Page layout shell ───────────────────────────────────────────────── */

.site-main {
  min-height: calc(100vh - 60px);
  padding-top: 60px;
  margin-top: 0;
}

.page-view {
  /* page-shell gives the max-width and padding */
}

/* ── Shared loading / error states ──────────────────────────────────── */

.page-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 4rem 1rem;
  color: var(--muted);
  text-align: center;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(79, 206, 132, 0.2);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ── Calendar page ───────────────────────────────────────────────────── */

.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.calendar-heading {
  text-align: center;
}

.calendar-heading h2 {
  margin: 0 0 0.2rem;
}

.cal-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  color: var(--muted);
  font-size: 1.1rem;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}

.cal-nav-btn:hover {
  background: var(--green-soft);
  color: var(--green);
  border-color: rgba(79, 206, 132, 0.4);
}

.cal-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.cal-weekday {
  padding: 0.4rem 0.2rem;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cal-friday {
  color: var(--green);
}

.cal-cell {
  padding: 0.5rem 0.3rem;
  text-align: center;
  vertical-align: top;
  border-radius: 10px;
  position: relative;
  cursor: default;
}

.cal-empty {
  /* empty cell */
}

.cal-hijri {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.cal-gregorian {
  display: block;
  font-size: 0.65rem;
  color: var(--muted);
  margin-top: 0.1rem;
}

.cal-today {
  background: var(--green-soft);
  border: 1px solid rgba(79, 206, 132, 0.4);
}

.cal-today .cal-hijri {
  color: var(--green);
}

.cal-event {
  background: rgba(240, 197, 107, 0.1);
}

.cal-event .cal-hijri {
  color: var(--gold);
}

.cal-event-dot {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  margin: 0.25rem auto 0;
}

.calendar-events-panel {
  margin-top: 1.2rem;
}

.events-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.event-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(240, 197, 107, 0.2);
  background: rgba(240, 197, 107, 0.06);
}

.event-today {
  border-color: var(--green);
  background: var(--green-soft);
}

.event-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 40px;
}

.event-date strong {
  font-size: 1.2rem;
  color: var(--gold);
  line-height: 1;
}

.event-date span {
  font-size: 0.65rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.event-detail {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.event-gregorian {
  font-size: 0.75rem;
  color: var(--muted);
}

.event-empty {
  padding: 1rem 0;
  color: var(--muted);
}

/* ── Settings page ───────────────────────────────────────────────────── */

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 560px;
}

.setting-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.setting-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}

.setting-hint {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

.setting-select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(9, 21, 29, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239fc0b7' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.setting-select:focus {
  outline: none;
  border-color: var(--green);
}

.setting-toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
}

.toggle-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}

.muted-example {
  color: var(--muted);
  opacity: 0.6;
}

.toggle-option input[type="radio"] {
  accent-color: var(--green);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Hijri date offset stacked options */
.hijri-offset-options {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.hijri-offset-option {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  cursor: pointer;
}

.hijri-offset-option input[type="radio"] {
  accent-color: var(--green);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 0.15em;
  cursor: pointer;
}

.hijri-offset-option span {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.88rem;
  color: var(--fg);
  line-height: 1.4;
}

.hijri-offset-option .muted-example {
  font-size: 0.8rem;
}

.settings-saved-msg {
  font-size: 0.85rem;
  color: var(--green);
  margin: 0;
}

/* ── About page ──────────────────────────────────────────────────────── */

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 0.5rem;
}

.about-card {
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(18, 38, 49, 0.6), rgba(9, 21, 29, 0.6));
}

.about-card h4 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: var(--text);
}

.about-card p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.6;
}

.about-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.about-list li {
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.6;
  padding-left: 1rem;
  border-left: 2px solid var(--panel-border);
}

.about-list li strong {
  color: var(--text);
}

.about-link {
  color: var(--green);
  text-decoration-color: transparent;
  transition: text-decoration-color 0.15s;
}

.about-link:hover {
  text-decoration-color: var(--green);
}

/* Stats bar */
.about-stats-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.about-stat-item {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.85rem;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Feature cards */
.about-feature-card {
  padding: 1.1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(18, 38, 49, 0.6), rgba(9, 21, 29, 0.6));
}

.about-feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--green-soft);
  color: var(--green);
  margin-bottom: 0.8rem;
}

.about-feature-card h4 {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
  color: var(--text);
}

.about-feature-card p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.65;
}

/* Makrooh list with icons */
.about-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.about-list-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  margin-top: 0.1rem;
}

.about-list-icon--sunrise {
  background: rgba(240, 197, 107, 0.16);
  color: var(--gold);
}

.about-list-icon--zawal {
  background: rgba(255, 160, 80, 0.14);
  color: #f0a050;
}

.about-list-icon--sunset {
  background: var(--red-soft);
  color: var(--red);
}

.about-list li > div p {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.6;
}

.about-list li > div strong {
  color: var(--text);
  font-size: 0.88rem;
}

/* Privacy list */
.about-privacy-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.about-privacy-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.6;
}

.about-check {
  flex-shrink: 0;
  color: var(--green);
  margin-top: 0.14rem;
}

/* FAQ */
.about-faq {
  display: flex;
  flex-direction: column;
  margin-top: 0.25rem;
}

.about-faq-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--panel-border);
}

.about-faq-item:first-child {
  padding-top: 0.25rem;
}

.about-faq-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.about-faq-q {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
}

.about-faq-a {
  margin: 0;
  font-size: 0.83rem;
  color: var(--muted);
  line-height: 1.7;
}

/* Tech chips (libs + stack) */
.about-tech-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.about-tech-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
}

/* Social / action buttons */
.about-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.about-social-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--panel-border);
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.18s, color 0.18s, background 0.18s;
}

.about-social-btn:hover {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-soft);
}

.about-social-btn--feedback:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(240, 197, 107, 0.12);
}

/* ── Responsive navbar ───────────────────────────────────────────────── */

@media (max-width: 680px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 0.75rem 1rem 1rem;
    background: rgba(7, 19, 26, 0.97);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--panel-border);
    z-index: 999;
  }

  .nav-links.nav-open {
    display: flex;
  }

  .nav-link {
    padding: 0.65rem 0.9rem;
    font-size: 0.95rem;
  }

}

@media (min-width: 681px) {
  .nav-links {
    position: static !important;
    display: flex !important;
    flex-direction: row;
  }
}

/* ── Share button ────────────────────────────────────────────────────── */

.panel-header-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.6rem;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1rem;
  border-radius: 40px;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  backdrop-filter: blur(10px);
  white-space: nowrap;
  flex-shrink: 0;
}

.share-btn:hover {
  color: var(--text);
  border-color: var(--green);
  background: var(--green-soft);
}

.share-btn.copied {
  color: var(--green);
  border-color: var(--green);
  background: var(--green-soft);
}

.share-btn svg {
  flex-shrink: 0;
}

/* ── Save location button ────────────────────────────────────────────── */

.location-status-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.45rem;
}

.location-status-row strong {
  flex: 1;
  min-width: 0;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--panel-border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  flex-shrink: 0;
}

.icon-btn:hover {
  color: var(--gold);
  border-color: rgba(240, 197, 107, 0.4);
  background: rgba(240, 197, 107, 0.1);
}

.save-btn.saved {
  color: var(--gold);
  border-color: rgba(240, 197, 107, 0.4);
  background: rgba(240, 197, 107, 0.1);
}

.save-btn.saved svg {
  fill: var(--gold);
}

/* ── Favorites page ──────────────────────────────────────────────────── */

.favorites-rows {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.favorite-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(18, 38, 49, 0.94), rgba(9, 21, 29, 0.88));
  transition: border-color 0.15s;
}

.favorite-row:hover {
  border-color: var(--green);
}

.favorite-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.favorite-label {
  font-size: 0.95rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.favorite-type {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.favorite-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.favorite-load-btn {
  min-height: 38px !important;
  padding: 0.5rem 1rem !important;
  font-size: 0.82rem !important;
  border-radius: 12px !important;
}

.favorite-remove-btn {
  width: 34px;
  height: 34px;
}

.favorite-remove-btn:hover {
  color: var(--red) !important;
  border-color: rgba(255, 114, 98, 0.4) !important;
  background: var(--red-soft) !important;
}

.favorites-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--muted);
}

.favorites-empty p {
  margin: 0 0 0.5rem;
}

@media (max-width: 719px) {
  .favorite-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }

  .favorite-actions {
    justify-content: flex-end;
  }

  .panel-header-actions {
    align-items: flex-start;
  }
}

/* ── Dhikr page ──────────────────────────────────────────────────────── */

.dhikr-tabs {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.4rem;
  margin-bottom: 1.2rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.dhikr-tab {
  flex-shrink: 0;
  padding: 0.45rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.dhikr-tab:hover {
  border-color: var(--accent);
  color: var(--fg);
}

.dhikr-tab-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.dhikr-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dhikr-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.dhikr-card:hover {
  border-color: var(--accent-soft, rgba(99, 102, 241, 0.25));
}

.dhikr-complete {
  border-color: var(--green, #22c55e) !important;
  background: rgba(34, 197, 94, 0.04);
}

.dhikr-body {
  flex: 1;
  min-width: 0;
}

.dhikr-arabic {
  font-size: 1.35rem;
  line-height: 2;
  font-family: 'Amiri', 'Scheherazade New', 'Noto Naskh Arabic', serif;
  color: var(--fg);
  margin: 0 0 0.7rem;
  word-wrap: break-word;
}

.dhikr-transliteration {
  font-size: 0.88rem;
  font-style: italic;
  color: var(--muted);
  margin: 0 0 0.5rem;
  line-height: 1.5;
}

.dhikr-translation {
  font-size: 0.9rem;
  color: var(--fg);
  opacity: 0.85;
  margin: 0 0 0.6rem;
  line-height: 1.55;
}

.dhikr-fadl-toggle,
.dhikr-source-toggle {
  margin: 0.3rem 0;
}

.dhikr-fadl-toggle summary,
.dhikr-source-toggle summary {
  font-size: 0.8rem;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.dhikr-fadl,
.dhikr-source {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0.3rem 0 0;
  line-height: 1.45;
}

.dhikr-fadl {
  color: var(--accent);
}

/* Counter area */
.dhikr-counter-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}

.dhikr-counter-btn {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s;
}

.dhikr-counter-btn:active,
.dhikr-tap {
  transform: scale(0.9);
}

.dhikr-progress-ring {
  position: absolute;
  inset: 0;
  transform: rotate(-90deg);
}

.dhikr-ring-bg {
  stroke: var(--border);
}

.dhikr-ring-fill {
  stroke: var(--accent);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.3s ease;
}

.dhikr-counter-btn.done .dhikr-ring-fill {
  stroke: var(--green, #22c55e);
}

.dhikr-counter-text {
  position: relative;
  z-index: 1;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--fg);
  pointer-events: none;
}

.dhikr-counter-btn.done .dhikr-counter-text {
  color: var(--green, #22c55e);
  font-size: 1.1rem;
}

.dhikr-counter-label {
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
}

.dhikr-loading,
.dhikr-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 719px) {
  .dhikr-card {
    flex-direction: column;
  }

  .dhikr-counter-area {
    flex-direction: row;
    justify-content: flex-start;
    gap: 0.6rem;
  }

  .dhikr-arabic {
    font-size: 1.2rem;
  }
}

/* ── Daily Reflection: Ayah & Hadith of the Day ──────────────────────── */

.daily-reflection-panel {
  margin-bottom: 1.4rem;
}

.reflection-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin-top: 1rem;
}

.reflection-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.4rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.reflection-type-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #fff;
  background: var(--primary, #4fce84);
  padding: 0.18em 0.65em;
  border-radius: 20px;
  align-self: flex-start;
}

.reflection-type-hadith {
  background: var(--gold, #f0c56b);
  color: #1a1a1a;
}

.reflection-arabic {
  font-size: 1.4rem;
  line-height: 2.1;
  color: var(--fg);
  font-family: 'Amiri', 'Scheherazade New', 'Traditional Arabic', serif;
  text-align: right;
}

.reflection-transliteration {
  font-size: 0.88rem;
  font-style: italic;
  color: var(--muted);
  margin: 0 0 0.5rem;
  line-height: 1.5;
}

.reflection-translation {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--fg);
}

.reflection-source {
  font-size: 0.74rem;
  color: var(--muted);
  margin-top: auto;
  padding-top: 0.4rem;
  border-top: 1px solid var(--border);
}

/* Skeleton loader */
.reflection-skeleton {
  min-height: 180px;
  background: linear-gradient(
    90deg,
    var(--surface) 25%,
    var(--border) 50%,
    var(--surface) 75%
  );
  background-size: 200% 100%;
  animation: reflection-shimmer 1.4s infinite;
  border: 1px solid var(--border);
}

@keyframes reflection-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@media (max-width: 719px) {
  .reflection-grid {
    grid-template-columns: 1fr;
  }

  .reflection-arabic {
    font-size: 1.2rem;
  }
}