/* ============================================================
   PERISAI MUSLIM — STYLE.CSS
   Dikongsi oleh index.html dan semua halaman bab (N-doa-xxx.html)
   ============================================================ */

:root {
  --bg-page: #f9fafb;
  --bg-card: #ffffff;
  --bg-soft: #f8fafc;
  --ink: #1a1a2e;
  --ink-meta: #6b7280;
  --line: #e5e7eb;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #eff6ff;
  --radius-card: 12px;
  --radius-item: 10px;
  --max-width: 800px;
  --font-scale: 1;
}

/* ===== Mod Gelap ===== */
[data-theme="dark"] {
  --bg-page: #0f1115;
  --bg-card: #1a1d23;
  --bg-soft: #23272f;
  --ink: #e8eaed;
  --ink-meta: #9aa0a6;
  --line: #2e333b;
  --accent: #60a5fa;
  --accent-hover: #93c5fd;
  --accent-soft: #1e3a5f;
}
html { color-scheme: light dark; }
html[data-theme="dark"] { color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }

.theme-toggle {
  margin-left: 0.75rem;
  padding: 0.35rem 0.7rem;
  font-size: 0.85rem;
  font-family: inherit;
  border: 1px solid var(--line);
  border-radius: var(--radius-item);
  background: var(--bg-card);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  vertical-align: middle;
}
.theme-toggle:hover {
  background: var(--bg-soft);
}

/* Mobile: dark mode icon-only (hide label, keep 44px touch target) */
@media (max-width: 768px) {
  .theme-toggle .theme-label { display: none; }
  .theme-toggle { padding: 0.4rem 0.6rem; min-width: 44px; min-height: 44px; }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  padding: 48px 20px 72px;
  background: var(--bg-page);
  color: var(--ink);
  font-family: "Poppins", "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 40px 40px 48px;
}

/* ---------- identity ---------- */

.site-title {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.site-subtitle {
  margin: 0 0 32px;
  color: var(--ink-meta);
  font-size: 14px;
}

/* ---------- TOC ---------- */

.toc {
  margin: 0 0 40px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--bg-soft);
}

.toc-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 0 16px 0;
  padding: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--line);
}

.toc-tabs::-webkit-scrollbar { display: none; }

.toc-tab {
  flex: 0 0 auto;
  padding: 8px 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-meta);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.toc-tab:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.toc-tab.active {
  background: var(--accent);
  color: var(--bg-card);
}

.toc-tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.toc-panel { display: none; }
.toc-panel.active { display: block; }
.toc-panel[hidden] { display: none; }

.toc-panel .toc-list {
  columns: 2;
  column-gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  line-height: 1.9;
}

.toc-panel .toc-list li { break-inside: avoid; }

.search-container { margin-top: 8px; }

.search-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-item);
  background: var(--bg-card);
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.search-results {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  max-height: 400px;
  overflow-y: auto;
}

.search-results li {
  padding: 0;
  border-bottom: 1px solid var(--line);
}

.search-results li:last-child { border-bottom: 0; }

.search-results a {
  display: block;
  padding: 10px 4px;
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.5;
}

.search-results a:hover { background: var(--accent-soft); }

.search-results mark {
  background: #fef3c7;
  color: inherit;
  padding: 0 2px;
  border-radius: 2px;
}

.search-empty {
  margin: 16px 0 0;
  color: var(--ink-meta);
  font-size: 14px;
  text-align: center;
}

@media (max-width: 768px) {
  .toc-panel .toc-list { columns: 1; }
  .toc-tab { font-size: 12px; padding: 7px 12px; }
}

.toc-title {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 600;
}

.toc-list {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 2;
  column-gap: 32px;
  font-size: 14px;
  line-height: 1.9;
}

.toc-list li { break-inside: avoid; }
.toc-list a { color: var(--accent); text-decoration: none; }
.toc-list a:hover { text-decoration: underline; }

@media (max-width: 768px) {
  .toc-list { columns: 1; }
}

/* ---------- article (satu bab) ---------- */

.bab {
  padding-bottom: 40px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 20px;
  content-visibility: auto;
  contain-intrinsic-size: 0 1200px;
}

.bab:last-of-type { border-bottom: 0; margin-bottom: 0; }

.bab-header {
  padding-bottom: 12px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--accent);
}

.bab-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.bab-title .theme-toggle {
  margin-left: 0; /* Buang margin asal */
  flex-shrink: 0;
  margin-top: 2px; /* Selaraskan sedikit dengan baris pertama teks */
}

/* ---------- doa dalam bab ---------- */

.doa {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-item);
  padding: 24px;
}

.doa + .doa { margin-top: 24px; }

.doa-label {
  display: inline-block;
  margin: 0 0 16px;
  padding: 2px 10px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* ---------- arabic ---------- */

.arabic {
  margin: 0 0 10px;
  font-family: "Noto Naskh Arabic", "Traditional Arabic", serif;
  font-size: calc(26px * var(--font-scale));
  line-height: 1.95;
  direction: rtl;
  text-align: right;
  color: var(--ink);
}

.arabic:last-child { margin-bottom: 0; }

.arabic + .translation,
.arabic + .instruction,
.arabic + .steps,
.arabic + .rumi-toggle,
.arabic + .rumi-content { margin-top: 14px; }

/* ---------- Rumi toggle ---------- */

.rumi-toggle,
.toc-list a,
.back-to-top {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.rumi-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 12px;
  padding: 4px 12px;
  background: var(--bg-card);
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.rumi-toggle:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.rumi-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.rumi-icon {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  transform: translateY(-1px);
}

.rumi-content {
  margin: 0 0 16px;
  padding: 14px 18px;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-item) var(--radius-item) 0;
  font-size: calc(15px * var(--font-scale));
  font-style: italic;
  color: var(--ink);
  line-height: 1.7;
}

.rumi-content[hidden] { display: none; }
.rumi-content p { margin: 0; }

/* ---------- malay text ---------- */

.translation,
.note-text {
  margin: 0 0 16px;
  font-size: calc(16px * var(--font-scale));
  line-height: 1.7;
}

.translation:last-child,
.note-text:last-child { margin-bottom: 0; }

.instruction {
  margin: 0 0 16px;
  font-size: calc(16px * var(--font-scale));
  line-height: 1.65;
}

.steps {
  margin: 0 0 16px;
  padding-left: 20px;
  font-size: calc(16px * var(--font-scale));
  line-height: 1.7;
}

.steps li + li { margin-top: 8px; }
.steps li::marker { color: var(--accent); font-weight: 600; }

/* ---------- sub-tajuk dalam bab ---------- */

.sub-bab {
  margin: 32px 0 16px;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.sub-bab:first-of-type { margin-top: 0; }

/* ---------- footnotes ---------- */

.footnotes {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--ink-meta);
  font-size: 13px;
  line-height: 1.65;
}

.footnotes-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 12px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.footnote { margin: 0 0 8px; }
.footnote:last-child { margin-bottom: 0; }

.footnote .marker {
  font-weight: 600;
  color: var(--accent);
  margin-right: 4px;
}

.footnote .hisn-ref {
  color: var(--accent);
  font-weight: 600;
}

/* Footnote reference (superscript link) — Mock 2 style */
.fn-ref {
  vertical-align: super;
  font-size: 0.75em;
  line-height: 0;
  color: #0066cc;
  text-decoration: none;
  font-weight: normal;
  margin-left: 0.15em;
  margin-right: 0.05em;
  transition: color 0.15s ease, text-decoration 0.15s ease;
}

.fn-ref:hover {
  color: #004499;
  text-decoration: underline;
}

.fn-ref:focus-visible {
  outline: 2px solid #0066cc;
  outline-offset: 2px;
  border-radius: 2px;
}

/* Footnote back-link */
.fn-backref {
  text-decoration: none;
  color: #0066cc;
  margin-left: 0.5em;
  font-size: 0.9em;
}

.fn-backref:hover {
  text-decoration: underline;
}

/* Footnotes section — Mock 2 classic style */
.footnotes {
  border-top: 2px solid var(--ink);
  font-family: inherit;
}

.footnotes-title {
  font-family: "Poppins", "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-align: center;
  margin-bottom: 16px;
}

/* ---------- document foot ---------- */

.summary {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--ink-meta);
  font-size: 13px;
  line-height: 1.7;
}

/* ---------- back to top button ---------- */

.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  z-index: 999;
  padding: 0;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease,
              box-shadow 0.2s ease, transform 0.2s ease;
}

.back-to-top:hover {
  background: var(--accent);
  color: var(--bg-card);
  border-color: var(--accent);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
  transform: translateY(-2px);
}

.back-to-top:active { transform: translateY(0); }

.back-to-top:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.back-to-top svg {
  width: 20px;
  height: 20px;
  display: block;
}

@media (max-width: 768px) {
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
  }
  .back-to-top svg { width: 18px; height: 18px; }
}

/* ---------- responsive ---------- */

@media (max-width: 768px) {
  body { padding: 24px 12px 48px; font-size: 14.5px; }
  .container { padding: 24px 18px 32px; }
  .site-title { font-size: 22px; }
  .bab-title { font-size: 18px; }
  .doa { padding: 18px; }
  .arabic { font-size: calc(22px * var(--font-scale)); line-height: 2; }
  .bab { padding-bottom: 28px; margin-bottom: 28px; }
  .rumi-content { padding: 12px 14px; font-size: calc(14px * var(--font-scale)); }
  .translation,
  .instruction,
  .steps { font-size: calc(14.5px * var(--font-scale)); }

  .rumi-toggle,
  .toc-list a,
  .back-to-top {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
  }
}

/* --- PWA Install Banner --- */
.pwa-install-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  margin: 0 0 24px 0;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--radius-card);
  position: relative;
}

.pwa-install-banner[hidden] { display: none !important; }

.pwa-install-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink);
}

.pwa-install-text strong {
  color: var(--accent);
  font-weight: 600;
}

.pwa-install-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--accent);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease;
  min-height: 44px;
}

.pwa-install-btn:hover { background: var(--accent-hover); }

.pwa-dismiss-btn {
  background: none;
  border: none;
  color: var(--ink-meta);
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  transition: background 0.15s ease, color 0.15s ease;
}

.pwa-dismiss-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--ink);
}

@media (max-width: 768px) {
  .pwa-install-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
  }
  .pwa-install-btn {
    width: 100%;
    justify-content: center;
  }
  .pwa-dismiss-btn {
    position: absolute;
    top: 12px;
    right: 12px;
  }
}

/* ---------- Butang Salin/Kongsi ---------- */

.bab-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.bab-copy,
.bab-share,
.kad-copy {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--accent);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  min-height: 44px;
  min-width: 44px;
}

.bab-copy:hover,
.bab-share:hover,
.kad-copy:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.bab-copy:focus-visible,
.bab-share:focus-visible,
.kad-copy:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.bab-copy.copied,
.kad-copy.copied {
  background: #dcfce7;
  border-color: #16a34a;
  color: #166534;
}

[data-theme="dark"] .bab-copy.copied,
[data-theme="dark"] .kad-copy.copied {
  background: #14532d;
  border-color: #4ade80;
  color: #bbf7d0;
}

.kad-copy {
  float: right;
  margin: 0 0 8px 8px;
  font-size: 12px;
  padding: 6px 12px;
  min-height: 44px;
  min-width: 44px;
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: var(--bg-card);
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 10000;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 768px) {
  .bab-actions { gap: 6px; }
  .bab-copy,
  .bab-share {
    font-size: 12px;
    padding: 8px 12px;
    min-height: 44px;
    min-width: 44px;
  }
  .kad-copy {
    font-size: 11px;
    padding: 6px 10px;
    min-height: 44px;
    min-width: 44px;
  }
}

/* ---------- Floating Font Controls ---------- */

.floating-font-controls {
  position: fixed;
  bottom: 90px;
  right: 32px;
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  z-index: 998;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.floating-font-controls:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.font-btn {
  width: 44px;
  height: 44px;
  padding: 0;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.font-btn:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.font-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.font-btn.active {
  background: var(--accent);
  color: var(--bg-card);
}

@media (max-width: 768px) {
  .floating-font-controls {
    bottom: 72px;
    right: 20px;
  }
  .font-btn {
    width: 44px;
    height: 44px;
    font-size: 13px;
  }
}

/* ---------- Hubungi Admin ---------- */

.contact-admin {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  font-size: 14px;
}

.contact-admin-label {
  color: var(--ink-meta);
  font-weight: 600;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  min-height: 44px;
  min-width: 44px;
}

.contact-btn:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.contact-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.contact-btn.whatsapp { color: #16a34a; }
.contact-btn.whatsapp:hover {
  background: #dcfce7;
  border-color: #16a34a;
}

[data-theme="dark"] .contact-btn.whatsapp:hover {
  background: #14532d;
}

@media (max-width: 768px) {
  .contact-admin {
    flex-direction: column;
    align-items: flex-start;
  }
  .contact-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ============================================================
   INDEX.HTML — HERO CAROUSEL + TOC ACCORDION (Mock 4 Final)
   ============================================================ */

/* ---------- Hero Carousel ---------- */
.hero-carousel-wrapper {
  position: relative;
  margin-bottom: 32px;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--radius-card);
  padding: 24px 40px 24px 24px;
  overflow: hidden;
}

.hero-carousel {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 16px;
  padding-bottom: 8px;
}
.hero-carousel::-webkit-scrollbar { display: none; }

.hero-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 24px;
  text-align: center;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-height: 380px;
}

.hero-slide-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
  align-self: center;
}

.hero-slide-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 16px 0;
  line-height: 1.4;
}

.hero-slide .arabic {
  font-size: 1.9rem;
  line-height: 1.8;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 0;
}

.hero-slide .translation {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-meta);
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

.hero-slide .btn-hero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(37,99,235,0.3);
  transition: background 0.2s, transform 0.2s;
  align-self: center;
  margin-top: auto;
  min-height: 44px;
}
.hero-slide .btn-hero:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

/* Carousel Nav Buttons (Desktop sahaja) */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--line);
  color: var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: background 0.2s, color 0.2s;
  min-height: 44px;
  min-width: 44px;
}
.carousel-btn:hover {
  background: var(--accent);
  color: #fff;
}
.carousel-btn.prev { left: 8px; }
.carousel-btn.next { right: 8px; }

/* ---------- Dots Indicator ---------- */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}

.carousel-dot.active {
  background: var(--accent);
  transform: scale(1.3);
}

/* ---------- TOC Accordion ---------- */
.toc-accordion {
  margin: 0 0 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--bg-card);
  overflow: hidden;
}
.toc-accordion summary {
  padding: 16px 20px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink);
  background: var(--bg-soft);
  min-height: 44px;
}
.toc-accordion summary::-webkit-details-marker { display: none; }
.toc-accordion summary::after {
  content: '▼';
  font-size: 12px;
  transition: transform 0.2s;
}
.toc-accordion[open] summary::after {
  transform: rotate(180deg);
}
.toc-accordion .toc-content {
  padding: 20px;
}

/* ---------- Tab TOC (5 Tab) ---------- */
.toc-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 16px 0;
  padding: 4px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--line);
}

.toc-tab {
  flex: 0 0 auto;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-meta);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
  min-height: 36px;
}
.toc-tab:hover { background: var(--accent-soft); color: var(--accent); }
.toc-tab.active { background: var(--accent); color: var(--bg-card); }

/* ---------- Carian (di bawah tab) ---------- */
.search-container { margin: 0 0 16px; }

.search-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-item);
  background: var(--bg-card);
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ---------- Senarai TOC (dikongsi tab & carian) ---------- */
.toc-shared-list {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 24px;
  font-size: 14px;
  line-height: 1.9;
}
.toc-shared-list li { break-inside: avoid; padding: 2px 0; }
.toc-shared-list a { color: var(--accent); text-decoration: none; }
.toc-shared-list a:hover { text-decoration: underline; }
.toc-shared-list li.hidden { display: none; }

.search-empty-msg {
  margin: 16px 0 0;
  color: var(--ink-meta);
  font-size: 14px;
  text-align: center;
}

/* ---------- Sembunyikan font controls di index ---------- */
.is-index .floating-font-controls { display: none; }

/* ---------- Font terjemahan: sans-serif (inherit) ---------- */
.translation, .instruction, .note-text {
  font-family: inherit;
}

/*