/* ═══════════════════════════════════════════════
   FONT — Plus Jakarta Sans (variable, self-hosted/offline)
   ═══════════════════════════════════════════════ */
@font-face {
    font-family: 'Plus Jakarta Sans';
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url('/fonts/plus-jakarta-var.woff2') format('woff2');
}

/* ═══════════════════════════════════════════════
   DESIGN TOKENS — NurAI Muslim+ · Mihrab × Bento
   Sumber: NurAI Design System (prototype Beranda)
   Arsitektur: token kanonik → alias legacy.
   Tema: :root = dark (default) · body.light-mode = terang
         body[data-theme="kabah"|"royal"] = varian (via theme.js)
   ═══════════════════════════════════════════════ */
:root {
    /* ── Surfaces ── */
    --bg:            #0a1814;   /* latar terdalam */
    --bg-2:          #0f211a;   /* latar sekunder */
    --surface:       #163024;   /* kartu */
    --surface-2:     #1d3e2e;   /* kartu terang / gradien atas */
    --surface-3:     #244830;   /* hover / chip */
    --bg-deep:       #05100a;

    /* ── Gold (identitas brand) ── */
    --gold:          #d4af37;
    --gold-br:       #e9c869;   /* bright — hero & arab */
    --gold-dp:       #a8893e;   /* deep — gradien bawah */
    --gold-tint:     rgba(212, 175, 55, 0.14);
    --gold-tint-2:   rgba(212, 175, 55, 0.06);
    --gold-border:   rgba(212, 175, 55, 0.32);
    --gold-line:     rgba(212, 175, 55, 0.18);
    --line:          rgba(212, 175, 55, 0.16);
    --glow:          rgba(212, 175, 55, 0.12);

    /* ── Palet aksen (personality tiles) ── */
    --emerald:       #1f6048;
    --emerald-deep:  #0c2a1f;
    --coral:         #c25a3d;
    --coral-deep:    #6e2f1e;
    --plum:          #5a3560;
    --plum-deep:     #2e1730;
    --teal:          #1a8a7d;
    --teal-deep:     #0c4a3d;
    --paper:         #f5f0e8;
    --paper-deep:    #d9c89a;
    --ink:           #14120c;

    /* ── Teks ── */
    --t1:            #f3efe2;
    --t2:            #97a89b;
    --t3:            #5e7466;
    --scripture:     #e9c869;   /* teks Arab (ayat/doa) */

    /* ── Logo 03·PLUS (konstanta brand — pill TETAP emas di semua tema) ── */
    --logo-fg:       #ffffff;
    --brand-gold:    #d4af37;
    --brand-ink:     #14120c;

    /* ── Garis & bayangan ── */
    --border:        rgba(255, 255, 255, 0.06);
    --shadow:        0 12px 36px rgba(0, 0, 0, 0.5);
    --shadow-sm:     0 4px 16px rgba(0, 0, 0, 0.35);

    /* ── Radius (lengkung mihrab = bawah lebih besar) ── */
    --radius-xl:     20px;
    --radius-lg:     16px;
    --radius-md:     12px;
    --radius-sm:     8px;
    --radius-full:   9999px;
    --arch-sm:       8px 8px 14px 14px;
    --arch-md:       10px 10px 18px 18px;
    --arch-lg:       12px 12px 22px 22px;
    --arch-hero:     8px 8px 22px 22px;

    /* ── Tipografi ── */
    --font-ui:       'Inter', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display:  'Reem Kufi', 'Inter', sans-serif;
    --font-serif:    'Cormorant Garamond', Georgia, serif;
    --font-mono:     'JetBrains Mono', ui-monospace, monospace;
    --font-arabic:   'Scheherazade New', 'Amiri', serif;
    --font-body:     var(--font-ui);
    --green-hover:   #27775a;
}

/* ── Terang (toggle lama script.js — WAJIB body.light-mode) ── */
body.light-mode {
    --bg:            #f5f0e8;   /* paper/krem */
    --bg-2:          #ece4d2;
    --surface:       #fffdf8;
    --surface-2:     #f6f0e2;
    --surface-3:     #eee5d0;
    --bg-deep:       #e7dec9;

    --gold:          #9a7b14;   /* gold tua — kontras di latar terang */
    --gold-br:       #b8941f;
    --gold-dp:       #8a6f1a;
    --gold-tint:     rgba(154, 123, 20, 0.12);
    --gold-tint-2:   rgba(154, 123, 20, 0.05);
    --gold-border:   rgba(154, 123, 20, 0.30);
    --gold-line:     rgba(154, 123, 20, 0.20);
    --line:          rgba(154, 123, 20, 0.18);
    --glow:          rgba(154, 123, 20, 0.10);

    --emerald:       #0f6a4b;
    --emerald-deep:  #0a4a34;
    --coral:         #b04c30;
    --coral-deep:    #8a3a24;
    --plum:          #6d4a73;
    --plum-deep:     #533458;
    --teal:          #117a6e;
    --teal-deep:     #0c5a50;
    --paper-deep:    #e2d4ae;

    --t1:            #1b2a20;
    --t2:            #4a564b;
    --t3:            #7d8a7e;
    --scripture:     #1b2d22;

    --border:        rgba(20, 40, 28, 0.08);
    --shadow:        0 10px 30px rgba(40, 34, 18, 0.10);
    --shadow-sm:     0 4px 14px rgba(40, 34, 18, 0.07);
    --green-hover:   #13855e;
    --logo-fg:       var(--ink);   /* wordmark gelap di latar terang; pill tetap emas */
}

/* ── Varian tema (dipilih via theme.js → body[data-theme]) ──
   Default tanpa atribut = "mihrab" (prototype). Tiap varian hanya
   menimpa token kanonik; seluruh komponen mengalir otomatis. */
body[data-theme="kabah"] {
    --bg:            #070707;
    --bg-2:          #111111;
    --surface:       #161616;
    --surface-2:     #1e1e1e;
    --surface-3:     #262626;
    --bg-deep:       #000000;
    --gold:          #c9a227;
    --gold-br:       #e6c766;
    --gold-dp:       #9c7f1e;
    --emerald:       #2a2a2a;
    --emerald-deep:  #141414;
    --t1:            #f2efe6;
    --t2:            #b5b5ad;
    --t3:            #76766e;
    --scripture:     #e6c766;
}
body.light-mode[data-theme="kabah"] {
    --bg:            #f6f6f4;
    --bg-2:          #ebebe7;
    --surface:       #ffffff;
    --surface-2:     #f3f3ef;
    --surface-3:     #eaeae4;
    --bg-deep:       #e2e2dc;
    --gold:          #9c7f1e;
    --gold-br:       #b8941f;
    --gold-dp:       #8a6f1a;
    --emerald:       #3a3a3a;
    --emerald-deep:  #242424;
    --t1:            #161613;
    --t2:            #4b4b46;
    --t3:            #82827a;
    --scripture:     #2a2418;
}
body[data-theme="royal"] {
    --bg:            #041E12;
    --bg-2:          #0A2A18;
    --surface:       #0D341F;
    --surface-2:     #114226;
    --surface-3:     #15502d;
    --bg-deep:       #02140B;
    --emerald:       #1f7a52;
    --emerald-deep:  #0c3a26;
}
body.light-mode[data-theme="royal"] {
    --bg:            #F4F1E7;
    --bg-2:          #EAE4D4;
    --surface:       #FFFFFF;
    --surface-2:     #F1ECDF;
    --surface-3:     #E9E2CE;
    --bg-deep:       #E2DAC6;
    --emerald:       #0C6B47;
    --emerald-deep:  #094F34;
}

/* ── Alias legacy (CSS komponen lama tetap mengalir) ──
   PENTING: dideklarasikan di `:root, body` — alias yang hanya di :root
   ter-resolve sekali di <html>, sehingga override tema di level <body>
   (light-mode / data-theme) tidak ikut mengalir ke alias. */
:root, body {
    --bg-card:       var(--surface);
    --bg-card-2:     var(--bg-2);
    --bg-main:       var(--bg);
    --bg-input:      var(--bg-2);
    --card-bg:       var(--surface);
    --gold-muted:    var(--gold-dp);
    --gold-dim:      var(--gold-dp);
    --green:         var(--emerald);
    --green-btn:     var(--emerald);
    --accent:        var(--emerald);
    --cream:         var(--paper);
    --cream-border:  var(--gold-border);
    --cream-text:    var(--ink);
    --cream-sub:     var(--gold-dp);
    --text-1:        var(--t1);
    --text-2:        var(--t2);
    --text-3:        var(--t3);
    --border-gold:   var(--gold-line);
}

/* ═══════════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════════ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-ui);
    background-color: var(--bg);
    color: var(--text-1);
    min-height: 100vh;
    transition: background-color 0.3s, color 0.3s;
    -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; }

/* ═══════════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════════ */
.app-main {
    max-width: 480px;
    margin: 0 auto;
    padding: 8px 16px 10px;   /* atas dikurangi ½ → card lebih ke atas (semua tab); clearance nav dari body padding-bottom:62px */
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ═══════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════ */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;            /* bismillah turun ke baris sendiri (logo baru lebih lebar) */
    row-gap: 3px;
    padding: 9px 16px 10px;
    background-color: var(--bg);
    border-bottom: none;   /* garis header dihapus di semua page */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background-color 0.3s;
}
.header-logo { order: 0; }
.header-right { order: 1; }

/* Bismillah = baris penuh ketengah di bawah logo+toggle (sesuai design reference;
   tidak lagi absolute-center yang menabrak wordmark "NurAI Muslim+") */
.bismillah {
    order: 2;
    flex-basis: 100%;
    width: 100%;
    text-align: center;
    font-family: 'Scheherazade New', 'Amiri', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold);
    white-space: nowrap;
    line-height: 1.35;
    letter-spacing: 0.04em;
    direction: rtl;
    pointer-events: none;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-1);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    transition: background 0.2s;
    padding: 0;
    flex-shrink: 0;
}

.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { background: var(--border); }

/* ── Logo tile-emerald — icon image di header ── */
.header-logo {
    position: relative;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.header-logo-img {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: block;
}
.logo-light { display: none; }
body.light-mode .logo-dark  { display: none; }
body.light-mode .logo-light { display: block; }
.logo-wordmark {
    font-family: var(--font-ui);
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -0.04em;
    color: var(--logo-fg);
    line-height: 1;
}
.logo-wordmark .ai { color: var(--gold); }
.logo-pill {
    background: var(--brand-gold);
    color: var(--brand-ink);
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 10px;
    letter-spacing: 0.06em;
    padding: 3px 8px;
    border-radius: 5px 5px 8px 8px;   /* lengkung mihrab mini khas logo */
    line-height: 1.2;
    white-space: nowrap;
}
.header-v-badge {
    position: absolute;
    bottom: -4px;
    right: -6px;
    font-size: 0.48rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: #000;
    background: var(--gold);
    padding: 1px 4px;
    border-radius: 4px;
    line-height: 1.4;
    pointer-events: none;
}



/* ═══════════════════════════════════════════════
   GREETING
   ═══════════════════════════════════════════════ */
.greeting {
    padding: 6px 2px 2px;
}

.greeting h1 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-1);
    margin-bottom: 4px;
    line-height: 1.3;
}

.greeting p {
    font-size: 0.78rem;
    color: var(--text-2);
    line-height: 1.6;
}

/* ═══════════════════════════════════════════════
   AYAT HARIAN
   ═══════════════════════════════════════════════ */
.ayat-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 11px 16px 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-gold);
    position: relative;
    overflow: hidden;
}
.ayat-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--gold), rgba(212,175,55,0.08));
    border-radius: 20px 20px 0 0;
    pointer-events: none;
}

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

.ayat-title-row {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--gold);
}

.card-info-btn {
    background: none;
    border: none;
    color: var(--gold);
    font-size: 0.82rem;
    cursor: pointer;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
    opacity: 0.55;
    transition: opacity 0.2s;
    flex-shrink: 0;
}
.card-info-btn:hover { opacity: 1; }
.hadis-title-row .card-info-btn { color: var(--cream-text); }

/* Share button — sudut kanan bawah card (Ayat Harian & Hadis Harian) */
.ayat-card, .hadis-card { padding-bottom: 18px; }
.card-share-btn {
    position: absolute;
    bottom: 8px; right: 10px;
    width: 30px; height: 30px;
    border-radius: 50%;
    background: rgba(212,175,55,0.12);
    border: 1px solid var(--border-gold);
    color: var(--gold);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; padding: 0;
    transition: transform 0.15s, background 0.15s;
    z-index: 2;
}
.card-share-btn:hover { transform: scale(1.12); background: rgba(212,175,55,0.22); }
.card-share-btn svg { display: block; }

/* Share button di topbar Ayat Pilihan */
.fav-av-share {
    background: rgba(212,175,55,0.12);
    border: 1px solid var(--border-gold);
    color: var(--gold);
    width: 34px; height: 34px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; padding: 0; flex-shrink: 0;
    transition: transform 0.15s, background 0.15s;
}
.fav-av-share:hover { transform: scale(1.1); background: rgba(212,175,55,0.22); }
.fav-av-share svg { display: block; }

.ayat-badge {
    font-size: 0.7rem;
    background: rgba(212, 175, 55, 0.12);
    color: var(--gold);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-weight: 500;
    border: 1px solid var(--border-gold);
    white-space: nowrap;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ayat-body {
    text-align: center;
    margin-bottom: 14px;
}

.ayat-arabic {
    font-family: 'Scheherazade New', 'Amiri', serif;
    font-size: 1.4rem;
    direction: rtl;
    line-height: 2;
    color: var(--text-1);
    margin-bottom: 12px;
}

.ayat-translation {
    font-family: var(--font-serif, 'Cormorant Garamond', serif);
    font-size: 0.83rem;
    color: var(--text-2);
    line-height: 1.65;
    margin-bottom: 6px;
    font-style: italic;
}

.ayat-ref {
    font-size: 0.78rem;
    color: var(--gold);
    font-weight: 500;
}

.ayat-expand-btn {
    background: none;
    border: none;
    color: var(--cream-sub);
    font-size: 0.72rem;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 0 2px;
    display: block;
    margin: 0 auto 4px;
    text-decoration: underline dotted;
    text-underline-offset: 2px;
}

/* ═══════════════════════════════════════════════
   HADIS HARIAN
   ═══════════════════════════════════════════════ */
.hadis-card {
    background: var(--cream);
    border-radius: var(--radius-xl);
    padding: 11px 16px 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-gold);
    position: relative;
    overflow: hidden;
}
.hadis-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--gold), rgba(212,175,55,0.08));
    border-radius: 20px 20px 0 0;
    pointer-events: none;
}

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

.hadis-title-row {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--cream-text);
}

.ayat-icon {
    width: 17px;
    height: 17px;
    color: var(--gold);
    display: block;
    flex-shrink: 0;
}

.hadis-icon {
    width: 17px;
    height: 17px;
    color: var(--gold);
}

.quran-card-ico {
    width: 22px;
    height: 22px;
    color: var(--gold);
    display: block;
}

.hadis-badge {
    font-size: 0.7rem;
    background: #163024;
    color: var(--gold);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-weight: 500;
    white-space: nowrap;
}

.hadis-body {
    text-align: center;
}

.hadis-arabic {
    font-family: 'Amiri', serif;
    font-size: 1.4rem;
    direction: rtl;
    line-height: 1.9;
    color: var(--cream-text);
    margin-bottom: 10px;
}

.hadis-translation {
    font-family: var(--font-serif, 'Cormorant Garamond', serif);
    font-size: 0.83rem;
    color: #3d2800;
    line-height: 1.65;
    margin-bottom: 6px;
    font-style: italic;
}

.hadis-footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
}

.hadis-rawi {
    font-family: var(--font-serif, 'Cormorant Garamond', serif);
    font-style: italic;
    font-size: 0.76rem;
    color: var(--cream-sub);
}

.hadis-expand-btn {
    background: none;
    border: none;
    color: var(--cream-sub);
    font-family: var(--font-serif, 'Cormorant Garamond', serif);
    font-style: italic;
    font-size: 0.76rem;
    cursor: pointer;
    padding: 0;
    text-decoration: underline dotted;
    text-underline-offset: 2px;
}

.hadis-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 14px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(44, 26, 0, 0.18);
    cursor: pointer;
    padding: 0;
    transition: all 0.25s;
}

.dot.active {
    background: var(--green-btn);
    width: 22px;
    border-radius: 4px;
}

/* ═══════════════════════════════════════════════
   CHAT SECTION
   ═══════════════════════════════════════════════ */
.chat-section {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-gold);
    position: relative;
}
.chat-section::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--gold), rgba(212,175,55,0.08));
    border-radius: 20px 20px 0 0;
    pointer-events: none;
    z-index: 1;
}

.chat-section-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 16px 16px 14px;
    border-bottom: 1px solid var(--border);
}

.chat-spark {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.chat-section-header h2 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-1);
    margin-bottom: 3px;
}

.chat-section-header p {
    font-size: 0.76rem;
    color: var(--text-2);
    line-height: 1.45;
}

/* Clear chat button */
.clear-chat-btn {
    margin-left: auto;
    flex-shrink: 0;
    align-self: center;
    padding: 6px;
    background: transparent;
    border: none;
    color: var(--text-3);
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, background 0.15s;
    -webkit-appearance: none;
    appearance: none;
}
.clear-chat-btn:hover { color: var(--text-1); background: var(--bg-input); }
.clear-chat-btn.hidden { display: none; }

/* Chat box wrapper — for scroll-to-bottom button positioning */
.chat-box-wrap { position: relative; }

/* Scroll to bottom floating button */
.chat-scroll-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-gold);
    color: var(--gold);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    z-index: 5;
    -webkit-appearance: none;
    appearance: none;
}

/* Chat Box */
.chat-box {
    height: 300px;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scroll-behavior: auto;
}

.chat-box::-webkit-scrollbar { width: 3px; }
.chat-box::-webkit-scrollbar-track { background: transparent; }
.chat-box::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.chat-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-3);
    font-size: 0.82rem;
}

/* Message wrappers */
.message-wrapper {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.message-wrapper.user { flex-direction: row-reverse; }

.bot-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--green-btn), #1a4a1a);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
    border: 1px solid var(--border-gold);
}

.message-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
    max-width: 78%;
}

.message-wrapper.user .message-content { align-items: flex-end; }

.message {
    padding: 9px 13px;
    border-radius: 16px;
    font-size: 0.875rem;
    line-height: 1.55;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.message.user {
    background: var(--green-btn);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.message.bot {
    background: var(--bg-card-2);
    color: var(--text-1);
    border-bottom-left-radius: 4px;
    border: 1px solid var(--border);
}

.chat-divider {
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-3);
    padding: 10px 0 4px;
    width: 100%;
}

.error-text {
    color: #e05555;
    display: block;
    margin-bottom: 8px;
}

.retry-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-2);
    font-size: 0.72rem;
    cursor: pointer;
    padding: 4px 10px;
    transition: color 0.2s, border-color 0.2s;
}

.retry-btn:hover {
    color: var(--gold);
    border-color: var(--border-gold);
}

/* Markdown inside bot messages */
.message.bot h1,
.message.bot h2,
.message.bot h3 {
    font-size: 0.88rem;
    margin: 8px 0 4px;
    color: var(--gold);
    line-height: 1.3;
}

.message.bot ul,
.message.bot ol {
    padding-left: 16px;
    margin: 5px 0;
}

.message.bot li { margin-bottom: 3px; }

.message.bot p {
    margin-bottom: 5px;
}

.message.bot p:last-child { margin-bottom: 0; }

.message.bot strong { color: var(--gold); }

.message.bot blockquote {
    border-left: 3px solid var(--gold);
    padding-left: 10px;
    margin: 6px 0;
    color: var(--text-2);
    font-style: italic;
}

.message.bot code {
    background: var(--bg);
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 0.82em;
}

.message-time {
    font-size: 0.67rem;
    color: var(--text-3);
    padding: 0 3px;
}

/* Thinking animation */
.thinking-dots {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    height: 18px;
}

.thinking-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-2);
    animation: bounce 1.2s infinite;
}

.thinking-dots span:nth-child(2) { animation-delay: 0.2s; }
.thinking-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30%            { transform: translateY(-5px); opacity: 1; }
}

/* Quick Prompts */
.quick-prompts-wrap {
    position: relative;
}

.quick-prompts-wrap::after {
    content: '';
    position: absolute;
    right: 0; top: 0; bottom: 0;
    width: 32px;
    background: linear-gradient(to right, transparent, var(--bg-card));
    pointer-events: none;
}

.quick-prompts {
    display: flex;
    gap: 7px;
    padding: 10px 14px;
    overflow-x: auto;
    border-top: 1px solid var(--border);
    scrollbar-width: none;
    cursor: grab;
}

.quick-prompts:active { cursor: grabbing; }

.quick-prompts::-webkit-scrollbar { display: none; }

.prompt-chip {
    background: var(--bg-card-2);
    border: 1px solid var(--border);
    color: var(--text-2);
    font-size: 0.75rem;
    padding: 6px 13px;
    border-radius: var(--radius-full);
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.prompt-chip:hover {
    background: var(--green-btn);
    color: #fff;
    border-color: var(--green-btn);
}

/* Chat min-length hint */
.chat-hint {
    font-size: 0.68rem;
    color: var(--gold);
    text-align: center;
    padding: 2px 14px 0;
    margin-top: -4px;
    opacity: 0.85;
}

/* Disclaimer */
.chat-disclaimer {
    font-size: 0.68rem;
    color: var(--text-3);
    text-align: center;
    padding: 0 14px 10px;
    line-height: 1.5;
}

/* Chat Input */
.chat-input-area {
    display: flex;
    gap: 10px;
    padding: 10px 14px 12px;
    border-top: 1px solid var(--border);
    background: var(--bg-card);
}

#user-input {
    flex: 1;
    background: var(--bg-card-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 10px 16px;
    font-family: inherit;
    font-size: 16px; /* min 16px — cegah iOS Safari auto-zoom */
    color: var(--text-1);
    outline: none;
    transition: border-color 0.2s;
    min-width: 0;
}

#user-input::placeholder { color: var(--text-3); }
#user-input:focus { border-color: var(--green-btn); }

#send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--green-btn);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.1s;
    padding: 0;
}

#send-btn svg { width: 15px; height: 15px; }
#send-btn:hover { background: var(--green-hover); }
#send-btn:active { transform: scale(0.93); }
#send-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

/* ═══════════════════════════════════════════════
   DATE SECTION
   ═══════════════════════════════════════════════ */
.date-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.date-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 13px 11px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-gold);
    position: relative;
    overflow: hidden;
}
.date-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--gold), rgba(212,175,55,0.08));
    border-radius: 16px 16px 0 0;
    pointer-events: none;
}

.date-label {
    font-size: 0.68rem;
    color: var(--text-2);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
    line-height: 1.3;
}

.info-badge {
    color: var(--text-3);
    font-size: 0.75rem;
    cursor: help;
    margin-left: 2px;
}

.date-main {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-1);
    margin-bottom: 4px;
    line-height: 1.25;
}

.date-sub {
    font-size: 0.65rem;
    color: var(--text-2);
    line-height: 1.3;
}

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

.ayamul-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
}

.ayamul-num {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-1);
    line-height: 1;
}

.ayamul-sub {
    font-size: 0.64rem;
    color: var(--text-2);
}

/* ═══════════════════════════════════════════════
   TWO-COL: SHOLAT + KIBLAT
   ═══════════════════════════════════════════════ */
.two-col-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.placeholder-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 14px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-gold);
    position: relative;
    overflow: hidden;
}
.placeholder-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--gold), rgba(212,175,55,0.08));
    border-radius: 16px 16px 0 0;
    pointer-events: none;
}
.placeholder-card {
    display: flex;
    flex-direction: column;
}

.placeholder-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.placeholder-emoji { font-size: 1.1rem; flex-shrink: 0; }

.placeholder-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-1);
    line-height: 1.2;
}

.placeholder-loc {
    font-size: 0.68rem;
    color: var(--text-2);
    margin-top: 2px;
}

.refresh-btn {
    background: none;
    border: none;
    color: var(--text-2);
    cursor: pointer;
    margin-left: auto;
    padding: 4px;
    border-radius: var(--radius-sm);
    display: flex;
    transition: color 0.2s;
}

.refresh-btn:hover { color: var(--gold); }

.refresh-btn.loading svg {
    animation: spin 1s linear infinite;
}

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

.sholat-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    margin-bottom: 10px;
}

.sholat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-2);
    padding: 3px 0;
    border-bottom: 1px solid var(--border);
}

.sholat-row:last-child { border-bottom: none; }

.sholat-row.sholat-active {
    color: var(--gold);
    font-weight: 600;
}

.sholat-time {
    color: var(--text-3);
    font-size: 0.75rem;
}

.sholat-row.sholat-active .sholat-time {
    color: var(--gold);
}

.next-prayer-countdown {
    width: 100%;
    padding: 7px;
    background: var(--bg-card-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--gold);
    font-size: 0.73rem;
    font-weight: 500;
    text-align: center;
}

.location-prompt {
    color: var(--gold);
    cursor: pointer;
    text-decoration: underline dotted;
    text-underline-offset: 2px;
}

/* Kiblat */
.kiblat-card {
    align-items: center;
    justify-content: space-between;
}

.kiblat-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-1);
    align-self: flex-start;
    margin-bottom: 8px;
}
.compass-ver {
    font-size: 0.6rem;
    font-weight: 700;
    background: rgba(212,175,55,0.15);
    color: var(--gold);
    border: 1px solid rgba(212,175,55,0.3);
    border-radius: 4px;
    padding: 1px 5px;
    margin-left: 4px;
    vertical-align: middle;
    letter-spacing: 0.04em;
}

.compass-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 8px 0;
}

.compass-svg {
    width: 155px;
    height: 155px;
    filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.5));
    overflow: visible;
}

.kiblat-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    font-size: 0.72rem;
    color: var(--text-2);
}

.kiblat-footer strong { color: var(--text-1); }

.kiblat-open-btn {
    background: none;
    border: 1px solid rgba(212,175,55,0.35);
    border-radius: var(--radius-full);
    color: var(--gold);
    font-size: 0.68rem;
    font-weight: 500;
    padding: 2px 8px;
    cursor: pointer;
    transition: background 0.2s;
}
.kiblat-open-btn:hover { background: rgba(212,175,55,0.1); }

.compass-ios-btn {
    background: none;
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-full);
    color: var(--gold);
    font-size: 0.72rem;
    font-weight: 500;
    padding: 5px 12px;
    cursor: pointer;
    margin: 4px auto;
    display: block;
    transition: background 0.2s;
}
.compass-ios-btn:hover { background: rgba(212,175,55,0.1); }


/* ═══════════════════════════════════════════════
   QIBLA FULLSCREEN OVERLAY
   ═══════════════════════════════════════════════ */
.qibla-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    background: #060e06;
    z-index: 200;
    display: none;
    flex-direction: column;
    align-items: center;
    padding: 16px 20px 24px;
    padding-top: max(16px, env(safe-area-inset-top));
    padding-bottom: max(24px, env(safe-area-inset-bottom));
    overflow-y: auto;
    box-sizing: border-box;
}
.qibla-fullscreen.open {
    display: flex;
}

.qibla-fs-topbar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.qibla-fs-back {
    background: none;
    border: none;
    color: var(--gold);
    font-size: 0.82rem;
    cursor: pointer;
    padding: 4px 0;
}
.qibla-fs-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--gold);
}
.qibla-fs-close {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-2);
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.qibla-fs-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
    justify-content: center;
}
.qibla-badge {
    border-radius: var(--radius-full);
    padding: 3px 12px;
    font-size: 0.72rem;
    font-weight: 500;
}
.qibla-badge-city { background: var(--bg-card); color: var(--text-2); border: 1px solid var(--border); }
.qibla-badge-deg  { background: rgba(212,175,55,0.1); color: var(--gold); border: 1px solid rgba(212,175,55,0.3); font-weight: 700; }

.qibla-fs-compass-wrap {
    margin-top: 20px;
    margin-bottom: 16px;
    width: 100%;
}
.qibla-fs-svg {
    display: block;
    margin: 0 auto;
    width: min(260px, 78vw);
    height: min(260px, 78vw);
    filter: drop-shadow(0 4px 20px rgba(0,0,0,0.6));
    overflow: visible;
}
.qibla-direction-box {
    text-align: center;
    margin-bottom: 16px;
}
.qibla-direction-arrow {
    font-size: 1.8rem;
    color: var(--gold);
    line-height: 1;
    margin-bottom: 4px;
}
.qibla-direction-text {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-1);
}
.qibla-direction-sub {
    font-size: 0.72rem;
    color: var(--text-3);
    margin-top: 3px;
}

.qibla-info-strip {
    display: flex;
    gap: 8px;
    width: 100%;
}
.qibla-info-item {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 8px 10px;
    text-align: center;
}
.qibla-info-label {
    font-size: 0.65rem;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 3px;
}
.qibla-info-val {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gold);
}
.qibla-info-item.aligned .qibla-info-val { color: #5c5; }
.qibla-info-item.aligned { border-color: rgba(85,204,85,0.3); }

/* ═══════════════════════════════════════════════
   FEATURE GRID
   ═══════════════════════════════════════════════ */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.feature-item {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 13px 8px 11px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 5px;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    position: relative;
    border: 1px solid var(--border);
}

.feature-item:hover:not(.coming-soon) {
    background: var(--bg-card-2);
    transform: translateY(-1px);
}

.feature-item.coming-soon {
    opacity: 0.5;
    cursor: not-allowed;
}

.feature-emoji { font-size: 1.3rem; }

.feature-name {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-1);
    line-height: 1.25;
}

.feature-desc {
    font-size: 0.6rem;
    color: var(--text-2);
    line-height: 1.3;
}

.ext-icon {
    position: absolute;
    top: 6px;
    right: 7px;
    font-size: 0.6rem;
    color: var(--text-3);
}

/* ═══════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════ */
.app-footer {
    text-align: center;
    padding: 6px 16px 8px;
    color: var(--text-2);
    font-size: 0.75rem;
    letter-spacing: 0.03em;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════ */
@media (max-width: 360px) {
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bismillah { font-size: 1.2rem; }
    .hadis-arabic { font-size: 1.2rem; }
    .logo-pill { display: none; }   /* <360px: sisakan wordmark saja */
    .logo-wordmark { font-size: 18px; }
}

@media (min-width: 480px) {
    .app-header {
        max-width: 480px;
        margin: 0 auto;
        left: 0;
        right: 0;
    }
}

/* ═══════════════════════════════════════════════
   FORM MODAL (bottom sheet)
   ═══════════════════════════════════════════════ */
.form-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.form-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.form-modal {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 480px;
    margin: 0 auto;
    height: 90dvh;
    background: var(--bg-card);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    border-top: 1px solid var(--border-gold);
    z-index: 201;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.4);
}

.form-modal.open {
    transform: translateY(0);
}

.form-modal-handle {
    width: 36px;
    height: 4px;
    background: var(--border);
    border-radius: var(--radius-full);
    margin: 10px auto 0;
    flex-shrink: 0;
}

.form-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px 14px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.form-modal-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-1);
}

.form-modal-close {
    background: none;
    border: none;
    color: var(--text-2);
    font-size: 1rem;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}

.form-modal-close:hover {
    background: var(--border);
    color: var(--text-1);
}

.form-iframe {
    flex: 1;
    width: 100%;
    border: none;
    background: #fff;
    border-radius: 0 0 0 0;
}

/* ── Dzikir Modal ──────────────────────────────────────────── */
.dzikir-modal {
    height: 100dvh;
    top: 0;
    border-radius: 0;
    border-top: none;
}

.dzikir-tabs {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    overflow-x: auto;
    scrollbar-width: none;
    flex-shrink: 0;
    border-bottom: 1px solid var(--border);
    cursor: grab;
    user-select: none;
}

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

.dzikir-tab {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 0.72rem;
    color: var(--text-2);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    font-family: inherit;
}

.dzikir-tab.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    font-weight: 600;
}

.dzikir-list {
    overflow-y: auto;
    padding: 14px 16px 32px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dzikir-item {
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px;
}

.dzikir-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    gap: 8px;
}

.dzikir-nama {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-1);
}

.dzikir-ulang {
    background: var(--accent);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 10px;
    white-space: nowrap;
    flex-shrink: 0;
}

.dzikir-arab {
    font-family: 'Scheherazade New', 'Amiri', serif;
    font-size: 1.4rem;
    line-height: 2.1;
    text-align: right;
    direction: rtl;
    color: var(--text-1);
    margin-bottom: 10px;
}

.dzikir-latin {
    font-size: 0.74rem;
    color: var(--gold);
    font-style: italic;
    line-height: 1.6;
    margin-bottom: 6px;
}

.dzikir-arti {
    font-size: 0.74rem;
    color: var(--text-2);
    line-height: 1.6;
    margin-bottom: 10px;
}

.dzikir-sumber {
    font-size: 0.63rem;
    color: var(--text-3);
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 3px 9px;
    border-radius: 8px;
    display: inline-block;
}
.dzikir-sumber-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 6px;
}
.dzikir-hitung-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--gold);
    background: rgba(212,175,55,0.08);
    border: 1px solid rgba(212,175,55,0.28);
    border-radius: 16px;
    padding: 3px 10px;
    cursor: pointer;
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
}
.dzikir-hitung-btn:hover { background: rgba(212,175,55,0.16); }

/* Counter dzikir (bacaan > 1×) — kanan bawah, sejajar sumber, tema NurAI */
.dzikir-counter {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;            /* dorong ke kanan, sejajar referensi */
}
.dzc-btn {
    width: 26px; height: 26px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.95rem; line-height: 1;
    cursor: pointer;
    border: 1px solid rgba(212,175,55,0.32);
    background: transparent;
    color: var(--gold);
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.1s, background 0.15s;
}
.dzc-btn:active { transform: scale(0.88); }
.dzc-reset { font-size: 0.85rem; }
.dzc-plus {
    background: var(--green-btn);
    color: #fff;
    border-color: transparent;
    font-weight: 700;
}
.dzc-num {
    min-width: 16px; text-align: center;
    font-weight: 800; font-size: 0.92rem;
    color: var(--text-1);
}
.dzc-target { font-size: 0.66rem; color: var(--text-3); margin-left: -2px; }
.dzikir-counter.dzc-done .dzc-num,
.dzikir-counter.dzc-done .dzc-target { color: var(--gold); }

/* ═══════════════════════════════════════════════
   PANDUAN ISLAM — Card & Detail Page
   ═══════════════════════════════════════════════ */

/* Main card */
.panduan-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 18px 20px 16px;
    border: 1px solid var(--border-gold);
    position: relative;
    overflow: hidden;
}
.panduan-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--gold), rgba(212,175,55,0.08));
    border-radius: 20px 20px 0 0;
    pointer-events: none;
}
.panduan-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.panduan-card-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-1);
}
.panduan-lihat-semua {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gold);
    text-decoration: none;
    opacity: 0.85;
    transition: opacity 0.15s;
}
.panduan-lihat-semua:hover { opacity: 1; text-decoration: underline; }
.panduan-tile-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
    user-select: none;
    cursor: grab;
}
.panduan-tile-scroll::-webkit-scrollbar { display: none; }
.panduan-tile-scroll.grabbing { cursor: grabbing; }
.panduan-tile {
    flex-shrink: 0;
    width: 76px;
    background: linear-gradient(145deg, rgba(212,175,55,0.09), rgba(212,175,55,0.03));
    border: 1px solid rgba(212,175,55,0.18);
    border-radius: var(--radius-md);
    padding: 12px 6px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: all 0.2s;
}
.panduan-tile:hover {
    background: rgba(212,175,55,0.15);
    border-color: rgba(212,175,55,0.4);
    transform: translateY(-2px);
}
.panduan-tile-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}
.pi-0 { background: rgba(212,175,55,0.15); }
.pi-1 { background: rgba(100,180,255,0.12); }
.pi-2 { background: rgba(80,200,120,0.12); }
.pi-3 { background: rgba(180,100,255,0.12); }
.pi-4 { background: rgba(255,160,80,0.12); }
.panduan-tile-lbl {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--text-1);
    text-align: center;
    line-height: 1.3;
}

/* Detail page */
.panduan-detail {
    position: fixed;
    inset: 0;
    max-width: 480px;
    margin: 0 auto;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    transform: translateX(100vw);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 200;
    overflow: hidden;
    pointer-events: none;
}
.panduan-detail.open { transform: translateX(0); pointer-events: auto; }

.panduan-dheader {
    background: var(--bg-card);
    padding: 14px 16px 0;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.panduan-dtopbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.panduan-back {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,0.07);
    border: 1px solid var(--border);
    color: var(--text-1);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
}
.panduan-back:hover { background: rgba(255,255,255,0.14); }
.panduan-dtitle {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-1);
}
.panduan-dtabs {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
}
.panduan-dtabs::-webkit-scrollbar { display: none; }
.panduan-dtab {
    flex-shrink: 0;
    padding: 9px 14px 11px;
    font-size: 0.73rem;
    font-weight: 600;
    color: var(--text-3);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: all 0.2s;
}
.panduan-dtab.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

/* Swipe zone + strip */
.panduan-swipe-zone {
    flex: 1;
    overflow: hidden;
    position: relative;
    cursor: grab;
}
.panduan-swipe-zone.grabbing { cursor: grabbing; }
.panduan-strip {
    display: flex;
    width: 500%;
    height: 100%;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.panduan-panel {
    width: 20%;
    height: 100%;
    overflow-y: auto;
    padding: 18px 16px 40px;
    flex-shrink: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--gold) transparent;
}

/* Panel content */
.pi-sbox {
    background: rgba(212,175,55,0.06);
    border: 1px solid rgba(212,175,55,0.2);
    border-radius: var(--radius-lg);
    padding: 18px 16px;
    text-align: center;
    margin-bottom: 12px;
}
.pi-ar {
    font-family: var(--font-arabic);
    font-size: 1.5rem;
    line-height: 2;
    color: var(--gold);
    direction: rtl;
    margin-bottom: 10px;
}
.pi-lat {
    font-size: 0.8rem;
    font-style: italic;
    color: var(--text-3);
    margin-bottom: 8px;
}
.pi-mean {
    font-size: 0.8rem;
    color: var(--text-1);
    line-height: 1.6;
    padding: 9px 12px;
    background: rgba(255,255,255,0.04);
    border-radius: 8px;
    border-left: 2px solid var(--gold);
    text-align: left;
}
.pi-slbl {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: 16px 0 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.pi-search {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 9px 14px;
    gap: 8px;
    margin-bottom: 12px;
}
.pi-search input {
    background: none;
    border: none;
    outline: none;
    color: var(--text-1);
    font-size: 0.82rem;
    flex: 1;
}
.pi-search input::placeholder { color: var(--text-3); }
.pi-ag {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
}
.pi-ai {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(212,175,55,0.1);
    border-radius: 10px;
    padding: 9px 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}
.pi-ai:hover {
    background: rgba(212,175,55,0.1);
    border-color: rgba(212,175,55,0.3);
}
.pi-ain { font-size: 0.55rem; color: var(--gold); margin-bottom: 2px; }
.pi-aia { font-family: var(--font-arabic); font-size: 1rem; color: var(--gold); direction: rtl; line-height: 1.6; }
.pi-ail { font-size: 0.58rem; color: var(--text-3); margin-top: 2px; }
.pi-ait { font-size: 0.6rem; color: var(--text-1); margin-top: 1px; }
.pi-acnt { text-align: center; color: var(--text-3); font-size: 0.65rem; margin-top: 8px; }

.pi-rl { display: flex; flex-direction: column; gap: 8px; }
.pi-ri {
    display: flex;
    gap: 12px;
    background: rgba(255,255,255,0.04);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    border: 1px solid var(--border);
}
.pi-rn {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--gold);
    color: #1a1200;
    font-size: 0.72rem; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; margin-top: 1px;
}
.pi-rt { font-size: 0.84rem; font-weight: 600; color: var(--text-1); margin-bottom: 3px; }
.pi-rd { font-size: 0.74rem; color: var(--text-3); line-height: 1.5; }

.pi-hs { margin-bottom: 14px; }
.pi-hst { font-size: 0.76rem; font-weight: 700; color: var(--gold); margin-bottom: 8px; display: flex; align-items: center; gap: 5px; }
.pi-hstep {
    display: flex; gap: 10px;
    padding: 9px 12px; margin-bottom: 5px;
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
    border-left: 2px solid rgba(212,175,55,0.3);
}
.pi-hsn { font-size: 0.65rem; font-weight: 700; color: var(--gold); width: 16px; flex-shrink: 0; padding-top: 2px; }
.pi-hstit { font-size: 0.78rem; font-weight: 600; color: var(--text-1); }
.pi-hsdsc { font-size: 0.7rem; color: var(--text-3); line-height: 1.4; margin-top: 2px; }
.pi-divider { height: 1px; background: var(--border); margin: 12px 0; }

/* ═══════════════════════════════════════════════
   AL-QUR'AN SECTION
   ═══════════════════════════════════════════════ */

/* Base overlay — shared by home + reader */
.quran-overlay {
    position: fixed;
    inset: 0;
    max-width: 480px;
    margin: 0 auto;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    transform: translateX(100vw);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 200;
    overflow: hidden;
}
.quran-overlay.open { transform: translateX(0); }
#quran-reader { z-index: 201; }

/* ── Shared header bar ── */
.qh-header, .qr-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 13px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.qh-back, .qr-back {
    width: 30px; height: 30px;
    background: var(--bg-card-2);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-1); font-size: 0.9rem;
    border: none; cursor: pointer; flex-shrink: 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
}
.qh-back:hover, .qr-back:hover { background: var(--text-3); }
.qh-header-title { font-size: 0.95rem; font-weight: 600; flex: 1; }
.qh-search-btn {
    width: 30px; height: 30px;
    background: var(--bg-card-2);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-2); font-size: 0.85rem;
    border: none; cursor: pointer; flex-shrink: 0;
    transition: opacity 0.2s;
}

/* ── Search bar (below header, toggles) ── */
.qh-searchbar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 8px 14px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.qh-s-ico { color: var(--gold); font-size: 0.82rem; }
.qh-searchbar input {
    flex: 1; background: none; border: none; outline: none;
    color: var(--text-1); font-size: 16px; /* min 16px — cegah auto-zoom iOS Safari */
    font-family: 'Plus Jakarta Sans', sans-serif;
}
.qh-s-clear {
    background: none; border: none;
    color: var(--text-3); font-size: 0.75rem; cursor: pointer;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* ── Resume banner ── */
.qh-resume {
    margin: 10px 12px 0;
    background: linear-gradient(135deg, rgba(212,175,55,0.14) 0%, rgba(212,175,55,0.04) 100%);
    border: 1px solid rgba(212,175,55,0.3);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex; align-items: center; justify-content: space-between;
    cursor: pointer;
    flex-shrink: 0;
}
.qh-resume-left { display: flex; gap: 9px; align-items: center; }
.qh-resume-ico  { font-size: 1.1rem; }
.qh-resume-info { display: flex; flex-direction: column; gap: 1px; }
.qh-resume-lbl  { font-size: 0.6rem; color: var(--gold); text-transform: uppercase; letter-spacing: 0.06em; }
.qh-resume-val  { font-size: 0.84rem; font-weight: 600; color: var(--text-1); }
.qh-resume-sub  { font-size: 0.68rem; color: var(--text-2); }
.qh-resume-arr  { color: var(--gold); font-size: 0.9rem; }

/* ── Tabs: Surah / Juz / Ayat Pilihan ── */
.qh-tabs {
    display: flex;
    margin: 10px 12px 0;
    background: var(--bg-card-2);
    border-radius: 11px;
    padding: 3px;
    gap: 3px;
    flex-shrink: 0;
}
.qh-tab {
    flex: 1; text-align: center;
    padding: 7px 4px;
    border-radius: 9px;
    font-size: 0.72rem; font-weight: 500;
    color: var(--text-2);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
}
.qh-tab.active { background: var(--green-btn); color: #fff; }

/* ── Scrollable body ── */
.qh-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--text-3) transparent;
}
.qh-panel { padding: 6px 0 16px; }

/* ── Loading / error states ── */
.qh-loading {
    padding: 32px 20px;
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-2);
}
.qh-error-state {
    display: flex; flex-direction: column;
    align-items: center; gap: 10px;
    padding: 48px 24px; text-align: center;
}
.qh-error-ico   { font-size: 2.5rem; opacity: 0.4; }
.qh-error-title { font-size: 0.9rem; font-weight: 600; color: var(--text-1); }
.qh-error-sub   { font-size: 0.78rem; color: var(--text-2); line-height: 1.6; }
.qh-retry-btn {
    background: var(--green-btn); color: #fff; border: none;
    border-radius: 10px; padding: 9px 20px;
    font-size: 0.82rem; font-weight: 500; cursor: pointer;
    font-family: 'Plus Jakarta Sans', sans-serif;
    margin-top: 4px;
}

/* ── Surah list ── */
.qh-surah-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    margin: 0 4px;
    transition: background 0.12s;
    position: relative;
}
.qh-surah-item:hover { background: var(--bg-card); }
.qh-snum {
    width: 32px; height: 32px;
    background: rgba(212,175,55,0.1);
    border: 1px solid var(--border-gold);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.68rem; font-weight: 700; color: var(--gold);
    flex-shrink: 0;
}
.qh-sinfo { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.qh-slatin { font-size: 0.84rem; font-weight: 600; color: var(--text-1); }
.qh-smeta  { font-size: 0.66rem; color: var(--text-2); display: flex; align-items: center; gap: 5px; }
.qh-sar {
    font-family: 'Scheherazade New', serif;
    font-size: 1rem; color: var(--gold); direction: rtl; flex-shrink: 0;
}
.qh-tag { padding: 1px 5px; border-radius: 4px; font-size: 0.6rem; }
.qh-tag-meccan  { background: rgba(212,175,55,0.12); color: var(--gold); }
.qh-tag-medinan { background: rgba(100,180,100,0.12); color: #7dc97d; }
.qh-divider { height: 1px; background: var(--border); margin: 0 12px; }
.qh-search-hint {
    margin: 8px 12px;
    background: var(--bg-card);
    border-radius: 10px; padding: 10px 12px;
    text-align: center;
    font-size: 0.72rem; color: var(--text-2);
}

/* ── Juz list ── */
.qh-juz-list-inner { padding: 8px 12px 16px; display: flex; flex-direction: column; gap: 5px; }
.qh-juz-item {
    background: var(--bg-card);
    border-radius: 11px;
    padding: 11px 12px;
    display: flex; align-items: center; gap: 10px;
    cursor: pointer;
    border: 1px solid var(--border);
    transition: border-color 0.15s;
    position: relative;
    overflow: hidden;
}
.qh-juz-item:hover { border-color: var(--border-gold); }
.qh-jbadge {
    width: 36px; height: 36px;
    background: rgba(212,175,55,0.1);
    border: 1px solid var(--border-gold);
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.78rem; font-weight: 700; color: var(--gold); flex-shrink: 0;
}
.qh-jinfo  { flex: 1; }
.qh-jname  { font-size: 0.84rem; font-weight: 600; color: var(--text-1); }
.qh-jrange { font-size: 0.67rem; color: var(--text-2); margin-top: 2px; }
.qh-juz-chevron {
    font-size: 1.1rem;
    color: var(--text-3);
    transition: transform 0.2s;
    flex-shrink: 0;
    line-height: 1;
}
.qh-juz-item.expanded .qh-juz-chevron { transform: rotate(90deg); }
.qh-juz-item.expanded { border-color: var(--border-gold); border-radius: 11px 11px 0 0; }
.qh-juz-surah-list {
    border: 1px solid var(--border-gold);
    border-top: none;
    border-radius: 0 0 11px 11px;
    overflow: hidden;
    margin-top: -5px;     /* close the gap created by qh-juz-list-inner gap */
    margin-bottom: 5px;
}
.qh-juz-surah-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px 9px 14px;
    cursor: pointer;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}
.qh-juz-surah-item:last-child { border-bottom: none; }
.qh-juz-surah-item:active { background: rgba(212,175,55,0.08); }
.qh-jsno {
    width: 24px; height: 24px;
    border-radius: 50%;
    background: rgba(212,175,55,0.1);
    border: 1px solid var(--border-gold);
    color: var(--gold);
    font-size: 0.68rem;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.qh-jsname  { flex: 1; font-size: 0.84rem; font-weight: 500; color: var(--text-1); }
.qh-jsrange { font-size: 0.68rem; color: var(--text-3); white-space: nowrap; }

/* ── Ayat Pilihan (Favorit) ── */
.qh-fav-empty {
    display: flex; flex-direction: column;
    align-items: center; gap: 10px;
    padding: 48px 24px; text-align: center;
}
.qh-fav-empty-ico { font-size: 2.2rem; opacity: 0.35; }
.qh-fav-empty-txt { font-size: 0.8rem; color: var(--text-2); line-height: 1.6; }
.qh-fav-count { padding: 6px 12px 2px; font-size: 0.65rem; color: var(--text-3); }
.qh-fav-card {
    margin: 4px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 13px;
    cursor: pointer;
    transition: border-color 0.15s;
}
.qh-fav-card:hover { border-color: var(--border-gold); }
.qh-fav-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.qh-fav-meta   { display: flex; flex-direction: column; gap: 1px; }
.qh-fav-sname  { font-size: 0.72rem; font-weight: 600; color: var(--gold); }
.qh-fav-nis    { font-size: 0.62rem; color: var(--text-2); }
.qh-fav-star   {
    background: none; border: none;
    font-size: 0.9rem; cursor: pointer; color: var(--gold);
    font-family: 'Plus Jakarta Sans', sans-serif;
}
.qh-fav-ar {
    font-family: 'Scheherazade New', serif;
    font-size: 1.2rem; line-height: 2;
    color: var(--text-1); direction: rtl; text-align: right;
    margin-bottom: 6px;
}
.qh-fav-id { font-size: 0.75rem; color: var(--text-2); line-height: 1.55; }

/* ════════════════════════════════
   AL-QUR'AN READER (Screen 2)
   ════════════════════════════════ */

/* Reader title wrap */
.qr-title-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; }
.qr-title    { font-size: 0.9rem; font-weight: 600; }
.qr-subtitle { font-size: 0.65rem; color: var(--text-2); margin-top: 1px; }

/* Auto-save bar */
.qr-autosave-bar {
    background: rgba(45,106,45,0.25);
    border-bottom: 1px solid rgba(45,106,45,0.4);
    padding: 6px 14px;
    font-size: 0.65rem; color: #7dc97d;
    display: flex; align-items: center; gap: 6px;
    flex-shrink: 0;
}

/* Offline bar */
.qr-offline-bar {
    background: rgba(212,175,55,0.1);
    border-bottom: 1px solid rgba(212,175,55,0.25);
    padding: 6px 14px;
    font-size: 0.65rem; color: var(--gold);
    display: flex; align-items: center; gap: 6px;
    flex-shrink: 0;
}

/* Surah info band */
.qr-info-band {
    background: linear-gradient(135deg, rgba(212,175,55,0.1) 0%, transparent 60%);
    border-bottom: 1px solid var(--border);
    padding: 14px 16px;
    text-align: center;
    flex-shrink: 0;
}
.qr-ar-title {
    font-family: 'Scheherazade New', serif;
    font-size: 1.7rem; color: var(--gold);
    direction: rtl; margin-bottom: 4px;
}
.qr-meta { font-size: 0.72rem; color: var(--text-2); }

/* Scrollable ayat area */
.qr-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--text-3) transparent;
}
.qr-body.with-audio { padding-bottom: 72px; }

/* Bismillah */
.qr-bismillah {
    text-align: center;
    padding: 16px 16px 10px;
    font-family: 'Scheherazade New', serif;
    font-size: 1.35rem; color: var(--text-1);
    direction: rtl; line-height: 1.9;
    border-bottom: 1px solid var(--border);
}

/* Loading / error in reader */
.qr-loading {
    padding: 40px 20px;
    text-align: center;
    font-size: 0.82rem; color: var(--text-2);
}
.qr-error-state {
    display: flex; flex-direction: column;
    align-items: center; gap: 10px;
    padding: 48px 24px; text-align: center;
}

/* ── Per-ayat card items ── */
.qr-ayat-item {
    margin: 10px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}
.qr-ayat-item.playing {
    background: rgba(212,175,55,0.04);
    border-color: var(--border-gold);
}
/* Reading position indicator — top border on card */
.qr-ayat-item--reading {
    border-color: rgba(138,170,138,0.55);
    border-top: 2.5px solid rgba(138,170,138,0.65);
    transition: border-color 0.3s;
}
.qr-ayat-item.playing.qr-ayat-item--reading {
    border-top: 2.5px solid rgba(212,175,55,0.85);
}

/* Card header row */
.qr-ayat-hdr {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    gap: 8px;
}
.qr-ayat-hdr-l {
    display: flex; align-items: center; gap: 10px; min-width: 0;
}
.qr-ayat-hdr-r {
    display: flex; gap: 6px; align-items: center; flex-shrink: 0;
}
.qr-ayat-circle {
    width: 34px; height: 34px;
    background: rgba(212,175,55,0.12);
    border: 1.5px solid var(--border-gold);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Scheherazade New', serif;
    font-size: 0.85rem; color: var(--gold); font-weight: 700;
    flex-shrink: 0;
}
.qr-ayat-hdr-title {
    font-size: 0.75rem; font-weight: 600; color: var(--text-1);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.qr-ayat-hdr-sub {
    font-size: 0.63rem; color: var(--text-3); margin-top: 2px;
}

/* Arabic text & translation inside card */
.qr-ayat-ar {
    font-family: 'Scheherazade New', serif;
    font-size: 1.35rem; line-height: 2;
    color: var(--text-1); direction: rtl; text-align: right;
    padding: 14px 14px 6px;
}
.qr-ayat-id {
    font-size: 0.8rem; color: var(--text-2); line-height: 1.6;
    padding: 0 14px 12px;
    text-align: right; /* selalu rata kanan, konsisten dengan teks Arab */
}

/* ── Latin transliteration line ─────────────────────────────── */
.qr-ayat-latin {
    font-size: 0.76rem;
    font-style: italic;
    color: var(--gold);
    opacity: 0.85;
    padding: 2px 14px 6px;
    line-height: 1.55;
    text-align: right;
    display: none; /* hidden by default — shown when .qr-latin-on on body */
}
body.qr-latin-on .qr-ayat-latin { display: block; }

/* Compact icon buttons in card header */
.qr-share-btn {
    width: 36px; height: 36px;
    background: rgba(212,175,55,0.08);
    border: 1px solid rgba(212,175,55,0.3);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--gold);
    transition: transform 0.15s, background 0.15s;
    flex-shrink: 0;
    padding: 0;
}
.qr-share-btn:hover { transform: scale(1.15); background: rgba(212,175,55,0.18); }
.qr-share-btn svg { display: block; }

.qr-star {
    width: 36px; height: 36px;
    background: rgba(229,57,53,0.07);
    border: 1px solid rgba(229,57,53,0.28);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.78rem; cursor: pointer; color: var(--text-3);
    font-family: 'Plus Jakarta Sans', sans-serif;
    transition: transform 0.15s;
    flex-shrink: 0;
}
.qr-star:hover { transform: scale(1.15); }
.qr-star.saved {
    color: var(--gold);
    background: rgba(212,175,55,0.12);
    border-color: var(--border-gold);
}
.qr-play-btn {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px;
    background: rgba(76,175,80,0.1);
    border: 1px solid rgba(76,175,80,0.35);
    border-radius: 50%;
    font-size: 0.7rem; color: #4caf50; cursor: pointer;
    font-family: 'Plus Jakarta Sans', sans-serif;
    transition: all 0.15s;
    flex-shrink: 0;
}
.qr-play-btn.active {
    background: rgba(212,175,55,0.12);
    border-color: var(--border-gold);
    color: var(--gold);
}

/* ── Sticky audio bar ── */
.qr-audio-bar {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border-gold);
    padding: 0 14px 10px;
    flex-shrink: 0;
}
.qr-audio-prog { height: 2px; background: var(--border); margin-bottom: 9px; }
.qr-audio-fill { height: 100%; width: 0; background: var(--gold); transition: width 0.3s linear; }
.qr-audio-main { display: flex; align-items: center; gap: 10px; }
.qr-audio-info { flex: 1; min-width: 0; }
.qr-audio-surah {
    display: block; font-size: 0.72rem; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.qr-audio-qari { font-size: 0.62rem; color: var(--text-2); }
.qr-audio-ctrls { display: flex; align-items: center; gap: 6px; }
.qr-ac-btn  { background: none; border: none; color: var(--text-2); font-size: 1rem; cursor: pointer; padding: 4px; font-family: 'Plus Jakarta Sans', sans-serif; }
.qr-ac-btn:hover { color: var(--text-1); }
/* Close button — slightly separated, muted red on hover */
.qr-ac-close {
    margin-left: 4px;
    font-size: 0.8rem;
    color: var(--text-3);
    padding: 4px 6px;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}
.qr-ac-close:hover { background: rgba(229,57,53,0.12); color: #ef5350; }
.qr-ac-play {
    width: 32px; height: 32px; background: var(--gold);
    border-radius: 50%; border: none;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; color: #000; cursor: pointer;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* ── Reader Settings Strip ──────────────────────────────────── */
.qr-settings-strip {
    display: flex;
    align-items: stretch;
    background: var(--bg-card-2);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    position: relative;
}
.qr-settings-strip::-webkit-scrollbar { display: none; }
.qrs-cell {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;   /* label di ATAS → sejajar antar box */
    gap: 4px;
    padding: 6px 7px;
    border-right: 1px solid var(--border);
    flex-shrink: 0;
}
/* Tajwid & Latin cells (toggle only, no on/off text) — extra compact */
.qrs-cell-toggle { padding: 6px 5px; }
.qrs-cell-grow { flex: 1; min-width: 0; border-right: none; padding-left: 8px; }
.qrs-label {
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-3);
    white-space: nowrap;
}
.qrs-select {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--text-1);
    font-size: 0.7rem;
    padding: 4px 22px 4px 7px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5'%3E%3Cpath d='M1 1l3 3 3-3' stroke='%23d4af37' stroke-width='1.4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    width: 100%;
    transition: border-color 0.15s;
}
.qrs-select:focus { outline: 1px solid var(--gold); }
.qrs-select.changed { border-color: var(--gold-dim); }

/* ── Custom dropdown (replaces <select> — avoids iOS native picker) ── */
.qrs-dd { position: relative; width: 100%; }
.qrs-dd-btn {
    display: flex; align-items: center; justify-content: space-between;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--text-1);
    font-size: 0.7rem;
    padding: 4px 6px 4px 7px;
    cursor: pointer;
    width: 100%;
    gap: 4px;
    text-align: left;
    transition: border-color 0.15s;
}
.qrs-dd-btn:focus { outline: 1px solid var(--gold); }
.qrs-dd.changed .qrs-dd-btn { border-color: var(--gold-dim); }
.qrs-dd-val {
    flex: 1; min-width: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.qrs-dd-chev { flex-shrink: 0; transition: transform 0.15s; opacity: 0.75; display: block; }
.qrs-dd.open .qrs-dd-chev { transform: rotate(180deg); }
/* List — positioned by JS as position:fixed, portaled to <body> */
.qrs-dd-list {
    background: var(--bg-card);
    border: 1px solid rgba(212,175,55,0.35);
    border-radius: 8px;
    padding: 3px 0;
    list-style: none;
    margin: 0;
    box-shadow: 0 6px 22px rgba(0,0,0,0.6);
    overflow: hidden;
}
.qrs-dd-item {
    padding: 8px 12px;
    font-size: 0.7rem;
    color: var(--text-1);
    cursor: pointer;
    white-space: nowrap;
    display: flex; align-items: center; gap: 6px;
    transition: background 0.1s;
}
.qrs-dd-item:hover { background: rgba(212,175,55,0.09); }
.qrs-dd-item.active { color: var(--gold); background: rgba(212,175,55,0.07); }
.qrs-dd-item.active::before { content: '✓'; font-size: 0.62rem; opacity: 0.8; }

.qrs-toggle-row { display: flex; align-items: center; gap: 6px; }
.qrs-sw {
    width: 34px; height: 19px;
    background: var(--border);
    border-radius: 10px; border: none;
    position: relative; cursor: pointer;
    transition: background 0.2s; flex-shrink: 0;
}
.qrs-sw::after {
    content: '';
    position: absolute;
    width: 13px; height: 13px;
    background: #fff; border-radius: 50%;
    top: 3px; left: 3px;
    transition: transform 0.2s;
}
.qrs-sw.on { background: var(--gold); }
.qrs-sw.on::after { transform: translateX(15px); }
.qrs-sw-lbl { font-size: 0.65rem; color: var(--text-2); white-space: nowrap; }

/* Tampilan chip pair */
.qrs-chip-pair {
    display: flex;
    gap: 3px;
    margin-top: 2px;
}
.qrs-chip {
    padding: 2px 7px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-2);
    font-size: 0.62rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.qrs-chip.active {
    background: var(--gold);
    color: #0d1b0f;
    border-color: var(--gold);
    font-weight: 600;
}

/* ── Per-halaman (mushaf page) view ── */
.qr-hal-wrap { display: flex; flex-direction: column; }

/* Sticky navigation bar — stays visible when page text is long */
.qr-hal-nav {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex; align-items: center; justify-content: space-between;
    padding: 7px 10px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    gap: 5px;
}
.qr-hal-nb {
    display: flex; align-items: center; gap: 4px;
    background: var(--bg-card-2);
    border: 1px solid var(--border);
    border-radius: 8px; padding: 5px 11px;
    font-size: 0.67rem; color: var(--text-2); cursor: pointer;
    font-family: 'Plus Jakarta Sans', sans-serif;
    transition: color 0.15s, border-color 0.15s; white-space: nowrap;
}
.qr-hal-nb:hover:not(.dis) { color: var(--text-1); border-color: rgba(212,175,55,0.5); }
.qr-hal-nb.dis { opacity: 0.25; pointer-events: none; }
.qr-hal-npg {
    font-size: 0.72rem; font-weight: 700; color: var(--gold);
    letter-spacing: 0.03em; flex: 1; text-align: center;
}
.qr-hal-sv {
    background: rgba(212,175,55,0.1);
    border: 1px solid var(--border-gold);
    border-radius: 8px; padding: 5px 9px;
    font-size: 0.64rem; color: var(--gold); cursor: pointer;
    font-family: 'Plus Jakarta Sans', sans-serif;
    transition: background 0.15s; white-space: nowrap;
}
.qr-hal-sv:hover { background: rgba(212,175,55,0.22); }

/* Physical page — warm dark parchment feel with gold frame */
.qr-hal-page {
    margin: 10px 10px 24px;
    padding: 18px 15px 16px;
    background: #0e1a0b;
    border: 1.5px solid rgba(212,175,55,0.5);
    border-radius: 6px;
    box-shadow:
        0 0 0 5px rgba(212,175,55,0.07),
        inset 0 0 0 5px rgba(212,175,55,0.04);
    display: flex; flex-direction: column; gap: 10px;
}

/* Surah header block — framed box */
.qr-hal-surah-hdr {
    text-align: center;
    padding: 12px 14px 13px;
    background: rgba(212,175,55,0.07);
    border: 1px solid rgba(212,175,55,0.35);
    border-radius: 5px;
    margin-bottom: 4px;
    position: relative;
}
/* Ornamental side marks */
.qr-hal-surah-hdr::before,
.qr-hal-surah-hdr::after {
    content: '❧';
    position: absolute;
    top: 50%; transform: translateY(-50%);
    color: rgba(212,175,55,0.35);
    font-size: 0.85rem;
}
.qr-hal-surah-hdr::before { left: 10px; }
.qr-hal-surah-hdr::after  { right: 10px; }

.qr-hal-surah-ar {
    font-family: 'Scheherazade New', serif;
    font-size: 1.75rem; color: var(--gold);
    margin-bottom: 6px; line-height: 1.4;
    text-shadow: 0 0 20px rgba(212,175,55,0.2);
}
.qr-hal-surah-info {
    font-size: 0.58rem; color: var(--text-2);
    letter-spacing: 0.12em; font-weight: 600;
}

/* Bismillah — centered, decorative */
.qr-hal-bisml {
    text-align: center;
    font-family: 'Scheherazade New', serif;
    font-size: 1.35rem; color: var(--text-1);
    padding: 4px 0 2px; line-height: 2;
    opacity: 0.95;
}

/* ── Flowing mushaf text ── */
.qr-hal-flow {
    font-family: 'Scheherazade New', serif;
    font-size: 1.45rem; line-height: 2.5;
    color: var(--text-1);
    text-align: justify;
    direction: rtl;
    word-spacing: 4px;
    flex: 1;
    /* Subtle text shadow for depth */
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

/* Verse number rosette — inspired by printed Quran markers */
.qr-hal-vn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px;
    background: rgba(212,175,55,0.1);
    border: 1.5px solid rgba(212,175,55,0.55);
    border-radius: 50%;
    /* Inner ring for rosette effect */
    box-shadow: 0 0 0 2.5px rgba(212,175,55,0.1), inset 0 0 0 2px rgba(212,175,55,0.07);
    font-size: 0.65rem; color: var(--gold);
    font-family: 'Scheherazade New', serif;
    vertical-align: middle;
    margin: 0 3px;
    flex-shrink: 0;
}

/* Page footer — mushaf style */
.qr-hal-footer {
    display: flex; justify-content: space-between; align-items: center;
    padding: 9px 2px 0;
    border-top: 1px solid rgba(212,175,55,0.25);
    margin-top: 4px;
    direction: ltr;
}
.qr-hal-footer span {
    font-family: 'Scheherazade New', serif;
    font-size: 0.72rem; color: rgba(212,175,55,0.65);
}
.qr-hal-footer span:nth-child(2) { color: var(--text-3); }

/* ── Quran "per halaman" (Mushaf) premium polish ── */
.qr-hal-npg { font-family: var(--font-mono); }
.qr-hal-juz { color: var(--gold-br); font-weight: 700; }
.qr-hal-npg-sep { margin: 0 5px; opacity: 0.45; }
.qr-hal-nb { border-radius: var(--arch-sm); border-color: var(--gold-line); font-family: var(--font-mono); font-size: 0.64rem; }
.qr-hal-sv { border-radius: var(--arch-sm); font-family: var(--font-mono); }
.qr-hal-surah-info { font-family: var(--font-mono); }
.qr-hal-page { border-radius: var(--arch-lg); box-shadow: 0 10px 30px rgba(0,0,0,0.45), inset 0 0 44px rgba(212,175,55,0.045); }
.qr-hal-hint {
    text-align: center; font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.05em;
    color: var(--t3); padding: 0 0 16px; margin-top: -10px;
    animation: qrHalHintPulse 2.4s ease-in-out infinite;
}
.qr-hal-hint::first-letter { color: var(--gold-br); }
@keyframes qrHalHintPulse { 0%,100% { opacity: 0.4; } 50% { opacity: 0.85; } }

/* Per-ayat: blok/pilih ayat (mode halaman) + sheet aksi */
.qr-hal-vn { cursor: pointer; transition: background 0.15s, color 0.15s, transform 0.1s; }
.qr-hal-vn:active { transform: scale(0.88); }
.qr-hal-ayat.selected .qr-hal-ar { background: var(--gold-tint); border-radius: 4px; }
.qr-hal-ayat.selected .qr-hal-vn { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.qr-ayat-sheet { position: fixed; inset: 0; z-index: 260; display: none; }
.qr-ayat-sheet.open { display: block; }
.qr-as-bd { position: absolute; inset: 0; background: rgba(0,0,0,0.5); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.qr-as-panel {
    position: absolute; left: 0; right: 0; bottom: 0; max-width: 480px; margin: 0 auto;
    background: linear-gradient(180deg, var(--surface-2), var(--surface));
    border-top: 1px solid var(--gold-border);
    border-radius: 22px 22px 0 0;
    padding: 8px 16px calc(20px + env(safe-area-inset-bottom));
    box-shadow: 0 -12px 36px rgba(0,0,0,0.5);
    animation: qrAsUp 0.22s cubic-bezier(0.4,0,0.2,1);
}
@keyframes qrAsUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.qr-as-handle { width: 38px; height: 4px; border-radius: 999px; background: var(--gold-line); margin: 4px auto 12px; }
.qr-as-ref { text-align: center; font-family: var(--font-display); font-size: 0.92rem; font-weight: 600; color: var(--gold-br); margin-bottom: 14px; }
.qr-as-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qr-as-btn {
    display: flex; align-items: center; gap: 9px;
    padding: 13px 14px; border-radius: var(--arch-md);
    background: var(--surface-3); border: 1px solid var(--gold-line);
    color: var(--t1); font-size: 0.8rem; font-weight: 600;
    cursor: pointer; -webkit-tap-highlight-color: transparent;
    transition: background 0.12s, transform 0.1s;
}
.qr-as-btn:active { transform: scale(0.97); background: var(--gold-tint); }
.qr-as-ic { font-size: 1.05rem; line-height: 1; }

/* ── Mushaf parchment overrides (per halaman) ── */
/* 1+2. Parchment bg + shadow for physical-book feel */
.qr-hal-page { background: #fdf8f0; box-shadow: 0 10px 40px rgba(0,0,0,0.28), 0 2px 8px rgba(0,0,0,0.12); }
/* 2. Black Arabic text + remove dark-bg text shadow */
.qr-hal-flow { color: #1a1200; text-shadow: none; }
/* Text colours that assume dark bg → warm dark on parchment */
.qr-hal-bisml { color: #1a1200; }
.qr-hal-surah-info { color: #5c3d11 !important; }
.qr-hal-footer { border-top-color: rgba(139,105,20,0.3); }
.qr-hal-footer span { color: #8B6914; }
.qr-hal-footer span:nth-child(2) { color: #5c3d11; }
/* 3. Ornate verse number rosette — double-ring (printed Quran style) */
.qr-hal-vn {
    width: 30px; height: 30px;
    background: var(--gold-br); border: 1.5px solid var(--gold-br);
    box-shadow: 0 0 0 2.5px #fdf8f0, 0 0 0 4.5px var(--gold-br), 0 1px 4px rgba(0,0,0,0.15);
    font-size: 0.72rem; font-weight: 700; color: #2a1500; margin: 0 7px;
}
.qr-hal-vn:active { background: var(--gold); }
.qr-hal-ayat.selected .qr-hal-ar { background: rgba(212,175,55,0.2); }
/* 4. Top hint chip — "ketuk nomor ayat untuk fitur lainnya" */
.qr-hal-top-hint {
    text-align: center; font-family: var(--font-sans); font-size: 0.62rem;
    letter-spacing: 0.04em; color: #8B6914; padding: 6px 4px 2px;
}
/* 6. Swipe hint — override subtle pulse with prominent pill chip */
.qr-hal-hint {
    display: block; text-align: center; font-family: var(--font-mono); font-size: 0.68rem;
    letter-spacing: 0.05em; color: var(--text-2); width: fit-content; margin: 6px auto 14px;
    padding: 7px 18px; background: rgba(212,175,55,0.1); border: 1.5px solid rgba(212,175,55,0.5);
    border-radius: 999px; animation: none;
}

/* Tajwid legend bar */
.qr-tj-legend {
    display: none;
    flex-wrap: wrap;
    gap: 8px;
    padding: 5px 12px;
    background: #0a160c;
    border-bottom: 1px solid var(--border);
    font-size: 0.62rem;
}
.qr-tj-legend.show { display: flex; }
.qr-tj-leg-item { font-size: 0.62rem; }

/* ── Tajwid span coloring (client-side regex detection) ─────── */
/* Colors applied via span.tj-* injected by applyTajwidColoring() */
/* Default: inherit color (tajwid OFF) */
.qr-ayat-ar span.tj-mad, .qr-hal-flow span.tj-mad,
.qr-ayat-ar span.tj-ghunnah, .qr-hal-flow span.tj-ghunnah,
.qr-ayat-ar span.tj-qalq, .qr-hal-flow span.tj-qalq,
.qr-ayat-ar span.tj-idgham, .qr-hal-flow span.tj-idgham,
.qr-ayat-ar span.tj-ikhfa, .qr-hal-flow span.tj-ikhfa,
.qr-ayat-ar span.tj-iqlab, .qr-hal-flow span.tj-iqlab { color: inherit; }

/* When tajwid ON: colorize */
.qr-tajwid-on .qr-ayat-ar span.tj-mad,    .qr-tajwid-on .qr-hal-flow span.tj-mad     { color: #1e88e5; }
.qr-tajwid-on .qr-ayat-ar span.tj-ghunnah,.qr-tajwid-on .qr-hal-flow span.tj-ghunnah { color: #43a047; }
.qr-tajwid-on .qr-ayat-ar span.tj-qalq,   .qr-tajwid-on .qr-hal-flow span.tj-qalq    { color: #e53935; }
.qr-tajwid-on .qr-ayat-ar span.tj-idgham, .qr-tajwid-on .qr-hal-flow span.tj-idgham  { color: #8e24aa; }
.qr-tajwid-on .qr-ayat-ar span.tj-ikhfa,  .qr-tajwid-on .qr-hal-flow span.tj-ikhfa   { color: #f9a825; }
.qr-tajwid-on .qr-ayat-ar span.tj-iqlab,  .qr-tajwid-on .qr-hal-flow span.tj-iqlab   { color: #00acc1; }

/* Clickable spans when tajwid ON */
.qr-tajwid-on .qr-ayat-ar span[class^="tj-"],
.qr-tajwid-on .qr-hal-flow span[class^="tj-"] {
    cursor: pointer;
    border-radius: 3px;
    padding: 0 2px;
    transition: background 0.12s;
}
.qr-tajwid-on .qr-ayat-ar span[class^="tj-"]:hover,
.qr-tajwid-on .qr-hal-flow span[class^="tj-"]:hover {
    background: rgba(255,255,255,0.1);
}

/* Font switching classes */
.qr-font-uthmani .qr-ayat-ar,
.qr-font-uthmani .qr-bismillah,
.qr-font-uthmani .qr-hal-flow,
.qr-font-uthmani .qr-hal-bisml  { font-family: 'Scheherazade New', serif; }
.qr-font-uthmani .qr-ayat-ar,
.qr-font-uthmani .qr-hal-flow   { font-size: 1.35rem; }
.qr-font-uthmani .qr-bismillah,
.qr-font-uthmani .qr-hal-bisml  { font-size: 1.35rem; }

.qr-font-simple .qr-ayat-ar,
.qr-font-simple .qr-bismillah,
.qr-font-simple .qr-hal-flow,
.qr-font-simple .qr-hal-bisml   { font-family: 'Noto Naskh Arabic', serif; }
.qr-font-simple .qr-ayat-ar,
.qr-font-simple .qr-hal-flow    { font-size: 1.25rem; }
.qr-font-simple .qr-bismillah,
.qr-font-simple .qr-hal-bisml   { font-size: 1.25rem; }

.qr-font-indopak .qr-ayat-ar,
.qr-font-indopak .qr-bismillah,
.qr-font-indopak .qr-hal-flow,
.qr-font-indopak .qr-hal-bisml  { font-family: 'Amiri', serif; }
.qr-font-indopak .qr-ayat-ar,
.qr-font-indopak .qr-hal-flow   { font-size: 1.5rem; }
.qr-font-indopak .qr-bismillah,
.qr-font-indopak .qr-hal-bisml  { font-size: 1.5rem; }

/* ── Tajwid Info Popup ───────────────────────────────────────── */
.qr-tj-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 210;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s;
}
.qr-tj-overlay.show { opacity: 1; pointer-events: all; }

.qr-tj-popup {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    background: #182d1a;
    border-top: 2px solid var(--border);
    border-radius: 20px 20px 0 0;
    padding: 0 0 30px;
    z-index: 211;
    transform: translateY(105%);
    transition: transform 0.28s cubic-bezier(.32,.72,0,1);
    box-shadow: 0 -8px 32px rgba(0,0,0,0.5);
}
.qr-tj-popup.show { transform: translateY(0); }

.qr-tj-handle {
    width: 36px; height: 4px;
    background: var(--border); border-radius: 2px;
    margin: 12px auto 0;
}
.qr-tj-header {
    display: flex; align-items: center;
    padding: 12px 16px 10px; gap: 12px;
}
.qr-tj-badge {
    width: 42px; height: 42px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; flex-shrink: 0;
}
.qr-tj-names { flex: 1; }
.qr-tj-name-id { font-size: 1rem; font-weight: 700; color: var(--text-1); }
.qr-tj-name-ar {
    font-family: 'Scheherazade New', serif;
    font-size: 1.15rem; color: var(--gold);
    direction: rtl; margin-top: 2px;
}
.qr-tj-close {
    background: none; border: 1px solid var(--border);
    width: 28px; height: 28px; border-radius: 50%;
    color: var(--text-3); font-size: 0.9rem;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all 0.15s; flex-shrink: 0;
}
.qr-tj-close:hover { border-color: var(--gold); color: var(--gold); }
.qr-tj-divider { height: 1px; background: var(--border); margin: 0 16px; }
.qr-tj-body { padding: 14px 16px 0; display: flex; flex-direction: column; gap: 11px; }

.qr-tj-word-box {
    background: #0f1a10;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 16px;
    text-align: center;
}
.qr-tj-word-label {
    font-size: 0.6rem; text-transform: uppercase;
    letter-spacing: 0.07em; color: var(--text-3); margin-bottom: 7px;
}
.qr-tj-word {
    font-family: 'Scheherazade New', serif;
    font-size: 2.4rem; direction: rtl; line-height: 1.4;
}
.qr-tj-desc { font-size: 0.85rem; color: var(--text-2); line-height: 1.65; }
.qr-tj-detail {
    display: flex; align-items: center; gap: 6px;
    background: #0f1a10; border: 1px solid var(--border);
    border-radius: 8px; padding: 7px 11px;
    font-size: 0.75rem; color: var(--text-3);
}

/* ── Maintenance Card ────────────────────────────────────────── */
.maintenance-section {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    margin-bottom: 1rem;
    border: 1px dashed var(--border);
    text-align: center;
}
.maintenance-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}
.maint-icon { font-size: 2rem; opacity: 0.5; }
.maint-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-1);
    margin: 0;
}
.maint-sub {
    font-size: 0.78rem;
    color: var(--text-3);
    margin: 0;
}

/* ── Ad slots (Google AdSense / AdMob) — default hidden via inline style ── */
/* Best-practice in-feed banner: lebar penuh, tinggi adaptif ~100px (large mobile
   banner 320×100), maks 280px. Tag <ins> AdSense/AdMob nanti mengisi .ad-slot-inner. */
.ad-slot {
    width: 100%;
    margin: 0;   /* spacing serahkan ke gap:14px .app-main → konsisten dgn card lain */
}
.ad-slot-inner {
    width: 100%;
    min-height: 90px;            /* mobile banner baseline */
    max-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px dashed rgba(212,175,55,0.3);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}
/* Label kecil "Iklan" — transparansi (best practice & syarat AdSense) */
.ad-slot-tag {
    position: absolute;
    top: 6px; left: 8px;
    font-size: 0.52rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-3);
    opacity: 0.7;
}
/* Pastikan unit AdSense yang di-inject mengisi penuh lebar slot */
.ad-slot-inner ins.adsbygoogle { display: block; width: 100%; }

/* ═══════════════════════════════════════════════
   TAB PANEL SYSTEM
   ═══════════════════════════════════════════════ */
.tab-panel {
    display: none;
}
.tab-panel.tab-active {
    display: block;
}

/* ═══════════════════════════════════════════════
   BOTTOM NAVIGATION
   ═══════════════════════════════════════════════ */
/* Reserve space for the fixed bottom nav */
body {
    padding-bottom: calc(62px + env(safe-area-inset-bottom, 0px));
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    z-index: 200;
    display: flex;
    align-items: stretch;
    background: rgba(10, 24, 20, 0.94);
    backdrop-filter: blur(20px) saturate(1.2);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
    border-top: 1px solid var(--gold-line);
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    border-radius: 16px 16px 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.45);
}
body[data-theme="kabah"] .bottom-nav { background: rgba(5, 5, 5, 0.94); }
body[data-theme="royal"] .bottom-nav { background: rgba(4, 30, 18, 0.94); }

.bottom-nav.nav-hidden {
    transform: translateX(-50%) translateY(100%);
    pointer-events: none;
}

/* ── Premium tap feedback (Step 3) — terasa responsif saat ditekan ── */
.ibadah-3card, .ibadah-tracker-entry, .kalender-head, .lainnya-row, .bn-tab {
    transition: transform .12s ease, background-color .15s ease, border-color .15s ease;
}
.ibadah-3card:active, .ibadah-tracker-entry:active, .kalender-head:active,
.lainnya-row:active, .bn-tab:active {
    transform: scale(0.97);
}

/* Light mode: nav jadi glass TERANG (bukan bar gelap) */
body.light-mode .bottom-nav { background: rgba(255, 255, 255, 0.85); }

.bn-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 7px 2px 7px;
    background: none;
    border: none;
    border-radius: 0;
    cursor: pointer;
    color: var(--text-2);
    font-size: 0.58rem;
    font-weight: 500;
    font-family: inherit;
    letter-spacing: 0.02em;
    transition: color 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.bn-tab:hover { color: var(--text-1); }
.bn-tab.bn-active {
    color: var(--gold);
}

/* Icon dalam chip lengkung mihrab — aktif: tinta emas + bingkai emas tipis */
.bn-ico {
    width: 30px;
    height: 30px;
    padding: 5px;
    flex-shrink: 0;
    border: 1px solid transparent;
    border-radius: var(--arch-sm);
    transition: background-color 0.15s, border-color 0.15s;
}
.bn-tab.bn-active .bn-ico {
    background: var(--gold-tint);
    border-color: var(--gold-border);
}
/* Nav tab Ibadah pakai ikon Phosphor (mosque) → butuh fill (ikon lain stroke) */
.bn-ico-ph { fill: currentColor; }

/* ═══════════════════════════════════════════════
   TAB IBADAH — JADWAL SHOLAT FULL WIDTH
   ═══════════════════════════════════════════════ */
.sholat-fw-card {
    background: var(--bg-card);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 0;
    position: relative;
}
.sholat-fw-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--gold), rgba(212,175,55,0.08));
    border-radius: 16px 16px 0 0;
    pointer-events: none;
    z-index: 1;
}

.sholat-fw-head {
    display: flex;
    align-items: center;        /* icon center-vertikal → sejajar 2 baris (judul + lokasi) */
    gap: 11px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
}

.sholat-fw-ico {
    font-size: 2.05rem;          /* diperbesar, span 2 baris */
    line-height: 1;
    flex-shrink: 0;
}
.sholat-fw-ico svg { width: 32px; height: 32px; fill: currentColor; color: var(--gold); display: block; }
.chat-spark svg { width: 1.05em; height: 1.05em; fill: currentColor; color: var(--gold); vertical-align: -0.18em; }

.sholat-fw-head-main {
    flex: 1;
    min-width: 0;
}

/* Baris atas: judul + metode + Ashar + refresh — semua sejajar, tak wrap */
.sholat-fw-titlerow {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 5px;
}
.sholat-fw-titlerow .sh-pick { margin-left: 0; transform: translateY(-2px); }
.sholat-fw-titlerow .refresh-btn {
    margin-left: auto;           /* dorong ke kanan, sejajar */
    flex-shrink: 0;
    padding: 2px;
}

.sholat-fw-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-1);
    line-height: 1;
    white-space: nowrap;
    flex-shrink: 0;
}


.placeholder-loc {
    font-size: 0.7rem;
    color: var(--text-2);
    margin-top: 3px;
}

/* Metode & mazhab Ashar — dropdown custom (samping judul). Native select tak bisa
   diatur lebar/warna popup-nya di iOS, jadi pakai komponen sendiri. */
.sh-pick { position: relative; display: inline-block; vertical-align: middle; margin-left: 5px; }
.sh-pick-btn {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 6px;
    border-radius: 999px;
    border: 1px solid var(--border-gold);
    background: var(--bg-card-2);
    color: var(--text-1);
    font-family: inherit;
    font-size: 0.58rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: .02em;
    cursor: pointer;
    white-space: nowrap;
}

/* Icon topbar kalender (samakan dgn entri Kalender di beranda) */
.kal-topbar-ico {
    width: 1.15em;
    height: 1.15em;
    vertical-align: -0.2em;
    margin-right: 5px;
}
.sh-pick-btn .dot { width: 5px; height: 5px; border-radius: 50%; background: #d4af37; flex-shrink: 0; }
.sh-pick-arw {
    width: 0; height: 0; margin-left: 1px;
    border-left: 3px solid transparent;
    border-right: 3px solid transparent;
    border-top: 4px solid currentColor;
    opacity: .55;
}
.sh-pick-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 60;
    display: none;
    flex-direction: column;
    min-width: 118px;
    padding: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border-gold);
    border-radius: 11px;
    box-shadow: 0 10px 28px rgba(0,0,0,.35);
}
.sh-pick.open .sh-pick-menu { display: flex; }
.sh-pick-menu button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: none;
    background: none;
    border-radius: 8px;
    color: var(--text-1);
    font-family: inherit;
    font-size: 0.74rem;
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
    cursor: pointer;
}
.sh-pick-menu button:hover { background: var(--bg-card-2); }
.sh-pick-menu button.active { background: rgba(212,175,55,.16); font-weight: 700; }
.sh-pick-menu button .dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }

/* ── Prayer settings bottom sheet (method + asr + country mapping) ── */
.sholat-sheet { height: 80dvh; }   /* tinggi tetap → tak berubah saat pindah tab */
.sholat-sheet-body { flex: 1; overflow-y: auto; padding: 6px 14px 28px; }
.shs-pane { display: none; }
.shs-pane.active { display: block; }
.shs-opt {
    display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
    padding: 12px; border: 1px solid var(--border); background: var(--bg-card-2);
    border-radius: 12px; margin: 7px 0 0; cursor: pointer; font-family: inherit;
    color: var(--text-1); transition: border-color .15s, background .15s;
}
.shs-opt:first-child { margin-top: 8px; }
.shs-opt.active { border-color: var(--gold); background: rgba(212,175,55,.1); }
.shs-opt .shs-dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.shs-opt-main { flex: 1; min-width: 0; }
.shs-opt-lbl { font-size: 0.86rem; font-weight: 600; }
.shs-opt-sub { font-size: 0.7rem; color: var(--text-3); margin-top: 5px; line-height: 1.55; padding-right: 4px; }

/* Tab Koreksi menit (per-waktu stepper) */
.shs-kor-note { font-size: 0.7rem; color: var(--text-2); line-height: 1.55; background: var(--gold-tint); border: 1px solid var(--gold-line); border-radius: 10px; padding: 9px 11px; margin: 8px 0 12px; }
.shs-kor-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--border); }
.shs-kor-row:last-of-type { border-bottom: none; }
.shs-kor-lbl { font-size: 0.86rem; font-weight: 600; color: var(--text-1); }
.shs-kor-time { margin-left: 9px; font-family: var(--font-display); font-size: 0.82rem; font-weight: 600; color: var(--gold-br); letter-spacing: 0.02em; }
.shs-kor-ctrl { box-sizing: border-box; display: inline-flex; align-items: center; width: 128px; height: 30px; border: 1px solid var(--border-gold); border-radius: 999px; overflow: hidden; flex-shrink: 0; background: var(--bg-card-2); }
.shs-kor-btn { flex: 1; height: 100%; background: transparent; border: none; color: var(--text-1); font-size: 1rem; line-height: 1; cursor: pointer; font-family: inherit; touch-action: manipulation; }
.shs-kor-btn:active { background: var(--border); }
.shs-kor-btn:disabled { opacity: 0.3; cursor: default; }
.shs-kor-val { flex: 1.8; text-align: center; font-size: 0.72rem; font-weight: 700; color: var(--gold); white-space: nowrap; }
.shs-kor-reset { display: block; width: 100%; margin-top: 14px; background: transparent; border: 1px solid var(--border-gold); color: var(--gold); font-family: inherit; font-size: 0.78rem; font-weight: 600; border-radius: 10px; padding: 10px; cursor: pointer; }
.shs-kor-reset:active { background: var(--gold-tint); }
.shs-opt:has(.shs-opt-sub) { padding-top: 13px; padding-bottom: 13px; }   /* baris Auto sedikit lebih lega */
.shs-opt-check { color: var(--gold); font-size: 0.95rem; flex-shrink: 0; opacity: 0; }
.shs-opt.active .shs-opt-check { opacity: 1; }
.shs-map-table { width: 100%; border-collapse: collapse; font-size: 0.78rem; margin-top: 6px; }
.shs-map-table th {
    text-align: left; font-size: 0.62rem; text-transform: uppercase; letter-spacing: .05em;
    color: var(--text-3); padding: 8px 10px; border-bottom: 1px solid var(--border); font-weight: 700;
}
.shs-map-table td { padding: 11px 10px; border-bottom: 1px solid var(--border); color: var(--text-2); vertical-align: middle; }
.shs-map-table td:last-child { font-weight: 600; color: var(--text-1); white-space: nowrap; }
.shs-map-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; vertical-align: middle; }

/* ── Hijri date adjustment stepper (−2..+2) ── */
.kal-adj-row { display: flex; align-items: center; gap: 10px; padding: 0 16px 9px; }
.kal-adj-ctrl { display: inline-flex; align-items: center; box-sizing: border-box; width: 116px; height: 26px; border: 1px solid var(--border-gold); border-radius: 999px; overflow: hidden; flex-shrink: 0; background: var(--bg-card-2); }
.kal-adj-btn { flex: 1; height: 100%; background: transparent; border: none; color: var(--text-1); font-size: 0.95rem; line-height: 1; cursor: pointer; font-family: inherit; touch-action: manipulation; }
.kal-adj-btn:active { background: var(--border); }
.kal-adj-btn:disabled { opacity: 0.3; cursor: default; }
.kal-adj-val { flex: 1.1; text-align: center; font-size: 0.66rem; font-weight: 700; color: var(--gold); }
.kal-adj-note { flex: 1; min-width: 0; font-size: 0.56rem; line-height: 1.4; color: var(--text-3); font-style: italic; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.sholat-fw-disclaimer {
    margin-top: 10px;
    padding: 0 6px 2px;
    text-align: center;
    font-size: 0.52rem;
    line-height: 1.5;
    color: var(--text-3);
    font-style: italic;
    word-break: break-word;
}
.sholat-fw-disclaimer:empty { display: none; }

/* Kalender: badge metode Hijriah + disclaimer sebaris (sejajar, boleh 2 baris) */
.kal-method-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px 9px;
}
.kal-method-row .sh-pick { margin-left: 0; flex-shrink: 0; }
/* kotak dropdown: min-width samakan stepper, tapi tumbuh utk label panjang (tak kepotong) */
.kal-method-row .sh-pick-btn { box-sizing: border-box; min-width: 116px; height: 26px; padding: 0 12px; font-size: 0.62rem; border-radius: 999px; justify-content: center; }
.kal-method-note {
    flex: 1;
    min-width: 0;
    font-size: 0.56rem;
    line-height: 1.4;
    color: var(--text-3);
    font-style: italic;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.kal-method-note:empty { display: none; }

/* Skenario A: metode kiri + koreksi kanan (rata kanan), keterangan via ikon i */
.kal-ctrl-row { justify-content: space-between; }
.kal-ctrl-grp { display: flex; align-items: center; gap: 7px; }
.kal-info-btn {
    width: 22px; height: 22px; flex-shrink: 0; padding: 0;
    border-radius: 50%; border: 1px solid var(--border-gold); background: var(--bg-card-2);
    color: var(--gold); font: italic 700 0.66rem Georgia, serif; line-height: 1; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
}
.kal-info-btn:active, .kal-info-btn.on { background: var(--gold); color: var(--bg-main); border-color: var(--gold); }
.kal-note-box {
    margin: 0 16px 9px; padding: 8px 11px; border-radius: 9px;
    font-size: 0.62rem; line-height: 1.5; color: var(--text-2);
    background: var(--gold-tint); border: 1px solid var(--border-gold);
}
.kal-note-box[hidden] { display: none; }

/* ── Bahasa / Language overlay (Sprint 1) ── */
.bahasa-body { flex: 1; overflow-y: auto; padding: 8px 16px 24px; }
.bahasa-sec { font-size: 0.62rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin: 16px 4px 8px; }
.bahasa-item { display: flex; align-items: center; gap: 12px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; box-shadow: var(--shadow-sm); }
.bahasa-item.master { border: 1px solid var(--border-gold); background: linear-gradient(135deg, rgba(212,175,55,.08), transparent); }
.bahasa-item-l { flex: 1; min-width: 0; }
.bahasa-item-t { font-size: 0.88rem; font-weight: 700; color: var(--text-1); }
.bahasa-item-s { font-size: 0.66rem; color: var(--text-3); margin-top: 2px; line-height: 1.35; }
.bahasa-pick { position: relative; flex-shrink: 0; max-width: 50%; }
.bahasa-pick-btn {
    width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 7px;
    padding: 8px 11px; border-radius: 10px; border: 1px solid var(--border-gold);
    background: var(--bg-card-2); color: var(--text-1); font-family: inherit; font-size: 0.76rem; font-weight: 600; cursor: pointer;
}
.bahasa-pick-lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bahasa-pick-arw {
    width: 10px; height: 10px; flex-shrink: 0; transition: transform .18s;
    background: no-repeat center / 10px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23d4af37' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}
.bahasa-pick.open .bahasa-pick-arw { transform: rotate(180deg); }
.bahasa-pick-menu {
    display: none; position: absolute; right: 0; top: calc(100% + 5px); z-index: 60;
    min-width: 160px; max-height: 244px; overflow-y: auto; flex-direction: column; gap: 2px;
    background: var(--bg-card); border: 1px solid var(--border-gold); border-radius: 10px; box-shadow: var(--shadow); padding: 4px;
}
.bahasa-pick.open .bahasa-pick-menu { display: flex; }
.bahasa-pick-menu button {
    text-align: left; padding: 9px 11px; border-radius: 7px; border: none; background: none;
    color: var(--text-1); font-family: inherit; font-size: 0.8rem; cursor: pointer; white-space: nowrap;
}
.bahasa-pick-menu button:hover { background: var(--bg-card-2); }
.bahasa-pick-menu button.active { background: rgba(212,175,55,.16); font-weight: 700; }
.bahasa-note { font-size: 0.68rem; color: var(--text-3); line-height: 1.55; background: rgba(212,175,55,.06); border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; margin: 16px 4px 8px; font-style: italic; }

.sholat-fw-countdown-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 16px;
    background: rgba(212, 175, 55, 0.06);
    border-bottom: 1px solid var(--border);
}

.sholat-fw-countdown-lbl {
    font-size: 0.68rem;
    color: var(--text-2);
}

.sholat-fw-countdown-val {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gold);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.03em;
}

.sholat-fw-rows {
    padding: 4px 0;
}

.sholat-fw-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 0.88rem;
    color: var(--text-2);
}
body.light-mode .sholat-fw-row {
    border-bottom-color: rgba(0, 0, 0, 0.04);
}
.sholat-fw-row:last-child {
    border-bottom: none;
}
.sholat-fw-row.sholat-active {
    background: rgba(212, 175, 55, 0.07);
    color: var(--text-1);
    font-weight: 600;
}
.sholat-fw-row.sholat-active .sholat-time {
    color: var(--gold);
    font-weight: 700;
}

/* ═══════════════════════════════════════════════
   TAB IBADAH — 3-ITEM GRID
   ═══════════════════════════════════════════════ */
.ibadah-sec-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-3);
    margin: 0 2px 0;
}

.ibadah-3grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-top: -8px;
    margin-bottom: 0;
}

/* Grid Ibadah 6 card: 2 kolom × 3 baris */
.ibadah-6grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: -8px;
}

.ibadah-3card {
    background: linear-gradient(160deg, #114226 0%, #0A2618 100%);
    border: 1px solid var(--border-gold);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    padding: 14px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    overflow: hidden;
}
.ibadah-3card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--gold), rgba(212,175,55,0.08));
    border-radius: 16px 16px 0 0;
    pointer-events: none;
}
.ibadah-3card:hover,
.ibadah-3card:active {
    background: linear-gradient(160deg, #16502E 0%, #0E3320 100%);
    border-color: rgba(212,175,55,0.45);
}

.ibadah-3card-ico {
    width: 40px;
    height: 40px;
    background: rgba(212,175,55,0.1);
    border: 1px solid rgba(212,175,55,0.22);
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    line-height: 1;
    flex-shrink: 0;
}
.ibadah-ico-ph { width: 25px; height: 25px; fill: currentColor; color: var(--gold); }
.lr-ph { width: 22px; height: 22px; fill: currentColor; color: var(--gold); }
/* Ikon Phosphor generik — ukuran ikut font-size container (≈ ukuran emoji lama) */
.ph-ic { width: 1em; height: 1em; fill: currentColor; color: var(--gold); vertical-align: middle; display: inline-block; }
/* Ikon inline di dalam tombol — ikut warna teks tombol (bukan dipaksa gold) */
.btn-ic { width: 1em; height: 1em; fill: currentColor; vertical-align: -0.12em; display: inline-block; }

.ibadah-3card-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: #e8f0e8;
    line-height: 1.3;
}

.ibadah-3card-sub {
    font-size: 0.62rem;
    color: rgba(200,220,200,0.65);
    line-height: 1.4;
}

/* ── Light mode: kalender + ibadah cards use light surface, dark text ── */
body.light-mode .ibadah-3card {
    background: linear-gradient(160deg, #ffffff 0%, #f6f4ea 100%);
}
body.light-mode .ibadah-3card:hover,
body.light-mode .ibadah-3card:active {
    background: linear-gradient(160deg, #fffdf5 0%, #f0eede 100%);
}
body.light-mode .ibadah-3card-title { color: var(--text-1); }
body.light-mode .ibadah-3card-sub   { color: var(--text-2); }

/* 2×2 override — Tasbih added */
.ibadah-4grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;   /* equal row heights */
    flex: 1;                        /* fill remaining space in flex column */
    align-content: stretch;
}

/* ibadah tab: main fills full viewport so grid reaches bottom nav */
#tab-ibadah .app-main {
    min-height: calc(100dvh - 62px - env(safe-area-inset-bottom, 0px));
    padding-bottom: 16px;
}


.ibadah-card-new {
    border-color: rgba(212,175,55,0.5);
}
.ibadah-card-new:hover,
.ibadah-card-new:active {
    border-color: rgba(212,175,55,0.8);
}

/* Card "Segera Hadir" (Sedekah, Kurban) — belum aktif */
.ibadah-card-soon { opacity: 0.78; }
.ibadah-card-soon .ibadah-3card-ico,
.ibadah-card-soon .ibadah-3card-title { opacity: 0.9; }
.ibadah-soon-badge {
    position: absolute;
    top: 7px;
    right: 7px;
    font-size: 0.5rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--gold);
    background: rgba(212,175,55,0.12);
    border: 1px solid var(--border-gold);
    padding: 2px 6px;
    border-radius: 8px;
    white-space: nowrap;
    z-index: 2;
}

/* ── Ikon brand SVG: Tasbih "33" & Asmaul Husna "٩٩" (glow tile) ── */
.nurai-ico { display: block; }
.nurai-ico-inline { display: inline-block; vertical-align: middle; }
/* Slot kartu yang memakai glow-tile sendiri → matikan kotak tinted bawaan */
.ibadah-3card-ico.nurai-ico-tile,
.pi-tab-card-ico.nurai-ico-tile { background: none; border: none; }
/* Kotak ikon panduan kini tinggi seragam (38px, flex-center) → judul sejajar */
.pi-tab-card-ico.nurai-ico-tile .nurai-ico { width: 34px; height: 34px; }
.lainnya-row-ico:has(.nurai-ico-inline) { width: 28px; }
.form-modal-title .nurai-ico-inline { margin-right: 2px; }

/* ═══════════════════════════════════════════════
   TASBIH MODAL
   ═══════════════════════════════════════════════ */
.tasbih-modal {
    height: 100dvh;
    max-height: 100dvh;
    top: 0;
    border-radius: 0;
    border-top: none;
    overflow-y: auto;
    overscroll-behavior: contain;
    display: flex;
    flex-direction: column;
}

/* Dzikir & Tasbih = full page → sembunyikan handle drag (afordance sheet) */
.dzikir-modal .form-modal-handle,
.tasbih-modal .form-modal-handle { display: none; }

/* Tabs bar */
.tasbih-tabs-bar {
    display: flex;
    border-bottom: 1px solid var(--border);
    background: var(--bg-card);
    flex-shrink: 0;
}
.tasbih-tab {
    flex: 1;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 10px 2px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-2);
    cursor: pointer;
    font-family: var(--font-body, 'Plus Jakarta Sans', sans-serif);
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.tasbih-tab.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

/* Panels */
.tasbih-panel {
    padding: 16px 16px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

/* Dzikir pill selector */
.tasbih-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    width: 100%;
}
.tasbih-pill {
    font-size: 0.73rem;
    font-weight: 600;
    padding: 5px 11px;
    border-radius: 20px;
    border: 1px solid var(--border);
    color: var(--text-2);
    background: transparent;
    cursor: pointer;
    font-family: var(--font-body, 'Plus Jakarta Sans', sans-serif);
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.tasbih-pill.active {
    background: rgba(212,175,55,0.12);
    color: var(--gold);
    border-color: rgba(212,175,55,0.4);
}

/* Arabic block */
.tasbih-arabic-block { text-align: center; }
.tasbih-ar {
    font-family: 'Scheherazade New', serif;
    font-size: 1.6rem;
    color: var(--text-1);
    line-height: 1.8;
}
.tasbih-latin {
    font-family: var(--font-serif, 'Cormorant Garamond', serif);
    font-size: 0.75rem;
    color: var(--text-2);
    margin-top: 2px;
}

/* Custom input */
.tasbih-custom-wrap {
    width: 100%;
}
.tasbih-custom-label {
    font-size: 0.7rem;
    color: var(--text-2);
    display: block;
    margin-bottom: 6px;
}
.tasbih-custom-input {
    width: 100%;
    background: var(--bg-deep, #060e06);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.88rem;
    color: var(--text-1);
    font-family: var(--font-body, 'Plus Jakarta Sans', sans-serif);
    outline: none;
    transition: border-color 0.15s;
}
.tasbih-custom-input:focus { border-color: rgba(212,175,55,0.5); }

/* Counter ring */
.tasbih-counter-outer {
    position: relative;
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}
.tasbih-ring-svg {
    position: absolute;
    inset: 0;
    transform: rotate(-90deg);
    pointer-events: none;
}
.tasbih-ring-bg {
    fill: none;
    stroke: rgba(255,255,255,0.05);
    stroke-width: 6;
}
.tasbih-ring-fill {
    fill: none;
    stroke: var(--gold);
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.25s ease;
}
.tasbih-counter-inner {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(22,48,36,0.55) 0%, var(--bg-deep, #060e06) 75%);
    border: 1px solid rgba(45,106,79,0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px rgba(45,106,79,0.18), 0 0 0 9px var(--bg-deep);
    transition: transform 0.08s;
}
.tasbih-counter-outer:active .tasbih-counter-inner {
    transform: scale(0.95);
}
.tasbih-count-num {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-1);
    line-height: 1;
    letter-spacing: -0.15rem;
}
.tasbih-count-hint {
    font-size: 0.6rem;
    color: var(--text-3);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-top: 3px;
}

/* Progress bar */
.tasbih-prog-area { width: 100%; }
.tasbih-prog-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-2);
    margin-bottom: 5px;
}
.tasbih-prog-labels span:last-child { color: var(--gold); font-weight: 600; }
.tasbih-prog-bg {
    height: 3px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    overflow: hidden;
}
.tasbih-prog-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--green, #2d6a4f) 0%, var(--gold) 100%);
    transition: width 0.25s ease;
}

/* Target buttons */
.tasbih-target-row {
    display: flex;
    gap: 8px;
    justify-content: center;
}
.tasbih-tbtn {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 16px;
    border: 1px solid var(--border);
    color: var(--text-2);
    background: transparent;
    cursor: pointer;
    font-family: var(--font-body, 'Plus Jakarta Sans', sans-serif);
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.tasbih-tbtn.active {
    background: rgba(45,106,79,0.25);
    color: var(--text-1);
    border-color: rgba(45,106,79,0.5);
}

/* Action row */
.tasbih-act-row {
    display: flex;
    gap: 10px;
    width: 100%;
}
.tasbih-abtn {
    flex: 1;
    padding: 11px 12px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 600;
    text-align: center;
    border: 1px solid var(--border);
    cursor: pointer;
    font-family: var(--font-body, 'Plus Jakarta Sans', sans-serif);
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s, border-color 0.15s;
}
.tasbih-abtn-secondary {
    background: rgba(255,255,255,0.04);
    color: var(--text-2);
}
.tasbih-abtn-secondary:hover { background: rgba(255,255,255,0.07); }
.tasbih-abtn-primary {
    background: rgba(212,175,55,0.12);
    color: var(--gold);
    border-color: rgba(212,175,55,0.3);
}
.tasbih-abtn-primary:hover { background: rgba(212,175,55,0.2); }

/* Next dzikir suggestion card (between sets) */
.tasbih-next-card {
    width: 100%;
    background: var(--bg-deep, #060e06);
    border: 1px solid rgba(212,175,55,0.2);
    border-radius: 12px;
    padding: 12px 14px;
    text-align: center;
}
.tasbih-next-title {
    font-size: 0.7rem;
    color: var(--text-2);
    margin-bottom: 6px;
}
.tasbih-next-ar {
    font-family: 'Scheherazade New', serif;
    font-size: 1.2rem;
    color: var(--text-1);
    line-height: 1.9;
}
.tasbih-next-sub {
    font-size: 0.7rem;
    color: var(--text-2);
    margin-bottom: 10px;
    font-family: var(--font-serif, 'Cormorant Garamond', serif);
    font-style: italic;
}
.tasbih-next-actions {
    display: flex;
    gap: 8px;
}

/* Khatam dua card (after all 3 done) */
.tasbih-khatam-card {
    width: 100%;
    background: linear-gradient(135deg, rgba(22,48,36,0.9) 0%, var(--bg-deep, #060e06) 100%);
    border: 1px solid var(--border-gold);
    border-radius: 14px;
    padding: 16px;
    text-align: center;
}
.tasbih-khatam-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gold);
    background: rgba(212,175,55,0.1);
    border: 1px solid rgba(212,175,55,0.3);
    border-radius: 20px;
    padding: 3px 10px;
    margin-bottom: 12px;
}
.tasbih-khatam-ar {
    font-family: 'Scheherazade New', serif;
    font-size: 1.2rem;
    color: var(--text-1);
    line-height: 2;
}
.tasbih-khatam-latin {
    font-family: var(--font-serif, 'Cormorant Garamond', serif);
    font-size: 0.72rem;
    color: var(--text-2);
    font-style: italic;
    line-height: 1.7;
    margin-top: 8px;
}
.tasbih-khatam-next-btn {
    display: block;
    width: 100%;
    margin-top: 14px;
    padding: 10px;
    background: rgba(212,175,55,0.1);
    border: 1px solid rgba(212,175,55,0.28);
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gold);
    cursor: pointer;
    font-family: var(--font-body, 'Plus Jakarta Sans', sans-serif);
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.tasbih-khatam-next-btn:hover { background: rgba(212,175,55,0.18); }

/* Light mode: elemen tasbih berlatar GELAP (counter + kartu next/khatam) tetap
   premium → paksa teks terang agar terbaca (var(--text-1/2/3) jadi gelap di
   light mode → tak terlihat di atas latar gelap). */
body.light-mode .tasbih-count-num,
body.light-mode .tasbih-next-ar,
body.light-mode .tasbih-khatam-ar { color: #f0f4f0; }
body.light-mode .tasbih-count-hint { color: #9fc0a0; }
/* Counter (lingkaran utama) tetap gelap → teks terang. TAPI kartu Lanjut/Khatam
   ikut tema terang (jangan kotak hitam di light mode). */
body.light-mode .tasbih-next-card,
body.light-mode .tasbih-khatam-card {
    background: var(--bg-card-2);
    border-color: var(--border-gold);
}
body.light-mode .tasbih-next-title,
body.light-mode .tasbih-next-sub,
body.light-mode .tasbih-khatam-latin { color: var(--text-2); }
body.light-mode .tasbih-next-ar,
body.light-mode .tasbih-khatam-ar { color: var(--text-1); }

/* Riwayat panel */
.tasbih-riwayat-body {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.tasbih-riwayat-day {}
.tasbih-riwayat-date {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-3);
    padding-bottom: 5px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--border);
}
.tasbih-riwayat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    font-size: 0.78rem;
}
.tasbih-riwayat-row:last-of-type { border-bottom: none; }
.tasbih-riwayat-name { color: var(--text-2); }
.tasbih-riwayat-count { color: var(--gold); font-weight: 700; }
.tasbih-riwayat-total {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gold);
    background: rgba(212,175,55,0.08);
    border-radius: 8px;
    padding: 6px 10px;
    margin-top: 8px;
}
.tasbih-riwayat-empty {
    text-align: center;
    padding: 40px 0;
    font-size: 0.82rem;
    color: var(--text-3);
    line-height: 2;
}
.tasbih-riwayat-note {
    text-align: center;
    font-size: 0.65rem;
    color: var(--text-3);
    font-style: italic;
    margin-top: 8px;
    padding-bottom: 8px;
}

/* ── Pill states: done ✓ + saved-custom ─────────── */
.tasbih-pill.done {
    color: var(--text-3);
    border-color: rgba(212,175,55,0.18);
    opacity: 0.65;
}
.tasbih-pill.saved-custom {
    border-style: dashed;
    font-style: italic;
}

/* ── Target reached celebration ─────────────────── */
@keyframes tasbih-celebrate {
    0%   { transform: scale(1); }
    25%  { transform: scale(1.09); }
    60%  { transform: scale(0.96); }
    100% { transform: scale(1); }
}
.tasbih-reached {
    animation: tasbih-celebrate 0.65s cubic-bezier(.36,.07,.19,.97);
}
.tasbih-ring-fill.done {
    filter: drop-shadow(0 0 6px rgba(212,175,55,0.55));
    transition: none;
}
.tasbih-count-num.done {
    color: var(--gold);
    transition: color 0.2s;
}

/* ── Riwayat: stat cards ─────────────────────────── */
.tasbih-stat-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    padding: 10px 0 6px;
    width: 100%;
    flex-shrink: 0;
}
/* Tap pulse on counter number — tactile visual feedback (works on iOS too) */
@keyframes tasbih-pulse { 0% { transform: scale(1); } 40% { transform: scale(1.13); } 100% { transform: scale(1); } }
.tasbih-pulse { animation: tasbih-pulse 0.17s ease-out; }

.tasbih-stat-card {
    background: linear-gradient(160deg, rgba(255,255,255,0.04) 0%, var(--bg-card) 100%);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 6px 9px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.tasbih-stat-card.gold {
    border-color: rgba(212,175,55,0.45);
    background: linear-gradient(160deg, rgba(212,175,55,0.1) 0%, var(--bg-card) 100%);
}
.tasbih-stat-num {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-1);
    line-height: 1;
}
.tasbih-stat-card.gold .tasbih-stat-num { color: var(--gold); }
.tasbih-stat-lbl {
    font-size: 0.58rem;
    color: var(--text-3);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── Riwayat: stacked bar chart ──────────────────── */
.tasbih-chart-wrap {
    margin: 0 0 8px;
    background: linear-gradient(160deg, rgba(45,106,45,0.12) 0%, rgba(22,48,36,0.35) 50%, var(--bg-card) 100%);
    border: 1px solid rgba(212,175,55,0.25);
    border-radius: 14px;
    padding: 12px 12px 8px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.tasbih-chart-wrap::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--gold), rgba(212,175,55,0.08));
    pointer-events: none;
}
.tasbih-chart-hdr {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    gap: 6px;
    flex-wrap: wrap;
}
.tasbih-chart-title {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-2);
    letter-spacing: 0.03em;
}
.tasbih-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.tasbih-legend-item {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 0.58rem;
    color: var(--text-3);
}
.tasbih-legend-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.tasbih-chart-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}
.tasbih-chart-svg {
    display: block;
    width: 100%;
    min-width: 260px;
    height: 120px;
}

/* ── Riwayat: delete per day ─────────────────────── */
.tasbih-riwayat-date-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
.tasbih-del-day-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--text-3);
    padding: 2px 4px;
    border-radius: 4px;
    opacity: 0.55;
    transition: opacity 0.15s, color 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.tasbih-del-day-btn:hover { opacity: 1; color: #ef4444; }

/* ── Riwayat: hapus semua footer ─────────────────── */
.tasbih-riwayat-footer {
    padding: 6px 0 8px;
    display: flex;
    justify-content: center;
}
.tasbih-clear-btn {
    font-size: 0.7rem;
    color: var(--text-3);
    background: none;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 5px 16px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.tasbih-clear-btn:hover { color: #ef4444; border-color: rgba(239,68,68,0.4); }

/* ── Dashboard: streak card ──────────────────────── */
.tasbih-stat-card.streak {
    border-color: rgba(251,146,60,0.35);
    background: linear-gradient(135deg, rgba(251,146,60,0.06) 0%, var(--bg-card) 100%);
}
.tasbih-stat-card.streak .tasbih-stat-num { color: #fb923c; }

/* ── Dashboard: best day card ────────────────────── */
.tasbih-best-card {
    background: linear-gradient(135deg, rgba(212,175,55,0.1) 0%, rgba(22,48,36,0.4) 45%, var(--bg-card) 100%);
    border: 1px solid rgba(212,175,55,0.38);
    border-radius: 14px;
    padding: 14px 14px 12px;
    margin-top: 8px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.22);
}
.tasbih-best-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--gold), rgba(212,175,55,0.1));
    pointer-events: none;
}
.tasbih-best-hdr {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.tasbih-best-badge {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 0.02em;
}
.tasbih-best-date {
    font-size: 0.6rem;
    color: var(--text-3);
}
.tasbih-best-total {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--gold);
    line-height: 1;
    letter-spacing: -0.08em;
    margin-bottom: 8px;
}
.tasbih-best-minibar {
    display: flex;
    height: 7px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
    gap: 1px;
}
.tasbih-best-breakdown { display: flex; flex-direction: column; gap: 3px; }
.tasbih-best-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.72rem;
    color: var(--text-2);
}
.tasbih-best-dot {
    display: inline-block;
    width: 7px; height: 7px;
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: middle;
    flex-shrink: 0;
}

/* ══════════════════════════════════════════════════
   DASHBOARD v2 — premium Islamic cards
   ══════════════════════════════════════════════════ */
/* Stat card: icon + delta line */
.tasbih-stat-card { position: relative; padding-top: 14px; }
.tasbih-stat-ico {
    position: absolute; top: 8px; right: 8px;
    font-size: 0.82rem; opacity: 0.85; line-height: 1;
}
.tasbih-stat-delta {
    font-size: 0.5rem; font-weight: 600; margin-top: 3px;
    color: var(--text-3); line-height: 1.25;
}

/* Shared premium card (month chart / donut / trend) */
.tasbih-card {
    position: relative;
    width: 100%;
    flex-shrink: 0;          /* don't let the column flex shrink/clip cards */
    margin: 0;
    background: linear-gradient(160deg, rgba(45,106,45,0.12) 0%, rgba(22,48,36,0.34) 48%, var(--bg-card) 100%);
    border: 1px solid rgba(212,175,55,0.25);
    border-radius: 16px;
    padding: 13px 13px 11px;
    overflow: hidden;
    box-shadow: 0 3px 14px rgba(0,0,0,0.22);
}
.tasbih-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--gold), rgba(212,175,55,0.08));
    pointer-events: none;
}
.tasbih-card-hdr {
    display: flex; align-items: center; justify-content: space-between;
    gap: 8px; margin-bottom: 8px;
}
.tasbih-card-title {
    font-size: 0.82rem; font-weight: 700; color: var(--text-1);
    display: flex; align-items: center; gap: 6px;
}
.tasbih-card-ico { color: var(--gold); font-size: 0.85rem; }
.tasbih-card-sub {
    font-size: 0.55rem; font-weight: 700; letter-spacing: 0.08em;
    color: var(--text-3); text-transform: uppercase;
}
.tasbih-card-legend {
    display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 6px;
}

/* Month navigation */
.tasbih-month-nav { display: flex; align-items: center; gap: 6px; }
.tasbih-mnav-btn {
    width: 22px; height: 22px; border-radius: 7px;
    background: rgba(212,175,55,0.1); border: 1px solid rgba(212,175,55,0.3);
    color: var(--gold); font-size: 0.95rem; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-family: inherit; padding: 0;
}
.tasbih-mnav-btn:hover { background: rgba(212,175,55,0.2); }
.tasbih-mnav-btn.disabled { opacity: 0.3; pointer-events: none; }
.tasbih-mnav-lbl {
    font-size: 0.6rem; font-weight: 700; letter-spacing: 0.06em;
    color: var(--gold); min-width: 58px; text-align: center;
}

/* Month chart svg */
.tasbih-mc-scroll { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
.tasbih-mc-svg { display: block; width: 100%; min-width: 280px; height: 150px; }

/* Donut card */
.tasbih-donut-body { display: flex; align-items: center; gap: 14px; }
.tasbih-donut-wrap { position: relative; width: 116px; height: 116px; flex-shrink: 0; }
.tasbih-donut-wrap svg { width: 100%; height: 100%; display: block; }
.tasbih-donut-center {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    pointer-events: none;
}
.tasbih-donut-total { font-size: 1.25rem; font-weight: 800; color: var(--gold); line-height: 1; }
.tasbih-donut-cap   { font-size: 0.5rem; font-weight: 700; letter-spacing: 0.12em; color: var(--text-3); margin-top: 2px; }
.tasbih-donut-legend { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 9px; }
.tasbih-comp-row { display: flex; align-items: center; gap: 8px; }
.tasbih-comp-dot { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }
.tasbih-comp-name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.tasbih-comp-latin { font-size: 0.78rem; font-weight: 600; color: var(--text-1); line-height: 1.15; }
.tasbih-comp-ar { font-family: 'Scheherazade New', serif; font-size: 0.78rem; color: var(--text-3); direction: rtl; line-height: 1.2; }
.tasbih-comp-vals { text-align: right; flex-shrink: 0; }
.tasbih-comp-count { font-size: 0.82rem; font-weight: 800; color: var(--text-1); display: block; line-height: 1.1; }
.tasbih-comp-pct { font-size: 0.6rem; color: var(--gold); font-weight: 600; }
.tasbih-comp-empty { font-size: 0.72rem; color: var(--text-3); padding: 10px 0; }

/* Trend card */
.tasbih-trend-scroll { overflow-x: auto; overflow-y: hidden; }
.tasbih-trend-svg { display: block; width: 100%; min-width: 280px; height: 110px; }

/* Light mode surfaces for dashboard cards */
body.light-mode .tasbih-card {
    background: linear-gradient(160deg, #ffffff 0%, #f6f4ea 100%);
}
body.light-mode .tasbih-donut-wrap svg g > circle:first-child { stroke: rgba(0,0,0,0.06); }

/* ── Riwayat: monthly groups ─────────────────────── */
.tasbih-month-group {
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
}
.tasbih-month-hdr {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: var(--bg-card);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}
.tasbih-month-info { display: flex; align-items: center; gap: 10px; }
.tasbih-month-name { font-size: 0.8rem; font-weight: 700; color: var(--text-1); }
.tasbih-month-total { font-size: 0.68rem; color: var(--gold); font-weight: 600; }
.tasbih-month-chevron { font-size: 0.6rem; color: var(--text-3); }
.tasbih-month-body { border-top: 1px solid var(--border); }
.tasbih-month-body .tasbih-riwayat-day {
    border-radius: 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    margin: 0;
}
.tasbih-month-body .tasbih-riwayat-day:last-child { border-bottom: none; }

/* ── Custom pill × delete button ─────────────────── */
.tasbih-pill-del {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    color: var(--text-3);
    font-size: 0.58rem;
    margin-left: 4px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    vertical-align: middle;
    flex-shrink: 0;
}
.tasbih-pill-del:hover { background: rgba(239,68,68,0.3); color: #ef4444; }

/* ── Custom confirm overlay (fixed, above modal) ─── */
.tasbih-confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 400;
    padding: 20px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.tasbih-confirm-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 22px 20px 18px;
    width: 100%;
    max-width: 300px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.tasbih-confirm-msg {
    font-size: 0.88rem;
    color: var(--text-1);
    line-height: 1.55;
    margin-bottom: 18px;
}
.tasbih-confirm-btns { display: flex; gap: 8px; }
.tasbih-confirm-btn-yes {
    flex: 1;
    background: rgba(239,68,68,0.12);
    border: 1px solid rgba(239,68,68,0.35);
    color: #ef4444;
    border-radius: 10px;
    padding: 10px 0;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
    font-family: var(--font-body, 'Plus Jakarta Sans', sans-serif);
}
.tasbih-confirm-btn-yes:hover { background: rgba(239,68,68,0.22); }
.tasbih-confirm-btn-no {
    flex: 1;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-2);
    border-radius: 10px;
    padding: 10px 0;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    font-family: var(--font-body, 'Plus Jakarta Sans', sans-serif);
}
.tasbih-confirm-btn-no:hover { background: rgba(255,255,255,0.05); }

/* ═══════════════════════════════════════════════
   TAB PANDUAN — GRID (pi-tab-*)
   ═══════════════════════════════════════════════ */
.pi-tab-sec-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-3);
    margin: 0 2px 0;
}

.pi-tab-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: -8px;
    margin-bottom: 0;
}

.pi-tab-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    overflow: hidden;
}
.pi-tab-card:hover,
.pi-tab-card:active {
    background: var(--bg-card-2);
    border-color: var(--border-gold);
}

.pi-tab-card-gold {
    border-color: rgba(212, 175, 55, 0.2);
    background: rgba(212, 175, 55, 0.04);
}
.pi-tab-card-gold:hover,
.pi-tab-card-gold:active {
    background: rgba(212, 175, 55, 0.09);
    border-color: rgba(212, 175, 55, 0.4);
}

.pi-tab-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 0.55rem;
    font-weight: 700;
    color: var(--text-1);
    background: var(--green-btn);
    padding: 2px 6px;
    border-radius: var(--radius-full);
    letter-spacing: 0.04em;
}

.pi-tab-badge-gold {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 0.55rem;
    font-weight: 700;
    color: #000;
    background: var(--gold);
    padding: 2px 6px;
    border-radius: var(--radius-full);
    letter-spacing: 0.04em;
}

.pi-tab-card-ico {
    font-size: 1.5rem;
    line-height: 1;
    margin-top: 4px;
    height: 38px;
    display: flex;
    align-items: center;
}

.pi-tab-card-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-1);
    line-height: 1.3;
}

.pi-tab-card-sub {
    font-size: 0.65rem;
    color: var(--text-2);
    line-height: 1.4;
}

.pi-tab-footer {
    text-align: center;
    font-size: 0.65rem;
    color: var(--text-3);
    padding: 8px 0 4px;
    margin-top: -8px;
}
.pi-tab-footer span {
    color: var(--text-2);
    font-weight: 500;
}

/* ═══════════════════════════════════════════════
   TAB LAINNYA
   ═══════════════════════════════════════════════ */
.lainnya-tentang-card {
    background: var(--bg-card);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-lg);
    padding: 18px 16px 16px;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
}
.lainnya-tentang-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--gold), rgba(212,175,55,0.08));
    border-radius: 16px 16px 0 0;
    pointer-events: none;
}

.lainnya-tentang-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.lainnya-app-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    flex-shrink: 0;
}

.lainnya-app-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-1);
    line-height: 1.2;
}

.lainnya-app-ver {
    font-size: 0.7rem;
    color: var(--text-3);
    margin-top: 2px;
}

.lainnya-tentang-desc {
    font-size: 0.78rem;
    color: var(--text-2);
    line-height: 1.6;
    margin-bottom: 12px;
}

.lainnya-tentang-footer {
    font-size: 0.7rem;
    color: var(--text-3);
    line-height: 1.8;
}

.lainnya-sec-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-3);
    margin: 0 2px 0;
}

.lainnya-group {
    background: var(--bg-card);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-md);
    margin-top: -8px;
    margin-bottom: 0;
    overflow: hidden;
    position: relative;
}
.lainnya-group::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--gold), rgba(212,175,55,0.08));
    border-radius: 12px 12px 0 0;
    pointer-events: none;
    z-index: 1;
}

.lainnya-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 14px;
    gap: 12px;
}

.lainnya-row-link {
    cursor: pointer;
    text-decoration: none;
    transition: background 0.12s;
    -webkit-tap-highlight-color: transparent;
}
.lainnya-row-link:hover { background: var(--bg-card-2); }

.lainnya-row-disabled {
    opacity: 0.55;
    pointer-events: none;
}

.lainnya-row-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.lainnya-row-ico {
    font-size: 1.15rem;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.lainnya-row-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-1);
    line-height: 1.2;
}

.lainnya-row-sub {
    font-size: 0.68rem;
    color: var(--text-2);
    margin-top: 2px;
    line-height: 1.3;
}

.lainnya-row-arr {
    font-size: 1.1rem;
    color: var(--text-3);
    flex-shrink: 0;
}

.lainnya-row-divider {
    height: 1px;
    background: var(--border);
    margin: 0 14px;
}

/* Theme toggle pill */
.lainnya-toggle {
    width: 42px;
    height: 24px;
    background: var(--text-3);
    border-radius: var(--radius-full);
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
}
/* Reset default button styles — prevents Android Chrome from adding
   default padding/border that misaligns the knob on button elements */
button.lainnya-toggle {
    border: none;
    padding: 0;
    margin: 0;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    display: block;
}
.lainnya-toggle.on {
    background: var(--gold);
}
.lainnya-toggle-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.lainnya-toggle.on .lainnya-toggle-knob {
    transform: translateX(18px);
}

/* ── Pemilih varian tema (theme.js) — chip lengkung mihrab ── */
.tv-opts {
    display: flex;
    gap: 6px;
    margin-top: 7px;
    flex-wrap: wrap;
}
.tv-opt {
    font-family: var(--font-ui);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: var(--arch-sm);
    border: 1px solid var(--border);
    background: var(--bg-2);
    color: var(--text-2);
    cursor: pointer;
    transition: all 0.15s;
}
.tv-opt:hover { border-color: var(--gold-border); color: var(--text-1); }
.tv-opt.tv-active {
    background: var(--gold-tint);
    border-color: var(--gold);
    color: var(--gold);
}

/* ═══════════════════════════════════════════════
   SINGLE AYAT VIEW (Ayat Pilihan)
   ═══════════════════════════════════════════════ */
.fav-av-overlay {
    position: fixed;
    inset: 0;
    z-index: 350;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center; /* center children on cross-axis (desktop width) */
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.fav-av-overlay.open {
    transform: translateX(0);
}

.fav-av-topbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-card);
    flex-shrink: 0;
    width: 100%; /* stays full-width bar despite parent align-items:center */
}

.fav-av-back {
    background: none;
    border: none;
    color: var(--gold);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 4px 0;
    font-family: inherit;
    white-space: nowrap;
    flex-shrink: 0;
}

.fav-av-title {
    flex: 1;
    text-align: center;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-1);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fav-av-star {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px;
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.15s, transform 0.15s;
}
.fav-av-star:active { transform: scale(1.3); opacity: 1; }

.fav-av-body {
    flex: 1;
    overflow-y: auto;
    padding: 28px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 640px;       /* centered via parent align-items:center */
    box-sizing: border-box;
}

.fav-av-ar {
    font-family: 'Scheherazade New', 'Amiri', serif;
    font-size: 1.75rem;
    line-height: 2.2;
    color: var(--text-1);
    text-align: right;
    margin: 0;
}

.fav-av-id {
    font-size: 0.9rem;
    line-height: 1.75;
    color: var(--text-2);
    margin: 0;
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

.fav-av-footer {
    padding: 16px 20px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--border);
    background: var(--bg-card);
    flex-shrink: 0;
    width: 100%;
    max-width: 640px;
    box-sizing: border-box;
}

.fav-av-open-btn {
    width: 100%;
    padding: 13px;
    background: var(--green-btn);
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-1);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s;
}
.fav-av-open-btn:hover { background: var(--green-hover); }

/* Notification tip note */
.notif-tip {
    font-size: 0.65rem;
    color: var(--text-3);
    line-height: 1.6;
    padding: 0 4px;
    margin-top: -6px;
}

/* "Segera" badge */
.lainnya-badge-soon {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--text-2);
    background: var(--bg-card-2);
    border: 1px solid var(--border);
    padding: 3px 8px;
    border-radius: var(--radius-full);
    letter-spacing: 0.04em;
    flex-shrink: 0;
}
.lainnya-badge-auto {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--gold);
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.3);
    padding: 3px 8px;
    border-radius: var(--radius-full);
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

/* ── Notif Topic Toggle Rows ─────────────────────────────────── */
.notif-row-needs-perm {
    opacity: 0.72;
}
.notif-row-needs-perm .lainnya-row-left {
    pointer-events: none;
}
.notif-perm-badge {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--gold);
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.4);
    padding: 3px 8px;
    border-radius: var(--radius-full);
    letter-spacing: 0.04em;
    flex-shrink: 0;
    cursor: pointer;
    transition: background 0.2s;
}
.notif-perm-badge:hover {
    background: rgba(212, 175, 55, 0.22);
}
.notif-toggle-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    flex-shrink: 0;
}
.notif-toggle-label {
    font-size: 0.55rem;
    color: var(--text-3);
    font-weight: 500;
    letter-spacing: 0.02em;
    text-align: right;
    white-space: nowrap;
}

/* ── Notif Permission Prompt ─────────────────────────────────── */
.notif-prompt-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 900;
}
.notif-prompt-overlay.show { display: block; }

.notif-prompt-sheet {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    width: 100%;
    max-width: 480px;
    background: var(--bg-card);
    border-radius: 20px 20px 0 0;
    padding: 12px 24px calc(24px + env(safe-area-inset-bottom, 0px));
    z-index: 901;
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
    text-align: center;
}
.notif-prompt-sheet.show { transform: translateX(-50%) translateY(0); }

.notif-prompt-handle {
    width: 36px; height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 0 auto 20px;
}
.notif-prompt-ico {
    font-size: 2.4rem;
    margin-bottom: 10px;
}
.notif-prompt-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-1);
    margin-bottom: 8px;
}
.notif-prompt-desc {
    font-size: 0.8rem;
    color: var(--text-2);
    line-height: 1.6;
    margin-bottom: 20px;
}
.notif-prompt-btn-allow {
    width: 100%;
    padding: 13px;
    background: var(--green-btn);
    color: var(--text-1);
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    margin-bottom: 10px;
    touch-action: manipulation;
}
.notif-prompt-btn-skip {
    width: 100%;
    padding: 11px;
    background: none;
    color: var(--text-3);
    border: none;
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    touch-action: manipulation;
}

/* ── Prayer Strip (Beranda) ──────────────────────────────────── */
.prayer-strip {
    background: var(--bg-card);
    border: 1px solid var(--border-gold);
    border-radius: 12px;
    padding: 10px 8px 10px 14px;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
}
.prayer-strip::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--gold), rgba(212,175,55,0.08));
    border-radius: 12px 12px 0 0;
    pointer-events: none;
}
.ps-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.ps-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.ps-block-next { flex: 1; }
.ps-lbl {
    font-size: 0.58rem;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.ps-val {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0 4px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-1);
}
.ps-time-val {
    color: var(--gold);
}
.ps-sep {
    color: var(--border);
    font-size: 1.3rem;
    align-self: center;
    opacity: 0.6;
    flex-shrink: 0;
}
.ps-cd {
    font-size: 0.82rem;
    color: var(--text-3);
    font-weight: 400;
}
.ps-btn {
    background: none;
    border: 1px solid rgba(212,175,55,0.35);
    border-radius: 8px;
    color: var(--gold);
    font-size: 0.68rem;
    padding: 5px 10px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.15s;
}
.ps-btn:hover { background: rgba(212,175,55,0.1); }

/* ── Kalender Link Row (Beranda) ─────────────────────────────── */
.kalender-link-row {
    text-align: center;
    margin: 2px 0 14px;
}
.kalender-link-btn {
    background: none;
    border: none;
    color: var(--text-3);
    font-size: 0.72rem;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 8px;
    transition: color 0.15s;
    font-family: inherit;
}
.kalender-link-btn:hover { color: var(--gold); }
.kalender-link-arr { color: var(--gold); margin-left: 2px; }

/* ═══════════════════════════════════════════════
   TAB KOMUNITAS
   ═══════════════════════════════════════════════ */
.komunitas-card {
    background: var(--bg-card);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
}
.komunitas-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--gold), rgba(212,175,55,0.08));
    border-radius: 16px 16px 0 0;
    pointer-events: none;
    z-index: 1;
}

.komunitas-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 12px;
    border-bottom: 1px solid var(--border);
}

.komunitas-head-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.komunitas-ico { font-size: 1.3rem; line-height: 1; }

.komunitas-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-1);
    line-height: 1.2;
}

.komunitas-sub {
    font-size: 0.65rem;
    color: var(--text-3);
    margin-top: 2px;
}

/* Masjid list */
.masjid-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 16px;
    gap: 12px;
}

.masjid-item-left { flex: 1; min-width: 0; }

.masjid-item-name {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-1);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.masjid-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 3px;
}

.masjid-item-dist {
    font-size: 0.66rem;
    font-weight: 700;
    color: var(--gold-br);
    font-family: var(--font-mono);
    letter-spacing: 0.02em;
}

.masjid-item-walk {
    font-size: 0.63rem;
    color: var(--t2);
}

.masjid-maps-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 50%;
    color: var(--gold);
    flex-shrink: 0;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}
.masjid-maps-btn:hover  { background: rgba(212, 175, 55, 0.22); }
.masjid-maps-btn:active { transform: scale(0.92); }

.masjid-divider {
    height: 1px;
    background: var(--border);
    margin: 0 16px;
}

.masjid-loading, .masjid-empty {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 20px 16px;
    color: var(--text-3);
    font-size: 0.78rem;
}

.masjid-empty {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding: 24px 16px;
}

.masjid-empty p { margin: 0; line-height: 1.5; }

.komunitas-loc-btn {
    margin-top: 4px;
    background: none;
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-full);
    color: var(--gold);
    font-size: 0.72rem;
    padding: 5px 14px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s;
}
.komunitas-loc-btn:hover { background: rgba(212, 175, 55, 0.1); }

/* Load data masjid button (in header) */
.masjid-gmaps-arr {
    font-size: 1rem;
    color: var(--gold);
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: opacity 0.15s;
}
.masjid-gmaps-arr:hover { opacity: 0.7; }

/* Show more row */
.masjid-show-more {
    padding: 10px 16px;
    text-align: center;
}
.masjid-show-more-btn {
    background: none;
    border: none;
    color: var(--gold);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    padding: 4px 0;
    transition: opacity 0.15s;
}
.masjid-show-more-btn:hover { opacity: 0.75; }

/* Restoran Halal button */
.restoran-halal-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-lg);
    cursor: pointer;
    width: 100%;
    font-family: inherit;
    text-align: left;
    transition: background 0.15s, border-color 0.15s;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    overflow: hidden;
}
.restoran-halal-btn::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--gold), rgba(212,175,55,0.08));
    border-radius: 16px 16px 0 0;
    pointer-events: none;
}
.restoran-halal-btn:hover, .restoran-halal-btn:active {
    background: var(--bg-card-2);
    border-color: rgba(212,175,55,0.65);
}

.restoran-halal-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.restoran-halal-ico { font-size: 1.3rem; line-height: 1; }

.restoran-halal-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-1);
    line-height: 1.2;
}

.restoran-halal-sub {
    font-size: 0.65rem;
    color: var(--text-3);
    margin-top: 2px;
}

.restoran-halal-arr {
    font-size: 1rem;
    color: var(--gold);
    flex-shrink: 0;
}

/* ── Combined Block (Beranda) ──────────────────────────────────── */
.combined-block {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-gold);
    box-shadow: var(--shadow-sm);
    position: relative;
}
.combined-block::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--gold), rgba(212,175,55,0.08));
    border-radius: 16px 16px 0 0;
    pointer-events: none;
    z-index: 1;
}

/* Prayer part — slightly darker, same as card bg */
.prayer-part {
    background: var(--bg-card);
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
}

/* Dates part — slightly lighter than card */
.dates-part {
    background: var(--bg-card-2);
    border-bottom: 1px solid var(--border);
}

/* 2×2 grid of date cells */
.date-2x2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.d2-cell {
    padding: 10px 12px 9px;
}
.d2-cell:nth-child(odd) {
    border-right: 1px solid var(--border);
}
.d2-cell:nth-child(1),
.d2-cell:nth-child(2) {
    border-bottom: 1px solid var(--border);
}

.d2-lbl {
    font-size: 0.68rem;
    color: var(--text-3);
    display: flex;
    align-items: center;
    gap: 3px;
    margin-bottom: 5px;
    line-height: 1.3;
}

.d2-main {
    font-size: 0.96rem;
    font-weight: 600;
    color: var(--text-1);
    margin-bottom: 3px;
    line-height: 1.25;
}

.d2-sub {
    font-size: 0.65rem;
    color: var(--text-2);
    line-height: 1.3;
}

/* Libur nasional (tanggal merah) — tanggal Masehi & Hijriah jadi merah */
.d2-main.date-libur { color: #ef4444; }

.d2-nums {
    display: flex;
    gap: 6px;
    margin-bottom: 4px;
    align-items: flex-start;
}

.d2-num-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
}

/* Kalender link row — menyatu di bawah combined-block */
.lihat-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 14px;
    background: var(--bg-card);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s;
}
.lihat-bottom:hover,
.lihat-bottom:active {
    background: var(--bg-card-2);
}

.lihat-bottom-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.lihat-bottom-ico-svg {
    width: 14px; height: 14px;
    color: var(--text-3);
    display: block;
    flex-shrink: 0;
}

.lihat-bottom-text {
    font-size: 0.72rem;
    color: var(--text-3);
}

.lihat-bottom-arr {
    font-size: 1rem;
    color: var(--text-3);
    flex-shrink: 0;
}

/* ── Kalender Section — Opsi 2 Gold Accent Banner ────────────── */
.kalender-section {
    background: linear-gradient(135deg, var(--surface-2) 0%, var(--surface) 100%);
    border: 1px solid var(--border-gold);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    padding: 14px 16px;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
}
.kalender-section::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--gold), rgba(212,175,55,0.15));
    border-radius: 16px 16px 0 0;
}
/* Light mode & varian tema (Ka'bah/Royal) ditangani otomatis via token --surface-* */
.kalender-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0;
}
.kalender-head-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.kalender-head-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}
.kalender-ico-wrap {
    width: 42px; height: 42px;
    background: rgba(212,175,55,0.12);
    border: 1px solid var(--border-gold);
    border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.kalender-ico-svg {
    width: 24px; height: 24px;
    color: var(--gold);
    display: block;
}
.kalender-greg {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-1);
    line-height: 1.3;
}
.kalender-sub {
    font-size: 0.62rem;
    color: var(--gold);
    margin-top: 2px;
}
.kalender-dow {
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.kalender-placeholder {
    background: var(--bg);
    border-radius: 10px;
    padding: 20px 16px;
    text-align: center;
}
.kalender-ph-ico {
    font-size: 2rem;
    display: block;
    margin-bottom: 8px;
    opacity: 0.45;
}
.kalender-ph-text {
    font-size: 0.75rem;
    color: var(--text-3);
    line-height: 1.55;
    margin: 0;
}

/* Entry card head — clickable */
.kalender-section .kalender-head { cursor: pointer; }
.kalender-section .kalender-head:hover { opacity: 0.85; }

/* Entry preview events */
.kal-entry-events {
    border-top: 1px solid var(--border);
    padding: 6px 0 2px;
    margin-top: 6px;
}
.kal-entry-ev-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 0.72rem;
}
.kal-entry-ev-dot {
    flex-shrink: 0;
}
.kal-entry-ev-name { color: var(--text-2); flex: 1; }
.kal-entry-ev-date { color: var(--text-2); font-size: 0.65rem; white-space: nowrap; }

/* ═══════════════════════════════════════════════
   KALENDER ISLAM OVERLAY
   ═══════════════════════════════════════════════ */
.kal-overlay {
    position: fixed;
    inset: 0;
    max-width: 480px;
    margin: 0 auto;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    transform: translateX(100vw);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 200;
    overflow: hidden;
}
.kal-overlay.open { transform: translateX(0); }

/* Top bar */
.kal-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 14px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.kal-back-btn, .kal-today-btn {
    background: none;
    border: none;
    color: var(--gold);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    font-family: inherit;
}
.kal-topbar-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-1);
}

/* Month navigation */
.kal-month-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px 8px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.kal-nav-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-2);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
}
.kal-nav-btn:hover { border-color: var(--gold); color: var(--gold); }
.kal-month-info { text-align: center; }
.kal-hijri-lbl {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-1);
}
.kal-masehi-lbl {
    font-size: 0.72rem;
    font-weight: 500;
    color: #D4AF37;
    margin-top: 2px;
}

/* Day headers */
.kal-day-headers {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    padding: 8px 8px 4px;
    flex-shrink: 0;
}
.kal-dh {
    text-align: center;
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.kal-dh-fri { color: var(--gold); }

/* Calendar grid */
.kal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    padding: 0 8px 4px;
    gap: 2px;
    flex-shrink: 0;
}
.kal-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4px 2px 3px;
    border-radius: 8px;
    cursor: pointer;
    min-height: 46px;
    gap: 1px;
}
.kal-cell:hover:not(.today) { background: var(--bg-card); }
.kal-cell.other-month { opacity: 0.28; pointer-events: none; }
.kal-cell.today { background: linear-gradient(135deg, #1f8a5a, #15633e); }
.kal-cell.today .kal-g-num { color: #fff; font-weight: 700; }
.kal-cell.today .kal-h-num { color: rgba(255,255,255,0.65); }
.kal-cell.jumat .kal-g-num { color: var(--gold); }
.kal-g-num {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.1;
    color: var(--text-1);
}
.kal-h-num {
    font-size: 0.54rem;
    color: var(--text-3);
    line-height: 1;
}
.kal-dots {
    display: flex;
    gap: 2px;
    margin-top: 2px;
    min-height: 6px;
}
.kal-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
}
.kal-dot-gold  { background: #D4AF37; }  /* Hari Besar — Gold */
.kal-dot-green { background: #5A93B8; }  /* Puasa Sunnah — Dusty Blue */
.kal-dot-blue  { background: #d9695a; }  /* Libur Nasional — Terracotta */

/* Legend */
.kal-legend {
    display: flex;
    gap: 12px;
    padding: 6px 14px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    flex-wrap: wrap;
}
.kal-leg-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.6rem;
    color: var(--text-3);
}
.kal-leg-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}
.kal-dot-today { background: #1f8a5a; }

/* Events section */
.kal-events-section {
    flex: 1;
    overflow-y: auto;
    padding: 10px 14px 80px;
}
.kal-events-lbl {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 8px;
}
.kal-ev-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.71rem;
    line-height: 1.5;
}
.kal-ev-row:last-child { border-bottom: none; }
.kal-ev-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 4px;
}
.kal-ev-dot-gold  { background: #D4AF37; }  /* Hari Besar — Gold */
.kal-ev-dot-green { background: #5A93B8; }  /* Puasa Sunnah — Dusty Blue */
.kal-ev-dot-blue  { background: #d9695a; }  /* Libur Nasional — Terracotta */
.kal-ev-text { color: var(--text-2); }
.kal-ev-today { background: rgba(76, 175, 122, 0.15); border-radius: 6px; }
.kal-ev-today .kal-ev-text { color: #4caf7a; font-weight: 700; }
.kal-ev-upcoming .kal-ev-text { font-weight: 700; color: var(--text-1); }
.kal-ev-empty {
    font-size: 0.75rem;
    color: var(--text-3);
    text-align: center;
    padding: 24px 0;
}

/* ═══════════════════════════════════════════════
   CAROUSEL BANNER
   ═══════════════════════════════════════════════ */
.banner-carousel {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(212, 175, 55, 0.25);
    box-shadow: var(--shadow-sm);
    user-select: none;
    -webkit-user-select: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.banner-track {
    display: flex;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.banner-slide {
    flex: 0 0 100%;
    min-width: 0;
}

.banner-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px 22px;
    min-height: 100px;
}

/* Banner gambar penuh (Firebase bgImage) — rasio ≈2.8:1 seperti referensi.
   Gambar ideal 1080×385 (≈2.8:1). Chrome overlay (icon/teks/panah) disembunyikan
   agar gambar full-bleed. Banner-teks fallback tetap pakai .banner-card biasa. */
.banner-card--img {
    padding: 0;
    min-height: 0;
    aspect-ratio: 1080 / 385;
}
.banner-card--img > * { display: none; }

.banner-icon {
    font-size: 2.2rem;
    line-height: 1;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

.banner-text {
    flex: 1;
    min-width: 0;
}

.banner-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
    margin-bottom: 3px;
}

.banner-subtitle {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.45;
}

.banner-arr {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 2px;
}

/* Dot indicators */
.banner-dots {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    z-index: 2;
    pointer-events: none;
}

.banner-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: background 0.2s, width 0.2s;
    flex-shrink: 0;
}

.banner-dot.active {
    background: rgba(255, 255, 255, 0.9);
    width: 14px;
    border-radius: 3px;
}

/* Toast */
.banner-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    background: rgba(20, 40, 20, 0.96);
    color: #f0f4f0;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 9px 20px;
    border-radius: 999px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    white-space: normal;
    max-width: min(88vw, 340px);
    text-align: center;
    word-break: break-word;
    z-index: 9999;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
}

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

/* ══════════════════════════════════════════════════
   FITUR NurAI TERBAIK — Bottom sheet modal
   ══════════════════════════════════════════════════ */
.nts-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 350;
    display: flex;
    align-items: flex-end;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}
.nts-overlay.show {
    opacity: 1;
    pointer-events: auto;
}
.nts-sheet {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    background: var(--bg-card);
    border-radius: 22px 22px 0 0;
    border-top: 1px solid rgba(212,175,55,0.35);
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.32,0.72,0,1);
    overflow: hidden;
    position: relative;
}
.nts-sheet::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--gold), rgba(212,175,55,0.08));
    pointer-events: none;
}
.nts-overlay.show .nts-sheet {
    transform: translateY(0);
}
.nts-handle {
    width: 36px; height: 4px;
    background: rgba(255,255,255,0.12);
    border-radius: 2px;
    margin: 12px auto 6px;
}
.nts-body {
    padding: 4px 20px 0;
    text-align: center;
}
.nts-crown { font-size: 2.2rem; margin-bottom: 8px; display: block; }
.nts-title { font-size: 1.05rem; font-weight: 700; color: var(--text-1); margin-bottom: 6px; }
.nts-desc  { font-size: 0.75rem; color: var(--text-2); line-height: 1.6; margin-bottom: 18px; }
.nts-feats {
    text-align: left;
    display: flex; flex-direction: column; gap: 9px;
    margin-bottom: 16px;
    max-height: 46vh;          /* 9 fitur → bisa di-scroll, header & tombol tetap terlihat */
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    padding-right: 4px;
}
.nts-feat {
    display: flex; align-items: center; gap: 12px;
}
.nts-feat-ico {
    width: 36px; height: 36px;
    background: rgba(212,175,55,0.1);
    border: 1px solid rgba(212,175,55,0.25);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; flex-shrink: 0;
}
.nts-feat-title { font-size: 0.78rem; font-weight: 600; color: var(--text-1); }
.nts-feat-sub   { font-size: 0.63rem; color: var(--text-2); margin-top: 1px; }
.nts-mulai {
    width: 100%;
    background: linear-gradient(135deg, #d4af37, #d4af37, #a8893e);
    color: #000;
    border: none;
    border-radius: 14px;
    padding: 14px;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    letter-spacing: 0.01em;
    margin-bottom: 10px;
}
.nts-nanti {
    width: 100%;
    background: none;
    color: var(--text-3);
    border: none;
    font-size: 0.78rem;
    cursor: pointer;
    font-family: inherit;
    padding: 6px;
    margin-bottom: 2px;
}

/* Lainnya row — Fitur Terbaik highlight */
.lainnya-row-terbaik .lainnya-row-ico { color: var(--gold); }
.lainnya-row-terbaik .lainnya-row-title { color: var(--gold); font-weight: 600; }
.lainnya-row-terbaik .lainnya-row-arr { color: var(--gold); }

/* ══════════════════════════════════════════════════
   QURAN DOWNLOAD — Button states, Sheet, Storage row
   ══════════════════════════════════════════════════ */

/* Download button on surah/juz rows */
.qh-dl-btn {
    width: 28px; height: 28px; border-radius: 50%;
    border: 1.5px solid rgba(212,175,55,.3);
    background: rgba(212,175,55,.08);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; flex-shrink: 0; position: relative;
    transition: border-color .15s, background .15s;
    font-size: .65rem; color: var(--gold);
}
.qh-dl-btn:hover  { border-color: rgba(212,175,55,.6); background: rgba(212,175,55,.14); }
.qh-dl-btn.qhdl-done { border-color: rgba(45,106,45,.6); background: rgba(45,106,45,.18); color: #7dc97d; }
.qh-dl-btn.qhdl-spin { border-color: transparent; background: rgba(212,175,55,.06); color: transparent; }
.qh-dl-ring {
    position: absolute; inset: 0; border-radius: 50%;
    border: 2px solid rgba(212,175,55,.15); border-top-color: var(--gold);
    animation: qhdl-spin .9s linear infinite; display: none;
}
.qh-dl-btn.qhdl-spin .qh-dl-ring { display: block; }
.qh-dl-pct { font-size: .44rem; color: var(--gold); font-weight: 700; display: none; }
.qh-dl-btn.qhdl-spin .qh-dl-pct { display: block; }
@keyframes qhdl-spin { to { transform: rotate(360deg); } }
/* Square variant for juz list */
.qh-dl-btn.qhdl-sq { border-radius: 8px; }
/* Spinning button → tap to cancel hint (subtle red tint on hover) */
.qh-dl-btn.qhdl-spin:hover { border-color: rgba(229,57,53,.4); }

/* Thin progress bar at bottom edge of surah/juz row during download */
.qh-dl-rowbar {
    position: absolute; bottom: 0; left: 0; height: 2.5px;
    background: var(--gold); border-radius: 0 2px 2px 0;
    width: 0%; transition: width .3s ease;
    pointer-events: none; z-index: 1;
}

/* Storage row (top — below tabs, persistent banner) */
.qh-storage-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 14px;
    margin: 8px 12px 0;
    background: rgba(212,175,55,.07);
    border: 1px solid rgba(212,175,55,.22);
    border-radius: 9px;
    flex-shrink: 0;
}
.qh-storage-lbl { font-size: .66rem; color: var(--text-2); }
.qh-storage-manage { font-size: .66rem; font-weight: 600; color: var(--gold); background: none; border: none; cursor: pointer; font-family: inherit; }

/* ── Download Sheet ──────────────────────────────── */
.qdl-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.6);
    z-index: 360; display: flex; align-items: flex-end;
    opacity: 0; pointer-events: none; transition: opacity .25s;
}
.qdl-overlay.show { opacity: 1; pointer-events: auto; }
.qdl-sheet {
    width: 100%; max-width: 480px; margin: 0 auto;
    background: var(--bg-card);
    border-radius: 22px 22px 0 0;
    border-top: 1px solid rgba(212,175,55,.35);
    padding-bottom: calc(20px + env(safe-area-inset-bottom,0px));
    transform: translateY(100%);
    transition: transform .3s cubic-bezier(.32,.72,0,1);
    position: relative; overflow: hidden;
}
.qdl-sheet::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg,var(--gold),rgba(212,175,55,.08));
    pointer-events: none;
}
.qdl-overlay.show .qdl-sheet { transform: translateY(0); }
.qdl-handle { width: 36px; height: 4px; background: rgba(255,255,255,.12); border-radius: 2px; margin: 12px auto 6px; }
.qdl-hdr {
    padding: 10px 18px 12px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
}
.qdl-title { font-size: .88rem; font-weight: 700; }
.qdl-subtitle { font-size: .64rem; color: var(--text-2); margin-top: 2px; }
.qdl-x {
    width: 28px; height: 28px; background: var(--bg-card-2); border: 1px solid var(--border);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: .7rem; cursor: pointer; color: var(--text-2); flex-shrink: 0;
}
.qdl-body { padding: 14px 18px; }
.qdl-item-name { font-size: .92rem; font-weight: 700; color: var(--text-1); margin-bottom: 2px; }
.qdl-item-meta { font-size: .66rem; color: var(--text-2); margin-bottom: 14px; }
.qdl-kbps-row { display: flex; gap: 8px; margin-bottom: 14px; }
.qdl-kbps-chip {
    flex: 1; padding: 6px; text-align: center; cursor: pointer;
    background: rgba(212,175,55,.06); border: 1px solid rgba(212,175,55,.18);
    border-radius: 8px; font-size: .64rem; color: var(--text-2);
}
.qdl-kbps-chip strong { display: block; color: var(--gold); font-size: .78rem; font-weight: 700; }
.qdl-kbps-chip.on { border-color: rgba(212,175,55,.5); background: rgba(212,175,55,.12); }
.qdl-qari-lbl { font-size: .6rem; color: var(--text-3); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.qdl-qari-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.qdl-qari-chip {
    background: var(--bg-card-2); border: 1px solid var(--border);
    border-radius: 8px; padding: 5px 10px; font-size: .68rem; color: var(--text-2); cursor: pointer;
}
.qdl-qari-chip.on { background: rgba(45,106,45,.2); border-color: var(--green-btn); color: var(--text-1); }
.qdl-prog-wrap { width: 100%; height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; margin-bottom: 8px; display: none; }
.qdl-prog-wrap.show { display: block; }
.qdl-prog-bar { height: 100%; background: var(--gold); border-radius: 3px; transition: width .3s; }
.qdl-prog-lbl { font-size: .64rem; color: var(--text-2); text-align: center; margin-bottom: 10px; display: none; }
.qdl-prog-lbl.show { display: block; }
.qdl-go {
    width: 100%; background: var(--green-btn); color: #fff; border: none;
    border-radius: 12px; padding: 13px; font-size: .88rem; font-weight: 600;
    cursor: pointer; font-family: inherit;
    display: flex; align-items: center; justify-content: center; gap: 6px;
}
.qdl-go:disabled { opacity: .45; cursor: not-allowed; }
/* Cancel button — shown while downloading (replaces Mulai Unduh) */
.qdl-cancel {
    width: 100%; background: rgba(229,57,53,.1); color: #ef5350;
    border: 1px solid rgba(229,57,53,.35); border-radius: 12px; padding: 13px;
    font-size: .88rem; font-weight: 600; cursor: pointer; font-family: inherit;
    display: none; align-items: center; justify-content: center; gap: 6px;
}
.qdl-cancel.show { display: flex; }
.qdl-go.hide { display: none; }
.qdl-note { font-size: .6rem; color: var(--text-3); text-align: center; margin-top: 8px; line-height: 1.5; }

/* ── Kelola Unduhan screen ────────────────────── */
.qdl-kelola-overlay {
    position: fixed; inset: 0; background: var(--bg);
    z-index: 370; display: flex; flex-direction: column;
    align-items: center; /* center the 640px column on desktop */
    opacity: 0; pointer-events: none;
    transform: translateX(100%);
    transition: opacity .2s, transform .25s cubic-bezier(.32,.72,0,1);
}
.qdl-kelola-overlay.show { opacity: 1; pointer-events: auto; transform: translateX(0); }
.qdl-kelola-hdr {
    background: var(--bg-card); border-bottom: 1px solid var(--border);
    padding: 13px 14px; display: flex; align-items: center; gap: 10px; flex-shrink: 0;
    width: 100%; max-width: 640px; box-sizing: border-box;
}
.qdl-kelola-back {
    width: 30px; height: 30px; background: var(--bg-card-2); border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-1); font-size: .9rem; border: none; cursor: pointer; flex-shrink: 0;
    font-family: inherit;
}
.qdl-kelola-title { font-size: .95rem; font-weight: 600; flex: 1; }
/* Inner content constrained on wide screens (desktop) so it doesn't stretch full width */
.qdl-kelola-body  { flex: 1; overflow-y: auto; width: 100%; max-width: 640px; box-sizing: border-box; }
.qdl-kelola-list  { width: 100%; }
.qdl-kelola-empty {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    padding: 60px 24px; text-align: center;
    max-width: 640px; margin: 0 auto;
}
.qdl-kelola-empty-ico { font-size: 2.5rem; opacity: .4; }
.qdl-kelola-empty-txt { font-size: .82rem; color: var(--text-2); line-height: 1.6; }
.qdl-kelola-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px; border-bottom: 1px solid var(--border);
}
.qdl-kelola-ico { font-size: 1rem; flex-shrink: 0; }
.qdl-kelola-info { flex: 1; min-width: 0; }
.qdl-kelola-name { font-size: .82rem; font-weight: 600; color: var(--text-1); }
.qdl-kelola-meta {
    font-size: .62rem; color: var(--text-2); margin-top: 3px;
    display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
}
.qdl-ktag-s { background: rgba(45,106,45,.2); border: 1px solid rgba(45,106,45,.4); color: #7dc97d; font-size: .52rem; font-weight: 700; padding: 1px 5px; border-radius: 4px; letter-spacing: .04em; }
.qdl-ktag-j { background: rgba(212,175,55,.12); border: 1px solid rgba(212,175,55,.3); color: var(--gold); font-size: .52rem; font-weight: 700; padding: 1px 5px; border-radius: 4px; letter-spacing: .04em; }
.qdl-open-btn {
    width: 30px; height: 30px; background: rgba(212,175,55,.1); border: 1px solid rgba(212,175,55,.3);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 1rem; cursor: pointer; color: var(--gold); flex-shrink: 0;
    font-family: inherit; line-height: 1;
}
.qdl-open-btn:hover { background: rgba(212,175,55,.2); }
.qdl-del-btn {
    width: 30px; height: 30px; background: rgba(229,57,53,.1); border: 1px solid rgba(229,57,53,.3);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: .7rem; cursor: pointer; color: #ef5350; flex-shrink: 0;
}
.qdl-kelola-footer {
    padding: 12px 14px; border-top: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
    background: var(--bg-card);
    width: 100%; max-width: 640px; box-sizing: border-box;
}
.qdl-footer-lbl   { font-size: .72rem; color: var(--text-2); }
.qdl-footer-size  { font-size: .82rem; font-weight: 700; color: var(--gold); }
.qdl-hapus-semua  {
    display: block;
    width: calc(100% - 28px); max-width: 612px; margin: 0 auto 12px;
    background: rgba(229,57,53,.1); border: 1px solid rgba(229,57,53,.3); color: #ef5350;
    border-radius: 10px; padding: 10px; font-size: .78rem; font-weight: 600;
    cursor: pointer; font-family: inherit;
}

/* ╔══════════════════════════════════════════════════════════════╗
   ║  REVAMP SKIN — MIHRAB × BENTO (Fase 4)                        ║
   ║  Lapisan reskin di ATAS aturan komponen lama: hanya menimpa    ║
   ║  presentasi (radius/lengkung mihrab, gradien, tipografi aksen).║
   ║  Layout & mekanika tetap di section asal masing-masing.       ║
   ╚══════════════════════════════════════════════════════════════╝ */

/* ── Pola bersama: bahu lengkung (arch sliver) di puncak kartu ── */
.ayat-card::before,
.hadis-card::before,
.chat-section::before,
.combined-block::before,
.kalender-section::before {
    height: 8px;
    left: 50%;
    right: auto;
    width: 56%;
    transform: translateX(-50%);
    background: var(--gold-tint);
    border-bottom: 1px solid var(--gold-border);
    border-radius: 0;
    border-top-left-radius: 999px 8px;
    border-top-right-radius: 999px 8px;
}

/* ════════ 4a · BERANDA ════════ */
.greeting h1 {
    font-family: var(--font-display);
    font-size: 1.18rem;
    letter-spacing: -0.01em;
}

/* Hero — combined block bergaya ceruk mihrab */
.combined-block {
    border-radius: var(--arch-hero);
    border-color: var(--gold-border);
    box-shadow: var(--shadow);
}
.prayer-part {
    background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
    padding: 14px 14px 12px;
}
.ps-lbl {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    letter-spacing: 0.16em;
    color: var(--text-2);
}
.ps-val { font-weight: 700; }
.ps-time-val {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--gold-br);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}
.ps-cd {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.05em;
    color: var(--gold);
}
.ps-btn {
    border: 1px solid var(--gold-border);
    border-radius: var(--arch-sm);
    background: var(--gold-tint-2);
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.ps-btn:hover { background: var(--gold-tint); }
.dates-part { background: var(--bg-2); }
.d2-lbl {
    font-family: var(--font-mono);
    font-size: 0.58rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.d2-main { font-weight: 700; }

/* Ayat Harian — tile permata zamrud (bento) */
.ayat-card {
    background: linear-gradient(180deg, var(--surface-2) 0%, var(--emerald-deep) 100%);
    border-radius: var(--arch-lg);
    border-color: var(--gold-border);
}
.ayat-title-row {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.ayat-badge {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.06em;
    background: var(--gold-tint-2);
}
.ayat-arabic { color: var(--scripture); }
.ayat-translation {
    font-family: var(--font-serif);
    font-size: 0.95rem;
    font-style: italic;
}
.ayat-ref {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
body.light-mode .ayat-card {
    background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
}

/* Hadis Harian — tile kertas/manuskrip (ink di atas paper) */
.hadis-card {
    background: linear-gradient(180deg, var(--paper) 0%, var(--paper-deep) 100%);
    border-radius: var(--arch-lg);
    border-color: rgba(168, 140, 80, 0.5);
}
.hadis-card::before {
    background: rgba(168, 140, 80, 0.18);
    border-bottom-color: rgba(168, 140, 80, 0.5);
}
.hadis-title-row {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(20, 18, 12, 0.6);
}
.hadis-arabic { font-family: 'Amiri', var(--font-arabic); color: var(--ink); }
.hadis-translation {
    font-family: var(--font-serif);
    font-style: italic;
    color: rgba(20, 18, 12, 0.78);
}
.hadis-badge {
    background: rgba(20, 18, 12, 0.08);
    color: rgba(20, 18, 12, 0.62);
    border-color: rgba(20, 18, 12, 0.22);
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.06em;
}

/* Chat NurAI */
.chat-section {
    border-radius: var(--arch-lg);
    border-color: var(--gold-border);
}
.chat-section-header h2 { font-family: var(--font-display); }
.prompt-chip {
    background: var(--gold-tint-2);
    border-color: var(--gold-line);
    color: var(--gold-br);
}
.prompt-chip:hover { background: var(--gold-tint); }
#user-input { border-radius: var(--arch-md); }
#send-btn {
    background: var(--gold);
    color: var(--brand-ink);
    border-radius: var(--arch-sm);
}
#send-btn:hover { background: var(--gold-br); }
body.light-mode .prompt-chip { color: var(--gold); }

/* Banner carousel ikut lengkung */
.banner-carousel { border-radius: var(--arch-lg); overflow: hidden; }

/* ════════ 4b · IBADAH ════════ */
/* Section label → eyebrow JBM */
.ibadah-sec-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.14em;
    color: var(--text-2);
}
/* Jadwal Sholat — hero ceruk mihrab */
.sholat-fw-card {
    border-radius: var(--arch-hero);
    border-color: var(--gold-border);
    background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 60%, var(--bg-2) 100%);
}
.sholat-fw-card::before {
    height: 8px; left: 50%; right: auto; width: 56%;
    transform: translateX(-50%);
    background: var(--gold-tint);
    border-bottom: 1px solid var(--gold-border);
    border-radius: 0;
    border-top-left-radius: 999px 8px;
    border-top-right-radius: 999px 8px;
}
.sholat-fw-title { font-family: var(--font-display); font-size: 0.92rem; }
.sholat-fw-countdown-bar { background: var(--gold-tint-2); }
.sholat-fw-countdown-lbl {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.sholat-fw-countdown-val { font-family: var(--font-mono); }
.sholat-fw-row.sholat-active {
    background: linear-gradient(110deg, var(--gold-tint), rgba(31,96,72,0.12));
    box-shadow: inset 3px 0 0 var(--gold);
}
.sholat-time { font-variant-numeric: tabular-nums; }

/* Grid kartu fitur — ceruk mihrab + tile ikon lengkung */
.ibadah-3card {
    background: linear-gradient(160deg, var(--surface-2) 0%, var(--emerald-deep) 100%);
    border-radius: var(--arch-md);
    border-color: var(--gold-border);
}
.ibadah-3card::before {
    height: 7px; left: 50%; right: auto; width: 50%;
    transform: translateX(-50%);
    background: var(--gold-tint);
    border-bottom: 1px solid var(--gold-border);
    border-radius: 0;
    border-top-left-radius: 999px 7px;
    border-top-right-radius: 999px 7px;
}
.ibadah-3card:hover, .ibadah-3card:active {
    background: linear-gradient(160deg, var(--surface-3) 0%, var(--emerald-deep) 100%);
    border-color: var(--gold);
}
.ibadah-3card-ico {
    background: var(--gold-tint);
    border-color: var(--gold-border);
    border-radius: var(--arch-md);
}
.ibadah-3card-title { font-family: var(--font-display); color: var(--t1); }
.ibadah-3card-sub { color: var(--t2); }
body.light-mode .ibadah-3card {
    background: linear-gradient(160deg, var(--surface) 0%, var(--surface-2) 100%);
}
body.light-mode .ibadah-3card:hover, body.light-mode .ibadah-3card:active {
    background: linear-gradient(160deg, var(--surface) 0%, var(--surface-3) 100%);
}
.ibadah-soon-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-mono);
    font-size: 0.46rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: var(--gold-br);
    background: linear-gradient(180deg, rgba(233,200,105,0.20), rgba(212,175,55,0.10));
    border: 1px solid var(--gold-border);
    border-radius: 999px;
    padding: 3px 8px 3px 6px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.30), inset 0 1px 0 rgba(255,255,255,0.07);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}
.ibadah-soon-badge::before {
    content: '';
    width: 5px; height: 5px; flex-shrink: 0;
    border-radius: 50%;
    background: var(--gold-br);
    box-shadow: 0 0 6px var(--gold-br);
    animation: soonPulse 1.8s ease-in-out infinite;
}
@keyframes soonPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.35; transform: scale(0.65); }
}
/* Un-dim the whole card so the badge stays crisp; dim only the content underneath */
.ibadah-card-soon { opacity: 1; }
.ibadah-card-soon .ibadah-3card-ico,
.ibadah-card-soon .ibadah-3card-title,
.ibadah-card-soon .ibadah-3card-sub { opacity: 0.5; }
/* Tracker entry + kalender entry → tile ikon & lengkung selaras */
.kalender-section { border-radius: var(--arch-lg); border-color: var(--gold-border); }
.kalender-section::before {
    height: 8px; left: 50%; right: auto; width: 50%;
    transform: translateX(-50%);
    background: var(--gold-tint);
    border-bottom: 1px solid var(--gold-border);
    border-radius: 0;
    border-top-left-radius: 999px 8px;
    border-top-right-radius: 999px 8px;
}
.kalender-ico-wrap { border-radius: var(--arch-md); background: var(--gold-tint); border-color: var(--gold-border); }
.kalender-greg { font-family: var(--font-display); }
.kalender-sub { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.04em; }
.kalender-dow { font-family: var(--font-mono); }

/* ════════ 4c · KOMUNITAS ════════ */
.komunitas-card, .restoran-halal-btn { border-radius: var(--arch-lg); border-color: var(--gold-border); }
.komunitas-card::before, .restoran-halal-btn::before {
    height: 8px; left: 50%; right: auto; width: 50%;
    transform: translateX(-50%);
    background: var(--gold-tint);
    border-bottom: 1px solid var(--gold-border);
    border-radius: 0;
    border-top-left-radius: 999px 8px;
    border-top-right-radius: 999px 8px;
}
.komunitas-card { background: linear-gradient(180deg, var(--teal) 0%, var(--teal-deep) 100%); }
.komunitas-card .komunitas-title { color: var(--paper); }
.komunitas-card .komunitas-sub { color: rgba(245,240,232,0.72); }
.komunitas-ico svg { color: var(--paper) !important; }
.komunitas-card .komunitas-head { border-bottom-color: rgba(255,255,255,0.12); }
body.light-mode .komunitas-card {
    background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
}
body.light-mode .komunitas-card .komunitas-title { color: var(--t1); }
body.light-mode .komunitas-card .komunitas-sub { color: var(--t2); }
body.light-mode .komunitas-ico svg { color: var(--gold) !important; }
.komunitas-title { font-family: var(--font-display); }
.restoran-halal-title { font-family: var(--font-display); }
.restoran-halal-btn { background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
.restoran-halal-btn:hover, .restoran-halal-btn:active { border-color: var(--gold); }

/* ════════ 4d · PANDUAN ════════ */
.pi-tab-sec-label, .lainnya-sec-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.14em;
    color: var(--text-2);
}
.pi-tab-card {
    background: var(--surface);
    border-color: var(--gold-border);
    border-radius: var(--arch-md);
}
.pi-tab-card::before {
    content: '';
    position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 50%; height: 7px;
    background: var(--gold-tint);
    border-bottom: 1px solid var(--gold-border);
    border-top-left-radius: 999px 7px;
    border-top-right-radius: 999px 7px;
    pointer-events: none;
}
.pi-tab-card:hover, .pi-tab-card:active {
    background: var(--surface-2);
    border-color: var(--gold);
}
.pi-tab-card-title { font-family: var(--font-display); }
/* Kartu zakat → emas pekat (CTA musim zakat ala prototype) */
.pi-tab-card-gold {
    background: linear-gradient(180deg, var(--gold) 0%, var(--gold-dp) 100%);
    border-color: rgba(168,140,80,0.5);
}
.pi-tab-card-gold::before { background: rgba(20,18,12,0.10); border-bottom-color: rgba(20,18,12,0.18); }
.pi-tab-card-gold:hover, .pi-tab-card-gold:active {
    background: linear-gradient(180deg, var(--gold-br) 0%, var(--gold) 100%);
    border-color: var(--gold-dp);
}
.pi-tab-card-gold .pi-tab-card-title,
.pi-tab-card-gold .pi-tab-card-sub { color: var(--ink); }
.pi-tab-card-gold .pi-tab-card-ico { filter: brightness(0) saturate(0%) invert(8%); }
.pi-tab-badge-gold {
    background: rgba(20,18,12,0.18);
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 0.5rem;
    letter-spacing: 0.06em;
    border-radius: 4px;
}
.pi-tab-badge {
    font-family: var(--font-mono);
    font-size: 0.5rem;
    letter-spacing: 0.06em;
    border-radius: 4px;
}
.pi-tab-footer { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.04em; }

/* ════════ 4e · LAINNYA ════════ */
.lainnya-tentang-card {
    background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
    border-radius: var(--arch-lg);
    border-color: var(--gold-border);
}
.lainnya-tentang-card::before {
    height: 8px; left: 50%; right: auto; width: 50%;
    transform: translateX(-50%);
    background: var(--gold-tint);
    border-bottom: 1px solid var(--gold-border);
    border-radius: 0;
    border-top-left-radius: 999px 8px;
    border-top-right-radius: 999px 8px;
}
.lainnya-app-name { font-family: var(--font-display); }
.lainnya-group { border-radius: var(--arch-md); border-color: var(--gold-border); }
.lainnya-group::before {
    height: 7px; left: 50%; right: auto; width: 40%;
    transform: translateX(-50%);
    background: var(--gold-tint);
    border-bottom: 1px solid var(--gold-border);
    border-radius: 0;
    border-top-left-radius: 999px 7px;
    border-top-right-radius: 999px 7px;
}
.lainnya-row-ico {
    width: 30px; height: 30px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--arch-sm);
    background: var(--gold-tint);
    border: 1px solid var(--gold-line);
    font-size: 1rem;
}
.lainnya-row-ico .lr-ph,
.lainnya-row-ico .nurai-ico-inline { width: 18px; height: 18px; }
.lainnya-row-ico:has(.nurai-ico-inline) { width: 30px; }
.lainnya-row-title { font-weight: 600; }
/* Baris "NurAI Terbaik" → premium animated gold row */
.lainnya-row-terbaik {
    position: relative; overflow: hidden;
    background: linear-gradient(135deg, rgba(212,175,55,0.1) 0%, rgba(212,175,55,0.03) 100%);
    border: 1.5px solid rgba(212,175,55,0.45);
    border-radius: var(--arch-sm);
}
/* Shimmer sweep */
.lainnya-row-terbaik::after {
    content: ''; position: absolute; inset: 0 auto 0 -100%; width: 60%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.07), transparent);
    animation: lnTerbaikShimmer 2.8s ease-in-out infinite;
}
@keyframes lnTerbaikShimmer { to { left: 150%; } }
.lainnya-row-terbaik .lainnya-row-ico {
    background: linear-gradient(135deg, var(--gold), var(--gold-dp));
    border-color: var(--gold);
    animation: lnIcoGlow 2.4s ease-in-out infinite;
    box-shadow: 0 2px 10px rgba(212,175,55,0.25);
}
@keyframes lnIcoGlow {
    0%, 100% { box-shadow: 0 2px 10px rgba(212,175,55,0.25); }
    50%       { box-shadow: 0 2px 20px rgba(212,175,55,0.55); }
}
.lainnya-row-terbaik .lainnya-row-ico .lr-ph { color: var(--brand-ink); }
.lainnya-row-terbaik .lainnya-row-title {
    color: var(--gold-br); font-family: var(--font-display);
    text-shadow: 0 0 14px rgba(212,175,55,0.28);
}
.lainnya-row-terbaik .lainnya-row-arr {
    color: var(--gold-br);
    animation: lnArrBounce 1.6s ease-in-out infinite;
}
@keyframes lnArrBounce {
    0%, 100% { transform: translateX(0); opacity: 0.7; }
    50%       { transform: translateX(4px); opacity: 1; }
}

/* ── Ibadah card colour variants (Mihrab×Bento palette) ── */
.ibadah-3card.ib3c-coral {
    background: linear-gradient(160deg, var(--surface-2) 0%, var(--coral-deep) 100%);
    border-color: rgba(194,90,61,0.45);
}
.ibadah-3card.ib3c-coral:hover, .ibadah-3card.ib3c-coral:active {
    background: linear-gradient(160deg, var(--surface-3) 0%, var(--coral-deep) 100%);
    border-color: rgba(194,90,61,0.7);
}
.ibadah-3card.ib3c-coral .ibadah-3card-ico { background: rgba(194,90,61,0.14); border-color: rgba(194,90,61,0.28); }
.ibadah-3card.ib3c-coral::before { background: rgba(194,90,61,0.18); border-bottom-color: rgba(194,90,61,0.3); }

.ibadah-3card.ib3c-teal {
    background: linear-gradient(160deg, var(--surface-2) 0%, var(--teal-deep) 100%);
    border-color: rgba(26,138,125,0.45);
}
.ibadah-3card.ib3c-teal:hover, .ibadah-3card.ib3c-teal:active {
    background: linear-gradient(160deg, var(--surface-3) 0%, var(--teal-deep) 100%);
    border-color: rgba(26,138,125,0.7);
}
.ibadah-3card.ib3c-teal .ibadah-3card-ico { background: rgba(26,138,125,0.14); border-color: rgba(26,138,125,0.28); }
.ibadah-3card.ib3c-teal::before { background: rgba(26,138,125,0.18); border-bottom-color: rgba(26,138,125,0.3); }

.ibadah-3card.ib3c-plum {
    background: linear-gradient(160deg, var(--surface-2) 0%, var(--plum-deep) 100%);
    border-color: rgba(90,53,96,0.55);
}
.ibadah-3card.ib3c-plum:hover, .ibadah-3card.ib3c-plum:active {
    background: linear-gradient(160deg, var(--surface-3) 0%, var(--plum-deep) 100%);
    border-color: rgba(90,53,96,0.8);
}
.ibadah-3card.ib3c-plum .ibadah-3card-ico { background: rgba(90,53,96,0.18); border-color: rgba(90,53,96,0.32); }
.ibadah-3card.ib3c-plum::before { background: rgba(90,53,96,0.2); border-bottom-color: rgba(90,53,96,0.35); }

.ibadah-3card.ib3c-gold {
    background: linear-gradient(160deg, var(--surface-2) 0%, #4a3200 100%);
    border-color: rgba(212,175,55,0.5);
}
.ibadah-3card.ib3c-gold:hover, .ibadah-3card.ib3c-gold:active {
    background: linear-gradient(160deg, var(--surface-3) 0%, #5c3f00 100%);
    border-color: var(--gold);
}
.ibadah-3card.ib3c-gold .ibadah-3card-ico { background: rgba(212,175,55,0.15); border-color: rgba(212,175,55,0.3); }
.ibadah-3card.ib3c-gold::before { background: rgba(212,175,55,0.2); border-bottom-color: rgba(212,175,55,0.38); }
.ibadah-3card-ico .nurai-ico { color: var(--gold-br); fill: currentColor; }

/* ── Panduan card rainbow — 4-colour rotation within each pi-tab-grid ── */
.pi-tab-grid > *:nth-child(4n+1) {
    background: linear-gradient(155deg, var(--surface-2) 0%, var(--coral-deep) 100%);
    border-color: rgba(194,90,61,0.38);
}
.pi-tab-grid > *:nth-child(4n+2) {
    background: linear-gradient(155deg, var(--surface-2) 0%, var(--teal-deep) 100%);
    border-color: rgba(26,138,125,0.38);
}
.pi-tab-grid > *:nth-child(4n+3) {
    background: linear-gradient(155deg, var(--surface-2) 0%, var(--plum-deep) 100%);
    border-color: rgba(90,53,96,0.45);
}
.pi-tab-grid > *:nth-child(4n+4) {
    background: linear-gradient(155deg, var(--surface-2) 0%, var(--emerald-deep) 100%);
    border-color: rgba(212,175,55,0.32);
}
/* Restore gold card over nth-child (same specificity, later wins) */
.pi-tab-grid > .pi-tab-card-gold {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dp) 100%);
    border-color: rgba(168,140,80,0.55);
}

/* ── NurAI Premium card (Lainnya → "Fitur Terbaik") ── */
.ln-premium-card {
    position: relative; overflow: hidden; cursor: pointer;
    margin: 12px 14px 20px;
    padding: 22px 20px 20px;
    background: linear-gradient(155deg, #0d2016 0%, #05100a 100%);
    border: 1.5px solid rgba(212,175,55,0.45);
    border-radius: var(--arch-lg);
    box-shadow: 0 8px 28px rgba(0,0,0,0.5), 0 0 0 1px rgba(212,175,55,0.06);
    transition: transform 0.18s, box-shadow 0.18s;
}
.ln-premium-card:active { transform: scale(0.98); box-shadow: 0 4px 14px rgba(0,0,0,0.5); }
/* Arch shimmer top */
.ln-premium-card::before {
    content: ''; position: absolute;
    top: 0; left: 50%; transform: translateX(-50%);
    width: 55%; height: 5px;
    background: linear-gradient(90deg, transparent, rgba(212,175,55,0.65), transparent);
    border-radius: 0 0 999px 999px;
}
/* Ambient glow */
.ln-premium-card::after {
    content: ''; position: absolute;
    top: -40px; right: -20px;
    width: 160px; height: 160px;
    background: radial-gradient(circle, rgba(212,175,55,0.1) 0%, transparent 68%);
    pointer-events: none;
}
.ln-premium-sparkle {
    position: absolute; top: 18px; right: 18px;
    font-size: 1.4rem; color: var(--gold-br); opacity: 0.45;
    animation: lnSparkle 3.2s ease-in-out infinite;
}
@keyframes lnSparkle {
    0%, 100% { opacity: 0.3; transform: scale(1) rotate(0deg); }
    50%       { opacity: 0.65; transform: scale(1.2) rotate(18deg); }
}
.ln-premium-badge {
    display: inline-flex; align-items: center; gap: 4px;
    font-family: var(--font-mono); font-size: 0.5rem; letter-spacing: 0.14em; font-weight: 700;
    color: var(--gold-br); background: rgba(212,175,55,0.12); border: 1px solid rgba(212,175,55,0.3);
    border-radius: 999px; padding: 3px 10px; margin-bottom: 11px;
}
.ln-premium-title {
    font-family: var(--font-display); font-size: 1.15rem; font-weight: 700;
    color: var(--text-1); line-height: 1.25; margin-bottom: 6px;
}
.ln-premium-sub {
    font-size: 0.78rem; color: var(--text-2); line-height: 1.5; margin-bottom: 16px;
}
.ln-premium-cta {
    display: inline-flex; align-items: center; gap: 5px;
    font-family: var(--font-display); font-size: 0.8rem; font-weight: 600;
    color: var(--ink); background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dp) 100%);
    border: none; border-radius: var(--arch-md); padding: 9px 20px; cursor: pointer;
    box-shadow: 0 4px 12px rgba(212,175,55,0.28);
    transition: opacity 0.15s, transform 0.15s; pointer-events: none;
}

/* ════════ 4f · OVERLAY & MODAL ════════ */
/* Bottom sheets — handle emas + judul display + radius mihrab */
.form-modal { border-radius: 22px 22px 0 0; border-top-color: var(--gold-border); }
.form-modal-handle { background: var(--gold-line); }
.form-modal-title { font-family: var(--font-display); font-weight: 600; }
.notif-prompt-sheet { border-radius: 22px 22px 0 0; border-top: 1px solid var(--gold-border); }
.notif-prompt-handle { background: var(--gold-line); }
.notif-prompt-title { font-family: var(--font-display); }
.notif-prompt-btn-allow { background: var(--gold); color: var(--brand-ink); border-radius: var(--arch-md); }
.qdl-handle { background: var(--gold-line) !important; }
.nts-handle { background: var(--gold-line); }
.nts-title { font-family: var(--font-display); }
.nts-feat-ico { background: var(--gold-tint); border-color: var(--gold-border); border-radius: var(--arch-md); }
.nts-feat-title { font-family: var(--font-display); font-weight: 600; }

/* Dzikir tabs — chip lengkung gold-tint (selaras shelf prototype) */
.dzikir-tab { border-radius: var(--arch-sm); border-color: var(--gold-line); }
.dzikir-tab.active {
    background: var(--gold-tint);
    color: var(--gold);
    border-color: var(--gold-border);
}

/* Kalender penuh — topbar display + nav lengkung + label mono */
.kal-topbar-title, .kal-hijri-lbl { font-family: var(--font-display); }
.kal-back-btn, .kal-today-btn { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.04em; }
.kal-nav-btn { border-radius: var(--arch-sm); border-color: var(--gold-line); }
.kal-masehi-lbl { font-family: var(--font-mono); font-size: 0.66rem; color: var(--gold); }
.kal-dh { font-family: var(--font-mono); letter-spacing: 0.08em; }
.kal-cell.today { background: linear-gradient(135deg, var(--gold-tint), rgba(31,96,72,0.22)); box-shadow: inset 0 0 0 1px var(--gold-border); }
.kal-cell.today .kal-g-num { color: var(--gold-br); }
.kal-cell.today .kal-h-num { color: var(--gold); }

/* ── Kalender premium polish (Mihrab × emas) ── */
.kal-topbar, .kal-month-nav { background: linear-gradient(180deg, var(--surface-2), var(--surface)); border-bottom-color: var(--gold-line); }
.kal-nav-btn { border-color: var(--gold-line); }
.kal-nav-btn:hover { background: var(--gold-tint); border-color: var(--gold-border); color: var(--gold-br); }
.kal-masehi-lbl { color: var(--gold-br); font-family: var(--font-mono); letter-spacing: 0.04em; }
.kal-dh { color: var(--t2); }
.kal-day-headers { border-bottom: 1px solid var(--gold-line); }
.kal-cell { border-radius: var(--arch-sm); transition: background .14s ease, box-shadow .14s ease; }
.kal-cell:hover:not(.today) { background: var(--gold-tint-2); box-shadow: inset 0 0 0 1px var(--gold-line); }
.kal-cell.jumat:not(.today) { background: var(--gold-tint-2); }     /* Jumu'ah — sentuhan emas lembut */
.kal-h-num { color: rgba(212,175,55,0.5); font-family: var(--font-mono); }
.kal-cell.today { box-shadow: inset 0 0 0 1px var(--gold-border), 0 0 16px rgba(233,200,105,0.22); }
.kal-cell.today .kal-g-num { text-shadow: 0 0 10px rgba(233,200,105,0.45); }
.kal-cell.today .kal-h-num { color: var(--gold-br); }
.kal-leg-item { color: var(--t2); }
.kal-events-lbl { color: var(--gold); font-family: var(--font-mono); }
.kal-ev-text { color: var(--t1); }
/* Metode + geser/shift: catatan dirapikan (lebih terbaca, tak italic, tak terlalu kecil) */
.kal-method-note, .kal-adj-note { font-size: 0.6rem; line-height: 1.5; color: var(--t2); font-style: normal; }
.kal-adj-val { font-family: var(--font-mono); }
.kal-method-row .sh-pick-btn { font-family: var(--font-mono); letter-spacing: 0.02em; }

/* Quran home/reader — header display + tab/chip lengkung */
.qh-header-title, .qr-title { font-family: var(--font-display); }
.qh-tab { border-radius: var(--arch-sm); }
.qh-tab.active { background: var(--gold-tint); color: var(--gold); }
.qrs-chip { border-radius: var(--arch-sm); border-color: var(--gold-line); }
.qrs-chip.active { background: var(--gold); color: var(--brand-ink); border-color: var(--gold); }
.qrs-dd-btn { border-radius: var(--arch-sm); }

/* Tasbih — target chip lengkung gold-tint */
.tasbih-tbtn { border-radius: var(--arch-sm); border-color: var(--gold-line); }
.tasbih-tbtn.active { background: var(--gold-tint); color: var(--gold); border-color: var(--gold-border); }
.tasbih-count-num { font-family: var(--font-serif); }

/* ── Tasbih Digital premium polish (Mihrab × emas) ── */
.tasbih-tabs-bar { background: linear-gradient(180deg, var(--surface-2), var(--surface)); border-bottom-color: var(--gold-line); }
.tasbih-tab { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.04em; text-transform: uppercase; }
.tasbih-tab.active { color: var(--gold-br); border-bottom-color: var(--gold); }
.tasbih-pill { border-radius: var(--arch-sm); border-color: var(--gold-line); }
.tasbih-pill.active { background: var(--gold-tint); border-color: var(--gold-border); color: var(--gold-br); }
.tasbih-ar { color: var(--scripture); }
/* Cincin hitung — hero emas bercahaya + sumur emerald */
.tasbih-ring-bg { stroke: rgba(212,175,55,0.10); stroke-width: 7; }
.tasbih-ring-fill { stroke: var(--gold-br); stroke-width: 7; filter: drop-shadow(0 0 7px rgba(233,200,105,0.45)); }
.tasbih-counter-inner {
    background: radial-gradient(circle at 50% 38%, rgba(36,72,52,0.70) 0%, var(--bg-deep, #060e06) 78%);
    border: 1px solid var(--gold-border);
    box-shadow: inset 0 0 22px rgba(0,0,0,0.5);
}
.tasbih-count-num { color: var(--gold-br); text-shadow: 0 0 16px rgba(233,200,105,0.35); letter-spacing: -0.02em; }
.tasbih-count-hint { color: var(--t3); font-family: var(--font-mono); }
.tasbih-tbtn { border-radius: var(--arch-sm); border: 1px solid var(--gold-line); font-family: var(--font-mono); color: var(--t2); }
.tasbih-tbtn.active { background: var(--gold-tint); border-color: var(--gold-border); color: var(--gold-br); }
.tasbih-prog-fill { background: linear-gradient(90deg, var(--gold-dp), var(--gold-br)); }

/* ── Tasbih Dashboard + Riwayat premium polish (Mihrab × emas) ── */
/* Stat cards → lengkung mihrab + angka Cormorant + label mono */
.tasbih-stat-card { border-radius: var(--arch-md); border-color: var(--gold-line); }
.tasbih-stat-card.gold { border-color: var(--gold-border); }
.tasbih-stat-num { font-family: var(--font-serif); font-weight: 600; letter-spacing: 0; }
.tasbih-stat-card.gold .tasbih-stat-num { color: var(--gold-br); }
.tasbih-stat-lbl { font-family: var(--font-mono); color: var(--t2); }
.tasbih-stat-delta { font-family: var(--font-mono); }
/* Kartu chart → lengkung + judul Reem Kufi + label mono */
.tasbih-card { border-radius: var(--arch-lg); border-color: var(--gold-line); }
.tasbih-card-title { font-family: var(--font-display); font-weight: 600; }
.tasbih-card-sub { font-family: var(--font-mono); color: var(--t2); }
.tasbih-card-legend, .tasbih-legend-item, .tasbih-comp-empty { color: var(--t2); }
.tasbih-mnav-btn { border-radius: var(--arch-sm); border-color: var(--gold-line); }
.tasbih-mnav-lbl { font-family: var(--font-mono); color: var(--gold-br); }
/* Donut → angka tengah Cormorant emas bercahaya */
.tasbih-donut-total { font-family: var(--font-serif); font-weight: 600; color: var(--gold-br); text-shadow: 0 0 12px rgba(233,200,105,0.35); }
.tasbih-donut-cap { font-family: var(--font-mono); color: var(--t2); }
.tasbih-comp-count { font-family: var(--font-serif); font-weight: 600; }
.tasbih-comp-ar { color: var(--t2); }
.tasbih-comp-pct { font-family: var(--font-mono); }
/* Best day + Riwayat bulan → lengkung + display */
.tasbih-best-card { border-radius: var(--arch-lg); border-color: var(--gold-border); }
.tasbih-best-total { font-family: var(--font-serif); font-weight: 600; color: var(--gold-br); letter-spacing: -0.01em; }
.tasbih-month-group { border-radius: var(--arch-md); border-color: var(--gold-line); }
.tasbih-month-name { font-family: var(--font-display); font-weight: 600; }
.tasbih-month-total { font-family: var(--font-mono); color: var(--gold-br); }
.tasbih-clear-btn { border-radius: var(--arch-sm); font-family: var(--font-mono); color: var(--t2); }

/* Qibla — badge lengkung + nilai serif */
.qibla-badge { border-radius: var(--arch-sm); }
.qibla-badge-deg { background: var(--gold-tint); border-color: var(--gold-border); }

/* ════════ 7a · BERANDA — PRAYER NICHE HERO ════════ */
.prayer-niche {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 26px 16px 14px;
    background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 58%, var(--bg-2) 100%);
    border-bottom: 1px solid var(--gold-line);
    overflow: hidden;
}
/* ── Kartu KUBAH mihrab STANDALONE: puncak melengkung (border-radius dome) ──
   Sudut atas dibulatkan kuat (48% horiz / 60px vert) → siluet kubah; sudut
   bawah arch 22px. Border emas penuh mengikuti lengkung (tanpa mask = render
   bersih & andal). */
.niche-dome {
    border: 1px solid var(--gold-border);
    border-radius: 8px 8px 22px 22px;
    padding: 34px 18px 16px;
    box-shadow: var(--shadow);
    /* Lengkung mihrab = mask (ellipse 48px di puncak) — persis referensi prototype */
    -webkit-mask:
        radial-gradient(ellipse 64% 48px at 50% 48px, #000 99%, transparent 100%) top/100% 48px no-repeat,
        linear-gradient(#000, #000) 0 48px / 100% calc(100% - 48px) no-repeat;
    mask:
        radial-gradient(ellipse 64% 48px at 50% 48px, #000 99%, transparent 100%) top/100% 48px no-repeat,
        linear-gradient(#000, #000) 0 48px / 100% calc(100% - 48px) no-repeat;
}
/* Ornamen bintang segi-8 mihrab di puncak niche */
.prayer-niche::after {
    content: '';
    position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
    width: 22px; height: 22px;
    background: conic-gradient(from 22.5deg,
        var(--gold) 0 11.25deg, transparent 11.25deg 33.75deg,
        var(--gold) 33.75deg 56.25deg, transparent 56.25deg 78.75deg,
        var(--gold) 78.75deg 101.25deg, transparent 101.25deg 123.75deg,
        var(--gold) 123.75deg 146.25deg, transparent 146.25deg 168.75deg,
        var(--gold) 168.75deg 191.25deg, transparent 191.25deg 213.75deg,
        var(--gold) 213.75deg 236.25deg, transparent 236.25deg 258.75deg,
        var(--gold) 258.75deg 281.25deg, transparent 281.25deg 303.75deg,
        var(--gold) 303.75deg 326.25deg, transparent 326.25deg 348.75deg,
        var(--gold) 348.75deg 360deg);
    -webkit-mask: radial-gradient(circle at 50% 50%, transparent 2.5px, #000 3px, #000 9px, transparent 9.5px);
            mask: radial-gradient(circle at 50% 50%, transparent 2.5px, #000 3px, #000 9px, transparent 9.5px);
    opacity: 0.65;
    pointer-events: none;
}
.prayer-niche .niche-eb {
    margin-top: 16px;
    font-family: var(--font-mono);
    font-size: 0.58rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-2);
}
.niche-next-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-top: 4px;
}
.niche-next-name {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--gold-br);
    letter-spacing: 0.01em;
}
.niche-next-time {
    font-family: var(--font-serif);
    font-size: 2.6rem;
    font-weight: 300;
    color: var(--text-1);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
    line-height: 1;
}
.niche-cd .ps-cd, .prayer-niche .niche-cd {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.06em;
    color: var(--gold);
}
.niche-mini {
    display: flex;
    justify-content: space-around;
    width: 100%;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--gold-line);
}
.niche-mini > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    opacity: 0.5;
    transition: opacity 0.2s;
}
.niche-mini > div.now { opacity: 1; }
.niche-mini .nm-name {
    font-size: 0.5rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-2);
}
.niche-mini > div.now .nm-name { color: var(--gold); }
.niche-mini .nm-t {
    font-size: 0.72rem;
    color: var(--text-1);
    font-variant-numeric: tabular-nums;
}
.niche-mini > div.now .nm-t { color: var(--gold-br); font-weight: 600; }
.niche-lihat {
    margin-top: 12px;
}

/* ════ Tema per-waktu sholat (ref: prayer-times.css) — nilai mentah ════ */
:root{
  --pt-fajr-hf:#0b1f2b;    --pt-fajr-ht:#0a1814;    --pt-fajr-g1:rgba(86,128,184,.36);  --pt-fajr-g2:rgba(198,140,152,.18); --pt-fajr-c1:#1c3e4e;    --pt-fajr-c2:#122a30;    --pt-fajr-c3:#0c1c22;    --pt-fajr-ac:#7fb0e0;
  --pt-dhuhr-hf:#123a30;   --pt-dhuhr-ht:#0a1814;   --pt-dhuhr-g1:rgba(228,216,168,.26); --pt-dhuhr-g2:transparent;          --pt-dhuhr-c1:#225640;   --pt-dhuhr-c2:#16402c;   --pt-dhuhr-c3:#0c2418;   --pt-dhuhr-ac:#e4d8a8;
  --pt-asr-hf:#241f12;     --pt-asr-ht:#0a1814;     --pt-asr-g1:rgba(216,164,90,.30);    --pt-asr-g2:transparent;            --pt-asr-c1:#3c3420;     --pt-asr-c2:#2a2416;     --pt-asr-c3:#141208;     --pt-asr-ac:#d8a45a;
  --pt-maghrib-hf:#2a1622; --pt-maghrib-ht:#0a1814; --pt-maghrib-g1:rgba(200,90,61,.34); --pt-maghrib-g2:rgba(90,53,96,.30); --pt-maghrib-c1:#7a3a28; --pt-maghrib-c2:#5a2f3a; --pt-maghrib-c3:#2e1730; --pt-maghrib-ac:#f5b27a;
  --pt-isha-hf:#0a1220;    --pt-isha-ht:#07120c;    --pt-isha-g1:rgba(48,60,108,.32);    --pt-isha-g2:transparent;           --pt-isha-c1:#16243f;    --pt-isha-c2:#0e1830;    --pt-isha-c3:#0a1018;    --pt-isha-ac:#8aa0e0;
}
/* Variabel generik per waktu (header gradient · hero gradient sinkron · card · accent · glow) */
body[data-prayer="fajr"]   { --pt-header:linear-gradient(180deg,var(--pt-fajr-hf) 0%,var(--pt-fajr-ht) 70%);    --pt-hero:linear-gradient(180deg,var(--pt-fajr-hf) 0%,var(--pt-fajr-c1) 52%,var(--pt-fajr-ht) 100%);       --pt-card:linear-gradient(180deg,var(--pt-fajr-c1) 0%,var(--pt-fajr-c2) 60%,var(--pt-fajr-c3) 100%);       --pt-accent:var(--pt-fajr-ac);    --pt-glow:radial-gradient(ellipse 95% 36% at 50% -2%,var(--pt-fajr-g1),transparent 70%),radial-gradient(ellipse 70% 18% at 50% 7%,var(--pt-fajr-g2),transparent 70%); }
body[data-prayer="dhuhr"]  { --pt-header:linear-gradient(180deg,var(--pt-dhuhr-hf) 0%,var(--pt-dhuhr-ht) 72%);  --pt-hero:linear-gradient(180deg,var(--pt-dhuhr-hf) 0%,var(--pt-dhuhr-c1) 52%,var(--pt-dhuhr-ht) 100%);     --pt-card:linear-gradient(180deg,var(--pt-dhuhr-c1) 0%,var(--pt-dhuhr-c2) 60%,var(--pt-dhuhr-c3) 100%);     --pt-accent:var(--pt-dhuhr-ac);   --pt-glow:radial-gradient(ellipse 85% 42% at 50% -5%,var(--pt-dhuhr-g1),transparent 70%); }
body[data-prayer="asr"]    { --pt-header:linear-gradient(180deg,var(--pt-asr-hf) 0%,var(--pt-asr-ht) 70%);      --pt-hero:linear-gradient(180deg,var(--pt-asr-hf) 0%,var(--pt-asr-c1) 52%,var(--pt-asr-ht) 100%);         --pt-card:linear-gradient(180deg,var(--pt-asr-c1) 0%,var(--pt-asr-c2) 60%,var(--pt-asr-c3) 100%);         --pt-accent:var(--pt-asr-ac);     --pt-glow:radial-gradient(ellipse 85% 44% at 64% -5%,var(--pt-asr-g1),transparent 70%); }
body[data-prayer="maghrib"]{ --pt-header:linear-gradient(180deg,var(--pt-maghrib-hf) 0%,var(--pt-maghrib-ht) 70%); --pt-hero:linear-gradient(180deg,var(--pt-maghrib-hf) 0%,var(--pt-maghrib-c1) 50%,var(--pt-maghrib-ht) 100%); --pt-card:linear-gradient(180deg,var(--pt-maghrib-c1) 0%,var(--pt-maghrib-c2) 55%,var(--pt-maghrib-c3) 100%); --pt-accent:var(--pt-maghrib-ac); --pt-glow:radial-gradient(ellipse 95% 38% at 50% -2%,var(--pt-maghrib-g1),transparent 70%),radial-gradient(ellipse 90% 46% at 50% 102%,var(--pt-maghrib-g2),transparent 70%); }
body[data-prayer="isha"]   { --pt-header:linear-gradient(180deg,var(--pt-isha-hf) 0%,var(--pt-isha-ht) 80%);    --pt-hero:linear-gradient(180deg,var(--pt-isha-hf) 0%,var(--pt-isha-c1) 52%,var(--pt-isha-ht) 100%);       --pt-card:linear-gradient(180deg,var(--pt-isha-c1) 0%,var(--pt-isha-c2) 60%,var(--pt-isha-c3) 100%);       --pt-accent:var(--pt-isha-ac);    --pt-glow:radial-gradient(ellipse 80% 40% at 50% -2%,var(--pt-isha-g1),transparent 70%); }

/* Header = PERSIS referensi (header-from → header-to). Hero (latar bismillah +
   SISI card) berakhir di card-3 (biru gelap), BUKAN bg-2 (hijau tema) → tak ada
   hijau di samping card. Tanpa tweak terang/gelap. */
body[data-prayer="fajr"]    { --pt-header: linear-gradient(180deg, var(--pt-fajr-hf) 0%, var(--pt-fajr-ht) 70%);       --pt-hero: linear-gradient(180deg, var(--pt-fajr-hf) 0%, var(--pt-fajr-c1) 42%, var(--pt-fajr-c3) 100%); }
body[data-prayer="dhuhr"]   { --pt-header: linear-gradient(180deg, var(--pt-dhuhr-hf) 0%, var(--pt-dhuhr-ht) 72%);     --pt-hero: linear-gradient(180deg, var(--pt-dhuhr-hf) 0%, var(--pt-dhuhr-c1) 42%, var(--pt-dhuhr-c3) 100%); }
body[data-prayer="asr"]     { --pt-header: linear-gradient(180deg, var(--pt-asr-hf) 0%, var(--pt-asr-ht) 70%);         --pt-hero: linear-gradient(180deg, var(--pt-asr-hf) 0%, var(--pt-asr-c1) 42%, var(--pt-asr-c3) 100%); }
body[data-prayer="maghrib"] { --pt-header: linear-gradient(180deg, var(--pt-maghrib-hf) 0%, var(--pt-maghrib-ht) 70%); --pt-hero: linear-gradient(180deg, var(--pt-maghrib-hf) 0%, var(--pt-maghrib-c1) 42%, var(--pt-maghrib-c3) 100%); }
body[data-prayer="isha"]    { --pt-header: linear-gradient(180deg, var(--pt-isha-hf) 0%, var(--pt-isha-ht) 80%);       --pt-hero: linear-gradient(180deg, var(--pt-isha-hf) 0%, var(--pt-isha-c1) 42%, var(--pt-isha-c3) 100%); }

/* Card jadwal: gradient per waktu + glow ambient (multi-background) */
body[data-prayer] .prayer-niche { background: var(--pt-glow), var(--pt-card); }
body.light-mode[data-prayer] .prayer-niche { background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 60%, var(--bg-2) 100%); }
/* Accent per waktu: nama waktu berikutnya + countdown + waktu aktif mini-strip */
body[data-prayer] .niche-next-name { color: var(--pt-accent); }
body[data-prayer] .niche-cd .ps-cd { color: var(--pt-accent); }
body[data-prayer] .niche-mini .now .nm-name, body[data-prayer] .niche-mini .now .nm-t { color: var(--pt-accent); }

/* Beranda: SATU gradient layar (sbg referensi: header-from → header-to) di body →
   header + bismillah + sekitar card MENYATU tanpa garis. Header transparan (latar
   datang dari body); card sendiri di atasnya. Tab/halaman lain: tetap warna tema. */
body[data-tab="beranda"][data-prayer] { background-image: var(--pt-header); background-size: 100% 640px; background-repeat: no-repeat; }
body.light-mode[data-tab="beranda"][data-prayer] { background-image: none; }
body[data-tab="beranda"][data-prayer] .app-header { background: transparent; border-bottom-color: transparent; }
body.light-mode[data-tab="beranda"][data-prayer] .app-header { background: var(--bg); border-bottom-color: var(--border); }

/* Hero = wrapper transparan; gradient datang dari body, jadi sekitar card ikut
   warna layar (menyatu). Tanpa border/garis. */
.beranda-hero { background: transparent; margin: 0; padding: 0; }
.beranda-bismillah { text-align: center; padding: 0 0 12px; }
.beranda-bismillah .bismillah { font-family: var(--font-arabic); font-size: 1.35rem; color: var(--gold-br); }

/* #2/#3 Greeting 2-baris di header — rata KIRI, samping logo */
.header-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
/* Greeting 2-baris diselaraskan dengan tinggi logo (34px) — proporsional & center */
/* Baris atas dekat ujung ATAS logo, baris bawah dekat ujung BAWAH logo (space-between),
   ukuran diperbesar agar pas dengan tinggi logo (34px). */
.header-greet { display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; text-align: left; height: 38px; padding: 1px 0; min-width: 0; }
.hg-time { font-size: 1rem; font-weight: 800; color: var(--gold-br); white-space: nowrap; letter-spacing: 0.01em; line-height: 1; }
.hg-name { font-size: 0.8rem; font-weight: 600; color: var(--t2); white-space: nowrap; line-height: 1; }

/* #4 Search — halaman penuh bertema + hasil terkelompok + riwayat */
.search-overlay { position: fixed; inset: 0; z-index: 300; background: var(--bg); display: none; flex-direction: column; }
.search-overlay.open { display: flex; }

/* ── Notifikasi (inbox) ───────────────────────────────────────────────── */
.notif-btn { position: relative; }
.notif-btn svg { width: 22px; height: 22px; fill: currentColor; }
.notif-dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: #e05656; border: 2px solid var(--bg); }
.notif-overlay { position: fixed; inset: 0; z-index: 320; background: var(--bg); display: none; flex-direction: column; }
.notif-overlay.open { display: flex; }
.notif-page { display: flex; flex-direction: column; height: 100%; width: 100%; max-width: 480px; margin: 0 auto; }
.notif-topbar { display: flex; align-items: center; gap: 8px; padding: 12px 14px; }
.notif-back { display: grid; place-items: center; width: 36px; height: 36px; border: none; background: transparent; color: var(--t1); cursor: pointer; border-radius: 10px; flex: 0 0 auto; }
.notif-back svg { width: 22px; height: 22px; }
.notif-title { font-weight: 700; font-size: 1.05rem; color: var(--t1); flex: 1; }
.notif-readall { border: none; background: transparent; color: var(--gold-br); font-size: 0.82rem; font-weight: 600; cursor: pointer; padding: 6px 6px; flex: 0 0 auto; }
.notif-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 14px 12px; scrollbar-width: none; }
.notif-tabs::-webkit-scrollbar { display: none; }
.notif-tab { flex: 0 0 auto; border: 1px solid var(--border); background: var(--surface); color: var(--t2); border-radius: 999px; padding: 7px 14px; font-size: 0.82rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.notif-tab.active { background: var(--gold-br); color: #1a1206; border-color: transparent; }
.notif-body { flex: 1; overflow-y: auto; padding: 4px 12px 24px; }
.notif-group-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--t3); padding: 14px 6px 8px; }
.notif-item { display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px; margin-bottom: 8px; cursor: pointer; }
.notif-item.unread { border-color: var(--gold-border); }
.notif-ic { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; }
.notif-ic svg { width: 21px; height: 21px; fill: currentColor; }
.notif-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.notif-cat { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--t3); }
.notif-it-title { font-size: 0.92rem; font-weight: 700; color: var(--t1); }
.notif-it-desc { font-size: 0.8rem; color: var(--t2); line-height: 1.35; }
.notif-meta { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.notif-time { font-size: 0.68rem; color: var(--t3); white-space: nowrap; }
.notif-udot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold-br); }
.notif-empty { text-align: center; color: var(--t2); padding: 48px 16px; font-size: 0.9rem; }
/* detail satu notifikasi */
.notif-detail { position: absolute; inset: 0; background: var(--bg); display: none; flex-direction: column; }
.notif-detail.open { display: flex; }
.notif-detail-body { flex: 1; overflow-y: auto; padding: 8px 18px 32px; }
.nd-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 14px 0 22px; }
.nd-ic { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; }
.nd-ic svg { width: 34px; height: 34px; fill: currentColor; }
.nd-cat { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--t3); }
.nd-title { font-size: 1.25rem; font-weight: 800; color: var(--t1); margin: 0; line-height: 1.3; }
.nd-time { font-size: 0.78rem; color: var(--t3); }
.nd-meta { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 2px 14px; margin-bottom: 16px; }
.nd-row { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.nd-row:last-child { border-bottom: none; }
.nd-k { font-size: 0.82rem; color: var(--t2); }
.nd-v { font-size: 0.82rem; font-weight: 600; color: var(--t1); text-align: right; }
.nd-body { font-size: 0.95rem; line-height: 1.7; color: var(--t1); margin: 0 0 20px; }
.nd-cta { display: block; width: 100%; padding: 13px; border-radius: 12px; border: 1px solid var(--gold-border); background: transparent; color: var(--gold-br); font-size: 0.9rem; font-weight: 700; cursor: pointer; }

/* ── Kartu Ucapan ─────────────────────────────────────────────────────── */
.uc-overlay { position: fixed; inset: 0; z-index: 330; background: var(--bg); display: none; flex-direction: column; }
.uc-overlay.open { display: flex; }
.uc-page { display: flex; flex-direction: column; height: 100%; width: 100%; max-width: 480px; margin: 0 auto; overflow: hidden; }
.uc-topbar { display: flex; align-items: center; gap: 8px; padding: 12px 14px; }
.uc-back { display: grid; place-items: center; width: 36px; height: 36px; border: none; background: transparent; color: var(--t1); cursor: pointer; border-radius: 10px; flex: 0 0 auto; }
.uc-back svg { width: 22px; height: 22px; }
.uc-title { font-weight: 800; font-size: 1.1rem; color: var(--t1); }
.uc-chips { display: flex; gap: 8px; overflow-x: auto; padding: 0 14px 12px; scrollbar-width: none; flex: 0 0 auto; }
.uc-chips::-webkit-scrollbar { display: none; }
.uc-chip { flex: 0 0 auto; border: 1px solid var(--border); background: var(--surface); color: var(--t2); border-radius: 999px; padding: 7px 14px; font-size: 0.8rem; font-weight: 600; white-space: nowrap; cursor: pointer; }
.uc-chip.on { background: var(--gold-br); color: #1a1206; border-color: transparent; }
.uc-body { flex: 1; overflow-y: auto; padding: 2px 0 24px; }
.uc-sec { margin-bottom: 22px; }
.uc-sec-h { display: flex; align-items: center; gap: 8px; padding: 0 16px; margin-bottom: 11px; }
.uc-sec-h .uc-e { font-size: 1.05rem; }
.uc-sec-h .uc-n { font-size: 0.98rem; font-weight: 800; color: var(--t1); }
.uc-row { display: flex; gap: 12px; overflow-x: auto; padding: 2px 16px 6px; scrollbar-width: none; }
.uc-row::-webkit-scrollbar { display: none; }

.uc-card { flex: 0 0 auto; width: 204px; height: 262px; border-radius: 16px; position: relative; overflow: hidden; cursor: pointer; border: 1px solid rgba(255,255,255,0.08); display: flex; flex-direction: column; justify-content: flex-end; padding: 15px; text-align: left; }
.uc-pat { position: absolute; inset: 0; opacity: 0.16; background-size: 46px 46px; background-image: radial-gradient(circle at 12px 12px, #fff 1.3px, transparent 1.6px), radial-gradient(circle at 35px 35px, #fff 1.3px, transparent 1.6px); }
.uc-ribbon { position: absolute; top: 13px; left: 13px; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; background: rgba(0,0,0,0.28); padding: 4px 9px; border-radius: 999px; color: #fff; }
.uc-deco { position: absolute; top: 40px; right: 14px; font-size: 2.5rem; opacity: 0.9; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3)); }
.uc-txt { position: relative; font-size: 0.85rem; line-height: 1.45; font-weight: 600; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,0.45); }
.uc-foot { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 11px; }
.uc-tap { font-size: 0.6rem; color: rgba(255,255,255,0.7); }
.uc-brand { display: inline-flex; align-items: center; gap: 5px; background: rgba(0,0,0,0.26); padding: 3px 8px 3px 4px; border-radius: 999px; }
.uc-tile { width: 17px; height: 17px; border-radius: 5px; background: linear-gradient(135deg, #1f7a52, #0c3d2a); display: grid; place-items: center; font-size: 0.62rem; color: var(--gold-br); }
.uc-wm { font-size: 0.62rem; font-weight: 800; color: #fff; line-height: 1; }
.uc-wm .uc-plus { color: var(--gold-br); }

/* occasion themes */
.uc-t-fitri { background: linear-gradient(150deg, #1f7a52, #0e4f37 60%, #caa24a); }
.uc-t-adha { background: linear-gradient(150deg, #a06a2e, #6e4a22 60%, #caa14e); }
.uc-t-rama { background: linear-gradient(150deg, #3b3a8f, #262567 55%, #5b3f8a); }
.uc-t-jumat { background: linear-gradient(150deg, #1f8a6a, #0d5f48 60%, #1c3a2c); }
.uc-t-lahir { background: linear-gradient(150deg, #3f7fb8, #2a5e86 60%, #8fb8e8); }
.uc-t-nikah { background: linear-gradient(150deg, #b0567f, #7a3a5a 55%, #caa24a); }
.uc-t-wisuda { background: linear-gradient(150deg, #3a5fa0, #26407a 60%, #6f86c4); }
.uc-t-takziah { background: linear-gradient(150deg, #46524a, #2c352f 60%, #5e6b60); }
.uc-t-sembuh { background: linear-gradient(150deg, #2f8f7a, #1d5e52 60%, #7ec0ad); }
.uc-t-sabar { background: linear-gradient(150deg, #5a6072, #363a47 60%, #7e8496); }

/* preview */
.uc-preview { position: absolute; inset: 0; z-index: 5; display: none; align-items: flex-end; justify-content: center; background: rgba(0,0,0,0.55); }
.uc-preview.open { display: flex; }
.uc-preview-sheet { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--gold-border); border-radius: 22px 22px 0 0; padding: 18px 18px 22px; }
.uc-big { height: 330px; border-radius: 16px; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding: 20px; margin-bottom: 16px; }
.uc-big .uc-deco { top: 48px; font-size: 3.2rem; }
.uc-big .uc-txt { font-size: 1.02rem; line-height: 1.5; font-weight: 700; }
.uc-big .uc-foot { justify-content: flex-start; margin-top: 13px; }
.uc-acts { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.uc-act { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: 13px; border: 1px solid var(--border); background: var(--bg); color: var(--t1); font-size: 0.74rem; font-weight: 600; cursor: pointer; }
.uc-act .uc-ai { font-size: 1.2rem; }
.uc-act.primary { border-color: var(--gold-border); background: linear-gradient(135deg, rgba(233,200,105,0.16), rgba(233,200,105,0.04)); color: var(--gold-br); }
.uc-preview-close { width: 100%; margin-top: 12px; padding: 11px; border: none; background: transparent; color: var(--t2); font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.search-page { max-width: 480px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; height: 100%; }
.search-topbar { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.search-back { background: none; border: none; color: var(--t1); cursor: pointer; padding: 4px; display: flex; flex-shrink: 0; }
.search-back svg { width: 22px; height: 22px; }
.search-bar { flex: 1; display: flex; align-items: center; gap: 8px; background: var(--bg-2); border: 1px solid var(--gold-line); border-radius: 999px; padding: 9px 14px; min-width: 0; }
.search-bar-ic { width: 18px; height: 18px; color: var(--t3); flex-shrink: 0; }
/* font-size 16px → cegah auto-zoom iOS saat fokus input (tampilan tak berubah saat mengetik) */
#search-input { flex: 1; min-width: 0; background: none; border: none; outline: none; color: var(--t1); font-family: inherit; font-size: 16px; }
#search-input::placeholder { color: var(--t3); }
.search-clear { background: none; border: none; color: var(--t3); font-size: 0.95rem; cursor: pointer; flex-shrink: 0; }
.search-body { flex: 1; overflow-y: auto; padding: 6px 8px 32px; -webkit-overflow-scrolling: touch; }
.search-sec { margin-top: 10px; }
.search-sec-head { display: flex; align-items: baseline; justify-content: space-between; padding: 6px 10px; }
.search-sec-title { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--t2); }
.search-sec-count { font-size: 0.66rem; color: var(--t3); }
.search-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; background: none; border: none; border-radius: 10px; color: var(--t1); font-family: inherit; font-size: 0.9rem; text-align: left; cursor: pointer; }
.search-item:hover, .search-item:active { background: var(--gold-tint); }
.search-ic-w { width: 34px; height: 34px; border-radius: 9px; background: var(--gold-tint); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.search-ic-w svg { width: 19px; height: 19px; color: var(--gold-br); }
.search-it-main { flex: 1; min-width: 0; }
.search-it-lbl { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-it-sub { display: block; font-size: 0.68rem; color: var(--t3); margin-top: 1px; }
.search-arr { color: var(--t3); flex-shrink: 0; }
.search-seeall { display: block; width: calc(100% - 12px); text-align: center; padding: 9px; margin: 4px 6px 0; background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; color: var(--gold-br); font-family: inherit; font-size: 0.78rem; font-weight: 600; cursor: pointer; }
.search-empty { padding: 40px 16px; text-align: center; color: var(--t3); font-size: 0.88rem; line-height: 1.6; }
.search-hist-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 10px 4px; }
.search-hist-clear { background: none; border: none; color: var(--t3); font-size: 0.72rem; cursor: pointer; font-family: inherit; }
.search-hist-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; background: none; border: none; color: var(--t2); font-family: inherit; font-size: 0.88rem; text-align: left; cursor: pointer; border-radius: 8px; }
.search-hist-item:hover { background: var(--gold-tint); }
.search-hist-ic { width: 15px; height: 15px; color: var(--t3); flex-shrink: 0; }

/* ════════ 7b · BERANDA — BENTO QUICK-ACCESS ════════ */
.bq-seclabel { margin-top: 2px; }
.bento-quick {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.bq-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 14px 6px 12px;
    border: 1px solid var(--gold-border);
    border-radius: var(--arch-md);
    background: var(--surface);
    color: var(--t1);
    cursor: pointer;
    text-decoration: none;
    font-family: var(--font-ui);
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.12s ease, border-color 0.15s;
}
.bq-tile:active { transform: scale(0.96); }
.bq-tile::before {
    content: '';
    position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 46%; height: 6px;
    background: var(--gold-tint);
    border-bottom: 1px solid var(--gold-border);
    border-top-left-radius: 999px 6px;
    border-top-right-radius: 999px 6px;
    pointer-events: none;
}
.bq-ic { width: 26px; height: 26px; color: var(--gold-br); fill: currentColor; }
.bq-label {
    font-size: 0.66rem;
    font-weight: 600;
    color: var(--t1);
    text-align: center;
    line-height: 1.2;
}
/* Personality variants (selaras tile bento reference) */
.bq-emerald { background: linear-gradient(180deg, var(--surface-2), var(--emerald-deep)); }
.bq-coral   { background: linear-gradient(180deg, var(--coral), var(--coral-deep)); border-color: rgba(212,175,55,0.4); }
.bq-plum    { background: linear-gradient(180deg, var(--plum), var(--plum-deep)); }
.bq-teal    { background: linear-gradient(180deg, var(--teal), var(--teal-deep)); }
.bq-gold    { background: linear-gradient(180deg, var(--gold), var(--gold-dp)); border-color: rgba(168,140,80,0.5); }
.bq-coral .bq-ic, .bq-plum .bq-ic, .bq-teal .bq-ic { color: var(--paper); }
.bq-coral .bq-label, .bq-plum .bq-label, .bq-teal .bq-label { color: var(--paper); }
.bq-gold .bq-ic, .bq-gold .bq-label { color: var(--ink); }
.bq-gold::before { background: rgba(20,18,12,0.10); border-bottom-color: rgba(20,18,12,0.18); }
/* Light mode: emerald tile -> surface terang biar teks kebaca */
body.light-mode .bq-emerald { background: linear-gradient(180deg, var(--surface), var(--surface-2)); }
body.light-mode .bq-emerald .bq-label { color: var(--t1); }

/* ════════ 7c · BERANDA — CHAT FAB + SHEET ════════ */
/* FAB: bar mengambang di atas bottom-nav, hanya tampil di Beranda
   (fixed di dalam #tab-beranda → ikut display panel). */
.chat-fab {
    position: fixed;
    left: 50%; transform: translateX(-50%);
    bottom: calc(70px + env(safe-area-inset-bottom, 0px));
    width: calc(100% - 32px);
    max-width: 448px;
    z-index: 150;
    display: flex; align-items: center; gap: 10px;
    padding: 11px 12px 11px 14px;
    background: linear-gradient(180deg, var(--surface-2), var(--surface));
    border: 1px solid var(--gold-border);
    border-radius: 14px 14px 22px 22px;
    box-shadow: 0 12px 36px rgba(0,0,0,0.5);
    cursor: pointer;
    font-family: var(--font-ui);
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.14s ease;
}
.chat-fab:active { transform: translateX(-50%) scale(0.985); }
.chat-fab-spark {
    width: 30px; height: 30px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px 8px 14px 14px;
    background: var(--gold-tint); border: 1px solid var(--gold-border);
}
.chat-fab-spark svg { width: 17px; height: 17px; fill: currentColor; color: var(--gold); }
.chat-fab-ph { flex: 1; text-align: left; font-size: 0.78rem; color: var(--text-2); }
.chat-fab-send {
    width: 32px; height: 32px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px 8px 14px 14px;
    background: var(--gold); color: var(--brand-ink);
}
.chat-fab-send svg { width: 16px; height: 16px; }
body.light-mode .chat-fab { box-shadow: 0 12px 30px rgba(40,34,18,0.18); }

/* Scrim + sheet */
.chat-scrim {
    position: fixed; inset: 0; z-index: 900;
    background: rgba(5,12,8,0.62);
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
}
.chat-scrim.open { opacity: 1; pointer-events: auto; }
.chat-sheet {
    position: fixed; left: 0; right: 0; bottom: 0;
    max-width: 480px; margin: 0 auto;
    height: 82dvh; z-index: 901;
    display: flex; flex-direction: column;
    background: linear-gradient(180deg, var(--surface-2), var(--bg-2));
    border-radius: 26px 26px 0 0;
    border-top: 2px solid var(--gold-border);
    box-shadow: 0 -18px 40px rgba(0,0,0,0.5);
    transform: translateY(102%);
    transition: transform 0.4s cubic-bezier(.32,.72,0,1);
}
.chat-sheet.open { transform: translateY(0); }
.chat-sheet-head {
    display: flex; align-items: center; gap: 11px;
    padding: 16px 16px 13px;
    border-bottom: 1px solid var(--gold-line);
    flex-shrink: 0;
}
.chat-sheet-head .chat-spark {
    width: 38px; height: 38px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    border-radius: 11px 11px 19px 19px;
    background: linear-gradient(135deg, var(--gold), var(--emerald));
}
.chat-sheet-head .chat-spark svg { width: 20px; height: 20px; fill: currentColor; color: var(--brand-ink); }
.chat-sheet-head-tx { flex: 1; min-width: 0; }
.chat-sheet-head-tx h2 { font-family: var(--font-display); font-size: 0.98rem; font-weight: 600; color: var(--t1); }
.chat-sheet-stat {
    font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--gold); margin-top: 1px;
}
.chat-sheet-close {
    width: 30px; height: 30px; flex-shrink: 0;
    background: none; border: none; cursor: pointer;
    color: var(--text-2); font-size: 1rem; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s, color 0.15s;
}
.chat-sheet-close:hover { background: var(--border); color: var(--text-1); }
/* Chat box & form di dalam sheet → isi sisa tinggi */
.chat-sheet .chat-box-wrap { flex: 1; min-height: 0; display: flex; position: relative; }
.chat-sheet .chat-box { flex: 1; height: auto; }
.chat-sheet .chat-input-area { background: var(--bg-2); }

/* ════════ 8 · IBADAH — TRACKER SHOLAT FARDU (interaktif, sinkron) ════════ */
.trk-card {
    position: relative;
    background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
    border: 1px solid var(--gold-border);
    border-radius: var(--arch-lg);
    padding: 14px 14px 10px;
    overflow: hidden;
}
.trk-card::before {
    content: '';
    position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 50%; height: 8px;
    background: var(--gold-tint);
    border-bottom: 1px solid var(--gold-border);
    border-top-left-radius: 999px 8px; border-top-right-radius: 999px 8px;
    pointer-events: none;
}
.trk-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.trk-head-l { display: flex; align-items: center; gap: 11px; min-width: 0; }
.trk-ico {
    width: 38px; height: 38px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--arch-md);
    background: var(--gold-tint); border: 1px solid var(--gold-border);
}
.trk-ico svg { width: 22px; height: 22px; fill: currentColor; color: var(--gold-br); }
.trk-title { font-family: var(--font-display); font-size: 0.92rem; font-weight: 600; color: var(--t1); }
.trk-sub { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.03em; color: var(--text-2); margin-top: 2px; }
/* Progress ring */
.trk-ring-wrap { position: relative; width: 44px; height: 44px; flex-shrink: 0; }
.trk-ring { width: 44px; height: 44px; }
.trk-ring-bg { fill: none; stroke: var(--gold-tint); stroke-width: 4; }
.trk-ring-fill { fill: none; stroke: var(--gold); stroke-width: 4; stroke-linecap: round; transition: stroke-dashoffset 0.5s ease; }
.trk-ring-num {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-family: var(--font-mono); font-size: 0.56rem; font-weight: 700; color: var(--gold-br);
}
/* Rows */
.trk-rows { display: flex; flex-direction: column; gap: 6px; }
.trk-row {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    width: 100%; padding: 11px 12px;
    background: var(--bg-2); border: 1px solid var(--border);
    border-radius: var(--arch-sm);
    cursor: pointer; font-family: var(--font-ui);
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s, border-color 0.15s;
}
.trk-row:active { transform: scale(0.99); }
.trk-row-l { display: flex; align-items: center; gap: 9px; min-width: 0; }
.trk-dot {
    width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0;
    border: 1.5px solid var(--text-3); background: transparent;
    transition: all 0.15s;
}
.trk-row-name { font-size: 0.84rem; font-weight: 600; color: var(--t1); }
.trk-row-ar { font-family: var(--font-arabic); font-size: 0.95rem; color: var(--text-2); }
.trk-row-state {
    font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.04em;
    text-transform: uppercase; color: var(--text-3);
    padding: 4px 9px; border-radius: var(--radius-full);
    border: 1px solid var(--border); flex-shrink: 0;
}
/* State: Munfarid (gold) */
.trk-row.is-munfarid { border-color: var(--gold-border); background: var(--gold-tint-2); }
.trk-row.is-munfarid .trk-dot { background: var(--gold); border-color: var(--gold); }
.trk-row.is-munfarid .trk-row-state { color: var(--gold); border-color: var(--gold-border); background: var(--gold-tint); }
/* State: Berjamaah (emerald/teal — lebih utama) */
.trk-row.is-berjamaah { border-color: rgba(63,174,122,0.5); background: rgba(31,96,72,0.18); }
.trk-row.is-berjamaah .trk-dot { background: #3fae7a; border-color: #3fae7a; box-shadow: 0 0 0 2px rgba(63,174,122,0.25); }
.trk-row.is-berjamaah .trk-row-state { color: #7fc6a3; border-color: rgba(63,174,122,0.4); background: rgba(63,174,122,0.12); }
.trk-hint { font-size: 0.62rem; color: var(--text-3); line-height: 1.5; margin: 10px 2px 0; }
.trk-hint b { color: var(--text-2); font-weight: 600; }
.trk-foot {
    display: block; text-align: center; margin-top: 8px; padding: 8px;
    font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.03em;
    color: var(--gold); text-decoration: none;
    border-top: 1px solid var(--gold-line);
}
.trk-foot:hover { color: var(--gold-br); }

/* ── Tracker: streak mingguan ── */
.trk-week-wrap { margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--gold-line); }
.trk-week-lbl { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); margin-bottom: 8px; }
.trk-week-lbl #trk-week-streak { color: var(--gold); }
.trk-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.trk-wk { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.trk-wk-d { font-size: 0.5rem; color: var(--text-3); font-weight: 600; white-space: nowrap; letter-spacing: 0.01em; }
.trk-wk-pip {
    width: 26px; height: 26px; border-radius: var(--arch-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.62rem; font-weight: 700;
    border: 1px solid var(--border);
    font-variant-numeric: tabular-nums;
}
.trk-wk-pip.empty { background: var(--bg-2); color: var(--text-3); }
.trk-wk-pip.future { background: var(--bg-2); opacity: 0.4; }
.trk-wk-pip.partial { background: var(--gold-tint); border-color: var(--gold-border); color: var(--gold); }
.trk-wk-pip.full { background: linear-gradient(180deg, var(--gold), var(--gold-dp)); border-color: var(--gold); color: var(--brand-ink); }
.trk-wk.today .trk-wk-pip { box-shadow: 0 0 0 2px var(--gold-border); }
.trk-wk.today .trk-wk-d { color: var(--gold); }

/* ════════ 9 · QURAN — reskin Mihrab × Bento ════════ */
/* Home: resume + list surah/juz */
.qh-resume { border-radius: var(--arch-md); border: 1px solid var(--gold-border); background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
.qh-resume-lbl { font-family: var(--font-mono); letter-spacing: 0.1em; }
.qh-resume-val { font-family: var(--font-display); }
.qh-snum { border-radius: var(--arch-sm); background: var(--gold-tint); border-color: var(--gold-border); font-family: var(--font-mono); }
.qh-surah-item:hover { background: var(--surface); }
.qh-sname, .qh-juz-title { font-family: var(--font-display); }
.qh-juz-item { border-radius: var(--arch-md); }
.qh-juz-item.expanded { border-radius: var(--arch-md) var(--arch-md) 0 0; }
/* Reader: info band + ayat */
.qr-info-band { background: linear-gradient(180deg, var(--surface-2), var(--surface)); border-bottom: 1px solid var(--gold-line); }
.qr-ar-title { font-family: var(--font-arabic); color: var(--scripture); }
.qr-ayat-item { border-radius: var(--arch-md); }
.qr-ayat-item.playing { background: var(--gold-tint-2); box-shadow: inset 3px 0 0 var(--gold); }
.qr-ayat-ar { color: var(--scripture); }
/* Nomor ayat → tile lengkung mono */
.qr-ayat-num, .qr-anum {
    font-family: var(--font-mono) !important;
    border-radius: var(--arch-sm) !important;
}
/* Audio bar → mihrab + tombol play emas */
.qr-audio-bar { border-top: 1px solid var(--gold-border); background: linear-gradient(180deg, var(--surface-2), var(--bg-2)); }
.qr-audio-fill { background: linear-gradient(90deg, var(--gold-dp), var(--gold-br)); }
.qr-audio-surah { font-family: var(--font-display); }
.qr-audio-qari { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.04em; }
.qr-ac-play { background: var(--gold) !important; color: var(--brand-ink) !important; border-radius: var(--arch-sm) !important; }
.qr-ac-btn { border-radius: var(--arch-sm); }
/* Tab home pakai chip lengkung (sudah di 4f); favorit/penanda item */
.qh-fav-card { border-radius: var(--arch-md); border-color: var(--gold-border); }

/* ── Program Istiqomah CTA — premium glowing entry ── */
.trk-istiqomah {
    position: relative;
    display: flex; align-items: center; gap: 12px;
    margin-top: 10px; padding: 13px 14px;
    text-decoration: none;
    border: 1px solid var(--gold-border);
    border-radius: var(--arch-md);
    background:
        radial-gradient(120% 100% at 0% 0%, rgba(212,175,55,0.18), transparent 60%),
        linear-gradient(180deg, var(--surface-2), var(--surface));
    box-shadow: 0 0 0 1px rgba(212,175,55,0.05), 0 8px 24px rgba(0,0,0,0.35);
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.14s ease, border-color 0.2s;
}
.trk-istiqomah:active { transform: scale(0.985); }
.trk-istiqomah:hover { border-color: var(--gold); }
/* Shimmer melintas (kesan "menyala") */
.trk-istiqomah::after {
    content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 45%;
    background: linear-gradient(100deg, transparent, rgba(233,200,105,0.18), transparent);
    transform: skewX(-18deg);
    animation: trkShimmer 3.6s ease-in-out infinite;
    pointer-events: none;
}
@keyframes trkShimmer { 0%,100%{ left:-60%; } 55%{ left:120%; } }
.trk-ist-ico {
    width: 40px; height: 40px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--arch-md);
    background: linear-gradient(135deg, var(--gold-br), var(--gold-dp));
    box-shadow: 0 0 14px rgba(212,175,55,0.45);
}
.trk-ist-ico svg { width: 23px; height: 23px; color: var(--brand-ink); }
.trk-ist-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.trk-ist-title {
    font-family: var(--font-display);
    font-size: 0.96rem; font-weight: 700;
    color: var(--gold-br);
    letter-spacing: 0.01em;
    text-shadow: 0 0 10px rgba(233,200,105,0.55), 0 0 22px rgba(212,175,55,0.3);
    animation: trkGlow 2.8s ease-in-out infinite;
}
@keyframes trkGlow {
    0%,100% { text-shadow: 0 0 8px rgba(233,200,105,0.4), 0 0 18px rgba(212,175,55,0.22); }
    50%     { text-shadow: 0 0 14px rgba(233,200,105,0.7), 0 0 30px rgba(212,175,55,0.4); }
}
.trk-ist-sub { font-size: 0.66rem; color: var(--text-2); line-height: 1.35; }
.trk-ist-arr { color: var(--gold-br); font-size: 1.3rem; flex-shrink: 0; }
body.light-mode .trk-ist-title { text-shadow: 0 0 8px rgba(154,123,20,0.3); color: var(--gold); }
@media (prefers-reduced-motion: reduce) {
    .trk-istiqomah::after, .trk-ist-title { animation: none; }
}

/* ════════ 9b · QURAN — premium pass (feedback: terasa lebih berubah) ════════ */
/* Kartu ayat → kartu mihrab: gradient + bahu lengkung + sudut arch */
.qr-ayat-item {
    margin: 12px 12px;
    background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
    border: 1px solid var(--gold-border);
    border-radius: var(--arch-lg);
    position: relative;
    box-shadow: var(--shadow-sm);
}
.qr-ayat-item::before {
    content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 42%; height: 7px; z-index: 2;
    background: var(--gold-tint); border-bottom: 1px solid var(--gold-border);
    border-top-left-radius: 999px 7px; border-top-right-radius: 999px 7px;
    pointer-events: none;
}
.qr-ayat-item.playing {
    background: linear-gradient(180deg, var(--surface-2), var(--emerald-deep));
    box-shadow: 0 0 0 1px var(--gold-border), 0 8px 26px rgba(0,0,0,0.4);
}
.qr-ayat-hdr { border-bottom: 1px solid var(--gold-line); }
/* Nomor ayat → bintang/tile emas bercahaya */
.qr-ayat-circle {
    border-radius: var(--arch-sm);
    background: linear-gradient(135deg, var(--gold-br), var(--gold-dp));
    border: none; color: var(--brand-ink);
    box-shadow: 0 0 12px rgba(212,175,55,0.4);
    font-family: var(--font-mono);
}
.qr-ayat-hdr-title { font-family: var(--font-display); }
/* Teks Arab lebih besar & bercahaya emas */
.qr-ayat-ar {
    font-size: 1.6rem; line-height: 2.15;
    color: var(--scripture);
    text-shadow: 0 0 18px rgba(212,175,55,0.12);
    padding: 18px 16px 8px;
}
.qr-ayat-id { padding-left: 16px; padding-right: 16px; }
/* Info band reader: pita megah */
.qr-info-band { padding: 14px 16px; }
.qr-ar-title { font-size: 1.5rem; text-shadow: 0 0 18px rgba(212,175,55,0.18); }
/* Home: item surah jadi baris kartu lembut */
.qh-surah-item { border: 1px solid transparent; border-radius: var(--arch-md); margin: 4px 6px; }
.qh-surah-item:hover { background: var(--surface); border-color: var(--gold-line); }
.qh-snum { background: linear-gradient(135deg, var(--gold-br), var(--gold-dp)); color: var(--brand-ink); border: none; box-shadow: 0 0 10px rgba(212,175,55,0.3); }
