/* ═══════════════════════════════════════════════
   CSS VARIABLES
   ═══════════════════════════════════════════════ */
:root {
    --bg:            #0d1f0d;
    --bg-card:       #1a2e1a;
    --bg-card-2:     #152415;
    --gold:          #c9a84c;
    --gold-muted:    #a8893e;
    --green-btn:     #2d6a2d;
    --green-hover:   #3a7d3a;
    --cream:         #f5f0e8;
    --cream-border:  #e0d5c0;
    --cream-text:    #2c1a00;
    --cream-sub:     #6b5000;
    --text-1:        #f0f4f0;
    --text-2:        #8aaa8a;
    --text-3:        #4a6a4a;
    --border:        rgba(255, 255, 255, 0.07);
    --border-gold:   rgba(201, 168, 76, 0.25);
    --shadow:        0 4px 20px rgba(0, 0, 0, 0.35);
    --shadow-sm:     0 2px 8px rgba(0, 0, 0, 0.2);
    --radius-xl:     20px;
    --radius-lg:     16px;
    --radius-md:     12px;
    --radius-sm:     8px;
    --radius-full:   9999px;
}

body.light-mode {
    --bg:            #eef3ee;
    --bg-card:       #ffffff;
    --bg-card-2:     #f2f7f2;
    --text-1:        #0d1f0d;
    --text-2:        #4a6a4a;
    --text-3:        #8aaa8a;
    --border:        rgba(0, 0, 0, 0.07);
    --shadow:        0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-sm:     0 2px 8px rgba(0, 0, 0, 0.06);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    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: 16px 16px 32px;
    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;
    padding: 10px 16px;
    background-color: var(--bg);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background-color 0.3s;
}

.bismillah {
    font-family: 'Scheherazade New', 'Amiri', serif;
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--gold);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    line-height: 1.5;
    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); }

.header-logo {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: visible;
    flex-shrink: 0;
}
.header-logo img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 1px solid var(--border-gold);
}
.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: 18px 20px 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-gold);
}

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

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

.ayat-badge {
    font-size: 0.7rem;
    background: rgba(201, 168, 76, 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-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: 18px 20px 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--cream-border);
}

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

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

.hadis-icon {
    width: 16px;
    height: 16px;
    color: var(--green-btn);
}

.hadis-badge {
    font-size: 0.7rem;
    background: rgba(45, 106, 45, 0.12);
    color: #2d6a2d;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-weight: 500;
    border: 1px solid rgba(45, 106, 45, 0.25);
    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-size: 0.83rem;
    color: #4a3500;
    line-height: 1.65;
    margin-bottom: 6px;
    font-style: italic;
}

.hadis-rawi {
    font-size: 0.78rem;
    color: var(--cream-sub);
    font-weight: 500;
}

.hadis-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-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);
}

.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;
}

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

.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);
}

/* 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);
}

.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);
    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(201,168,76,0.15);
    color: var(--gold);
    border: 1px solid rgba(201,168,76,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(201,168,76,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(201,168,76,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(201,168,76,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(201,168,76,0.1); color: var(--gold); border: 1px solid rgba(201,168,76,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: 10px 16px 20px;
    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; }
}

@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: 88dvh;
}

.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(--accent);
    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;
}

/* ═══════════════════════════════════════════════
   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 rgba(201,168,76,0.15);
}
.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(201,168,76,0.09), rgba(201,168,76,0.03));
    border: 1px solid rgba(201,168,76,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(201,168,76,0.15);
    border-color: rgba(201,168,76,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(201,168,76,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(201,168,76,0.06);
    border: 1px solid rgba(201,168,76,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(201,168,76,0.1);
    border-radius: 10px;
    padding: 9px 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}
.pi-ai:hover {
    background: rgba(201,168,76,0.1);
    border-color: rgba(201,168,76,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(201,168,76,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: 'Inter', 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: 'Inter', sans-serif;
}
.qh-s-clear {
    background: none; border: none;
    color: var(--text-3); font-size: 0.75rem; cursor: pointer;
    font-family: 'Inter', sans-serif;
}

/* ── Resume banner ── */
.qh-resume {
    margin: 10px 12px 0;
    background: linear-gradient(135deg, rgba(201,168,76,0.14) 0%, rgba(201,168,76,0.04) 100%);
    border: 1px solid rgba(201,168,76,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: 'Inter', 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;
}
.qh-surah-item:hover { background: var(--bg-card); }
.qh-snum {
    width: 32px; height: 32px;
    background: rgba(201,168,76,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(201,168,76,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;
}
.qh-juz-item:hover { border-color: var(--border-gold); }
.qh-jbadge {
    width: 36px; height: 36px;
    background: rgba(201,168,76,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; }

/* ── 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: 'Inter', 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(201,168,76,0.1);
    border-bottom: 1px solid rgba(201,168,76,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(201,168,76,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;
}

/* Ayat items */
.qr-ayat-item {
    padding: 13px 14px;
    border-bottom: 1px solid var(--border);
}
.qr-ayat-item.playing {
    background: rgba(201,168,76,0.05);
    border-left: 3px solid var(--gold);
    padding-left: 11px;
}
/* Ayat yang sedang di-track sebagai posisi baca */
.qr-ayat-item--reading {
    border-left: 3px solid rgba(138,170,138,0.5);
    padding-left: 11px;
    background: rgba(255,255,255,0.02);
    transition: border-color 0.3s, background 0.3s;
}
/* Kalau ayat sedang playing sekaligus reading, playing menang */
.qr-ayat-item.playing.qr-ayat-item--reading {
    border-left: 3px solid var(--gold);
    background: rgba(201,168,76,0.05);
}
.qr-ayat-ar {
    font-family: 'Scheherazade New', serif;
    font-size: 1.35rem; line-height: 2;
    color: var(--text-1); direction: rtl; text-align: right;
    margin-bottom: 8px;
}
.qr-ayat-id { font-size: 0.8rem; color: var(--text-2); line-height: 1.6; margin-bottom: 8px; }
.qr-ayat-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.qr-ayat-num {
    width: 24px; height: 24px;
    background: rgba(201,168,76,0.1);
    border: 1px solid var(--border-gold);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.6rem; color: var(--gold); font-weight: 700;
    flex-shrink: 0;
}
.qr-ayat-actions { display: flex; gap: 6px; align-items: center; }
.qr-star {
    width: 28px; height: 28px;
    background: rgba(201,168,76,0.08);
    border: 1px solid var(--border-gold);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; cursor: pointer; color: var(--text-3);
    font-family: 'Inter', sans-serif; border: none;
    background: none;
    transition: transform 0.15s;
}
.qr-star:hover  { transform: scale(1.2); }
.qr-star.saved  { color: var(--gold); }
.qr-play-btn {
    display: flex; align-items: center; gap: 4px;
    background: var(--bg-card-2);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 5px 10px;
    font-size: 0.68rem; color: var(--text-2); cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.15s;
}
.qr-play-btn.active {
    background: rgba(201,168,76,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: 'Inter', sans-serif; }
.qr-ac-btn:hover { color: var(--text-1); }
.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: 'Inter', sans-serif;
}

/* ── 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;
}

/* ═══════════════════════════════════════════════
   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: var(--bg-card);
    border-top: 1px solid var(--border);
    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 -4px 20px rgba(0, 0, 0, 0.25);
}

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

.bn-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 9px 2px 8px;
    background: none;
    border: none;
    border-radius: 0;
    cursor: pointer;
    color: var(--text-3);
    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-2); }
.bn-tab.bn-active {
    color: var(--gold);
}

.bn-ico {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    stroke: currentColor;
}
.bn-tab.bn-active .bn-ico {
    stroke: var(--gold);
}

/* ═══════════════════════════════════════════════
   TAB IBADAH — JADWAL SHOLAT FULL WIDTH
   ═══════════════════════════════════════════════ */
.sholat-fw-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 0;
}

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

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

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

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

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

.sholat-fw-countdown-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 16px;
    background: rgba(201, 168, 76, 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(201, 168, 76, 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;
}

.ibadah-3card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 10px 10px;
    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;
}
.ibadah-3card:hover,
.ibadah-3card:active {
    background: var(--bg-card-2);
    border-color: var(--border-gold);
}

.ibadah-3card-ico {
    font-size: 1.6rem;
    line-height: 1;
}

.ibadah-3card-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-1);
    line-height: 1.3;
}

.ibadah-3card-sub {
    font-size: 0.62rem;
    color: var(--text-2);
    line-height: 1.4;
}

/* ═══════════════════════════════════════════════
   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(201, 168, 76, 0.2);
    background: rgba(201, 168, 76, 0.04);
}
.pi-tab-card-gold:hover,
.pi-tab-card-gold:active {
    background: rgba(201, 168, 76, 0.09);
    border-color: rgba(201, 168, 76, 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;
}

.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);
    border-radius: var(--radius-lg);
    padding: 18px 16px 16px;
    margin-bottom: 0;
}

.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);
    border-radius: var(--radius-md);
    margin-top: -8px;
    margin-bottom: 0;
    overflow: hidden;
}

.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;
}
.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);
}

/* ═══════════════════════════════════════════════
   SINGLE AYAT VIEW (Ayat Pilihan)
   ═══════════════════════════════════════════════ */
.fav-av-overlay {
    position: fixed;
    inset: 0;
    z-index: 350;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    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;
}

.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;
}

.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;
}

.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(201, 168, 76, 0.12);
    border: 1px solid rgba(201, 168, 76, 0.3);
    padding: 3px 8px;
    border-radius: var(--radius-full);
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

/* ── 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);
    border-radius: 12px;
    padding: 10px 8px 10px 14px;
    margin-bottom: 12px;
}
.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(201,168,76,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(201,168,76,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);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.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-dist {
    font-size: 0.63rem;
    color: var(--text-3);
    margin-top: 2px;
    display: block;
}

.masjid-maps-btn {
    background: rgba(201, 168, 76, 0.08);
    border: 1px solid rgba(201, 168, 76, 0.3);
    border-radius: var(--radius-full);
    color: var(--gold);
    font-size: 0.68rem;
    font-weight: 500;
    padding: 5px 12px;
    white-space: nowrap;
    flex-shrink: 0;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s;
}
.masjid-maps-btn:hover { background: rgba(201, 168, 76, 0.18); }

.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(201, 168, 76, 0.1); }

/* Load data masjid button (in header) */
.masjid-load-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-3);
    font-size: 0.62rem;
    font-weight: 500;
    padding: 4px 10px;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
    flex-shrink: 0;
}
.masjid-load-btn:hover {
    color: var(--gold);
    border-color: var(--border-gold);
}

/* 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);
    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;
}
.restoran-halal-btn:hover, .restoran-halal-btn:active {
    background: var(--bg-card-2);
    border-color: var(--border-gold);
}

.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);
    box-shadow: var(--shadow-sm);
}

/* 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;
}

.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-icon {
    font-size: 0.78rem;
    line-height: 1;
}

.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 (Ibadah tab dummy) ─────────────────────── */
.kalender-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 0;
}
.kalender-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.kalender-head-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.kalender-ico { font-size: 1.4rem; }
.kalender-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-1);
}
.kalender-sub {
    font-size: 0.65rem;
    color: var(--gold);
    margin-top: 2px;
}
.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;
}

/* Updated entry card head — clickable */
.kalender-section .kalender-head { cursor: pointer; margin-bottom: 0; }
.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: #e07b39;
    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: #4caf7a; }
.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: #e07b39; }  /* Hari Besar — Orange */
.kal-dot-green { background: #5096e0; }  /* Puasa Sunnah — Biru */
.kal-dot-blue  { background: #e05454; }  /* Libur Nasional — Merah */

/* 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: #4caf7a; }

/* 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: #e07b39; }  /* Hari Besar — Orange */
.kal-ev-dot-green { background: #5096e0; }  /* Puasa Sunnah — Biru */
.kal-ev-dot-blue  { background: #e05454; }  /* Libur Nasional — Merah */
.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(201, 168, 76, 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-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(201, 168, 76, 0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    white-space: nowrap;
    z-index: 9999;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
}

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