/* ============================================================
   Noor Al-Islam — design system
   ============================================================ */
:root {
  --bg: #081611;
  --bg-2: #0c1f18;
  --bg-3: #12291f;
  --card: rgba(255, 255, 255, 0.035);
  --card-strong: rgba(255, 255, 255, 0.06);
  --stroke: rgba(228, 197, 120, 0.14);
  --stroke-soft: rgba(255, 255, 255, 0.07);
  --gold: #e3b64f;
  --gold-2: #f5d78a;
  --green: #1f8a66;
  --green-2: #2fb886;
  --text: #f2ede1;
  --muted: #b7ae99;
  --danger: #e06060;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  --font-ui: 'Cairo', 'Segoe UI', system-ui, sans-serif;
  --font-quran: 'Amiri Quran', 'Amiri', 'Scheherazade New', serif;
  --font-ar: 'Amiri', 'Scheherazade New', serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-ui);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(47, 184, 134, 0.12), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(227, 182, 79, 0.07), transparent 55%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.65;
  overflow-x: hidden;
}

/* Subtle Islamic 8-point star lattice */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96'%3E%3Cg fill='none' stroke='%23e3b64f' stroke-opacity='0.05' stroke-width='1'%3E%3Cpath d='M48 8 58 38 88 48 58 58 48 88 38 58 8 48 38 38Z'/%3E%3Ccircle cx='48' cy='48' r='12'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 96px 96px;
}

::selection { background: rgba(227, 182, 79, 0.35); }
a { color: var(--gold-2); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; }

/* ---------- layout ---------- */
.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
main { padding-bottom: 96px; min-height: 70vh; }

/* ---------- header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(8, 22, 17, 0.82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--stroke);
}
.topbar-in {
  display: flex; align-items: center; gap: 18px;
  padding: 12px 20px; max-width: 1120px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--text); white-space: nowrap; }
.brand img { width: 38px; height: 38px; }
.brand .ar { font-family: var(--font-ar); color: var(--gold); font-size: 1.3rem; line-height: 1; }

.nav-links { display: flex; gap: 4px; margin-inline-start: auto; }
.nav-links a {
  padding: 8px 14px; border-radius: 999px; color: var(--muted);
  font-weight: 600; font-size: 0.95rem; transition: 0.2s;
}
.nav-links a:hover { color: var(--gold-2); background: var(--card-strong); }
.nav-links a.active { color: #10231b; background: linear-gradient(135deg, var(--gold), var(--gold-2)); }

.lang-wrap { position: relative; }
.lang-btn {
  display: flex; align-items: center; gap: 6px;
  background: var(--card-strong); color: var(--text);
  border: 1px solid var(--stroke); border-radius: 999px;
  padding: 7px 14px; font-weight: 700; font-size: 0.9rem;
}
.lang-menu {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 60;
  background: var(--bg-3); border: 1px solid var(--stroke); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); padding: 6px; display: none;
  grid-template-columns: 1fr 1fr; gap: 2px; width: 300px; max-height: 60vh; overflow: auto;
}
.lang-menu.open { display: grid; }
.lang-menu button {
  background: none; border: 0; color: var(--text); text-align: start;
  padding: 8px 12px; border-radius: 8px; font-size: 0.92rem;
}
.lang-menu button:hover { background: var(--card-strong); }
.lang-menu button.on { color: var(--gold); font-weight: 800; }

.install-btn {
  display: none; align-items: center; gap: 6px;
  background: transparent; color: var(--gold);
  border: 1px solid var(--gold); border-radius: 999px;
  padding: 7px 14px; font-weight: 700; font-size: 0.9rem; transition: 0.2s;
}
.install-btn:hover { background: var(--gold); color: #10231b; }
.install-btn.show { display: flex; }

/* ---------- mobile bottom nav ---------- */
.bottom-nav {
  position: fixed; bottom: 0; inset-inline: 0; z-index: 50; display: none;
  background: rgba(10, 26, 20, 0.94); backdrop-filter: blur(14px);
  border-top: 1px solid var(--stroke);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--muted); font-size: 0.62rem; font-weight: 700; padding: 4px 0; border-radius: 10px;
}
.bottom-nav a svg { width: 22px; height: 22px; }
.bottom-nav a.active { color: var(--gold); }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .bottom-nav { display: flex; }
  .brand span.name { display: none; }
}

/* ---------- hero ---------- */
.hero { text-align: center; padding: 64px 20px 30px; position: relative; }
.hero .bismillah { font-family: var(--font-quran); color: var(--gold); font-size: clamp(1.6rem, 4vw, 2.4rem); opacity: 0.95; margin-bottom: 18px; }
.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.6rem); font-weight: 900; line-height: 1.2;
  background: linear-gradient(135deg, #fff 20%, var(--gold-2) 60%, var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .sub { color: var(--muted); max-width: 640px; margin: 14px auto 0; font-size: 1.05rem; }
.hero .ornament { color: var(--gold); letter-spacing: 12px; margin-top: 22px; opacity: 0.7; }

/* ---------- prayer strip (home) ---------- */
.prayer-strip {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(31, 138, 102, 0.25), rgba(227, 182, 79, 0.08));
  border: 1px solid var(--stroke); border-radius: var(--radius);
  padding: 16px 22px; margin: 26px auto; max-width: 760px;
}
.prayer-strip .icon { font-size: 1.8rem; }
.prayer-strip .label { color: var(--muted); font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.prayer-strip .val { font-weight: 900; font-size: 1.25rem; color: var(--gold-2); }
.prayer-strip .count { font-variant-numeric: tabular-nums; font-weight: 800; color: var(--green-2); }
.prayer-strip a.more { margin-inline-start: auto; font-weight: 700; font-size: 0.9rem; }

/* ---------- cards grid ---------- */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); margin-top: 26px; }
.card {
  position: relative; display: block; overflow: hidden;
  background: var(--card); border: 1px solid var(--stroke-soft);
  border-radius: var(--radius); padding: 26px 22px;
  transition: transform 0.25s, border-color 0.25s, background 0.25s;
}
.card:hover { transform: translateY(-5px); border-color: var(--stroke); background: var(--card-strong); }
.card .glyph { font-size: 2rem; margin-bottom: 12px; display: block; }
.card h3 { font-size: 1.18rem; font-weight: 800; margin-bottom: 6px; color: var(--text); }
.card p { color: var(--muted); font-size: 0.92rem; }
.card .arrow { position: absolute; top: 20px; inset-inline-end: 18px; color: var(--gold); opacity: 0; transition: 0.25s; }
.card:hover .arrow { opacity: 1; }

/* ---------- section headers ---------- */
.page-head { padding: 44px 0 8px; }
.page-head h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 900; }
.page-head h1 .ar { font-family: var(--font-ar); color: var(--gold); }
.page-head p { color: var(--muted); max-width: 640px; margin-top: 6px; }
.rule-line { height: 2px; margin: 18px 0 26px; border: 0; background: linear-gradient(90deg, var(--gold), transparent 70%); opacity: 0.5; }
[dir='rtl'] .rule-line { background: linear-gradient(270deg, var(--gold), transparent 70%); }

/* ---------- inputs ---------- */
.search-row { display: flex; gap: 10px; margin: 18px 0; flex-wrap: wrap; }
.input {
  flex: 1; min-width: 220px;
  background: var(--card-strong); color: var(--text);
  border: 1px solid var(--stroke-soft); border-radius: var(--radius-sm);
  padding: 12px 16px; font-size: 1rem; outline: none; transition: 0.2s;
}
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(227, 182, 79, 0.15); }
select.input { flex: initial; cursor: pointer; }
select.input option { background: var(--bg-3); color: var(--text); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, var(--gold), var(--gold-2)); color: #10231b;
  border: 0; border-radius: var(--radius-sm); padding: 12px 22px;
  font-weight: 800; font-size: 0.98rem; transition: 0.2s; text-align: center;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--gold); border: 1px solid var(--gold); }
.btn.ghost:hover { background: rgba(227, 182, 79, 0.12); }
.btn.green { background: linear-gradient(135deg, var(--green), var(--green-2)); color: #fff; }
.btn.sm { padding: 8px 14px; font-size: 0.85rem; border-radius: 10px; }
.btn:disabled { opacity: 0.55; cursor: default; transform: none; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  background: var(--card-strong); color: var(--muted);
  border: 1px solid var(--stroke-soft); border-radius: 999px;
  padding: 7px 16px; font-weight: 700; font-size: 0.88rem; transition: 0.2s;
}
.chip:hover { color: var(--gold-2); border-color: var(--stroke); }
.chip.on { background: linear-gradient(135deg, var(--gold), var(--gold-2)); color: #10231b; border-color: transparent; }

/* ---------- surah list ---------- */
.surah-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.surah-item {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--stroke-soft);
  border-radius: var(--radius-sm); padding: 12px 16px; transition: 0.2s; color: var(--text);
}
.surah-item:hover { border-color: var(--stroke); background: var(--card-strong); transform: translateY(-2px); }
.surah-num {
  width: 40px; height: 40px; flex: none; display: flex; align-items: center; justify-content: center;
  background: rgba(227, 182, 79, 0.12); color: var(--gold);
  font-weight: 800; font-size: 0.9rem;
  clip-path: polygon(50% 0, 85% 15%, 100% 50%, 85% 85%, 50% 100%, 15% 85%, 0 50%, 15% 15%);
}
.surah-item .en { font-weight: 700; font-size: 0.95rem; }
.surah-item .meta { color: var(--muted); font-size: 0.75rem; }
.surah-item .arname { margin-inline-start: auto; font-family: var(--font-ar); font-size: 1.35rem; color: var(--gold-2); }

/* ---------- quran reader ---------- */
.reader-head {
  text-align: center; padding: 30px 16px 10px;
  background: var(--card); border: 1px solid var(--stroke-soft); border-radius: var(--radius);
  margin-top: 20px;
}
.reader-head .arname { font-family: var(--font-quran); font-size: 2.4rem; color: var(--gold); line-height: 1.4; }
.reader-head .sub { color: var(--muted); font-size: 0.95rem; }
.reader-tools { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; padding: 16px; }
.reader-note { text-align: center; color: var(--muted); font-size: 0.8rem; padding: 0 16px 14px; }

.basmala { font-family: var(--font-quran); text-align: center; font-size: 2rem; color: var(--text); padding: 26px 10px 6px; }

.ayah-list { margin-top: 8px; }
.ayah-card {
  background: var(--card); border: 1px solid var(--stroke-soft);
  border-radius: var(--radius); padding: 22px 24px; margin: 12px 0; transition: border-color 0.2s;
}
.ayah-card:hover { border-color: var(--stroke); }
.ayah-ar { font-family: var(--font-quran); font-size: var(--quran-size, 1.9rem); line-height: 2.3; text-align: justify; direction: rtl; color: var(--text); }
.ayah-end {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 42px; height: 42px; margin: 0 8px; padding: 4px;
  color: var(--gold); font-size: 1rem; font-weight: 700; font-family: var(--font-ui);
  background: rgba(227, 182, 79, 0.1); border: 1px solid rgba(227, 182, 79, 0.35); border-radius: 50%;
}
.ayah-tr { color: var(--muted); font-size: 1rem; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--stroke-soft); }
.ayah-foot { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.play-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--stroke);
  background: var(--card-strong); color: var(--gold); font-size: 0.85rem;
  display: inline-flex; align-items: center; justify-content: center; transition: 0.2s;
}
.play-btn:hover { background: var(--gold); color: #10231b; }
.play-btn.playing { background: var(--green-2); color: #fff; border-color: transparent; }
.ayah-ref { color: var(--muted); font-size: 0.8rem; font-weight: 700; }

/* Tajweed colors — verified from alquran.cloud/tajweed-guide */
tajweed, .tj { font-family: inherit; }
.ham_wasl, .slnt, .laam_shamsiyah { color: #AAAAAA; }
.madda_normal { color: #537FFF; }
.madda_permissible { color: #4050FF; }
.madda_necessary { color: #5B67FF; }
.madda_obligatory { color: #7B87FF; }
.qalaqah { color: #DD0008; }
.ikhafa_shafawi { color: #D500B7; }
.ikhafa { color: #B948DE; }
.idgham_shafawi { color: #58B800; }
.iqlab { color: #26BFFD; }
.idgham_ghunnah { color: #1BC29A; }
.idgham_wo_ghunnah { color: #48c214; }
.idgham_mutajanisayn, .idgham_mutaqaribayn { color: #A1A1A1; }
.ghunnah { color: #FF7E1E; }

.legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; padding: 16px; }
.legend .li { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; color: var(--muted); }
.legend .dot { width: 14px; height: 14px; border-radius: 4px; flex: none; }

.audio-bar { position: sticky; bottom: 66px; z-index: 30; margin: 10px 0; }
.audio-bar audio { width: 100%; border-radius: 12px; }
@media (min-width: 861px) { .audio-bar { bottom: 12px; } }

.progress-wrap { background: var(--card-strong); border-radius: 999px; height: 10px; overflow: hidden; margin: 10px 0; }
.progress-bar { height: 100%; width: 0%; background: linear-gradient(90deg, var(--green), var(--gold)); transition: width 0.2s; }

/* ---------- hadith ---------- */
.book-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.book-card {
  position: relative; overflow: hidden; color: var(--text);
  background: linear-gradient(160deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--stroke-soft); border-radius: var(--radius);
  padding: 22px; transition: 0.25s; display: block;
}
.book-card::before {
  content: ''; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 6px;
  background: linear-gradient(180deg, var(--gold), var(--green));
}
.book-card:hover { transform: translateY(-4px); border-color: var(--stroke); }
.book-card .ar { font-family: var(--font-ar); font-size: 1.5rem; color: var(--gold-2); display: block; }
.book-card .en { font-weight: 700; color: var(--text); }
.book-card .meta { color: var(--muted); font-size: 0.8rem; margin-top: 6px; }

.section-list { display: flex; flex-direction: column; gap: 6px; }
.section-item {
  display: flex; gap: 12px; align-items: center; text-align: start;
  background: var(--card); border: 1px solid var(--stroke-soft); color: var(--text);
  border-radius: var(--radius-sm); padding: 12px 16px; font-size: 0.95rem; font-weight: 600; transition: 0.15s;
}
.section-item:hover { border-color: var(--stroke); background: var(--card-strong); }
.section-item .n { color: var(--gold); font-weight: 800; min-width: 34px; }

.hadith-card {
  background: var(--card); border: 1px solid var(--stroke-soft);
  border-radius: var(--radius); padding: 22px 24px; margin: 12px 0;
}
.hadith-card .num {
  display: inline-block; background: rgba(47, 184, 134, 0.15); color: var(--green-2);
  font-weight: 800; font-size: 0.8rem; border-radius: 999px; padding: 3px 12px; margin-bottom: 12px;
}
.hadith-ar { font-family: var(--font-ar); font-size: 1.45rem; line-height: 2.1; direction: rtl; text-align: right; color: var(--text); }
.hadith-en { color: var(--muted); margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--stroke-soft); font-size: 0.97rem; }
.grade-chip {
  display: inline-block; font-size: 0.75rem; font-weight: 700;
  border: 1px solid var(--stroke); color: var(--gold-2);
  padding: 2px 10px; border-radius: 999px; margin: 8px 6px 0 0;
}

/* ---------- library ---------- */
.lib-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.lib-card {
  background: var(--card); border: 1px solid var(--stroke-soft); border-radius: var(--radius);
  padding: 22px; display: flex; flex-direction: column; gap: 8px; transition: 0.2s;
}
.lib-card:hover { border-color: var(--stroke); transform: translateY(-3px); }
.lib-card .ar { font-family: var(--font-ar); font-size: 1.6rem; color: var(--gold-2); }
.lib-card .latin { font-weight: 800; }
.lib-card .author { color: var(--green-2); font-size: 0.85rem; font-weight: 700; }
.lib-card .desc { color: var(--muted); font-size: 0.88rem; flex: 1; }
.lib-card .row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

/* ---------- convert ---------- */
.shahada-hero {
  text-align: center; padding: 44px 24px;
  background: linear-gradient(150deg, rgba(31, 138, 102, 0.25), rgba(227, 182, 79, 0.1));
  border: 1px solid var(--stroke); border-radius: var(--radius); margin-top: 20px;
}
.shahada-hero .ar { font-family: var(--font-quran); font-size: clamp(1.7rem, 4.5vw, 2.6rem); color: var(--gold-2); line-height: 1.9; direction: rtl; }
.shahada-hero .tr { color: var(--text); font-style: italic; margin-top: 14px; font-size: 1.05rem; }
.shahada-hero .mean { color: var(--muted); margin-top: 8px; max-width: 560px; margin-inline: auto; }

.pillars { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin-top: 16px; }
.pillar {
  text-align: center; background: var(--card); border: 1px solid var(--stroke-soft);
  border-radius: var(--radius-sm); padding: 18px 12px; font-weight: 700; font-size: 0.92rem;
}
.pillar .n {
  width: 34px; height: 34px; margin: 0 auto 10px; display: flex; align-items: center; justify-content: center;
  background: rgba(227, 182, 79, 0.14); color: var(--gold); border-radius: 50%; font-weight: 900;
}

.faq-item { background: var(--card); border: 1px solid var(--stroke-soft); border-radius: var(--radius-sm); margin: 8px 0; overflow: hidden; }
.faq-item summary {
  cursor: pointer; list-style: none; padding: 16px 20px; font-weight: 700;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; color: var(--gold); font-size: 1.3rem; font-weight: 400; flex: none; }
.faq-item[open] summary::after { content: '−'; }
.faq-item .a { padding: 0 20px 16px; color: var(--muted); }

.steps { counter-reset: step; display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.step {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--stroke-soft); border-radius: var(--radius-sm); padding: 14px 18px;
}
.step::before {
  counter-increment: step; content: counter(step);
  width: 30px; height: 30px; flex: none; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--green), var(--green-2)); color: #fff; border-radius: 50%; font-weight: 900; font-size: 0.9rem;
}

.cta-box {
  text-align: center; margin-top: 30px; padding: 34px 22px;
  background: linear-gradient(135deg, rgba(227, 182, 79, 0.14), rgba(31, 138, 102, 0.18));
  border: 1px solid var(--stroke); border-radius: var(--radius);
}
.cta-box h2 { font-size: 1.5rem; font-weight: 900; }
.cta-box p { color: var(--muted); max-width: 520px; margin: 8px auto 18px; }
.cta-box .row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------- prayer ---------- */
.loc-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 16px 0; }
.loc-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--card-strong); border: 1px solid var(--stroke-soft);
  border-radius: 999px; padding: 8px 16px; color: var(--muted); font-size: 0.9rem; font-weight: 700;
}
.times-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-top: 18px; }
.time-card {
  text-align: center; background: var(--card); border: 1px solid var(--stroke-soft);
  border-radius: var(--radius); padding: 20px 10px; transition: 0.2s;
}
.time-card .nm { color: var(--muted); font-weight: 700; font-size: 0.9rem; }
.time-card .tm { font-size: 1.5rem; font-weight: 900; margin-top: 4px; font-variant-numeric: tabular-nums; }
.time-card.next { background: linear-gradient(150deg, rgba(31, 138, 102, 0.35), rgba(227, 182, 79, 0.12)); border-color: var(--green-2); }
.time-card.next .nm { color: var(--green-2); }
.time-card .cd { color: var(--gold-2); font-size: 0.8rem; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; }
.hijri-line { color: var(--gold-2); font-weight: 700; margin-top: 10px; }

.qibla-box { display: flex; gap: 26px; align-items: center; flex-wrap: wrap; margin-top: 20px; }
.compass { position: relative; width: 230px; height: 230px; flex: none; margin: 0 auto; }
.compass .rose {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--stroke); background: radial-gradient(circle, var(--bg-3), var(--bg-2));
  transition: transform 0.15s linear;
}
.compass .mark { position: absolute; inset-inline-start: 50%; top: 8px; transform: translateX(-50%); color: var(--muted); font-weight: 900; font-size: 0.8rem; }
.compass .needle {
  position: absolute; inset-inline-start: 50%; top: 50%; width: 4px; height: 92px;
  background: linear-gradient(180deg, var(--gold), transparent);
  transform-origin: 50% 0%; border-radius: 4px;
}
.compass .kaaba { position: absolute; inset-inline-start: 50%; top: 50%; font-size: 1.6rem; transform: translate(-50%, -50%); }
.qibla-info .deg { font-size: 2.6rem; font-weight: 900; color: var(--gold-2); font-variant-numeric: tabular-nums; }
.qibla-info { flex: 1; min-width: 240px; }

/* ---------- misc ---------- */
.spinner {
  width: 44px; height: 44px; margin: 60px auto; border-radius: 50%;
  border: 3px solid var(--stroke-soft); border-top-color: var(--gold);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.notice { text-align: center; color: var(--muted); padding: 40px 16px; }
.error-box { text-align: center; padding: 40px 16px; color: var(--danger); }

.toast {
  position: fixed; bottom: 84px; inset-inline-start: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--bg-3); color: var(--text); border: 1px solid var(--stroke);
  border-radius: 999px; padding: 10px 22px; font-weight: 700; font-size: 0.9rem;
  opacity: 0; pointer-events: none; transition: 0.3s; z-index: 90; box-shadow: var(--shadow); white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

footer {
  border-top: 1px solid var(--stroke); margin-top: 60px;
  padding: 30px 20px calc(100px + env(safe-area-inset-bottom)); text-align: center; color: var(--muted); font-size: 0.9rem;
}
@media (min-width: 861px) { footer { padding-bottom: 30px; } }
footer .ar { font-family: var(--font-ar); color: var(--gold); font-size: 1.2rem; }

.fade-in { animation: fadeIn 0.35s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* section title rows */
.sec-title { display: flex; align-items: center; gap: 12px; margin: 34px 0 14px; font-size: 1.25rem; font-weight: 900; }
.sec-title::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--stroke), transparent); }
