/* ==========================================================================
   WAHDAHKU — Application UI
   ========================================================================== */

:root {
  --w-950: #032a1f;
  --w-900: #063c2d;
  --w-800: #074b38;
  --w-700: #0a5c43;
  --w-600: #0e7a52;
  --w-500: #12a366;
  --w-400: #5fb973;
  --w-300: #8fd3a6;
  --w-200: #bfe6cd;
  --w-100: #e4f4ea;
  --w-50: #f2faf5;
  --teal: #0c8596;
  --gold: #e8b93b;
  --gold-2: #fdf3d4;

  --ink: #0b1a14;
  --ink-2: #2c3f37;
  --ink-3: #6b7d74;
  --ink-4: #9aaba2;
  --line: #e6efe9;
  --paper: #ffffff;
  --bg: #f3f8f5;

  --r-s: 10px;
  --r-m: 15px;
  --r-l: 20px;
  --r-xl: 26px;

  --sh-1: 0 1px 2px rgba(6, 60, 45, .05), 0 2px 10px rgba(6, 60, 45, .05);
  --sh-2: 0 6px 20px rgba(6, 60, 45, .09);

  --ff: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ff-ar: "Scheherazade New", "Traditional Arabic", "Amiri", "Times New Roman", serif;
  --tab-h: 66px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }

body {
  font-family: var(--ff);
  background: #dfe9e3;
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(800px 500px at 20% 0%, rgba(18, 163, 102, .18), transparent 60%),
    radial-gradient(600px 500px at 90% 100%, rgba(12, 133, 150, .14), transparent 60%),
    #e9f1ec;
  z-index: -1;
}

button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }
input, textarea, select { font-family: inherit; font-size: 16px; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }

/* ============================ SHELL ============================ */
#app {
  position: relative;
  max-width: 460px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 0 1px rgba(6, 60, 45, .06), 0 30px 80px rgba(6, 60, 45, .14);
  overflow: hidden;
}

@media (min-width: 520px) {
  #app { margin: 18px auto; min-height: calc(100vh - 36px); border-radius: 30px; }
}

.view-host { flex: 1; position: relative; }

.view {
  display: none;
  padding: 0 0 calc(var(--tab-h) + 18px);
  animation: fadeUp .28s ease;
}
.view.active { display: block; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ============================ APP BAR ============================ */
.appbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(243, 248, 245, .88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  padding: 14px 18px 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.appbar.solid { border-bottom-color: var(--line); }

.appbar h1 { font-size: 19px; font-weight: 800; letter-spacing: -.02em; color: var(--w-950); }
.appbar .sub { font-size: 11.5px; color: var(--ink-3); font-weight: 600; }

.ab-btn {
  width: 38px; height: 38px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: #fff;
  box-shadow: var(--sh-1);
  color: var(--w-800);
  flex: none;
}
.ab-btn svg { width: 19px; height: 19px; }
.ab-btn:active { transform: scale(.94); }

.spacer { flex: 1; }

/* ============================ TABS ============================ */
.tabbar {
  position: sticky;
  bottom: 0;
  z-index: 40;
  height: var(--tab-h);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
@media (min-width: 520px) {
  .tabbar { position: sticky; border-radius: 0 0 30px 30px; }
}
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--ink-4);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .01em;
  transition: color .18s;
  position: relative;
}
.tab svg { width: 21px; height: 21px; stroke-width: 1.9; }
.tab.on { color: var(--w-700); }
.tab.on::before {
  content: "";
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 26px; height: 3px;
  background: var(--w-600);
  border-radius: 0 0 4px 4px;
}
.tab:active { transform: scale(.95); }

/* ============================ GENERIC ============================ */
.pad { padding: 0 18px; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; } .mt-24 { margin-top: 24px; }

.card {
  background: #fff;
  border-radius: var(--r-l);
  padding: 16px;
  box-shadow: var(--sh-1);
  border: 1px solid rgba(230, 239, 233, .8);
}

.sec-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 22px 0 10px;
}
.sec-title h2 { font-size: 15px; font-weight: 800; color: var(--w-950); letter-spacing: -.01em; }
.sec-title a, .sec-title button { font-size: 12px; font-weight: 700; color: var(--w-600); }

.hr { height: 1px; background: var(--line); margin: 14px 0; border: 0; }

.empty {
  text-align: center;
  padding: 46px 20px;
  color: var(--ink-3);
  font-size: 13.5px;
}
.empty svg { width: 44px; height: 44px; color: var(--w-300); margin: 0 auto 12px; }

/* ============================ PRAYER HERO ============================ */
.prayer-hero {
  margin: 4px 18px 0;
  border-radius: var(--r-xl);
  padding: 18px;
  color: #fff;
  position: relative;
  overflow: hidden;
  background: linear-gradient(150deg, var(--w-600) 0%, var(--w-800) 52%, var(--w-950) 100%);
  box-shadow: 0 10px 26px rgba(6, 60, 45, .26);
}
.prayer-hero::after {
  content: "";
  position: absolute;
  right: -46px; top: -56px;
  width: 170px; height: 170px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 185, 59, .3), transparent 68%);
}
.prayer-hero::before {
  content: "";
  position: absolute;
  left: -40px; bottom: -70px;
  width: 150px; height: 150px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 0 0 26px rgba(255, 255, 255, .04);
}
.ph-top { display: flex; justify-content: space-between; align-items: flex-start; position: relative; z-index: 1; }
.ph-lbl { font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; opacity: .68; }
.ph-name { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; }
.ph-count {
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 700;
  opacity: .9;
  margin-top: 1px;
}
.ph-count b { color: var(--gold); font-weight: 800; }
.ph-loc {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; font-weight: 700;
  background: rgba(255, 255, 255, .14);
  padding: 4px 9px; border-radius: 999px;
}
.ph-loc svg { width: 11px; height: 11px; }

.ph-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
  margin-top: 15px;
  padding-top: 13px;
  border-top: 1px solid rgba(255, 255, 255, .15);
  position: relative; z-index: 1;
}
.ph-p { text-align: center; padding: 4px 0; border-radius: 9px; transition: background .2s; }
.ph-p span { display: block; font-size: 9.5px; opacity: .65; font-weight: 600; }
.ph-p b { font-size: 12.5px; font-weight: 800; letter-spacing: -.01em; }
.ph-p.on { background: rgba(255, 255, 255, .16); }
.ph-p.on b { color: var(--gold); }
.ph-p.on span { opacity: .95; }

/* ============================ QUICK GRID ============================ */
.quick {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
  margin-top: 14px;
}
.q-item {
  background: #fff;
  border-radius: var(--r-m);
  padding: 12px 5px 10px;
  text-align: center;
  box-shadow: var(--sh-1);
  border: 1px solid rgba(230, 239, 233, .9);
  transition: transform .15s;
}
.q-item:active { transform: scale(.96); }
.q-item .qi {
  width: 34px; height: 34px;
  margin: 0 auto 6px;
  border-radius: 11px;
  display: grid; place-items: center;
  background: var(--w-100);
  color: var(--w-700);
}
.q-item .qi svg { width: 17px; height: 17px; }
.q-item span { font-size: 10px; font-weight: 700; color: var(--ink-2); display: block; line-height: 1.2; }
.q-item.gold .qi { background: var(--gold-2); color: #a67c00; }

/* ============================ AYAH CARD ============================ */
.ayah {
  background: linear-gradient(160deg, #ffffff, #fbfefc);
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  padding: 16px;
  box-shadow: var(--sh-1);
  position: relative;
  overflow: hidden;
}
.ayah::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--w-500), var(--gold));
}
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 800; letter-spacing: .06em;
  color: var(--w-600);
}
.tag svg { width: 13px; height: 13px; flex: none; }
svg { flex-shrink: 0; }
.ayah .ar {
  font-family: var(--ff-ar);
  font-size: 25px;
  line-height: 1.95;
  direction: rtl;
  text-align: right;
  color: var(--w-950);
  margin: 8px 0 6px;
}
.ayah .tr { font-size: 12.5px; color: var(--ink-2); font-style: italic; line-height: 1.6; }
.ayah .src { font-size: 11px; font-weight: 700; color: var(--w-700); margin-top: 8px; }

/* ============================ LIST ITEMS ============================ */
.list { display: flex; flex-direction: column; }
.li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 4px;
  border-bottom: 1px solid var(--line);
  width: 100%;
  text-align: left;
  transition: background .15s;
}
.li:last-child { border-bottom: 0; }
.li:active { background: var(--w-50); }
.li .li-ic {
  width: 36px; height: 36px; border-radius: 11px;
  background: var(--w-100); color: var(--w-700);
  display: grid; place-items: center; flex: none;
}
.li .li-ic svg { width: 17px; height: 17px; }
.li .li-body { flex: 1; min-width: 0; display: block; }
.li .li-t { font-size: 13.5px; font-weight: 700; color: var(--w-950); display: block; }
.li .li-d { font-size: 11.5px; color: var(--ink-3); margin-top: 1px; display: block; }
.li .li-x { font-size: 11.5px; color: var(--ink-4); font-weight: 700; flex: none; }
.li .chev { width: 16px; height: 16px; color: var(--ink-4); flex: none; }

/* ============================ QURAN ============================ */
.search-wrap {
  display: flex; align-items: center; gap: 9px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 13px;
  box-shadow: var(--sh-1);
  margin: 4px 18px 12px;
}
.search-wrap svg { width: 17px; height: 17px; color: var(--ink-4); flex: none; }
.search-wrap input {
  border: 0; outline: 0; background: none;
  font-size: 14px; width: 100%; color: var(--ink);
}
.search-wrap input::placeholder { color: var(--ink-4); }

.surah-item {
  display: flex; align-items: center; gap: 13px;
  padding: 11px 4px;
  border-bottom: 1px solid var(--line);
  width: 100%; text-align: left;
}
.surah-item:active { background: var(--w-50); }
.surah-no {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  font-size: 11.5px; font-weight: 800;
  color: var(--w-700);
  background: var(--w-100);
  border-radius: 10px;
  transform: rotate(0deg);
}
.surah-info { flex: 1; min-width: 0; }
.surah-info b { font-size: 13.5px; font-weight: 700; color: var(--w-950); display: block; }
.surah-info small { font-size: 11px; color: var(--ink-3); }
.surah-ar { font-family: var(--ff-ar); font-size: 20px; color: var(--w-700); flex: none; }

.continue-card {
  margin: 4px 18px 14px;
  background: linear-gradient(135deg, var(--w-700), var(--w-950));
  color: #fff;
  border-radius: var(--r-l);
  padding: 15px 16px;
  display: flex; align-items: center; gap: 13px;
  box-shadow: 0 8px 20px rgba(6, 60, 45, .22);
}
.continue-card .ci {
  width: 38px; height: 38px; border-radius: 11px;
  background: rgba(255, 255, 255, .16);
  display: grid; place-items: center; flex: none;
}
.continue-card .ci svg { width: 19px; height: 19px; }
.continue-card b { font-size: 13.5px; display: block; }
.continue-card small { font-size: 11px; opacity: .72; }

/* reader */
.reader-head {
  background: linear-gradient(150deg, var(--w-700), var(--w-950));
  color: #fff;
  padding: calc(16px + env(safe-area-inset-top)) 18px 20px;
  border-radius: 0 0 24px 24px;
  position: relative;
  overflow: hidden;
}
.reader-head::after {
  content: "";
  position: absolute; right: -30px; top: -40px;
  width: 130px; height: 130px; border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 185, 59, .26), transparent 70%);
}
.reader-head h2 { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.reader-head .meta { font-size: 11.5px; opacity: .74; margin-top: 2px; }
.reader-head .ar-name { font-family: var(--ff-ar); font-size: 26px; position: absolute; right: 18px; top: 48px; opacity: .95; }

.reader-tools { display: flex; gap: 7px; margin-top: 14px; flex-wrap: wrap; position: relative; z-index: 1; }
.rt-btn {
  font-size: 10.5px; font-weight: 700;
  padding: 6px 11px; border-radius: 999px;
  background: rgba(255, 255, 255, .15);
  border: 1px solid rgba(255, 255, 255, .2);
  color: #fff;
  display: inline-flex; align-items: center; gap: 5px;
}
.rt-btn.on { background: #fff; color: var(--w-800); }
.rt-btn svg { width: 12px; height: 12px; }

.bismillah {
  font-family: var(--ff-ar);
  font-size: 27px;
  text-align: center;
  color: var(--w-900);
  padding: 18px 0 6px;
  line-height: 1.9;
}

.ayah-row {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.ayah-row .no {
  position: absolute;
  left: 18px; top: 16px;
  width: 22px; height: 22px;
  border-radius: 7px;
  background: var(--w-100);
  color: var(--w-700);
  font-size: 10px; font-weight: 800;
  display: grid; place-items: center;
}
.ayah-row .ar {
  font-family: var(--ff-ar);
  font-size: 27px;
  line-height: 2.05;
  direction: rtl;
  text-align: right;
  color: var(--w-950);
  padding-left: 30px;
}
.ayah-row .lt {
  font-size: 12px; color: var(--w-600); font-style: italic;
  margin-top: 7px; line-height: 1.6; padding-left: 30px;
}
.ayah-row .id {
  font-size: 13px; color: var(--ink-2);
  margin-top: 6px; line-height: 1.62; padding-left: 30px;
}
.ayah-row .acts {
  display: flex; gap: 6px; margin-top: 9px; padding-left: 30px;
}
.mini-btn {
  font-size: 10.5px; font-weight: 700;
  color: var(--w-700); background: var(--w-50);
  border: 1px solid var(--w-100);
  padding: 5px 10px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 4px;
}
.mini-btn svg { width: 11px; height: 11px; }
.mini-btn.on { background: var(--w-600); color: #fff; border-color: var(--w-600); }
.ayah-row.bookmarked { background: #fbfdf9; }

/* ============================ DZIKIR ============================ */
.dz-seg {
  display: flex;
  gap: 6px;
  margin: 4px 18px 14px;
  background: #fff;
  padding: 5px;
  border-radius: 14px;
  box-shadow: var(--sh-1);
  overflow-x: auto;
  scrollbar-width: none;
}
.dz-seg::-webkit-scrollbar { display: none; }
.dz-seg button {
  flex: 1 0 auto;
  font-size: 12px; font-weight: 700;
  padding: 8px 13px; border-radius: 10px;
  color: var(--ink-3);
  white-space: nowrap;
  transition: all .18s;
}
.dz-seg button.on { background: var(--w-600); color: #fff; box-shadow: 0 3px 10px rgba(14, 122, 82, .3); }

.dz-card {
  background: #fff;
  border-radius: var(--r-l);
  padding: 18px;
  box-shadow: var(--sh-1);
  border: 1px solid var(--line);
  margin: 0 18px 12px;
}
.dz-count-tag {
  font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--w-600);
}
.dz-ar {
  font-family: var(--ff-ar);
  font-size: 26px;
  line-height: 2;
  direction: rtl;
  text-align: right;
  color: var(--w-950);
  margin: 10px 0 8px;
}
.dz-lt { font-size: 12.5px; font-style: italic; color: var(--w-600); line-height: 1.6; }
.dz-id { font-size: 12.5px; color: var(--ink-2); margin-top: 6px; line-height: 1.6; }

.tasbih {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}
.tasbih .prog { flex: 1; }
.tasbih .prog small { font-size: 11px; font-weight: 700; color: var(--ink-3); }
.bar { height: 6px; background: var(--w-100); border-radius: 99px; margin-top: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--w-500), var(--w-700)); border-radius: 99px; transition: width .25s ease; }

.tasbih-btn {
  width: 62px; height: 62px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--w-500), var(--w-700));
  color: #fff;
  font-size: 17px; font-weight: 800;
  display: grid; place-items: center;
  box-shadow: 0 6px 16px rgba(14, 122, 82, .34);
  flex: none;
  font-variant-numeric: tabular-nums;
  transition: transform .1s;
}
.tasbih-btn:active { transform: scale(.92); }
.tasbih-btn.done { background: linear-gradient(145deg, var(--gold), #c79a1d); box-shadow: 0 6px 16px rgba(232, 185, 59, .4); }

/* ============================ KAJIAN ============================ */
.kajian-card {
  background: #fff;
  border-radius: var(--r-l);
  overflow: hidden;
  box-shadow: var(--sh-1);
  border: 1px solid var(--line);
  margin: 0 18px 12px;
}
.kj-poster {
  height: 92px;
  background: linear-gradient(135deg, var(--w-700), var(--w-950));
  position: relative;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
  overflow: hidden;
}
.kj-poster::after {
  content: "";
  position: absolute; right: -24px; top: -34px;
  width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 185, 59, .3), transparent 70%);
}
.kj-badge {
  position: absolute; top: 12px; left: 16px;
  font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  background: rgba(255, 255, 255, .18);
  padding: 3px 9px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .22);
}
.kj-poster h3 { font-size: 15px; font-weight: 800; letter-spacing: -.01em; position: relative; z-index: 1; }
.kj-poster .sp { font-size: 11px; opacity: .78; position: relative; z-index: 1; }

.kj-body { padding: 13px 16px 15px; }
.kj-meta { display: flex; flex-direction: column; gap: 6px; }
.kj-meta div { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--ink-3); }
.kj-meta svg { width: 13px; height: 13px; color: var(--w-600); flex: none; }
.kj-acts { display: flex; gap: 7px; margin-top: 12px; }
.kj-acts .btn-s {
  flex: 1;
  font-size: 11.5px; font-weight: 700;
  padding: 9px; border-radius: 11px;
  background: var(--w-50); color: var(--w-700);
  border: 1px solid var(--w-100);
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
}
.kj-acts .btn-s.primary { background: var(--w-600); color: #fff; border-color: var(--w-600); }
.kj-acts .btn-s.on { background: var(--gold-2); color: #8a6400; border-color: #f2e0a8; }
.kj-acts svg { width: 12px; height: 12px; }

/* article */
.art-item { display: flex; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); width: 100%; text-align: left; }
.art-item:last-child { border-bottom: 0; }
.art-thumb {
  width: 62px; height: 62px; border-radius: 13px; flex: none;
  background: linear-gradient(140deg, var(--w-100), #cfe9da);
  display: grid; place-items: center;
  color: var(--w-700); font-size: 20px; font-weight: 800;
}
.art-item b { font-size: 13px; font-weight: 700; color: var(--w-950); line-height: 1.4; display: block; }
.art-item small { font-size: 11px; color: var(--ink-3); margin-top: 3px; display: block; }

/* ============================ FORM ============================ */
.field { margin-bottom: 14px; }
.field label { font-size: 12px; font-weight: 700; color: var(--ink-2); display: block; margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 12px 14px;
  font-size: 14px;
  background: #fff;
  color: var(--ink);
  outline: 0;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--w-400);
  box-shadow: 0 0 0 3px rgba(18, 163, 102, .12);
}
.field textarea { resize: vertical; min-height: 96px; line-height: 1.6; }

.btn-main {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--w-600), var(--w-800));
  color: #fff;
  font-size: 14.5px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(10, 92, 67, .26);
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-main:active { transform: scale(.985); }
.btn-main svg { width: 17px; height: 17px; }

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip-btn {
  font-size: 12px; font-weight: 700;
  padding: 8px 14px; border-radius: 999px;
  background: #fff; color: var(--ink-2);
  border: 1px solid var(--line);
  transition: all .16s;
}
.chip-btn.on { background: var(--w-600); color: #fff; border-color: var(--w-600); }

/* toggle */
.tog-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.tog-row:last-child { border-bottom: 0; }
.tog-row .tt { font-size: 13px; font-weight: 700; color: var(--w-950); }
.tog-row .td { font-size: 11px; color: var(--ink-3); margin-top: 1px; }
.tog {
  width: 44px; height: 26px; border-radius: 99px;
  background: #dbe6e0; position: relative; flex: none;
  transition: background .22s;
}
.tog::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
  transition: transform .22s cubic-bezier(.3, 1.4, .5, 1);
}
.tog.on { background: var(--w-600); }
.tog.on::after { transform: translateX(18px); }

/* ============================ ONBOARDING ============================ */
#onboard {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #fff;
  max-width: 460px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#onboard.hidden { display: none; }

.ob-splash {
  position: absolute; inset: 0;
  background: linear-gradient(160deg, var(--w-600), var(--w-900) 60%, var(--w-950));
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 18px; color: #fff;
  z-index: 5;
  transition: opacity .55s ease, visibility .55s;
}
.ob-splash.out { opacity: 0; visibility: hidden; }
.ob-splash img { width: 84px; height: 84px; border-radius: 22px; box-shadow: 0 12px 34px rgba(0, 0, 0, .3); }
.ob-splash .bism { font-family: var(--ff-ar); font-size: 26px; opacity: .92; }
.ob-splash .nm { font-size: 20px; font-weight: 800; letter-spacing: .22em; }
.ob-splash .tg { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; opacity: .6; }
.ob-splash .ld {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .22);
  border-top-color: var(--gold);
  animation: spin .8s linear infinite;
  margin-top: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.ob-body { flex: 1; display: flex; flex-direction: column; padding: 0 24px 26px; overflow-y: auto; }
.ob-progress { display: flex; gap: 6px; padding: 20px 0 6px; }
.ob-progress i { flex: 1; height: 3.5px; border-radius: 99px; background: var(--line); transition: background .3s; }
.ob-progress i.on { background: var(--w-500); }

.ob-step { display: none; flex: 1; flex-direction: column; justify-content: center; animation: fadeUp .35s ease; }
.ob-step.active { display: flex; }
.ob-step h2 { font-size: 25px; font-weight: 800; letter-spacing: -.025em; color: var(--w-950); margin-top: 18px; line-height: 1.2; }
.ob-step p.lead { font-size: 14px; color: var(--ink-3); margin-top: 10px; line-height: 1.6; }
.ob-content { margin-top: 24px; flex: 0 0 auto; }

.ob-opt {
  display: flex; align-items: center; gap: 13px;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  margin-bottom: 10px;
  width: 100%; text-align: left;
  transition: all .18s;
  background: #fff;
}
.ob-opt.on { border-color: var(--w-500); background: var(--w-50); box-shadow: 0 4px 14px rgba(18, 163, 102, .12); }
.ob-opt .oi {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  background: var(--w-100); color: var(--w-700);
  display: grid; place-items: center;
  font-size: 15px; font-weight: 800;
}
.ob-opt .oi svg { width: 18px; height: 18px; }
.ob-opt b { font-size: 14px; font-weight: 700; color: var(--w-950); display: block; }
.ob-opt small { font-size: 11.5px; color: var(--ink-3); }
.ob-opt .ckk { margin-left: auto; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line); flex: none; display: grid; place-items: center; }
.ob-opt.on .ckk { background: var(--w-600); border-color: var(--w-600); }
.ob-opt.on .ckk::after { content: ""; width: 8px; height: 4px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }

.ob-actions { display: flex; gap: 10px; margin-top: 26px; }
.ob-actions .btn-main { flex: 1; }
.ob-skip {
  font-size: 13px; font-weight: 700; color: var(--ink-3);
  padding: 14px 18px; border-radius: 14px;
  background: #f4f7f5;
}

.ob-icon-big {
  width: 74px; height: 74px; border-radius: 24px;
  background: linear-gradient(145deg, var(--w-500), var(--w-700));
  display: grid; place-items: center;
  margin: 34px auto 0;
  box-shadow: 0 12px 28px rgba(14, 122, 82, .28);
  color: #fff;
}
.ob-icon-big svg { width: 34px; height: 34px; }

/* ============================ MISC UI ============================ */
.toast {
  position: fixed;
  left: 50%; bottom: calc(var(--tab-h) + 22px);
  transform: translate(-50%, 20px);
  background: var(--w-950);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  padding: 11px 18px;
  border-radius: 999px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .28);
  opacity: 0;
  pointer-events: none;
  transition: all .28s cubic-bezier(.2, .9, .3, 1);
  z-index: 300;
  max-width: 88%;
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.sheet-back {
  position: fixed; inset: 0;
  background: rgba(3, 42, 31, .5);
  z-index: 150;
  opacity: 0; visibility: hidden;
  transition: all .25s;
  backdrop-filter: blur(3px);
}
.sheet-back.show { opacity: 1; visibility: visible; }
.sheet {
  position: fixed;
  left: 50%; bottom: 0;
  transform: translate(-50%, 100%);
  width: 100%; max-width: 460px;
  background: #fff;
  border-radius: 24px 24px 0 0;
  padding: 8px 20px 26px;
  z-index: 160;
  transition: transform .32s cubic-bezier(.2, .9, .3, 1);
  max-height: 82vh;
  overflow-y: auto;
}
.sheet.show { transform: translate(-50%, 0); }
.sheet-handle { width: 38px; height: 4px; border-radius: 99px; background: #dde7e2; margin: 6px auto 14px; }
.sheet h3 { font-size: 17px; font-weight: 800; color: var(--w-950); margin-bottom: 4px; }
.sheet .sd { font-size: 12.5px; color: var(--ink-3); margin-bottom: 16px; }

.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.stat {
  background: #fff; border-radius: var(--r-m); padding: 14px 8px;
  text-align: center; box-shadow: var(--sh-1); border: 1px solid var(--line);
}
.stat b { display: block; font-size: 20px; font-weight: 800; color: var(--w-700); letter-spacing: -.02em; }
.stat span { font-size: 10px; color: var(--ink-3); font-weight: 600; }

.profile-head {
  background: linear-gradient(150deg, var(--w-600), var(--w-950));
  color: #fff;
  padding: 22px 18px 26px;
  border-radius: 0 0 26px 26px;
  position: relative;
  overflow: hidden;
}
.profile-head::after {
  content: ""; position: absolute; right: -40px; top: -50px;
  width: 150px; height: 150px; border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 185, 59, .26), transparent 70%);
}
.pf-avatar {
  width: 58px; height: 58px; border-radius: 20px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .28);
  display: grid; place-items: center;
  font-size: 22px; font-weight: 800;
  margin-bottom: 12px;
}
.profile-head h2 { font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.profile-head p { font-size: 12px; opacity: .72; margin-top: 2px; }

.badge-row { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; position: relative; z-index: 1; }
.badge-pill {
  font-size: 10.5px; font-weight: 700;
  padding: 5px 11px; border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .2);
  display: inline-flex; align-items: center; gap: 5px;
}
.badge-pill svg { width: 11px; height: 11px; color: var(--gold); }

.article-body { padding: 18px; }
.article-body h1 { font-size: 21px; font-weight: 800; letter-spacing: -.02em; line-height: 1.28; color: var(--w-950); }
.article-body .meta { font-size: 11.5px; color: var(--ink-3); margin-top: 8px; }
.article-body p { font-size: 14px; color: var(--ink-2); line-height: 1.78; margin-top: 14px; }
.article-body h3 { font-size: 15.5px; font-weight: 800; color: var(--w-900); margin-top: 22px; }
.article-body blockquote {
  border-left: 3px solid var(--w-400);
  padding: 4px 0 4px 14px;
  margin: 16px 0;
  font-style: italic;
  color: var(--w-800);
  font-size: 13.5px;
}
