@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=Amiri:wght@400;700&display=swap');

/* ══════════════════════════════════════════════════════
   MyAlQuran v4 — Clean · Calm · Modern
   Tone: Tenang seperti air, sejuk seperti fajar
   Font: Plus Jakarta Sans + Amiri (Arab)
══════════════════════════════════════════════════════ */

/* ── TOKENS ── */
:root {
  --teal:     #0f9488;
  --teal-l:   #14b8a6;
  --teal-d:   #0d7a70;
  --teal-xs:  rgba(15,148,136,.08);
  --teal-sm:  rgba(15,148,136,.15);
  --teal-md:  rgba(15,148,136,.25);

  /* Light theme */
  --bg:       #f0f7f6;
  --bg2:      #e6f2f1;
  --surface:  #ffffff;
  --surface2: #f7fbfb;
  --border:   rgba(15,148,136,.12);
  --border2:  rgba(15,148,136,.22);
  --text:     #0c1f1d;
  --text2:    #2e5c58;
  --text3:    #6b9994;
  --text4:    #a8ccc9;

  --hero-from: #0d9488;
  --hero-to:   #0a7c73;
  --hero-text: #ffffff;

  --nav-bg:   #ffffff;
  --nav-border: rgba(15,148,136,.1);

  --r:        14px;
  --r-sm:     8px;
  --r-lg:     22px;
  --r-xl:     30px;

  --shadow-sm: 0 1px 4px rgba(0,0,0,.05);
  --shadow:    0 4px 18px rgba(0,0,0,.07);
  --shadow-t:  0 6px 24px rgba(15,148,136,.2);
  --ease:      cubic-bezier(.4,0,.2,1);
}

[data-theme="dark"] {
  --bg:       #0a1614;
  --bg2:      #0d1c1a;
  --surface:  #111f1d;
  --surface2: #162421;
  --border:   rgba(20,184,166,.12);
  --border2:  rgba(20,184,166,.22);
  --text:     #e0f2f0;
  --text2:    #89c4be;
  --text3:    #4d8a84;
  --text4:    #2a5450;

  --hero-from: #0a1f1d;
  --hero-to:   #081714;
  --hero-text: #e0f2f0;

  --nav-bg:   #0d1c1a;
  --nav-border: rgba(20,184,166,.1);

  --shadow-sm: 0 1px 4px rgba(0,0,0,.25);
  --shadow:    0 4px 18px rgba(0,0,0,.3);
  --shadow-t:  0 6px 24px rgba(20,184,166,.12);
}

/* ── RESET ── */
*, *::before, *::after {
  margin: 0; padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body { height: 100%; }

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  transition: background .3s var(--ease), color .3s var(--ease);
  overflow-x: hidden;
}

/* ── LAYOUT SHELL ── */
.app {
  display: flex;
  min-height: 100vh;
}

/* ── BOTTOM NAV (mobile) ── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--nav-bg);
  border-top: 1px solid var(--nav-border);
  display: flex;
  align-items: stretch;
  padding-bottom: env(safe-area-inset-bottom);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.bnav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 10px 4px 8px;
  text-decoration: none;
  color: var(--text3);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color .2s var(--ease);
  position: relative;
}

.bnav-item svg {
  width: 22px; height: 22px;
  stroke: currentColor;
  stroke-width: 1.75;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bnav-item.active {
  color: var(--teal);
}

.bnav-item.active::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 32px; height: 2px;
  background: var(--teal);
  border-radius: 0 0 3px 3px;
}

/* ── SIDEBAR (desktop) ── */
.sidebar {
  display: none;
  width: 240px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--nav-bg);
  border-right: 1px solid var(--nav-border);
  flex-direction: column;
  padding: 28px 16px;
  gap: 4px;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

.sidebar-logo {
  width: 36px; height: 36px;
  background: var(--teal);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-logo svg {
  width: 20px; height: 20px;
  stroke: white;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.sidebar-name span {
  color: var(--teal);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  color: var(--text2);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all .2s var(--ease);
}

.nav-link svg {
  width: 18px; height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.nav-link:hover {
  background: var(--teal-xs);
  color: var(--teal);
}

.nav-link.active {
  background: var(--teal-xs);
  color: var(--teal);
  font-weight: 600;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 8px;
  padding-right: 8px;
}

.btn-theme {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text2);
  transition: all .2s var(--ease);
}

.btn-theme:hover {
  background: var(--teal-xs);
  border-color: var(--teal);
  color: var(--teal);
}

.btn-theme svg {
  width: 16px; height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── MAIN CONTENT ── */
.main {
  flex: 1;
  min-width: 0;
  padding-bottom: 70px; /* for bottom nav */
}

/* ── PAGE ── */
.page {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 0 24px;
}

/* ── HERO CARD ── */
.hero-card {
  background: linear-gradient(160deg, var(--hero-from), var(--hero-to));
  color: var(--hero-text);
  padding: 28px 24px 36px;
  position: relative;
  overflow: hidden;
  border-radius: 0 0 28px 28px;
}

[data-theme="light"] .hero-card {
  box-shadow: var(--shadow-t);
}

.hero-waves {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  overflow: hidden;
  opacity: .18;
  pointer-events: none;
}

.hero-waves svg {
  position: absolute;
  bottom: 0;
  width: 200%;
  height: 100%;
}

.hero-waves .w1 {
  animation: waveShift 8s ease-in-out infinite;
}
.hero-waves .w2 {
  animation: waveShift 12s ease-in-out infinite reverse;
  opacity: .6;
}

@keyframes waveShift {
  0%, 100% { transform: translateX(0); }
  50%       { transform: translateX(-12%); }
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
}

.hero-orb-1 {
  width: 200px; height: 200px;
  top: -60px; right: -60px;
}

.hero-orb-2 {
  width: 100px; height: 100px;
  bottom: 20px; left: -30px;
}

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

.hero-location {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  opacity: .85;
  background: rgba(255,255,255,.12);
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: background .2s;
  border: none;
  color: inherit;
  max-width: 180px;
}

.hero-location:hover {
  background: rgba(255,255,255,.2);
}

.hero-location svg {
  width: 13px; height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}

.hero-location span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-btn-theme {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: background .2s;
}

.hero-btn-theme:hover { background: rgba(255,255,255,.25); }

.hero-btn-theme svg {
  width: 16px; height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Baris metode di bawah hero-top ── */
.hero-method-row {
  display: flex;
  align-items: center;
  margin-bottom: 14px;
}

.hero-greeting {
  font-size: 12px;
  font-weight: 500;
  opacity: .75;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.hero-clock {
  font-size: 56px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}

.hero-date {
  font-size: 12px;
  opacity: .7;
  margin-bottom: 16px;
}

.hero-next-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.hero-next-badge {
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.hero-next-badge svg {
  width: 13px; height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  opacity: .8;
}

.hero-countdown {
  font-size: 12px;
  opacity: .65;
}

/* ── PRAYER STRIP ── */
.prayer-strip {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 16px 16px 4px;
  -ms-overflow-style: none;
}

.prayer-strip::-webkit-scrollbar { display: none; }

.ps-item {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  border-radius: var(--r);
  transition: all .2s var(--ease);
  position: relative;
}

.ps-item.active {
  background: var(--teal-xs);
}

.ps-item.active::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 20px; height: 2px;
  background: var(--teal);
  border-radius: 2px;
}

.ps-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text3);
  letter-spacing: 0.04em;
}

.ps-item.active .ps-name {
  color: var(--teal);
}

.ps-time {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.ps-item.active .ps-time {
  color: var(--teal);
}

/* ── IMSAK — ditampilkan hanya saat Ramadhan ── */
.ps-imsak .ps-name {
  color: var(--teal-d);
  opacity: .75;
}
.ps-imsak .ps-time {
  color: var(--text2);
}
.ps-imsak.active .ps-name { color: var(--teal); opacity: 1; }
.ps-imsak.active .ps-time { color: var(--teal); }

/* ── SECTION ── */
.section {
  padding: 20px 16px 0;
}

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

.section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.section-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 3px;
}

.section-link svg {
  width: 13px; height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── SURAH LIST ── */
.surah-search {
  position: relative;
  margin-bottom: 12px;
}

.surah-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px; height: 15px;
  stroke: var(--text3);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 10px 12px 10px 36px;
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s var(--ease);
}

.search-input:focus {
  border-color: var(--teal);
}

.search-input::placeholder {
  color: var(--text4);
}

.surah-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.surah-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  text-decoration: none;
  cursor: pointer;
  transition: all .2s var(--ease);
}

.surah-item:hover, .surah-item:focus {
  border-color: var(--border2);
  background: var(--surface2);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.surah-item.locked {
  opacity: .55;
  cursor: not-allowed;
}

.surah-num {
  width: 36px; height: 36px;
  background: var(--teal-xs);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--teal);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.surah-info {
  flex: 1;
  min-width: 0;
}

.surah-latin {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.surah-meta {
  font-size: 11px;
  color: var(--text3);
  margin-top: 1px;
}

.surah-arab {
  font-family: 'Amiri', serif;
  font-size: 20px;
  color: var(--teal);
  direction: rtl;
  flex-shrink: 0;
}

/* ── QURAN READER ── */
.reader-header {
  background: linear-gradient(160deg, var(--hero-from), var(--hero-to));
  color: white;
  padding: 20px 16px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.reader-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.btn-back {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: background .2s;
  flex-shrink: 0;
}

.btn-back:hover { background: rgba(255,255,255,.25); }

.btn-back svg {
  width: 18px; height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.reader-title {
  flex: 1;
}

.reader-name {
  font-size: 16px;
  font-weight: 700;
}

.reader-sub {
  font-size: 11px;
  opacity: .7;
}

.reader-bismillah {
  text-align: center;
  font-family: 'Amiri', serif;
  font-size: 24px;
  opacity: .9;
  letter-spacing: 0.03em;
}

.ayat-list {
  padding: 16px 16px 80px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.ayat-item {
  padding: 16px 14px;
  background: var(--surface);
  border-radius: var(--r);
  margin-bottom: 8px;
  border: 1px solid var(--border);
  transition: border-color .2s;
}

.ayat-item:hover {
  border-color: var(--border2);
}

.ayat-arab {
  font-family: 'Amiri', serif;
  font-size: 26px;
  line-height: 1.8;
  direction: rtl;
  text-align: right;
  color: var(--text);
  margin-bottom: 10px;
}

.ayat-latin {
  font-size: 12px;
  color: var(--teal-d);
  font-style: italic;
  margin-bottom: 6px;
  line-height: 1.6;
}

[data-theme="dark"] .ayat-latin {
  color: var(--teal-l);
}

.ayat-terjemah {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.65;
}

.ayat-num-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  background: var(--teal-xs);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 10px;
  font-variant-numeric: tabular-nums;
}

/* ── PRAYER PAGE ── */
.prayer-hero {
  background: linear-gradient(160deg, var(--hero-from), var(--hero-to));
  color: white;
  padding: 24px 20px 28px;
  border-radius: 0 0 28px 28px;
}

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

.prayer-hero-title {
  font-size: 18px;
  font-weight: 700;
}

.prayer-hero-sub {
  font-size: 12px;
  opacity: .7;
  margin-top: 2px;
}

.btn-locate {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 20px;
  border: none;
  background: rgba(255,255,255,.15);
  color: white;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
  font-family: inherit;
}

.btn-locate:hover { background: rgba(255,255,255,.25); }

.btn-locate svg {
  width: 14px; height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.prayer-clock-big {
  font-size: 52px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}

.prayer-date-line {
  font-size: 12px;
  opacity: .7;
  margin-bottom: 16px;
}

.prayer-next {
  background: rgba(255,255,255,.12);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pnext-label {
  font-size: 11px;
  opacity: .7;
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.pnext-name {
  font-size: 16px;
  font-weight: 700;
}

.pnext-time {
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.pnext-countdown {
  font-size: 11px;
  opacity: .65;
  margin-top: 2px;
  text-align: right;
}

/* Prayer list on prayer page */
.prayer-full-list {
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pf-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  transition: all .2s var(--ease);
  position: relative;
  overflow: hidden;
}

.pf-item.active {
  border-color: var(--teal);
  background: var(--teal-xs);
}

.pf-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--teal);
  border-radius: 3px 0 0 3px;
}

.pf-icon {
  width: 40px; height: 40px;
  border-radius: var(--r-sm);
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pf-item.active .pf-icon {
  background: var(--teal-md);
}

.pf-icon svg {
  width: 18px; height: 18px;
  stroke: var(--teal);
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pf-info {
  flex: 1;
}

.pf-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.pf-item.active .pf-name {
  color: var(--teal);
}

.pf-sub {
  font-size: 11px;
  color: var(--text3);
  margin-top: 1px;
}

.pf-time {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.pf-item.active .pf-time {
  color: var(--teal);
}

/* ── IMSAK row di jadwal penuh ── */
.pf-imsak {
  opacity: .82;
  border-bottom: 1px dashed var(--border2) !important;
}
.pf-imsak .pf-name { color: var(--text2); }
.pf-imsak .pf-sub  { color: var(--text3); }
.pf-imsak-time     { color: var(--text2) !important; }
.pf-imsak .pf-icon svg { stroke: var(--text3); }
.pf-imsak.active           { opacity: 1; }
.pf-imsak.active .pf-name  { color: var(--teal); }
.pf-imsak.active .pf-imsak-time { color: var(--teal) !important; }
.pf-imsak.active .pf-icon svg   { stroke: var(--teal); }

/* ── INFO BOX ── */
.info-box {
  margin: 16px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  text-align: center;
}

.info-box svg {
  width: 36px; height: 36px;
  stroke: var(--teal);
  fill: none;
  stroke-width: 1.5;
  margin: 0 auto 10px;
  display: block;
}

.info-box p {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.6;
}

.info-box .btn-retry {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 8px 20px;
  border-radius: 20px;
  border: none;
  background: var(--teal);
  color: white;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background .2s;
}

.btn-retry:hover { background: var(--teal-d); }

/* ── COORD INPUT ── */
.coord-form {
  margin: 0 16px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
}

.coord-form h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.coord-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.coord-input {
  flex: 1;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text);
  font-size: 12px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s;
}

.coord-input:focus { border-color: var(--teal); }

.coord-input::placeholder { color: var(--text4); }

.btn-calc {
  width: 100%;
  padding: 10px;
  border-radius: var(--r-sm);
  border: none;
  background: var(--teal);
  color: white;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  margin-top: 4px;
  transition: background .2s;
}

.btn-calc:hover { background: var(--teal-d); }

/* ── SPINNER ── */
.loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  gap: 12px;
}

.spinner {
  width: 32px; height: 32px;
  border: 2px solid var(--border2);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

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

.loader p {
  font-size: 13px;
  color: var(--text3);
}

/* ── HIJRI CARD ── */
.hijri-card {
  margin: 16px 16px 0;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  display: flex;
  align-items: center;
  gap: 12px;
}

.hijri-icon {
  width: 36px; height: 36px;
  background: var(--teal-xs);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hijri-icon svg {
  width: 18px; height: 18px;
  stroke: var(--teal);
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
}

.hijri-date {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.hijri-greg {
  font-size: 11px;
  color: var(--text3);
  margin-top: 2px;
}

/* ── QUICK ACCESS GRID ── */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.quick-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: all .2s var(--ease);
  color: var(--text2);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.quick-item:hover {
  background: var(--teal-xs);
  border-color: var(--border2);
  color: var(--teal);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.quick-item svg {
  width: 24px; height: 24px;
  stroke: var(--teal);
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── LAST READ CARD ── */
.last-read-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-decoration: none;
  transition: all .2s var(--ease);
}

.last-read-card:hover {
  border-color: var(--teal);
  background: var(--teal-xs);
}

.last-read-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--teal), var(--teal-d));
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.last-read-icon svg {
  width: 20px; height: 20px;
  stroke: white;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
}

.last-read-info {
  flex: 1;
}

.last-read-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--teal);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.last-read-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.last-read-sub {
  font-size: 11px;
  color: var(--text3);
  margin-top: 1px;
}

.last-read-arrow svg {
  width: 16px; height: 16px;
  stroke: var(--text3);
  fill: none;
  stroke-width: 2;
}

/* ── UTILITY ── */
.text-teal   { color: var(--teal); }
.text-muted  { color: var(--text3); }
.text-center { text-align: center; }
.fw-7        { font-weight: 700; }
.fs-12       { font-size: 12px; }
.gap-8       { gap: 8px; }

/* ── FADE ANIMATIONS ── */
.fade-up {
  opacity: 0;
  transform: translateY(12px);
  animation: fadeUp .45s var(--ease) forwards;
}
.fade-up.d1 { animation-delay: .08s; }
.fade-up.d2 { animation-delay: .16s; }
.fade-up.d3 { animation-delay: .24s; }
.fade-up.d4 { animation-delay: .32s; }

@keyframes fadeUp {
  to { opacity: 1; transform: none; }
}

/* ── RESPONSIVE ── */
@media (min-width: 640px) {
  .bottom-nav { display: none; }
  .sidebar { display: flex; }
  .main { padding-bottom: 0; }
  .page { padding-top: 0; }
  .hero-clock { font-size: 64px; }
}

@media (max-width: 639px) {
  .sidebar { display: none; }
  .bottom-nav { display: flex; }
}

/* Xinjiang banner toggle */
.xj-active {
  border-color: var(--accent) !important;
  background: var(--accent) !important;
  color: #fff !important;
}
.xj-active span { color: rgba(255,255,255,.75) !important; }
