/* =====================================================================
   RUMAH HIKMAH — Stylesheet utama
   ===================================================================== */

/* ---------- Token & Palet ---------- */
:root {
  --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-ar: "Amiri", "Traditional Arabic", "Scheherazade New", serif;
  --radius: 20px;
  --radius-sm: 12px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --shadow-sm: 0 1px 2px rgba(20, 28, 24, .06), 0 3px 10px rgba(20, 28, 24, .05);
  --shadow: 0 14px 34px -14px rgba(20, 28, 24, .22);
  --shadow-lg: 0 30px 70px -24px rgba(20, 28, 24, .35);
  --read-scale: 1;

  --primary: #1546a8; --primary-deep: #0b2a6b; --primary-soft: #e8eefb;
  --accent: #d4a64a; --accent-deep: #a87a2a; --accent-soft: #f8efd9;
  --bg: #f7f8fc; --surface: #ffffff; --surface-2: #edf1f9;
  --text: #141f3a; --muted: #5a6683; --border: #dfe5f2;
  --hero-a: #06173f; --hero-b: #1546a8; --on-hero: #f6f3ea;
  --ink: var(--primary);

  --green: #2f8f5b; --amber: #cf8317; --red: #c2453d; --blue: #2f6fbf; --purple: #7b55c7;
}
[data-palette="zamrud"] { --primary: #0f5c4d; --primary-deep: #0a3a30; --primary-soft: #e6f2ee; --accent: #c9a24a; --accent-deep: #a87f2c; --accent-soft: #f7eed6; --bg: #fbf8f1; --surface-2: #f4efe3; --border: #e7e0cf; --text: #1c2925; --muted: #5d6b66; --hero-a: #072a23; --hero-b: #0f5c4d; }
[data-palette="terakota"] { --primary: #a94c33; --primary-deep: #6e2a1a; --primary-soft: #f8e6df; --accent: #e2a33b; --accent-deep: #b47a1c; --accent-soft: #fbefd8; --bg: #fdf6ee; --surface-2: #f6e9da; --border: #efdcc8; --text: #2f1d16; --muted: #75594d; --hero-a: #35120a; --hero-b: #a94c33; }
[data-palette="anggur"] { --primary: #5a3d8a; --primary-deep: #2f1d52; --primary-soft: #efe8f8; --accent: #e0899a; --accent-deep: #b85d70; --accent-soft: #fae6ea; --bg: #f9f6fc; --surface-2: #f0eaf6; --border: #e6dcf0; --text: #241a33; --muted: #665a78; --hero-a: #190d2e; --hero-b: #5a3d8a; }
[data-palette="sage"] { --primary: #4d6e51; --primary-deep: #2a3f2d; --primary-soft: #e8efe6; --accent: #b2895a; --accent-deep: #8a6438; --accent-soft: #f3eadc; --bg: #f6f5ef; --surface-2: #ecebe1; --border: #e0ded0; --text: #1f2a20; --muted: #5f6b5f; --hero-a: #142016; --hero-b: #4d6e51; }

[data-theme="dark"] {
  --bg: color-mix(in srgb, var(--primary-deep) 22%, #0a0e0d);
  --surface: color-mix(in srgb, var(--primary-deep) 18%, #131917);
  --surface-2: color-mix(in srgb, var(--primary-deep) 26%, #182120);
  --text: #e8eee9; --muted: #a2b1aa;
  --border: color-mix(in srgb, var(--primary) 22%, #222c29);
  --primary-soft: color-mix(in srgb, var(--primary) 26%, #101614);
  --accent-soft: color-mix(in srgb, var(--accent) 18%, #101614);
  --ink: color-mix(in srgb, var(--primary) 45%, #ffffff);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 14px 34px -14px rgba(0, 0, 0, .7);
  --shadow-lg: 0 30px 70px -24px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

/* ---------- Dasar ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font-sans); color: var(--text); background: var(--bg);
  line-height: 1.65; font-size: 16px; -webkit-font-smoothing: antialiased; overflow-x: hidden;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.ar { font-family: var(--font-ar); direction: rtl; line-height: 2; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

/* ---------- Preloader ---------- */
#preloader {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 40%, var(--hero-b), var(--hero-a));
  transition: opacity .6s var(--ease), visibility .6s;
}
#preloader.hide { opacity: 0; visibility: hidden; }
.pl-inner { text-align: center; color: var(--on-hero); }
.pl-inner img { width: 96px; height: 96px; margin: 0 auto 14px; animation: plPulse 1.6s var(--ease) infinite; }
.pl-inner strong { font-family: var(--font-serif); font-size: 1.5rem; letter-spacing: .5px; display: block; }
.pl-inner span { font-size: .8rem; letter-spacing: 3px; text-transform: uppercase; color: var(--accent); }
@keyframes plPulse { 0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0 transparent); } 50% { transform: scale(1.06); filter: drop-shadow(0 0 22px rgba(233, 196, 106, .55)); } }

/* ---------- Header ---------- */
.read-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 120; background: linear-gradient(90deg, var(--accent), var(--primary)); transition: width .1s linear; }
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100; height: 74px;
  display: flex; align-items: center;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  transition: background .35s var(--ease), border-color .35s, color .35s;
}
.site-header .container { display: flex; align-items: center; gap: 18px; }
body.on-hero:not(.scrolled) .site-header { background: transparent; border-color: transparent; color: var(--on-hero); backdrop-filter: none; -webkit-backdrop-filter: none; }
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.brand img { width: 46px; height: 46px; border-radius: 50%; box-shadow: 0 4px 14px -4px rgba(6, 23, 63, .45); transition: transform .6s var(--ease); }
.brand:hover img { transform: scale(1.08) rotate(-4deg); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--font-serif); font-size: 1.28rem; letter-spacing: .3px; }
.brand-text small { font-size: .7rem; letter-spacing: 1.6px; text-transform: uppercase; opacity: .72; margin-top: 3px; }
.main-nav { display: flex; gap: 4px; }
.main-nav a { padding: 9px 16px; border-radius: 999px; font-weight: 600; font-size: .93rem; opacity: .8; transition: all .25s var(--ease); display: flex; align-items: center; gap: 8px; }
.main-nav a:hover { opacity: 1; background: color-mix(in srgb, currentColor 8%, transparent); }
.main-nav a.active { opacity: 1; background: var(--primary); color: #fff; }
body.on-hero:not(.scrolled) .main-nav a.active { background: rgba(255, 255, 255, .14); }
.header-actions { display: flex; gap: 6px; }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; transition: background .25s, transform .25s var(--ease); position: relative; }
.icon-btn:hover { background: color-mix(in srgb, currentColor 10%, transparent); }
.icon-btn:active { transform: scale(.92); }
.icon-btn .ic { width: 20px; height: 20px; }
.sound-bars { display: none; gap: 2px; align-items: flex-end; height: 16px; }
.icon-btn.playing .sound-bars { display: flex; }
.icon-btn.playing .ic { display: none; }
.sound-bars i { width: 3px; background: var(--accent); border-radius: 2px; animation: bars 1s ease-in-out infinite; }
.sound-bars i:nth-child(2) { animation-delay: .2s; } .sound-bars i:nth-child(3) { animation-delay: .4s; } .sound-bars i:nth-child(4) { animation-delay: .1s; }
@keyframes bars { 0%, 100% { height: 4px; } 50% { height: 16px; } }

/* Bottom nav (mobile) */
.bottom-nav { display: none; }

/* ---------- Tombol & Chip ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 13px 24px; border-radius: 999px; font-weight: 700; font-size: .95rem; transition: transform .25s var(--ease), box-shadow .25s, background .25s, color .25s; white-space: nowrap; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 10px 24px -10px var(--primary); }
.btn-primary:hover { box-shadow: 0 16px 30px -12px var(--primary); }
.btn-gold { background: linear-gradient(135deg, #f3d98b, var(--accent) 50%, var(--accent-deep)); color: #2a1d05; box-shadow: 0 12px 30px -12px rgba(201, 162, 74, .8); }
.btn-ghost { border: 1.5px solid var(--border); background: var(--surface); }
.btn-ghost:hover { border-color: var(--primary); color: var(--ink); }
.btn-ghost-light { border: 1.5px solid rgba(255, 255, 255, .35); color: var(--on-hero); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .1); }
.btn-sm { padding: 9px 16px; font-size: .86rem; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--primary-soft); color: var(--ink); }
.chip-gold { background: var(--accent-soft); color: var(--accent-deep); }
[data-theme="dark"] .chip-gold { color: var(--accent); }
.chip-muted { background: var(--surface-2); color: var(--muted); }
.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-chip { padding: 9px 18px; border-radius: 999px; border: 1.5px solid var(--border); background: var(--surface); font-weight: 600; font-size: .9rem; display: inline-flex; align-items: center; gap: 8px; transition: all .25s var(--ease); }
.filter-chip:hover { border-color: var(--primary); }
.filter-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 8px 18px -10px var(--primary); }
.filter-chip .count { font-size: .75rem; padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, currentColor 14%, transparent); }

/* ---------- Animasi masuk ---------- */
#app { min-height: 70vh; }
.page-enter { animation: pageIn .6s var(--ease) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Hero beranda ---------- */
.hero { position: relative; color: var(--on-hero); padding: 140px 0 120px; overflow: hidden; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -1; background: radial-gradient(1200px 600px at 75% 30%, var(--hero-b), var(--hero-a) 70%); }
.pattern-layer {
  position: absolute; inset: 0; opacity: .14;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23e9c46a' stroke-width='1'%3E%3Crect x='22' y='22' width='36' height='36'/%3E%3Crect x='22' y='22' width='36' height='36' transform='rotate(45 40 40)'/%3E%3Cpath d='M0 0l22 22M80 0L58 22M0 80l22-22M80 80L58 58'/%3E%3Ccircle cx='40' cy='40' r='8'/%3E%3C/g%3E%3C/svg%3E");
  animation: drift 60s linear infinite;
  mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 75%);
}
@keyframes drift { to { background-position: 160px 160px; } }
.orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .45; animation: float 14s ease-in-out infinite; }
.orb.o1 { width: 380px; height: 380px; background: var(--accent); top: -120px; right: 8%; opacity: .22; }
.orb.o2 { width: 300px; height: 300px; background: var(--primary); bottom: -80px; left: -60px; animation-delay: -6s; }
@keyframes float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(30px, -26px); } }
.particles span { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #f3d98b; box-shadow: 0 0 10px 2px rgba(243, 217, 139, .6); animation: rise linear infinite; opacity: 0; }
@keyframes rise { 0% { transform: translateY(0); opacity: 0; } 10% { opacity: .9; } 90% { opacity: .6; } 100% { transform: translateY(-80vh); opacity: 0; } }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 50px; align-items: center; }
.bismillah { font-family: var(--font-ar); font-size: 1.7rem; color: var(--accent); margin-bottom: 10px; direction: rtl; text-align: left; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--accent-deep); }
.hero .eyebrow { color: var(--accent); background: rgba(255, 255, 255, .07); border: 1px solid rgba(233, 196, 106, .3); padding: 7px 14px; border-radius: 999px; }
.hero h1 { font-family: var(--font-serif); font-size: clamp(2.5rem, 5.6vw, 4.4rem); margin: 22px 0 18px; letter-spacing: -.5px; font-weight: 700; }
.hero h1 em { font-style: italic; background: linear-gradient(120deg, #f6e2a4, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: 1.12rem; opacity: .85; max-width: 560px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 30px 0 34px; }
.hero-meta { display: flex; align-items: center; gap: 12px; font-size: .9rem; opacity: .9; }
.avatar { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: linear-gradient(135deg, #f3d98b, var(--accent-deep)); color: #2a1d05; flex: none; font-family: var(--font-serif); overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.hero-visual { position: relative; aspect-ratio: 1; max-width: 460px; justify-self: center; width: 100%; }
.emblem-wrap { position: absolute; inset: 8%; display: grid; place-items: center; }
.emblem { width: 64%; border-radius: 50%; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .45)) drop-shadow(0 0 30px rgba(243, 217, 139, .25)); animation: bob 6s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.ring { position: absolute; inset: 0; border-radius: 50%; border: 1px dashed rgba(233, 196, 106, .45); animation: spin 50s linear infinite; }
.ring.r2 { inset: 12%; border-style: solid; border-color: rgba(233, 196, 106, .2); animation-duration: 80s; animation-direction: reverse; }
.ring.r1::before, .ring.r2::before { content: ""; position: absolute; top: -5px; left: 50%; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 16px var(--accent); }
.star-ornament { position: absolute; inset: 18%; opacity: .5; animation: spin 120s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.float-card { position: absolute; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); font-weight: 700; font-size: .9rem; animation: bob 7s ease-in-out infinite; box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .5); }
.float-card small { display: block; font-weight: 500; opacity: .75; font-size: .75rem; }
.float-card .fi { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, #f3d98b, var(--accent-deep)); color: #2a1d05; }
.float-card.fc1 { top: 8%; left: -6%; }
.float-card.fc2 { bottom: 10%; right: -4%; animation-delay: -3s; }
.float-card.fc2 .fi { background: linear-gradient(135deg, #f6b26b, #f08a5d); color: #fff; }
.hero-wave { position: absolute; bottom: -1px; left: 0; right: 0; line-height: 0; }
.hero-wave svg { width: 100%; height: 70px; }
.hero-wave path { fill: var(--bg); transition: fill .4s; }

/* ---------- Section ---------- */
.section { padding: 80px 0; }
.section-tight { padding: 50px 0; }
.sec-head { max-width: 680px; margin-bottom: 40px; }
.sec-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.sec-head h2 { font-family: var(--font-serif); font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin: 10px 0 12px; color: var(--text); }
.sec-head h2 em { color: var(--ink); font-style: italic; }
.sec-head p { color: var(--muted); font-size: 1.04rem; }
.sec-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 30px; }
.sec-row .sec-head { margin-bottom: 0; }
.link-more { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); }
.link-more .ic { transition: transform .25s var(--ease); }
.link-more:hover .ic { transform: translateX(4px); }
.ornament { display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--accent); }
.ornament::before, .ornament::after { content: ""; height: 1px; width: 60px; background: linear-gradient(90deg, transparent, var(--accent)); }
.ornament::after { transform: scaleX(-1); }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: -56px; position: relative; z-index: 2; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; display: flex; gap: 14px; align-items: center; box-shadow: var(--shadow); }
.stat-ic { width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; background: var(--primary-soft); color: var(--ink); flex: none; }
.stat-ic .ic { width: 24px; height: 24px; }
.stat strong { font-family: var(--font-serif); font-size: 1.9rem; display: block; line-height: 1; color: var(--text); }
.stat span { color: var(--muted); font-size: .86rem; }

/* Continue reading */
.continue { display: flex; align-items: center; gap: 18px; padding: 16px 20px; border-radius: var(--radius); background: linear-gradient(120deg, var(--accent-soft), var(--primary-soft)); border: 1px solid var(--border); }
.continue .ci { width: 48px; height: 48px; border-radius: 14px; background: var(--primary); color: #fff; display: grid; place-items: center; flex: none; }
.continue div { flex: 1; min-width: 0; }
.continue small { color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: 1px; }
.continue strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Pillars */
.pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.pillar { position: relative; border-radius: 28px; padding: 38px; overflow: hidden; color: #fff; min-height: 330px; display: flex; flex-direction: column; isolation: isolate; transition: transform .45s var(--ease), box-shadow .45s; box-shadow: var(--shadow); }
.pillar:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
[data-theme="dark"] .pillar, [data-theme="dark"] .hikmah-band, [data-theme="dark"] .b-nash.ayat { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent); }
.pillar::before { content: ""; position: absolute; inset: 0; z-index: -2; }
.pillar.islam::before { background: linear-gradient(140deg, var(--hero-a), var(--hero-b)); }
.pillar.parenting::before { background: linear-gradient(140deg, #e46f4f, #f3a65c 60%, #f6c46b); }
.pillar .p-art { position: absolute; right: -40px; bottom: -40px; width: 260px; height: 260px; opacity: .18; z-index: -1; transition: transform 1s var(--ease); }
.pillar:hover .p-art { transform: rotate(25deg) scale(1.08); }
.pillar .p-ic { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .25); margin-bottom: 22px; }
.pillar .p-ic .ic { width: 28px; height: 28px; }
.pillar h3 { font-family: var(--font-serif); font-size: 1.9rem; margin-bottom: 10px; }
.pillar p { opacity: .88; max-width: 420px; }
.pillar ul { list-style: none; padding: 0; margin: 4px 0 26px; display: flex; flex-wrap: wrap; gap: 8px; }
.pillar li { font-size: .78rem; font-weight: 600; padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, .14); }
.pillar .btn { margin-top: auto; align-self: flex-start; background: #fff; color: #222; }

/* ---------- Kartu kajian ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.k-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .4s var(--ease), box-shadow .4s, border-color .3s; position: relative; }
.k-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.k-cover { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); }
.k-cover > svg, .k-cover > img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.k-card:hover .k-cover > svg, .k-card:hover .k-cover > img { transform: scale(1.07); }
.k-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, .35)); }
.k-badge { position: absolute; z-index: 1; left: 14px; top: 14px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .92); color: #1c2925; font-size: .74rem; font-weight: 800; letter-spacing: .5px; display: inline-flex; gap: 6px; align-items: center; }
.k-state { position: absolute; z-index: 1; right: 14px; top: 14px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .35); color: #fff; backdrop-filter: blur(6px); }
.k-state.done { background: var(--green); }
.k-play { position: absolute; z-index: 1; right: 16px; bottom: 16px; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #2a1d05; transform: scale(.6); opacity: 0; transition: all .4s var(--ease); box-shadow: 0 10px 20px -6px rgba(0, 0, 0, .4); }
.k-card:hover .k-play { transform: scale(1); opacity: 1; }
.k-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.k-kicker { font-size: .74rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--accent-deep); margin-bottom: 6px; }
[data-theme="dark"] .k-kicker { color: var(--accent); }
.k-body h3 { font-size: 1.12rem; font-weight: 700; margin-bottom: 8px; line-height: 1.35; }
.k-body p { color: var(--muted); font-size: .9rem; margin-bottom: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.k-meta { margin-top: auto; display: flex; align-items: center; gap: 14px; font-size: .8rem; color: var(--muted); font-weight: 600; }
.k-meta span { display: inline-flex; gap: 6px; align-items: center; }
.k-card.locked .k-cover > svg { filter: saturate(.7) brightness(.92); }
.k-card.locked .k-body h3 { color: var(--muted); }

/* Hikmah band */
.hikmah-band { position: relative; overflow: hidden; color: var(--on-hero); background: linear-gradient(130deg, var(--hero-a), var(--hero-b)); padding: 90px 0; text-align: center; isolation: isolate; }
.hikmah-band .pattern-layer { mask-image: none; -webkit-mask-image: none; opacity: .08; }
.hk-slide { max-width: 820px; margin: 0 auto; min-height: 230px; display: grid; align-content: center; transition: opacity .6s var(--ease), transform .6s var(--ease); }
.hk-slide.out { opacity: 0; transform: translateY(12px); }
.hk-ar { font-family: var(--font-ar); font-size: clamp(1.6rem, 3.6vw, 2.5rem); color: #f3d98b; direction: rtl; line-height: 1.9; margin-bottom: 14px; }
.hk-text { font-family: var(--font-serif); font-style: italic; font-size: clamp(1.05rem, 2vw, 1.35rem); opacity: .92; }
.hk-src { margin-top: 16px; font-size: .82rem; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.hk-dots { display: flex; justify-content: center; gap: 8px; margin-top: 26px; }
.hk-dots button { width: 9px; height: 9px; border-radius: 99px; background: rgba(255, 255, 255, .3); transition: all .3s var(--ease); }
.hk-dots button.active { width: 28px; background: var(--accent); }
.hk-quote-ic { width: 46px; height: 46px; margin: 0 auto 14px; color: var(--accent); opacity: .7; }

/* Ulama */
.ulama-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.ulama-card { position: relative; border-radius: var(--radius); padding: 30px; background: var(--surface); border: 1px solid var(--border); overflow: hidden; transition: transform .4s var(--ease), box-shadow .4s; }
.ulama-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.ulama-card .u-top { display: flex; gap: 18px; align-items: center; margin-bottom: 16px; }
.u-seal { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #f3d98b; font-family: var(--font-ar); font-size: 1.05rem; text-align: center; line-height: 1.3; padding: 8px; box-shadow: inset 0 0 0 2px rgba(243, 217, 139, .5), 0 0 0 4px var(--surface), 0 0 0 5px rgba(201, 162, 74, .5); }
.ulama-card h3 { font-family: var(--font-serif); font-size: 1.45rem; margin: 0 0 4px; }
.ulama-card .u-years { font-size: .84rem; color: var(--muted); font-weight: 600; }
.ulama-card .u-ar { position: absolute; top: 14px; right: 22px; font-family: var(--font-ar); font-size: 2.6rem; color: var(--accent); opacity: .14; }
.ulama-card p { color: var(--muted); font-size: .95rem; }
.ulama-card .u-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 8px; }

.timeline { margin-top: 30px; padding: 26px 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.timeline h4 { display: flex; align-items: center; gap: 10px; font-size: 1rem; margin-bottom: 22px; }
.tl-track { position: relative; height: 92px; }
.tl-axis { position: absolute; left: 0; right: 0; bottom: 18px; height: 2px; background: var(--border); }
.tl-tick { position: absolute; bottom: 0; transform: translateX(-50%); font-size: .7rem; color: var(--muted); font-weight: 600; }
.tl-tick::before { content: ""; position: absolute; left: 50%; bottom: 18px; width: 1px; height: 8px; background: var(--border); }
.tl-bar { position: absolute; height: 30px; border-radius: 999px; display: flex; align-items: center; padding: 0 14px; color: #fff; font-size: .78rem; font-weight: 700; white-space: nowrap; overflow: hidden; transform-origin: left; transform: scaleX(0); transition: transform 1.4s var(--ease); }
.reveal.in .tl-bar { transform: scaleX(1); }
.tl-gap { position: absolute; top: 44px; font-size: .72rem; color: var(--muted); font-style: italic; transform: translateX(-50%); white-space: nowrap; }

/* Kelompok usia */
.usia-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.usia-card { border-radius: var(--radius); padding: 28px; color: #fff; position: relative; overflow: hidden; isolation: isolate; transition: transform .4s var(--ease), box-shadow .4s; min-height: 220px; display: flex; flex-direction: column; }
.usia-card:hover { transform: translateY(-6px) rotate(-.5deg); box-shadow: var(--shadow-lg); }
.usia-card .u-blob { position: absolute; right: -30px; top: -30px; width: 150px; height: 150px; border-radius: 50%; background: rgba(255, 255, 255, .15); z-index: -1; transition: transform .8s var(--ease); }
.usia-card:hover .u-blob { transform: scale(1.4); }
.usia-card .uc-ic { width: 52px; height: 52px; border-radius: 16px; background: rgba(255, 255, 255, .2); display: grid; place-items: center; margin-bottom: 18px; }
.usia-card .uc-ic .ic { width: 26px; height: 26px; }
.usia-card h3 { font-size: 1.3rem; margin-bottom: 2px; }
.usia-card .uc-range { font-size: .82rem; opacity: .85; font-weight: 600; }
.usia-card p { opacity: .92; font-size: .92rem; margin: 10px 0 18px; }
.usia-card .uc-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: .88rem; }

/* About / CTA */
.about { display: grid; grid-template-columns: .9fr 1.1fr; gap: 50px; align-items: center; }
.about-photo { position: relative; aspect-ratio: 4 / 5; border-radius: 30px; overflow: hidden; background: linear-gradient(150deg, var(--hero-b), var(--hero-a)); display: grid; place-items: center; box-shadow: var(--shadow-lg); }
.about-photo img.photo { width: 100%; height: 100%; object-fit: cover; }
.about-photo .initials { font-family: var(--font-serif); font-size: 7rem; color: #f3d98b; opacity: .95; }
.about-photo .seal-badge { position: absolute; right: 18px; bottom: 18px; width: 96px; height: 96px; animation: spin 40s linear infinite; }
.about-photo .pattern-layer { opacity: .1; mask-image: none; -webkit-mask-image: none; }
.about h2 { font-family: var(--font-serif); font-size: clamp(1.8rem, 3.2vw, 2.5rem); }
.about .name-title { color: var(--ink); }
.about p { color: var(--muted); }
.focus-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 26px; }
.cta-band { margin-top: 70px; border-radius: 28px; padding: 44px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; background: linear-gradient(120deg, var(--accent-soft), var(--primary-soft)); border: 1px solid var(--border); position: relative; overflow: hidden; }
.cta-band h3 { font-family: var(--font-serif); font-size: 1.7rem; margin-bottom: 6px; }
.cta-band p { color: var(--muted); margin: 0; }

/* ---------- Page hero (halaman dalam) ---------- */
.page-hero { position: relative; color: var(--on-hero); padding: 130px 0 70px; overflow: hidden; isolation: isolate; background: linear-gradient(130deg, var(--hero-a), var(--hero-b)); }
.page-hero.warm { background: linear-gradient(130deg, #b9482f, #e7834f 55%, #f2b45f); }
.page-hero .pattern-layer { mask-image: linear-gradient(90deg, transparent, #000); -webkit-mask-image: linear-gradient(90deg, transparent, #000); }
.page-hero .eyebrow { color: var(--accent); }
.page-hero.warm .eyebrow { color: #fff3d6; }
.page-hero h1 { font-family: var(--font-serif); font-size: clamp(2.1rem, 4.4vw, 3.3rem); margin: 14px 0 12px; }
.page-hero p { max-width: 640px; opacity: .88; font-size: 1.06rem; }
.page-hero .ph-ar { position: absolute; right: 5%; top: 50%; transform: translateY(-40%); font-family: var(--font-ar); font-size: clamp(4rem, 12vw, 9rem); opacity: .1; color: #f3d98b; pointer-events: none; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .84rem; opacity: .85; margin-bottom: 6px; }
.crumbs a:hover { text-decoration: underline; }
.crumbs .ic { width: 14px; height: 14px; opacity: .6; }

/* Toolbar */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 26px; }
.search-box { position: relative; flex: 1; min-width: 220px; max-width: 360px; }
.search-box .ic { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-box input { width: 100%; padding: 12px 16px 12px 44px; border-radius: 999px; border: 1.5px solid var(--border); background: var(--surface); outline: none; transition: border-color .25s, box-shadow .25s; }
.search-box input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty .ic { width: 48px; height: 48px; opacity: .4; margin-bottom: 10px; }

/* ---------- Kitab ---------- */
.ulama-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 30px; }
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 26px; }
.book-card { display: flex; flex-direction: column; gap: 14px; transition: transform .4s var(--ease); }
.book-card:hover { transform: translateY(-6px); }
.book-cover { position: relative; aspect-ratio: 3 / 4; border-radius: 6px 16px 16px 6px; overflow: hidden; box-shadow: 10px 16px 30px -12px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(255, 255, 255, .06); transition: box-shadow .4s, transform .5s var(--ease); transform-style: preserve-3d; }
.book-card:hover .book-cover { box-shadow: 18px 26px 40px -14px rgba(0, 0, 0, .5); transform: perspective(900px) rotateY(-8deg); }
.book-cover svg { width: 100%; height: 100%; }
.book-cover .status { position: absolute; top: 12px; right: 12px; z-index: 1; }
.status-live { background: var(--green); color: #fff; }
.status-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.status-soon { background: rgba(0, 0, 0, .45); color: #fff; backdrop-filter: blur(6px); }
.book-card h3 { font-size: 1.05rem; margin: 6px 0 2px; }
.book-card .b-ar { font-family: var(--font-ar); color: var(--accent-deep); font-size: 1.1rem; direction: rtl; text-align: left; line-height: 1.6; }
[data-theme="dark"] .book-card .b-ar { color: var(--accent); }
.book-card p { color: var(--muted); font-size: .88rem; margin: 6px 0 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.group-title { display: flex; align-items: center; gap: 14px; margin: 50px 0 24px; }
.group-title h3 { font-family: var(--font-serif); font-size: 1.5rem; margin: 0; }
.group-title .line { flex: 1; height: 1px; background: var(--border); }
.group-title .g-ar { font-family: var(--font-ar); color: var(--accent); font-size: 1.4rem; }

.book-hero { display: grid; grid-template-columns: 240px 1fr; gap: 44px; align-items: center; }
.book-hero .book-cover { max-width: 240px; }
.book-hero .ph-meta { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 22px; }
.book-hero .ph-meta .chip { background: rgba(255, 255, 255, .12); color: var(--on-hero); }
.book-hero .b-ar-big { font-family: var(--font-ar); font-size: 2rem; color: #f3d98b; direction: rtl; text-align: left; }
.progress-wrap { max-width: 440px; }
.progress-wrap small { display: flex; justify-content: space-between; font-weight: 600; opacity: .85; margin-bottom: 8px; }
.progress { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .16); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #f3d98b, var(--accent)); transition: width 1.2s var(--ease); }

.bab { margin-bottom: 56px; }
.bab-head { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; margin-bottom: 26px; }
.bab-no { width: 84px; height: 84px; border-radius: 24px; display: grid; place-items: center; text-align: center; background: linear-gradient(150deg, var(--hero-b), var(--hero-a)); color: #f3d98b; box-shadow: var(--shadow); position: relative; }
.bab-no::after { content: ""; position: absolute; inset: 6px; border-radius: 18px; border: 1px solid rgba(243, 217, 139, .35); }
.bab-no small { display: block; font-size: .62rem; letter-spacing: 2px; font-weight: 700; color: #fff; opacity: .7; }
.bab-no strong { font-family: var(--font-serif); font-size: 2rem; line-height: 1; }
.bab-head h2 { font-family: var(--font-serif); font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin: 0 0 4px; }
.bab-head .bab-ar { font-family: var(--font-ar); color: var(--accent-deep); font-size: 1.2rem; }
[data-theme="dark"] .bab-head .bab-ar { color: var(--accent); }
.bab-head p { color: var(--muted); margin: 6px 0 0; max-width: 760px; }
.bab-progress { display: inline-flex; align-items: center; gap: 8px; margin-left: 10px; font-size: .78rem; color: var(--muted); font-weight: 600; }

.soon-panel { text-align: center; padding: 60px 30px; border-radius: 28px; border: 2px dashed var(--border); background: var(--surface); }
.soon-panel .sp-ic { width: 76px; height: 76px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-deep); animation: bob 4s ease-in-out infinite; }
.soon-panel .sp-ic .ic { width: 34px; height: 34px; }
.soon-panel h3 { font-family: var(--font-serif); font-size: 1.6rem; }
.soon-panel p { color: var(--muted); max-width: 520px; margin: 0 auto 22px; }

/* ---------- Pembaca (Reader) ---------- */
.reader-hero { position: relative; min-height: 460px; display: flex; align-items: flex-end; color: #fff; overflow: hidden; isolation: isolate; }
.rh-cover { position: absolute; inset: 0; z-index: -2; }
.rh-cover > svg, .rh-cover > img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.05); animation: kenburns 30s ease-in-out infinite alternate; }
@keyframes kenburns { to { transform: scale(1.15) translate(-2%, -1%); } }
.rh-overlay { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0, 0, 0, .25) 0%, rgba(0, 0, 0, .15) 35%, rgba(0, 0, 0, .75) 100%); }
.rh-inner { padding-top: 120px; padding-bottom: 46px; }
.rh-inner .eyebrow { color: #f3d98b; }
.reader-hero h1 { font-family: var(--font-serif); font-size: clamp(2rem, 4.6vw, 3.4rem); max-width: 860px; margin: 12px 0 10px; text-shadow: 0 4px 30px rgba(0, 0, 0, .35); }
.reader-hero .rh-sub { font-size: 1.12rem; opacity: .9; max-width: 700px; }
.rh-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.rh-meta span { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 999px; background: rgba(255, 255, 255, .14); backdrop-filter: blur(8px); font-size: .84rem; font-weight: 600; }

.reader-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 50px; padding-top: 50px; padding-bottom: 40px; }
.toc { position: relative; }
.toc-card { position: sticky; top: 96px; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.toc-card h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: 2px; color: var(--muted); display: flex; gap: 8px; align-items: center; margin-bottom: 14px; }
.toc-card ol { list-style: none; padding: 0; margin: 0; counter-reset: toc; }
.toc-card li button { display: flex; gap: 10px; width: 100%; text-align: left; padding: 8px 10px; border-radius: 10px; font-size: .86rem; color: var(--muted); transition: all .2s; line-height: 1.4; }
.toc-card li button::before { counter-increment: toc; content: counter(toc, decimal-leading-zero); font-weight: 800; font-size: .72rem; color: var(--accent-deep); padding-top: 2px; }
.toc-card li button:hover { background: var(--surface-2); color: var(--text); }
.toc-card li button.active { background: var(--primary-soft); color: var(--ink); font-weight: 700; }
.toc-card .toc-foot { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); font-size: .78rem; color: var(--muted); }
.toc-card .progress { background: var(--surface-2); margin-top: 8px; height: 6px; }

.reader-body { max-width: 760px; font-size: calc(1.06rem * var(--read-scale)); }
.reader-body > * { margin-bottom: 30px; }
.reader-body p { line-height: 1.85; }
.reader-body strong { color: var(--ink); }
.b-intro { font-family: var(--font-serif); font-size: 1.28em; line-height: 1.7; color: var(--text); padding-left: 22px; border-left: 4px solid var(--accent); }
.b-intro p::first-letter { font-size: 3.2em; float: left; line-height: .9; margin: 6px 10px 0 0; color: var(--ink); font-weight: 700; }
.b-h { font-family: var(--font-serif); font-size: 1.65em; margin-top: 50px !important; margin-bottom: 18px !important; display: flex; align-items: center; gap: 14px; scroll-margin-top: 100px; }
.b-h::before { content: ""; width: 28px; height: 28px; flex: none; background: var(--accent); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1l3 5.6 5.8-2.4-2.4 5.8L24 12l-5.6 3 2.4 5.8-5.8-2.4L12 24l-3-5.6-5.8 2.4 2.4-5.8L0 12l5.6-3L3.2 3.2 9 5.6z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1l3 5.6 5.8-2.4-2.4 5.8L24 12l-5.6 3 2.4 5.8-5.8-2.4L12 24l-3-5.6-5.8 2.4 2.4-5.8L0 12l5.6-3L3.2 3.2 9 5.6z'/%3E%3C/svg%3E") center / contain no-repeat; }

.b-nash { position: relative; border-radius: var(--radius); padding: 34px 30px 26px; overflow: hidden; isolation: isolate; }
.b-nash.ayat { background: linear-gradient(150deg, var(--hero-a), var(--hero-b)); color: #fff; }
.b-nash.hadits { background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.b-nash::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .1; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cg fill='none' stroke='%23c9a24a'%3E%3Crect x='17' y='17' width='26' height='26'/%3E%3Crect x='17' y='17' width='26' height='26' transform='rotate(45 30 30)'/%3E%3C/g%3E%3C/svg%3E"); }
.b-nash .label { position: absolute; top: 14px; left: 18px; font-size: .7rem; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; display: inline-flex; gap: 6px; align-items: center; opacity: .8; }
.b-nash.ayat .label { color: #f3d98b; }
.b-nash.hadits .label { color: var(--accent-deep); }
.b-nash .arab { font-family: var(--font-ar); direction: rtl; text-align: right; font-size: calc(1.85em * var(--ar-scale, 1)); line-height: 2.1; margin: 16px 0 14px; }
.b-nash.ayat .arab { color: #fbe9b7; }
.b-nash.hadits .arab { color: var(--text); }
.b-nash .arti { font-style: italic; opacity: .92; margin-bottom: 12px; }
.b-nash .sumber { font-size: .82em; font-weight: 700; opacity: .8; display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.b-nash .tools { display: flex; gap: 6px; }
.b-nash .tools button { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, currentColor 12%, transparent); }
.b-nash .tools button .ic { width: 15px; height: 15px; }

.b-quote { position: relative; padding: 30px 30px 24px 30px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.b-quote .q-ic { position: absolute; top: -18px; left: 24px; width: 40px; height: 40px; border-radius: 12px; background: var(--primary); color: #fff; display: grid; place-items: center; }
.b-quote .arab { font-family: var(--font-ar); direction: rtl; text-align: right; font-size: calc(1.55em * var(--ar-scale, 1)); line-height: 2; color: var(--ink); margin: 6px 0 10px; }
.b-quote blockquote { margin: 0; font-family: var(--font-serif); font-style: italic; font-size: 1.1em; }
.b-quote cite { display: block; margin-top: 12px; font-style: normal; font-size: .84em; font-weight: 700; color: var(--accent-deep); }
[data-theme="dark"] .b-quote cite { color: var(--accent); }

.b-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.b-card { --c: var(--primary); padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); position: relative; overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s; }
.b-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.b-card::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 4px; background: var(--c); }
.b-card .bc-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); margin-bottom: 14px; }
.b-card .bc-ic .ic { width: 22px; height: 22px; }
.b-card h4 { font-size: 1.08em; margin-bottom: 2px; }
.b-card .bc-sub { font-size: .8em; color: var(--c); font-weight: 700; margin-bottom: 10px; display: block; }
.b-card p { font-size: .92em; color: var(--muted); margin: 0; line-height: 1.65; }
.tone-green { --c: var(--green); } .tone-amber { --c: var(--amber); } .tone-red { --c: var(--red); } .tone-blue { --c: var(--blue); } .tone-purple { --c: var(--purple); }

.b-box { border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); padding: 26px; box-shadow: var(--shadow-sm); }
.box-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.box-head .bh-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, var(--primary), var(--primary-deep)); color: #fff; flex: none; }
.box-head .bh-ic .ic { width: 22px; height: 22px; }
.box-head h4 { margin: 0; font-size: 1.1em; }
.box-head p { margin: 2px 0 0; color: var(--muted); font-size: .88em; }
.sim-badge { display: inline-flex; align-items: center; gap: 6px; font-size: .68rem; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: var(--accent-deep); margin-bottom: 2px; }
[data-theme="dark"] .sim-badge { color: var(--accent); }

/* Kartu balik */
.flip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.flip { perspective: 900px; height: 200px; cursor: pointer; }
.flip-in { position: relative; width: 100%; height: 100%; transition: transform .7s var(--ease); transform-style: preserve-3d; }
.flip.on .flip-in { transform: rotateY(180deg); }
.flip-f, .flip-b { position: absolute; inset: 0; border-radius: 16px; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 14px; }
.flip-f { background: linear-gradient(150deg, var(--primary), var(--primary-deep)); color: #fff; gap: 10px; }
.flip-f .ic { width: 34px; height: 34px; color: #f3d98b; }
.flip-f strong { font-size: .95em; line-height: 1.35; color: #fff; }
.flip-f small { font-size: .7em; opacity: .7; letter-spacing: 1px; text-transform: uppercase; }
.flip-b { background: var(--accent-soft); color: var(--text); transform: rotateY(180deg); font-size: .8em; line-height: 1.5; border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); overflow-y: auto; justify-content: flex-start; }
.flip-b::before, .flip-b::after { content: ""; margin: auto; }

/* Banding */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cmp { --c: var(--primary); border-radius: var(--radius); padding: 22px; background: color-mix(in srgb, var(--c) 7%, var(--surface)); border: 1.5px solid color-mix(in srgb, var(--c) 28%, transparent); }
.cmp h4 { display: flex; align-items: center; gap: 10px; color: var(--c); font-size: 1.1em; }
.cmp h4 .ic { width: 30px; height: 30px; padding: 6px; border-radius: 10px; background: var(--c); color: #fff; }
.cmp ul { list-style: none; padding: 0; margin: 0; }
.cmp li { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px dashed color-mix(in srgb, var(--c) 25%, transparent); font-size: .94em; }
.cmp li:last-child { border: 0; }
.cmp li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); margin-top: .62em; flex: none; }

/* Langkah */
.steps { position: relative; counter-reset: st; }
.step { position: relative; display: grid; grid-template-columns: 56px 1fr; gap: 18px; padding-bottom: 22px; }
.step::before { content: ""; position: absolute; left: 27px; top: 56px; bottom: 0; width: 2px; background: linear-gradient(var(--accent), transparent); }
.step:last-child::before { display: none; }
.step .s-no { counter-increment: st; width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; font-family: var(--font-serif); font-weight: 700; font-size: 1.5em; color: #fff; background: linear-gradient(140deg, var(--primary), var(--primary-deep)); box-shadow: 0 10px 20px -10px var(--primary); }
.step .s-no.auto::after { content: counter(st); }
.step h4 { margin: 6px 0 4px; font-size: 1.08em; }
.step p { margin: 0; color: var(--muted); font-size: .95em; }

/* Akordion */
.accordion { display: grid; gap: 10px; }
.accordion details { border-radius: 16px; background: var(--surface); border: 1px solid var(--border); overflow: hidden; transition: box-shadow .3s; }
.accordion details[open] { box-shadow: var(--shadow); }
.accordion summary { list-style: none; cursor: pointer; padding: 18px 20px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary .ic { transition: transform .35s var(--ease); color: var(--muted); }
.accordion details[open] summary .ic { transform: rotate(180deg); }
.accordion .acc-body { padding: 0 20px 18px; color: var(--muted); animation: pageIn .4s var(--ease); }

/* Catatan / callout */
.callout { --c: var(--primary); display: flex; gap: 16px; padding: 22px 24px; border-radius: var(--radius); background: color-mix(in srgb, var(--c) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 25%, transparent); }
.callout .co-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--c); color: #fff; flex: none; }
.callout h4 { margin: 2px 0 6px; color: var(--c); }
.callout p { margin: 0; }
.callout.hikmah { --c: var(--accent-deep); }
[data-theme="dark"] .callout.hikmah { --c: var(--accent); }
.callout.amalan { --c: var(--green); }
.callout.peringatan { --c: var(--red); }
.callout.info { --c: var(--blue); }

/* Ceklis */
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.checklist label { display: flex; gap: 14px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; cursor: pointer; transition: background .2s; }
.checklist label:hover { background: var(--surface-2); }
.checklist input { position: absolute; opacity: 0; }
.checklist .box { width: 24px; height: 24px; border-radius: 8px; border: 2px solid var(--border); display: grid; place-items: center; flex: none; transition: all .3s var(--ease); color: transparent; }
.checklist .box .ic { width: 15px; height: 15px; }
.checklist input:checked + .box { background: var(--green); border-color: var(--green); color: #fff; transform: scale(1.1); }
.checklist input:checked ~ span { text-decoration: line-through; color: var(--muted); }
.checklist input:focus-visible + .box { outline: 2px solid var(--accent); outline-offset: 2px; }
.cl-progress { display: flex; align-items: center; gap: 12px; margin-top: 16px; font-size: .84em; font-weight: 700; color: var(--muted); }
.cl-progress .progress { flex: 1; background: var(--surface-2); }
.cl-progress .progress i { background: linear-gradient(90deg, var(--green), #6cc28f); }

/* Kuis */
.quiz-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; font-size: .84em; color: var(--muted); font-weight: 700; }
.quiz-dots { display: flex; gap: 6px; }
.quiz-dots i { width: 26px; height: 6px; border-radius: 99px; background: var(--surface-2); transition: background .3s; }
.quiz-dots i.cur { background: var(--accent); }
.quiz-dots i.ok { background: var(--green); }
.quiz-dots i.no { background: var(--red); }
.quiz-q { font-size: 1.12em; font-weight: 700; margin-bottom: 16px; }
.quiz-opts { display: grid; gap: 10px; }
.quiz-opt { text-align: left; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface); display: flex; gap: 12px; align-items: center; transition: all .25s var(--ease); }
.quiz-opt:hover:not([disabled]) { border-color: var(--primary); transform: translateX(4px); }
.quiz-opt .letter { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); font-weight: 800; font-size: .85em; flex: none; }
.quiz-opt.correct { border-color: var(--green); background: color-mix(in srgb, var(--green) 10%, var(--surface)); }
.quiz-opt.correct .letter { background: var(--green); color: #fff; }
.quiz-opt.wrong { border-color: var(--red); background: color-mix(in srgb, var(--red) 9%, var(--surface)); animation: shake .4s; }
.quiz-opt.wrong .letter { background: var(--red); color: #fff; }
.quiz-opt[disabled] { cursor: default; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.quiz-exp { margin-top: 14px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); font-size: .92em; animation: pageIn .4s var(--ease); }
.quiz-foot { display: flex; justify-content: flex-end; margin-top: 16px; }
.quiz-result { text-align: center; padding: 10px 0; }
.quiz-result .score { font-family: var(--font-serif); font-size: 3.2em; color: var(--ink); line-height: 1; }

/* Pilah */
.pilah-card { padding: 22px 24px; border-radius: 18px; background: linear-gradient(140deg, var(--primary-soft), var(--accent-soft)); border: 1px dashed color-mix(in srgb, var(--primary) 35%, transparent); font-weight: 600; font-size: 1.05em; text-align: center; margin-bottom: 16px; animation: pageIn .45s var(--ease); }
.pilah-bins { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.pilah-bin { --c: var(--primary); display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 10px; border-radius: 16px; border: 2px solid color-mix(in srgb, var(--c) 35%, transparent); background: color-mix(in srgb, var(--c) 7%, var(--surface)); font-weight: 700; font-size: .9em; text-align: center; transition: all .25s var(--ease); }
.pilah-bin .ic { width: 26px; height: 26px; color: var(--c); }
.pilah-bin:hover:not([disabled]) { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--c); }
.pilah-bin[disabled] { cursor: default; opacity: .55; }
.pilah-bin.right { opacity: 1; background: var(--c); color: #fff; border-color: var(--c); }
.pilah-bin.right .ic { color: #fff; }
.pilah-bin.wrong { opacity: 1; animation: shake .4s; border-color: var(--red); }

/* Muhasabah */
.mh-item { padding: 14px 0; border-bottom: 1px dashed var(--border); }
.mh-item:last-of-type { border: 0; }
.mh-item p { margin: 0 0 10px; font-weight: 600; font-size: .98em; }
.mh-item p b { color: var(--accent-deep); margin-right: 6px; }
.mh-opts { display: flex; gap: 8px; flex-wrap: wrap; }
.mh-opt { padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--border); font-size: .86em; font-weight: 600; transition: all .2s var(--ease); background: var(--surface); }
.mh-opt:hover { border-color: var(--primary); }
.mh-opt.sel { background: var(--primary); border-color: var(--primary); color: #fff; transform: scale(1.04); }
.mh-bar { display: flex; align-items: center; gap: 12px; margin: 16px 0 6px; font-size: .84em; color: var(--muted); font-weight: 700; }
.mh-bar .progress { flex: 1; background: var(--surface-2); }
.mh-result { display: grid; grid-template-columns: 150px 1fr; gap: 24px; align-items: center; animation: pageIn .6s var(--ease); }
.gauge { position: relative; width: 150px; height: 150px; }
.gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge circle { fill: none; stroke-width: 12; }
.gauge .g-bg { stroke: var(--surface-2); }
.gauge .g-fg { stroke-linecap: round; transition: stroke-dashoffset 1.6s var(--ease); }
.gauge .g-val { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-serif); font-size: 2.2em; font-weight: 700; }
.mh-result h4 { font-size: 1.2em; }
.mh-note { font-size: .82em; color: var(--muted); display: flex; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }

/* Skenario */
.sc-meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.sc-meter { --c: var(--primary); padding: 12px 14px; border-radius: 14px; background: var(--surface-2); }
.sc-meter small { display: flex; justify-content: space-between; font-weight: 700; font-size: .78em; margin-bottom: 8px; }
.sc-meter small b { color: var(--c); }
.sc-meter .progress { background: color-mix(in srgb, var(--c) 15%, transparent); height: 9px; }
.sc-meter .progress i { background: var(--c); transition: width .9s var(--ease); }
.sc-meter .delta { font-size: .75em; font-weight: 800; margin-left: 6px; animation: pageIn .4s; }
.sc-meter .delta.up { color: var(--green); } .sc-meter .delta.down { color: var(--red); }
.sc-stage { display: grid; grid-template-columns: 64px 1fr; gap: 16px; align-items: start; margin-bottom: 18px; }
.sc-avatar { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: linear-gradient(135deg, #f6b26b, #f08a5d); color: #fff; position: relative; }
.sc-avatar .ic { width: 32px; height: 32px; }
.sc-avatar.shake { animation: shake .5s 2; }
.sc-bubble { position: relative; padding: 16px 18px; border-radius: 4px 18px 18px 18px; background: var(--surface-2); font-weight: 600; }
.sc-step { font-size: .74em; font-weight: 800; letter-spacing: 1.5px; color: var(--accent-deep); text-transform: uppercase; margin-bottom: 4px; display: block; }
.sc-choices { display: grid; gap: 10px; }
.sc-choice { text-align: left; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface); transition: all .25s var(--ease); display: flex; gap: 12px; align-items: flex-start; font-size: .95em; }
.sc-choice:hover:not([disabled]) { border-color: var(--primary); transform: translateX(4px); box-shadow: var(--shadow-sm); }
.sc-choice .ic { color: var(--muted); margin-top: 3px; }
.sc-choice[disabled] { opacity: .5; cursor: default; }
.sc-choice.picked { opacity: 1; border-color: var(--c); background: color-mix(in srgb, var(--c) 9%, var(--surface)); }
.sc-feedback { --c: var(--primary); margin-top: 14px; padding: 16px 18px; border-radius: 14px; border-left: 4px solid var(--c); background: color-mix(in srgb, var(--c) 8%, var(--surface)); animation: pageIn .45s var(--ease); }
.sc-feedback strong { color: var(--c); display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.nada-baik { --c: var(--green); } .nada-buruk { --c: var(--red); } .nada-campur { --c: var(--amber); }
.sc-end { text-align: center; animation: pageIn .6s var(--ease); }
.sc-end .trophy { width: 80px; height: 80px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #f3d98b, var(--accent-deep)); color: #2a1d05; animation: bob 3s ease-in-out infinite; }
.sc-end .trophy .ic { width: 38px; height: 38px; }
.sc-end .big { font-family: var(--font-serif); font-size: 3em; color: var(--ink); line-height: 1; }
.sc-history { text-align: left; display: grid; gap: 8px; margin: 18px 0; }
.sc-history div { --c: var(--primary); display: flex; gap: 10px; font-size: .88em; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--c) 8%, var(--surface)); }
.sc-history .ic { color: var(--c); margin-top: 2px; }

/* Cermin hati */
.mirror-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; }
.mirror-stage { position: relative; display: grid; place-items: center; padding: 10px; border-radius: 20px; background: radial-gradient(circle at 50% 40%, var(--primary-soft), transparent 70%); }
.mirror-stage svg { width: 100%; max-width: 280px; overflow: visible; }
.mh-base { transition: filter 1s var(--ease); }
.mh-spot { transform-box: fill-box; transform-origin: center; animation: spotIn .6s var(--ease) both; }
@keyframes spotIn { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.mh-spot.clean { animation: spotOut .9s var(--ease) both; }
@keyframes spotOut { to { transform: scale(0) rotate(90deg); opacity: 0; } }
.mh-glow { transition: opacity 1s var(--ease); }
.sparkle { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: #fff6cf; box-shadow: 0 0 12px 4px rgba(243, 217, 139, .9); pointer-events: none; animation: sparkle 1.1s var(--ease) forwards; }
@keyframes sparkle { from { transform: translate(0, 0) scale(1); opacity: 1; } to { transform: translate(var(--x), var(--y)) scale(0); opacity: 0; } }
.mirror-info h5 { font-size: 1.2em; margin: 0 0 4px; }
.mirror-info .count { color: var(--muted); font-size: .88em; font-weight: 600; }
.clarity { margin: 16px 0; }
.clarity small { display: flex; justify-content: space-between; font-weight: 700; font-size: .8em; color: var(--muted); margin-bottom: 6px; }
.clarity .progress { background: var(--surface-2); height: 10px; }
.clarity .progress i { transition: width .8s var(--ease), background .8s; }
.sim-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-sin { background: #2b2b2b; color: #fff; }
.btn-tobat { background: linear-gradient(135deg, var(--green), #48b07a); color: #fff; }
.sim-log { margin-top: 14px; min-height: 48px; font-size: .9em; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); }
.sim-log.raan { background: color-mix(in srgb, var(--red) 12%, var(--surface)); color: var(--text); border-left: 4px solid var(--red); }

/* Jurnal */
.journal textarea { width: 100%; min-height: 130px; resize: vertical; padding: 16px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface-2); outline: none; line-height: 1.7; transition: border-color .25s, box-shadow .25s; }
.journal textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); background: var(--surface); }
.journal .j-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: .8em; color: var(--muted); gap: 10px; flex-wrap: wrap; }
.journal .saved { display: inline-flex; gap: 6px; align-items: center; opacity: 0; transition: opacity .3s; color: var(--green); font-weight: 700; }
.journal .saved.on { opacity: 1; }

/* Doa */
.b-doa { text-align: center; padding: 36px 26px; border-radius: 28px; background: radial-gradient(circle at 50% 0%, var(--accent-soft), var(--surface) 70%); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.b-doa .d-label { display: inline-flex; gap: 8px; align-items: center; font-size: .72rem; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--accent-deep); }
.b-doa .arab { font-family: var(--font-ar); font-size: calc(2em * var(--ar-scale, 1)); line-height: 2; color: var(--ink); direction: rtl; margin: 12px 0 6px; }
.b-doa .latin { font-style: italic; color: var(--muted); }
.b-doa .arti { font-weight: 600; margin: 8px 0; }
.b-doa .sumber { font-size: .82em; color: var(--muted); font-weight: 700; }

.b-figure img { border-radius: var(--radius); width: 100%; }
.b-figure figcaption { font-size: .85em; color: var(--muted); text-align: center; margin-top: 8px; }
.b-video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; }
.b-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.b-list { padding-left: 1.2em; }
.b-list li { margin-bottom: 8px; }

/* Akhir bacaan */
.reader-end { max-width: 1060px; padding-bottom: 80px; }
.done-card { display: flex; align-items: center; gap: 20px; padding: 26px 28px; border-radius: 24px; background: linear-gradient(120deg, var(--primary-soft), var(--accent-soft)); border: 1px solid var(--border); flex-wrap: wrap; }
.done-card .dc-ic { width: 60px; height: 60px; border-radius: 18px; background: var(--primary); color: #fff; display: grid; place-items: center; flex: none; }
.done-card .dc-ic .ic { width: 28px; height: 28px; }
.done-card div.txt { flex: 1; min-width: 200px; }
.done-card h4 { margin: 0 0 2px; font-size: 1.15rem; }
.done-card p { margin: 0; color: var(--muted); font-size: .92rem; }
.done-card .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn.is-done { background: var(--green); }
.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 22px; }
.pn { display: flex; gap: 14px; align-items: center; padding: 18px 20px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); transition: all .3s var(--ease); }
.pn:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: var(--shadow); }
.pn.next { justify-content: flex-end; text-align: right; grid-column: 2; }
.pn small { color: var(--muted); font-weight: 700; font-size: .74rem; text-transform: uppercase; letter-spacing: 1px; }
.pn strong { display: block; font-size: .96rem; line-height: 1.35; }
.pn .ic { width: 22px; height: 22px; color: var(--ink); flex: none; }
.pn.disabled { opacity: .5; pointer-events: none; }

.reader-tools { position: fixed; right: 20px; bottom: 24px; z-index: 90; display: flex; flex-direction: column; gap: 8px; padding: 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); transform: translateY(20px); opacity: 0; pointer-events: none; transition: all .4s var(--ease); }
.reader-tools.show { transform: none; opacity: 1; pointer-events: auto; }
.reader-tools button { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .82rem; transition: background .2s; }
.reader-tools button:hover { background: var(--surface-2); }
.reader-tools button.on { background: var(--primary); color: #fff; }
body.focus-mode .toc { display: none; }
body.focus-mode .reader-grid { grid-template-columns: minmax(0, 1fr); }
body.focus-mode .reader-body { margin: 0 auto; }

/* ---------- Drawer pengaturan ---------- */
.overlay { position: fixed; inset: 0; z-index: 140; background: rgba(8, 12, 10, .45); backdrop-filter: blur(3px); opacity: 0; visibility: hidden; transition: all .35s var(--ease); }
.overlay.show { opacity: 1; visibility: visible; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 150; width: min(400px, 100%); background: var(--bg); border-left: 1px solid var(--border); box-shadow: var(--shadow-lg); transform: translateX(105%); transition: transform .45s var(--ease); display: flex; flex-direction: column; }
.drawer.show { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--border); }
.drawer-head h3 { margin: 0; font-size: 1.15rem; display: flex; gap: 10px; align-items: center; }
.drawer-body { padding: 8px 22px 30px; overflow-y: auto; }
.set-group { padding: 18px 0; border-bottom: 1px solid var(--border); }
.set-group:last-child { border: 0; }
.set-group h4 { font-size: .76rem; text-transform: uppercase; letter-spacing: 2px; color: var(--muted); margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.palette-list { display: grid; gap: 10px; }
.pal { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 16px; border: 1.5px solid var(--border); background: var(--surface); text-align: left; transition: all .25s var(--ease); }
.pal:hover { border-color: var(--primary); }
.pal.active { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.pal .sw { display: flex; flex: none; }
.pal .sw i { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--surface); margin-left: -8px; box-shadow: var(--shadow-sm); }
.pal .sw i:first-child { margin-left: 0; }
.pal strong { display: block; font-size: .92rem; }
.pal small { color: var(--muted); font-size: .78rem; }
.pal .ck { margin-left: auto; color: var(--primary); opacity: 0; }
.pal.active .ck { opacity: 1; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 5px; border-radius: 14px; background: var(--surface-2); }
.seg button { padding: 10px 6px; border-radius: 10px; font-size: .84rem; font-weight: 600; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--muted); transition: all .25s; }
.seg button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.sound-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.snd { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface); font-size: .86rem; font-weight: 600; text-align: left; transition: all .25s var(--ease); }
.snd:hover { border-color: var(--primary); }
.snd .ic { color: var(--ink); }
.snd.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.snd.active .ic { color: #fff; }
.snd.off { grid-column: 1 / -1; justify-content: center; }
.range-row { display: flex; align-items: center; gap: 12px; margin-top: 14px; color: var(--muted); }
input[type="range"] { -webkit-appearance: none; appearance: none; flex: 1; height: 6px; border-radius: 99px; background: var(--surface-2); outline: none; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--primary); border: 3px solid var(--surface); box-shadow: var(--shadow-sm); cursor: pointer; }
input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--primary); border: 3px solid var(--surface); cursor: pointer; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; font-weight: 600; font-size: .92rem; }
.toggle-row small { display: block; color: var(--muted); font-weight: 500; font-size: .78rem; }
.switch { position: relative; width: 48px; height: 28px; border-radius: 99px; background: var(--border); transition: background .25s; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .3s var(--ease); }
.switch.on { background: var(--primary); }
.switch.on::after { transform: translateX(20px); }
.set-note { font-size: .78rem; color: var(--muted); margin-top: 10px; display: flex; gap: 8px; }

/* ---------- Pencarian ---------- */
.search-modal { position: fixed; inset: 0; z-index: 160; display: flex; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px; background: rgba(8, 12, 10, .5); backdrop-filter: blur(6px); opacity: 0; visibility: hidden; transition: all .3s var(--ease); }
.search-modal.show { opacity: 1; visibility: visible; }
.search-panel { width: min(640px, 100%); border-radius: 22px; background: var(--bg); border: 1px solid var(--border); box-shadow: var(--shadow-lg); overflow: hidden; transform: translateY(-14px) scale(.98); transition: transform .35s var(--ease); }
.search-modal.show .search-panel { transform: none; }
.search-input { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.search-input .ic { color: var(--muted); width: 22px; height: 22px; }
.search-input input { flex: 1; border: 0; outline: none; background: none; font-size: 1.05rem; }
.search-input kbd { font-size: .72rem; padding: 3px 8px; border-radius: 6px; background: var(--surface-2); color: var(--muted); font-family: inherit; }
.search-results { max-height: 55vh; overflow-y: auto; padding: 8px; }
.sr-group { font-size: .72rem; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); padding: 12px 12px 6px; }
.sr-item { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 14px; transition: background .2s; }
.sr-item:hover, .sr-item.sel { background: var(--surface-2); }
.sr-item .si { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--ink); flex: none; }
.sr-item strong { display: block; font-size: .94rem; }
.sr-item small { color: var(--muted); font-size: .8rem; }
.sr-item mark { background: var(--accent-soft); color: inherit; border-radius: 3px; padding: 0 2px; }

/* ---------- Toast & Konfeti ---------- */
.toast { position: fixed; left: 50%; bottom: 30px; z-index: 180; transform: translate(-50%, 30px); opacity: 0; padding: 13px 20px; border-radius: 999px; background: #18221f; color: #fff; font-weight: 600; font-size: .9rem; display: flex; gap: 10px; align-items: center; box-shadow: var(--shadow-lg); transition: all .4s var(--ease); pointer-events: none; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast .ic { color: var(--accent); }
.confetti { position: fixed; top: -12px; z-index: 190; width: 10px; height: 14px; border-radius: 2px; pointer-events: none; animation: fall linear forwards; }
@keyframes fall { to { transform: translate(var(--dx), 110vh) rotate(var(--r)); } }

/* ---------- Tentang ---------- */
.logo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.logo-tile { border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); overflow: hidden; display: flex; flex-direction: column; }
.logo-tile .lt-view { height: 250px; display: flex; align-items: center; justify-content: center; padding: 26px; background: var(--surface-2); }
.logo-tile .lt-view.dark { background: linear-gradient(140deg, var(--hero-a), var(--hero-b)); }
.logo-tile .lt-view img { max-height: 100%; max-width: 100%; width: auto; height: auto; object-fit: contain; }
.logo-tile .lt-info { padding: 16px 18px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.logo-tile strong { font-size: .95rem; }
.logo-tile small { display: block; color: var(--muted); font-size: .8rem; }
.pal-show { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.pal-card { border-radius: 18px; overflow: hidden; border: 1px solid var(--border); background: var(--surface); text-align: left; transition: transform .3s var(--ease), box-shadow .3s; }
.pal-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.pal-card .pc-sw { display: grid; grid-template-columns: 2fr 1fr 1fr; height: 80px; }
.pal-card .pc-info { padding: 12px 14px; }
.pal-card strong { font-size: .88rem; display: block; }
.pal-card small { color: var(--muted); font-size: .74rem; font-family: ui-monospace, monospace; }
.vm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.vm-card { padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.vm-card h3 { display: flex; gap: 12px; align-items: center; font-family: var(--font-serif); }
.vm-card h3 .ic { width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: var(--primary-soft); color: var(--ink); }
.vm-card ul { padding-left: 1.1em; color: var(--muted); margin: 0; }
.vm-card li { margin-bottom: 8px; }
.contact-list { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Footer ---------- */
.site-footer { position: relative; color: var(--on-hero); background: var(--hero-a); padding: 70px 0 28px; overflow: hidden; isolation: isolate; }
.site-footer .pattern-layer { opacity: .05; mask-image: none; -webkit-mask-image: none; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; }
.foot-brand img { width: 260px; max-width: 100%; margin-bottom: 16px; }
.foot-brand p { opacity: .7; font-size: .9rem; max-width: 340px; }
.site-footer h5 { font-size: .78rem; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); margin: 6px 0 16px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.site-footer li a { opacity: .78; font-size: .92rem; transition: opacity .2s; display: inline-flex; align-items: center; gap: 8px; }
.site-footer li a:hover { opacity: 1; color: #f3d98b; }
.socials { display: flex; gap: 8px; margin-top: 16px; }
.socials a { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .08); transition: all .25s; }
.socials a:hover { background: var(--accent); color: #2a1d05; transform: translateY(-3px); }
.foot-bottom { margin-top: 50px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .1); display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: .84rem; opacity: .7; }
.foot-ar { font-family: var(--font-ar); font-size: 1.1rem; color: var(--accent); }

/* ---------- Responsif ---------- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; text-align: left; }
  .hero-visual { max-width: 340px; order: -1; margin-bottom: -10px; }
  .float-card { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .reader-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .toc { display: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .pal-show { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .main-nav { display: none; }
  .site-header { height: 64px; }
  .brand img { width: 38px; height: 38px; }
  .brand-text strong { font-size: 1.1rem; }
  .brand-text small { font-size: .58rem; letter-spacing: .6px; white-space: nowrap; }
  .bottom-nav { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 95; padding: 6px; border-radius: 22px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--border); box-shadow: var(--shadow-lg); }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 4px; border-radius: 16px; font-size: .68rem; font-weight: 700; color: var(--muted); transition: all .25s var(--ease); }
  .bottom-nav a .ic { width: 22px; height: 22px; }
  .bottom-nav a.active { color: #fff; background: var(--primary); }
  body { padding-bottom: 86px; }
  .reader-tools { bottom: 100px; right: 14px; }
  .toast { bottom: 104px; }
  .pillars, .ulama-grid, .about, .vm-grid { grid-template-columns: 1fr; }
  .usia-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 380px; }
  .book-hero { grid-template-columns: 1fr; gap: 26px; }
  .book-hero .book-cover { max-width: 180px; }
  .logo-grid { grid-template-columns: 1fr; }
  .mirror-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .hero { padding: 100px 0 100px; }
  .bismillah { font-size: 1.35rem; }
  .section { padding: 60px 0; }
  .stats { gap: 10px; }
  .stat { padding: 16px; flex-direction: column; align-items: flex-start; gap: 10px; }
  .stat strong { font-size: 1.6rem; }
  .pillar { padding: 28px; min-height: 0; }
  .compare { grid-template-columns: 1fr; }
  .prevnext { grid-template-columns: 1fr; }
  .pn.next { grid-column: auto; }
  .mh-result { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .b-nash { padding: 34px 20px 22px; }
  .b-box { padding: 20px; }
  .bab-head { grid-template-columns: 1fr; gap: 14px; }
  .bab-no { width: 64px; height: 64px; border-radius: 18px; }
  .bab-no strong { font-size: 1.5rem; }
  .card-grid { grid-template-columns: 1fr; }
  .book-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .foot-grid { grid-template-columns: 1fr; }
  .pal-show { grid-template-columns: repeat(2, 1fr); }
  .cta-band { padding: 28px; }
  .reader-hero { min-height: 400px; }
  .sound-list { grid-template-columns: 1fr; }
  .flip-grid { grid-template-columns: repeat(2, 1fr); }
  .tl-bar { font-size: .66rem; padding: 0 8px; }
}

/* Kurangi animasi */
html.reduce-motion *, html.reduce-motion *::before, html.reduce-motion *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
html.reduce-motion .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html:not(.force-motion) *, html:not(.force-motion) *::before, html:not(.force-motion) *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html:not(.force-motion) .reveal { opacity: 1; transform: none; }
}
@media print {
  .site-header, .bottom-nav, .reader-tools, .site-footer, .toc, .reader-end .actions, .read-progress { display: none !important; }
  .reader-hero { min-height: 0; color: #000; }
  .rh-cover, .rh-overlay { display: none; }
}
