<style>
  :root {
    --bg: #faf8f4; --surface: #f0ede6; --border: #ddd8ce;
    --gold: #8b6914; --gold-light: #a07d20;
    --text: #1a1612; --text-dim: #6b6560;
    --arabic: 'Amiri', serif; --body: 'DM Sans', sans-serif;
  }
  * { margin: 0; padding: 0; box-sizing: border-box; }
  body { background: #d8d3cb; color: var(--text); font-family: var(--body); min-height: 100vh; font-size: 15px; color-scheme: light; }

  #app-wrapper { width: 100%; min-height: 100vh; background: var(--bg); position: relative; }

  /* Phone only — centered 430px strip */
  @media (max-width: 767px) {
    body { display: flex; justify-content: center; }
    #app-wrapper { max-width: 430px; box-shadow: 0 0 40px rgba(0,0,0,0.15); overflow: hidden; margin: 0 auto; }
  }

  .home { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; padding: 40px 24px; text-align: center; }
  .bismillah { font-family: var(--arabic); font-size: 28px; color: var(--gold); margin-bottom: 32px; opacity: 0; animation: fadeUp 0.8s ease forwards 0.2s; }
  .app-title { font-size: 13px; letter-spacing: 4px; text-transform: uppercase; color: var(--text-dim); margin-bottom: 8px; opacity: 0; animation: fadeUp 0.8s ease forwards 0.4s; }
  .app-heading { font-family: var(--arabic); font-size: 48px; color: var(--text); margin-bottom: 8px; opacity: 0; animation: fadeUp 0.8s ease forwards 0.5s; }
  .app-sub { font-size: 13px; color: var(--text-dim); margin-bottom: 48px; opacity: 0; animation: fadeUp 0.8s ease forwards 0.6s; }
  .sections-list { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 10px; opacity: 0; animation: fadeUp 0.8s ease forwards 0.7s; }
  .section-btn { background: #1e1c1a; border: 1px solid #2e2c2a; border-radius: 12px; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; transition: border-color 0.2s, background 0.2s; text-align: left; color: #e8e4dc; font-family: var(--body); }
  .section-btn:hover { border-color: #3e3c3a; background: #2a2826; }
  .section-btn .num { font-size: 11px; color: #c9a84c; letter-spacing: 1px; margin-bottom: 3px; }
  .section-btn .label-ms { font-size: 14px; font-weight: 500; color: #e8e4dc; }
  .section-btn .label-en { font-size: 11px; color: #7a7670; margin-top: 2px; }
  .section-btn .arrow { color: #6a6660; font-size: 18px; }
  .start-btn { margin-top: 32px; background: var(--gold); color: #0f0f0f; border: none; border-radius: 50px; padding: 14px 40px; font-family: var(--body); font-size: 14px; font-weight: 500; cursor: pointer; letter-spacing: 1px; transition: background 0.2s, transform 0.1s; opacity: 0; animation: fadeUp 0.8s ease forwards 0.9s; }
  .start-btn:hover { background: var(--gold-light); transform: translateY(-1px); }

  .reader { display: none; min-height: 100vh; flex-direction: column; }
  .reader.active { display: flex; }
  .reader-header { position: sticky; top: 0; background: rgba(28,26,24,0.97); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; z-index: 10; }
  .back-btn { background: none; border: none; color: #a0a09a; font-size: 20px; cursor: pointer; padding: 4px 8px; border-radius: 6px; transition: color 0.2s; }
  .back-btn:hover { color: #e0ddd8; }
  .reader-title { font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: #b0ada8; }
  .progress-text { font-size: 11px; color: #c9a84c; }
  .progress-bar { height: 2px; background: var(--border); }
  .progress-fill { height: 100%; background: var(--gold); transition: width 0.3s ease; }
  .reader-content { flex: 1; padding: 32px 24px 100px; max-width: 600px; margin: 0 auto; width: 100%; }
  .section-header { text-align: center; margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
  .section-num { font-size: 11px; letter-spacing: 3px; color: var(--gold); text-transform: uppercase; margin-bottom: 8px; }
  .section-title-ar { font-family: var(--arabic); font-size: 32px; color: var(--text); margin-bottom: 4px; }
  .section-title-ms { font-size: 16px; font-weight: 500; margin-bottom: 2px; }
  .section-title-en { font-size: 12px; color: var(--text-dim); }
  .ayah { margin-bottom: 32px; padding-bottom: 32px; border-bottom: 1px solid var(--border); }
  .ayah:last-child { border-bottom: none; }
  .ayah-label { font-size: 10px; letter-spacing: 2px; color: var(--gold); text-transform: uppercase; margin-bottom: 16px; }
  .ayah-arabic { font-family: var(--arabic); font-size: 26px; line-height: 2; text-align: right; direction: rtl; color: #0f0c08; margin-bottom: 16px; }
  .ayah-rumi { font-size: 14px; line-height: 1.8; color: var(--text-dim); font-style: italic; margin-bottom: 10px; }
  .ayah-translation { font-size: 13px; line-height: 1.7; color: #3a3530; background: #ede9e1; border-left: 2px solid var(--gold); padding: 10px 14px; border-radius: 0 8px 8px 0; }
  .repeat-tag { display: inline-block; background: #e8e4dc; border: 1px solid var(--gold); color: var(--gold); font-size: 10px; padding: 2px 8px; border-radius: 20px; margin-bottom: 12px; letter-spacing: 1px; }

  .counter-wrap { display: flex; flex-direction: column; align-items: center; margin: 20px 0; }
  .counter-tap { width: 140px; height: 140px; border-radius: 50%; background: #e8e4dc; border: 2px solid var(--border); display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; transition: border-color 0.15s, transform 0.1s, background 0.15s; user-select: none; -webkit-tap-highlight-color: transparent; position: relative; overflow: hidden; }
  .counter-tap:active { transform: scale(0.93); background: #ddd9d0; border-color: var(--gold); }
  .counter-tap.done { border-color: var(--gold); background: #e2ddd0; }
  .counter-num { font-family: var(--arabic); font-size: 44px; color: var(--text); line-height: 1; transition: color 0.2s; }
  .counter-tap.done .counter-num { color: var(--gold); }
  .counter-target { font-size: 11px; color: var(--text-dim); margin-top: 4px; letter-spacing: 1px; }
  .counter-ring { position: absolute; inset: 0; border-radius: 50%; pointer-events: none; }
  .counter-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
  .counter-ring circle { fill: none; stroke: var(--gold); stroke-width: 3; stroke-dasharray: 408; stroke-dashoffset: 408; stroke-linecap: round; transition: stroke-dashoffset 0.2s ease; }
  .counter-actions { display: flex; gap: 16px; margin-top: 16px; }
  .counter-reset { background: none; border: 1px solid var(--border); color: var(--text-dim); border-radius: 20px; padding: 6px 16px; font-size: 11px; cursor: pointer; font-family: var(--body); letter-spacing: 1px; transition: border-color 0.2s, color 0.2s; }
  .counter-reset:hover { border-color: var(--text-dim); color: var(--text); }
  .counter-done-label { font-size: 11px; color: var(--gold); letter-spacing: 2px; margin-top: 10px; height: 16px; opacity: 0; transition: opacity 0.3s; }
  .counter-done-label.show { opacity: 1; }

  .reader-nav { position: fixed; bottom: 0; left: 0; right: 0; background: rgba(28,26,24,0.97); border-top: 1px solid var(--border); padding: 16px 24px; display: flex; gap: 12px; max-width: 600px; margin: 0 auto; }
  .nav-btn { flex: 1; padding: 14px; border-radius: 10px; border: 1px solid #3a3834; background: #2a2824; color: #c0bdb8; font-family: var(--body); font-size: 13px; cursor: pointer; transition: all 0.2s; }
  .nav-btn.primary { background: var(--gold); color: #0f0f0f; border-color: var(--gold); font-weight: 500; }
  .nav-btn:hover { opacity: 0.85; }
  .nav-btn:disabled { opacity: 0.3; cursor: default; }

  .complete-screen { display: none; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; padding: 40px 24px; text-align: center; }
  .complete-screen.active { display: flex; }
  .complete-icon { font-size: 48px; margin-bottom: 24px; }
  .complete-title { font-family: var(--arabic); font-size: 36px; color: var(--gold); margin-bottom: 8px; opacity: 0; animation: fadeUp 0.6s ease forwards 0.2s; }
  .complete-sub { font-size: 14px; color: var(--text-dim); margin-bottom: 40px; opacity: 0; animation: fadeUp 0.6s ease forwards 0.3s; }
  .restart-btn { background: none; border: 1px solid var(--border); color: var(--text); border-radius: 50px; padding: 12px 32px; font-family: var(--body); font-size: 13px; cursor: pointer; transition: border-color 0.2s; opacity: 0; animation: fadeUp 0.6s ease forwards 0.4s; }
  .restart-btn:hover { border-color: var(--gold); color: var(--gold); }

  
  /* ARWAH INPUT SCREEN */
  .arwah-screen { display: none; flex-direction: column; min-height: 100vh; background: #1a1714; }
  .arwah-screen.active { display: flex; }
  .arwah-header { background: rgba(28,26,24,0.97); border-bottom: 1px solid #2e2c2a; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; }
  .arwah-header-title { font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: #b0ada8; }
  .arwah-body { flex: 1; padding: 24px; width: 100%; overflow-y: auto; padding-bottom: 100px; background: #f7f3ed; border-radius: 24px 24px 0 0; }
  .arwah-intro { text-align: center; margin-bottom: 28px; }
  .arwah-intro-ar { font-family: var(--arabic); font-size: 22px; color: #1a1612; margin-bottom: 6px; }
  .arwah-intro-ms { font-size: 13px; color: #6b6560; }
  .arwah-group { margin-bottom: 28px; }
  .arwah-group-label { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: #c9a84c; margin-bottom: 12px; font-weight: 500; }
  .arwah-group-sub { font-family: var(--arabic); font-size: 14px; color: #6b6560; margin-bottom: 12px; direction: rtl; text-align: right; line-height: 1.8; }
  .arwah-names-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
  .arwah-name-row { display: flex; align-items: center; gap: 8px; }
  .arwah-name-input { flex: 1; background: #f0ede6; border: 1px solid #ddd8ce; border-radius: 10px; padding: 12px 14px; font-family: var(--body); font-size: 14px; color: #1a1612; outline: none; transition: border-color 0.2s; }
  .arwah-name-input:focus { border-color: #c9a84c; }
  .arwah-name-input::placeholder { color: #b0ada8; }
  .arwah-remove-btn { background: none; border: 1px solid #ddd8ce; border-radius: 8px; color: #b0ada8; width: 36px; height: 36px; cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: border-color 0.2s, color 0.2s; }
  .arwah-remove-btn:hover { border-color: #c0a898; color: #8a5a4a; }
  .arwah-add-btn { background: none; border: 1px dashed #c9a84c; border-radius: 10px; color: #c9a84c; padding: 10px; font-family: var(--body); font-size: 12px; cursor: pointer; width: 100%; letter-spacing: 1px; transition: background 0.2s; }
  .arwah-add-btn:hover { background: #f5f0e0; }
  .arwah-footer { position: sticky; bottom: 0; background: rgba(28,26,24,0.97); border-top: 1px solid #2e2c2a; padding: 16px 24px; max-width: 600px; margin: 0 auto; display: flex; gap: 12px; }
  .arwah-skip-btn { flex: 1; padding: 14px; border-radius: 10px; border: 1px solid #3a3834; background: #2a2824; color: #c0bdb8; font-family: var(--body); font-size: 13px; cursor: pointer; }
  .arwah-start-btn { flex: 2; padding: 14px; border-radius: 10px; border: none; background: #c9a84c; color: #0f0c08; font-family: var(--body); font-size: 13px; font-weight: 500; cursor: pointer; letter-spacing: 1px; }

  
  /* LANG TOGGLE */
  .lang-toggle {
    display: flex;
    background: #2a2824;
    border-radius: 50px;
    padding: 3px;
    gap: 2px;
    border: 1px solid #3a3834;
  }
  .lang-btn {
    padding: 5px 12px;
    border-radius: 50px;
    border: none;
    font-family: var(--body);
    font-size: 11px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s;
    background: none;
    color: #6a6560;
    font-weight: 500;
  }
  .lang-btn.active {
    background: var(--gold);
    color: #0f0c08;
  }

  /* Hide/show based on language */
  .lang-en { display: none; }
  .lang-ms { display: block; }
  body.lang-english .lang-en { display: block; }
  body.lang-english .lang-ms { display: none; }

  /* inline spans */
  span.lang-en { display: none; }
  span.lang-ms { display: inline; }
  body.lang-english span.lang-en { display: inline; }
  body.lang-english span.lang-ms { display: none; }

  
  .lang-toggle {
    display: flex;
    gap: 6px;
    align-items: center;
  }
  .lang-btn {
    background: none;
    border: 1px solid #3a3834;
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 10px;
    font-family: var(--body);
    color: #8a8278;
    cursor: pointer;
    letter-spacing: 1px;
    transition: all 0.2s;
  }
  .lang-btn.active {
    background: var(--gold);
    border-color: var(--gold);
    color: #0f0c08;
    font-weight: 500;
  }


  
  /* TRANSLATION TOGGLE */
  .trans-toggle-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 24px;
    background: var(--warm);
    border-bottom: 1px solid var(--border);
  }
  .trans-toggle-label {
    font-size: 11px;
    letter-spacing: 1px;
    color: var(--text-dim);
    text-transform: uppercase;
  }
  .toggle-switch {
    position: relative;
    width: 42px;
    height: 24px;
    cursor: pointer;
  }
  .toggle-switch input { display: none; }
  .toggle-track {
    position: absolute;
    inset: 0;
    background: var(--border);
    border-radius: 50px;
    transition: background 0.2s;
  }
  .toggle-thumb {
    position: absolute;
    top: 3px; left: 3px;
    width: 18px; height: 18px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  }
  .toggle-switch input:checked + .toggle-track { background: var(--gold); }
  .toggle-switch input:checked + .toggle-track + .toggle-thumb { transform: translateX(18px); }

  /* Hide translations when toggled off */
  body.hide-translation .ayah-translation { display: none; }
  body.hide-translation .ayah-rumi { display: none; }

  

  /* SMART MUSAFIR */
  .smart-musafir-banner {
    margin: 12px 16px 0;
    background: linear-gradient(135deg, #1a2a14, #243a1c);
    border: 1px solid #3a5a2a;
    border-radius: 16px;
    padding: 14px 16px;
    display: none;
  }
  .smart-musafir-banner.visible { display: block; }

  .smb-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
  .smb-icon { width: 36px; height: 36px; background: rgba(74,138,48,0.2); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
  .smb-title { font-size: 13px; font-weight: 600; color: #90d070; }
  .smb-sub { font-size: 10px; color: #5a8a48; margin-top: 1px; }
  .smb-dismiss { font-size: 18px; color: #4a7a38; cursor: pointer; margin-left: auto; line-height: 1; }

  .smb-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
  .smb-pill { background: rgba(74,138,48,0.15); border: 1px solid #3a6a28; border-radius: 20px; padding: 3px 9px; font-size: 9px; color: #80c060; }

  .smb-days { padding-top: 10px; border-top: 1px solid #2a4a1c; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .smb-days-label { font-size: 10px; color: #5a8a48; flex: 1; line-height: 1.4; }
  .smb-days-counter { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
  .smb-days-btn { width: 26px; height: 26px; background: rgba(74,138,48,0.2); border: none; border-radius: 50%; color: #80c060; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-family: var(--body); }
  .smb-days-num { font-size: 12px; font-weight: 600; color: #90d070; min-width: 48px; text-align: center; }
  .smb-days-warning { font-size: 10px; color: #f09050; font-weight: 600; text-align: center; margin-top: 8px; padding: 6px 10px; background: rgba(200,100,20,0.15); border-radius: 8px; border: 1px solid rgba(200,100,20,0.3); display: none; }
  .smb-days-warning.visible { display: block; }

  /* RETURN HOME BANNER */
  .return-home-banner {
    margin: 12px 16px 0;
    background: #1a1c2a;
    border: 1px solid #2a2c4a;
    border-radius: 16px;
    padding: 14px 16px;
    display: none;
    align-items: center;
    gap: 12px;
  }
  .return-home-banner.visible { display: flex; }
  .rhb-icon { width: 36px; height: 36px; background: rgba(100,120,200,0.2); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
  .rhb-title { font-size: 13px; font-weight: 600; color: #a0b0e0; margin-bottom: 2px; }
  .rhb-sub { font-size: 10px; color: #5060a0; }
  .rhb-dismiss { font-size: 18px; color: #4050a0; cursor: pointer; margin-left: auto; }

  /* JAMAK SUGGESTION */
  .jamak-suggestion-card {
    margin: 10px 16px 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    display: none;
  }
  .jamak-suggestion-card.visible { display: block; }
  .jsc-header { background: #fdf8ee; border-bottom: 1px solid #f0e8c8; padding: 11px 14px; display: flex; align-items: center; gap: 8px; }
  .jsc-icon { font-size: 16px; }
  .jsc-text { flex: 1; }
  .jsc-title { font-size: 12px; font-weight: 600; color: #8b6914; }
  .jsc-sub { font-size: 10px; color: #b09040; }
  .jsc-dismiss { font-size: 16px; color: #c0a060; cursor: pointer; }
  .jsc-body { padding: 12px 14px; }
  .jsc-options { display: flex; gap: 8px; margin-bottom: 10px; }
  .jsc-option { flex: 1; border: 1px solid var(--border); border-radius: 10px; padding: 9px; text-align: center; cursor: pointer; transition: all 0.2s; }
  .jsc-option.selected { background: var(--dark); border-color: var(--dark); }
  .jsc-option-name { font-size: 11px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
  .jsc-option.selected .jsc-option-name { color: var(--gold); }
  .jsc-option-desc { font-size: 9px; color: var(--text-dim); line-height: 1.4; }
  .jsc-option.selected .jsc-option-desc { color: #6a6258; }
  .jsc-niat { background: var(--warm); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
  .jsc-niat-ar { font-family: var(--arabic); font-size: 14px; direction: rtl; text-align: right; color: var(--text); line-height: 1.8; margin-bottom: 5px; }
  .jsc-niat-ms { font-size: 10px; color: #6a6258; line-height: 1.5; }
  .jsc-btn { width: 100%; padding: 10px; background: var(--gold); border: none; border-radius: 10px; font-family: var(--body); font-size: 12px; font-weight: 600; color: #0f0c08; cursor: pointer; }

  /* Qasar badge in prayer row */
  .qasar-pill { background: #fdf3d8; border: 1px solid #e8d08a; border-radius: 5px; padding: 2px 6px; font-size: 8px; color: #8b6914; font-weight: 600; }


  /* CATEGORY GRID */
  .home-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 7px; padding: 0 16px; }

  .hg-item {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 8px;
    text-align: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.15s;
  }

  .hg-item:active { transform: scale(0.95); }
  .hg-item.active { background: #1a1714; border-color: #2a2520; }
  .hg-item.soon { opacity: 0.72; cursor: default; }
  .hg-item.smart-highlight { background: #fdf8ee !important; border-color: #e8d08a !important; }
  .hg-item.smart-highlight .hg-name { color: #8b6914 !important; }
  .hg-item.smart-highlight .hg-sub { color: #b09040 !important; }
  .hg-sub { font-size: 8px; color: var(--text-dim); margin-top: 2px; line-height: 1.3; display: block; }
  .hg-item.active .hg-sub { color: #5a5248; }

  .hg-icon { font-size: 22px; display: block; margin-bottom: 5px; }
  .hg-ar { font-family: var(--arabic); font-size: 22px; color: #c9a84c; display: block; margin-bottom: 4px; line-height: 1.2; direction: rtl; }
  .hg-item.smart-highlight .hg-ar { color: #8b6914; }
  .hg-name { font-size: 10px; font-weight: 600; color: var(--text); line-height: 1.3; }
  .hg-item.active .hg-name { color: #e8e0d0; }

  .hg-badge {
    position: absolute;
    top: 4px; right: 4px;
    background: #4a4440;
    color: #8a8480;
    font-size: 6px;
    padding: 1px 4px;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
  }

  /* CONTEXT STRIP */
  .context-strip {
    background: var(--dark);
    padding: 7px 16px 7px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #252220;
    display: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .context-strip:active { opacity: 0.85; }
  .context-strip.visible { display: flex; }
  .context-icon { font-size: 13px; }
  .context-text { font-size: 11px; color: #7a7060; flex: 1; line-height: 1.4; }
  .context-text strong { color: var(--gold); font-weight: 600; }
  .context-dismiss { font-size: 14px; color: #3a3530; cursor: pointer; flex-shrink: 0; }


  /* SEMBAHYANG SCREEN */
  .sembahyang-screen { display: none; min-height: 100vh; flex-direction: column; background: #1a1714; }
  .sembahyang-screen.active { display: flex; }

  .sembahyang-menu-body { flex: 1; background: #f7f3ed; border-radius: 24px 24px 0 0; overflow-y: auto; padding: 16px 16px 80px; }

  .smenu-sec { font-size: 9px; letter-spacing: 3px; text-transform: uppercase; color: #c9a84c; font-weight: 500; padding: 12px 0 8px; }

  .smenu-list { background: white; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; margin-bottom: 10px; }

  .smenu-item { padding: 12px 14px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; cursor: pointer; transition: background 0.15s; }
  .smenu-item:last-child { border-bottom: none; }
  .smenu-item:active { background: var(--warm); }
  .smenu-item.smart { background: #fdf8ee; }

  .smi-icon { width: 32px; height: 32px; background: var(--dark); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
  .smenu-item.smart .smi-icon { background: #8b6914; }
  .smi-text { flex: 1; }
  .smi-name { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 1px; }
  .smenu-item.smart .smi-name { color: #8b6914; }
  .smi-sub { font-size: 10px; color: var(--text-dim); }
  .smenu-item.smart .smi-sub { color: #b09040; }
  .smi-arrow { color: var(--text-dim); font-size: 14px; }
  .smenu-item.smart .smi-arrow { color: #c9a84c; }


  /* SEMBAHYANG DETAIL SCREENS */
  .sembahyang-detail { display: none; min-height: 100vh; flex-direction: column; background: #1a1714; }
  .sembahyang-detail.active { display: flex; }
  .sd-body { flex: 1; background: #f7f3ed; border-radius: 24px 24px 0 0; overflow-y: auto; padding: 16px 16px 80px; }

  /* Section headers */
  .sd-sec { font-size: 9px; letter-spacing: 3px; text-transform: uppercase; color: #c9a84c; font-weight: 500; padding: 14px 0 8px; }
  .sd-card { background: white; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; margin-bottom: 10px; }
  .sd-card-item { padding: 13px 16px; border-bottom: 1px solid var(--border); }
  .sd-card-item:last-child { border-bottom: none; }

  /* Time window */
  .sd-time-card { background: #1a1714; border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; border: 1px solid #2e2a20; }
  .sd-time-label { font-size: 9px; letter-spacing: 2px; color: #c9a84c; text-transform: uppercase; font-weight: 600; margin-bottom: 10px; }
  .sd-time-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
  .sd-time-box { text-align: center; }
  .sd-time-name { font-size: 9px; color: #6a6258; margin-bottom: 3px; letter-spacing: 1px; text-transform: uppercase; }
  .sd-time-val { font-size: 20px; font-weight: 600; color: #f0ece4; }
  .sd-time-arrow { color: #c9a84c; font-size: 20px; }
  .sd-time-best { background: rgba(201,168,76,0.1); border: 1px solid rgba(201,168,76,0.2); border-radius: 8px; padding: 7px 10px; font-size: 10px; color: #b09040; text-align: center; }

  /* Rakaat selector */
  .sd-rakaat-card { background: white; border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; }
  .sd-rakaat-label { font-size: 11px; color: var(--text-dim); margin-bottom: 10px; }
  .sd-rakaat-btns { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 8px; }
  .sd-rk { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border); background: var(--warm); font-size: 13px; font-weight: 600; color: var(--text-dim); cursor: pointer; display: flex; align-items: center; justify-content: center; font-family: var(--body); transition: all 0.15s; }
  .sd-rk.sel { background: #1a1714; border-color: #1a1714; color: #c9a84c; }
  .sd-rk-note { font-size: 10px; color: var(--text-dim); }

  /* Niat card */
  .sd-niat-card { background: white; border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; }
  .sd-niat-label { font-size: 9px; letter-spacing: 2px; color: #c9a84c; text-transform: uppercase; font-weight: 600; margin-bottom: 10px; }
  .sd-niat-ar { font-family: var(--arabic); font-size: 17px; direction: rtl; text-align: right; color: var(--text); line-height: 1.9; background: var(--warm); padding: 10px 12px; border-radius: 10px; margin-bottom: 8px; }
  .sd-niat-rumi { font-size: 11px; color: var(--text-dim); font-style: italic; line-height: 1.6; margin-bottom: 6px; }
  .sd-niat-ms { font-size: 11px; color: #6a6258; line-height: 1.6; background: var(--warm); padding: 8px 10px; border-radius: 8px; }

  /* Surah list */
  .sd-surah-card { background: white; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; margin-bottom: 10px; }
  .sd-surah-hdr { padding: 10px 14px; background: #fafaf8; border-bottom: 1px solid var(--border); font-size: 9px; letter-spacing: 2px; text-transform: uppercase; color: #c9a84c; font-weight: 600; }
  .sd-surah-row { padding: 11px 14px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; cursor: pointer; }
  .sd-surah-row:last-child { border-bottom: none; }
  .sd-surah-num { width: 28px; height: 28px; background: #1a1714; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; color: #c9a84c; font-weight: 600; flex-shrink: 0; }
  .sd-surah-ar { font-family: var(--arabic); font-size: 15px; color: var(--text); margin-bottom: 2px; }
  .sd-surah-ms { font-size: 10px; color: var(--text-dim); }
  .sd-surah-ayat { font-size: 9px; color: var(--text-dim); background: var(--warm); border-radius: 6px; padding: 2px 7px; margin-left: auto; white-space: nowrap; }

  /* Doa card */
  .sd-doa-card { background: white; border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; }
  .sd-doa-label { font-size: 9px; letter-spacing: 2px; color: #c9a84c; text-transform: uppercase; font-weight: 600; margin-bottom: 10px; }
  .sd-doa-ar { font-family: var(--arabic); font-size: 16px; direction: rtl; text-align: right; color: var(--text); line-height: 1.9; background: var(--warm); padding: 10px 12px; border-radius: 10px; margin-bottom: 8px; }
  .sd-doa-rumi { font-size: 11px; color: var(--text-dim); font-style: italic; line-height: 1.6; margin-bottom: 6px; }
  .sd-doa-ms { font-size: 11px; color: #6a6258; line-height: 1.6; }

  /* Fadhilat */
  .sd-fadhilat { background: #fdf8ee; border: 1px solid #f0e8c8; border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; }
  .sd-fadhilat-label { font-size: 9px; letter-spacing: 2px; color: #8b6914; text-transform: uppercase; font-weight: 600; margin-bottom: 8px; }
  .sd-fadhilat-ar { font-family: var(--arabic); font-size: 15px; direction: rtl; text-align: right; color: var(--text); line-height: 1.8; margin-bottom: 7px; }
  .sd-fadhilat-ms { font-size: 11px; color: #8b6914; line-height: 1.6; }
  .sd-fadhilat-src { font-size: 10px; color: #b09040; margin-top: 4px; font-weight: 500; }

  /* Info row */
  .sd-info-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
  .sd-info-row:last-child { border-bottom: none; }
  .sd-info-icon { width: 28px; height: 28px; background: #1a1714; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; margin-top: 2px; }
  .sd-info-title { font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
  .sd-info-sub { font-size: 11px; color: var(--text-dim); line-height: 1.5; }

  /* Expandable section */
  .sd-expand-hdr { padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; background: #fafaf8; border-bottom: 1px solid var(--border); }
  .sd-expand-title { font-size: 12px; font-weight: 600; color: var(--text); }
  .sd-expand-chev { color: var(--text-dim); font-size: 11px; transition: transform 0.3s; }
  .sd-expand-chev.open { transform: rotate(180deg); }
  .sd-expand-body { display: none; padding: 12px 16px; }
  .sd-expand-body.open { display: block; }


  /* STEP BY STEP */
  .prayer-tabs-bar { background:#1a1714; padding:0 16px 14px; display:flex; gap:6px; overflow-x:auto; -webkit-overflow-scrolling:touch; scrollbar-width:none; }
  .prayer-tabs-bar::-webkit-scrollbar { display:none; }
  .ptab { flex-shrink:0; padding:6px 14px; border-radius:20px; font-size:11px; font-weight:600; cursor:pointer; border:1px solid #2e2a20; color:#6a6258; background:#2a2520; white-space:nowrap; font-family:var(--body); }
  .ptab.active { background:var(--gold); color:#0f0c08; border-color:var(--gold); }
  .solat-mode-sel { margin:14px 16px 0; display:flex; background:white; border:1px solid var(--border); border-radius:12px; padding:4px; gap:4px; }
  .solat-mode-btn { flex:1; padding:8px; border-radius:9px; font-size:11px; font-weight:600; text-align:center; cursor:pointer; color:var(--text-dim); border:none; background:none; font-family:var(--body); }
  .solat-mode-btn.active { background:var(--dark); color:var(--gold); }
  .step-wrap { padding:14px 16px 80px; }
  .step-progress { display:flex; align-items:center; gap:8px; margin-bottom:14px; }
  .step-bar-wrap { flex:1; height:4px; background:var(--border); border-radius:4px; overflow:hidden; }
  .step-bar-fill { height:100%; background:var(--gold); border-radius:4px; transition:width 0.4s; }
  .step-count-txt { font-size:10px; color:var(--text-dim); white-space:nowrap; }
  .step-card { background:white; border:1px solid var(--border); border-radius:16px; overflow:hidden; margin-bottom:14px; }
  .step-card-hdr { background:#1a1714; padding:14px 16px; display:flex; align-items:center; gap:12px; }
  .step-num { width:32px; height:32px; background:var(--gold); border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:700; color:#0f0c08; flex-shrink:0; }
  .step-title-txt { font-size:14px; font-weight:600; color:#f0ece4; }
  .step-sub-txt { font-size:10px; color:#6a6258; margin-top:2px; }
  .step-card-body { padding:16px; }
  .step-ar { font-family:var(--arabic); font-size:20px; direction:rtl; text-align:right; color:var(--text); line-height:1.9; background:var(--warm); padding:12px 14px; border-radius:10px; margin-bottom:10px; }
  .step-rumi { font-size:11px; color:var(--text-dim); font-style:italic; line-height:1.6; margin-bottom:8px; }
  .step-ms { font-size:11px; color:#6a6258; line-height:1.6; background:var(--warm); padding:8px 10px; border-radius:8px; margin-bottom:10px; }
  .step-note { font-size:10px; color:#8b6914; background:#fdf8ee; border:1px solid #f0e8c8; border-radius:8px; padding:7px 10px; }
  .step-nav { display:flex; gap:10px; margin-top:4px; }
  .step-back-btn { width:44px; height:44px; border-radius:12px; border:1px solid var(--border); background:white; color:var(--text-dim); font-size:18px; cursor:pointer; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
  .step-next-btn { flex:1; height:44px; border-radius:12px; border:none; background:var(--dark); color:var(--gold); font-size:12px; font-weight:600; cursor:pointer; font-family:var(--body); }
  .step-complete { background:#1a2a14; border:1px solid #3a5a2a; border-radius:16px; padding:24px 16px; text-align:center; margin-bottom:14px; }
  .step-complete-ar { font-family:var(--arabic); font-size:22px; color:#c9a84c; margin:8px 0 6px; }
  .step-complete-title { font-size:15px; font-weight:600; color:#90d070; margin-bottom:6px; }
  .step-complete-sub { font-size:11px; color:#5a8a48; line-height:1.6; }


  /* QIAMULLAIL */
  .qiam-screen { display: none; min-height: 100vh; flex-direction: column; background: #1a1714; }
  .qiam-screen.active { display: flex; }
  .qiam-body { flex: 1; background: #f7f3ed; border-radius: 24px 24px 0 0; overflow-y: auto; padding: 16px 16px 100px; }

  .qiam-prayer-card { background: white; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; margin-bottom: 10px; transition: all 0.2s; }
  .qiam-prayer-card.done { border-color: #4a8a30; background: #edf7e8; }
  .qiam-prayer-card.open .qiam-expand { transform: rotate(180deg); }

  .qiam-card-hdr { display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; }
  .qiam-check { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; flex-shrink: 0; cursor: pointer; transition: all 0.2s; }
  .qiam-prayer-card.done .qiam-check { background: #4a8a30; border-color: #4a8a30; color: white; }
  .qiam-check-icon { display: none; font-size: 12px; color: white; }
  .qiam-prayer-card.done .qiam-check-icon { display: block; }
  .qiam-ar { font-family: var(--arabic); font-size: 15px; color: #c9a84c; margin-bottom: 2px; }
  .qiam-name { font-size: 13px; font-weight: 600; color: var(--text); }
  .qiam-prayer-card.done .qiam-name { color: #2d6a4f; }
  .qiam-meta { font-size: 10px; color: var(--text-dim); }
  .qiam-expand { color: var(--text-dim); font-size: 16px; transition: transform 0.2s; margin-left: auto; }

  .qiam-card-body { display: none; padding: 0 16px 16px; }
  .qiam-prayer-card.open .qiam-card-body { display: block; }

  .qiam-rakaat-badge { display: inline-flex; align-items: center; gap: 6px; background: #fdf3d8; color: #8b6914; border-radius: 20px; padding: 3px 12px; font-size: 11px; font-weight: 600; margin-bottom: 12px; }

  .qiam-step { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
  .qiam-step-num { width: 22px; height: 22px; border-radius: 50%; background: #1a1714; color: #c9a84c; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; }
  .qiam-step-title { font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
  .qiam-step-ar { font-family: var(--arabic); font-size: 17px; direction: rtl; text-align: right; color: var(--text); line-height: 1.9; background: var(--warm); padding: 8px 10px; border-radius: 8px; margin: 6px 0; }
  .qiam-step-ms { font-size: 10px; color: #6a6258; line-height: 1.5; font-style: italic; }

  /* Progress ring */
  .qiam-progress-ring { background: #1a1714; border-radius: 14px; padding: 16px; margin-bottom: 14px; display: flex; align-items: center; gap: 16px; border: 1px solid #2a2520; }
  .qiam-ring-svg { width: 64px; height: 64px; flex-shrink: 0; }
  .qiam-ring-bg { fill: none; stroke: #2a2520; stroke-width: 8; }
  .qiam-ring-fill { fill: none; stroke: #c9a84c; stroke-width: 8; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset 0.5s; }
  .qiam-ring-count { font-size: 24px; font-weight: 700; color: #c9a84c; font-family: var(--arabic); }
  .qiam-ring-label { font-size: 11px; color: #6a6258; margin-top: 2px; }
  .qiam-reset-btn { width: 100%; padding: 10px; border-radius: 10px; border: 1px solid #2a2520; background: none; font-family: var(--body); font-size: 11px; color: #4a4440; cursor: pointer; margin-top: 10px; }
  .qiam-reset-btn:hover { border-color: #c04040; color: #c04040; }


  /* FONT SIZE CONTROL */
  .font-ctrl {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #2a2520;
    border-radius: 20px;
    padding: 4px 10px;
    position: absolute;
    top: 48px;
    right: 18px;
  }
  .font-ctrl-btn {
    background: none;
    border: none;
    color: #6a6258;
    font-size: 16px;
    cursor: pointer;
    font-family: var(--body);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.15s;
  }
  .font-ctrl-btn:active { background: #3a3530; color: #c9a84c; }
  .font-ctrl-label { font-size: 10px; color: #6a6258; min-width: 20px; text-align: center; }

  /* Arabic size classes */
  body.ar-sm .step-arabic,
  body.ar-sm .qiam-step-ar,
  body.ar-sm .sd-niat-ar,
  body.ar-sm .sd-doa-ar,
  body.ar-sm .doa-arabic,
  body.ar-sm .arabic-text,
  body.ar-sm [style*="font-family:var(--arabic)"],
  body.ar-sm .reader-arabic { font-size: 16px !important; }

  body.ar-md .step-arabic,
  body.ar-md .qiam-step-ar,
  body.ar-md .sd-niat-ar,
  body.ar-md .sd-doa-ar,
  body.ar-md .doa-arabic,
  body.ar-md .arabic-text,
  body.ar-md [style*="font-family:var(--arabic)"],
  body.ar-md .reader-arabic { font-size: 22px !important; }

  body.ar-lg .step-arabic,
  body.ar-lg .qiam-step-ar,
  body.ar-lg .sd-niat-ar,
  body.ar-lg .sd-doa-ar,
  body.ar-lg .doa-arabic,
  body.ar-lg .arabic-text,
  body.ar-lg [style*="font-family:var(--arabic)"],
  body.ar-lg .reader-arabic { font-size: 28px !important; }

  body.ar-xl .step-arabic,
  body.ar-xl .qiam-step-ar,
  body.ar-xl .sd-niat-ar,
  body.ar-xl .sd-doa-ar,
  body.ar-xl .doa-arabic,
  body.ar-xl .arabic-text,
  body.ar-xl [style*="font-family:var(--arabic)"],
  body.ar-xl .reader-arabic { font-size: 34px !important; }

  /* WAQAF AI SCREEN */
  .waqaf-ai-screen { display: none; min-height: 100vh; flex-direction: column; background: #1a1714; }
  .waqaf-ai-screen.active { display: flex; }

  .waqaf-ai-header {
    background: rgba(28,26,24,0.97);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #2e2c2a;
  }

  .waqaf-ai-avatar {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, #b8860b, #d4a017);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; flex-shrink: 0;
  }

  .waqaf-ai-info { flex: 1; }
  .waqaf-ai-name { font-size: 15px; font-weight: 600; color: #e8e0d0; }
  .waqaf-ai-status { font-size: 11px; color: #6a6258; display: flex; align-items: center; gap: 4px; }
  .waqaf-status-dot { width: 6px; height: 6px; background: #4ade80; border-radius: 50%; }

  .waqaf-chat-area {
    flex: 1;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
    padding-bottom: 100px;
  }

  .waqaf-intro {
    text-align: center;
    padding: 16px 20px;
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border);
    margin-bottom: 4px;
  }

  .waqaf-intro-ar {
    font-family: var(--arabic);
    font-size: 22px;
    color: #8b6914;
    margin-bottom: 6px;
  }

  .waqaf-intro-ms { font-size: 12px; color: var(--text-dim); }

  .waqaf-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .waqaf-chip {
    background: white;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 7px 13px;
    font-size: 12px;
    color: var(--text-mid);
    cursor: pointer;
    font-family: var(--body);
    transition: border-color 0.2s, background 0.2s;
  }

  .waqaf-chip:hover { border-color: #b8860b; background: #fdf8ee; }

  .bubble-user {
    align-self: flex-end;
    background: #1a1714;
    color: #e8e0d0;
    border-radius: 18px 18px 4px 18px;
    padding: 11px 15px;
    font-size: 14px;
    max-width: 82%;
    line-height: 1.5;
  }

  .bubble-ai {
    align-self: flex-start;
    background: white;
    border: 1px solid var(--border);
    border-radius: 18px 18px 18px 4px;
    padding: 13px 15px;
    font-size: 13px;
    max-width: 88%;
    line-height: 1.7;
    color: var(--text);
  }

  .bubble-ai-label {
    font-size: 9px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #b8860b;
    margin-bottom: 7px;
    font-weight: 600;
  }

  .bubble-ai-ar {
    font-family: var(--arabic);
    font-size: 18px;
    direction: rtl;
    text-align: right;
    color: var(--dark);
    margin-bottom: 8px;
    line-height: 1.8;
  }

  .bubble-typing {
    align-self: flex-start;
    background: white;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 12px 16px;
    display: flex;
    gap: 4px;
    align-items: center;
  }

  .typing-dot {
    width: 7px; height: 7px;
    background: var(--text-dim);
    border-radius: 50%;
    animation: typingBounce 1.2s infinite;
  }
  .typing-dot:nth-child(2) { animation-delay: 0.2s; }
  .typing-dot:nth-child(3) { animation-delay: 0.4s; }

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

  .waqaf-input-area {
    position: sticky;
    bottom: 0;
    background: white;
    border-top: 1px solid var(--border);
    padding: 12px 16px 24px;
    display: flex;
    gap: 10px;
    align-items: flex-end;
  }

  .waqaf-input {
    flex: 1;
    background: var(--warm);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 11px 16px;
    font-family: var(--body);
    font-size: 14px;
    color: var(--text);
    outline: none;
    resize: none;
    max-height: 100px;
    line-height: 1.4;
  }

  .waqaf-input:focus { border-color: #b8860b; }

  .waqaf-send {
    width: 42px; height: 42px;
    background: #b8860b;
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.1s;
  }

  .waqaf-send:hover { background: #d4a017; }
  .waqaf-send:active { transform: scale(0.92); }
  .waqaf-send:disabled { background: var(--border); cursor: default; }

  /* Home AI button */
  .home-ai-btn {
    margin: 16px 24px 0;
    background: linear-gradient(135deg, #1a1714 0%, #2a2318 100%);
    border-radius: 16px;
    padding: 16px 18px;
    border: 1px solid #3a3020;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: opacity 0.2s;
  }

  .home-ai-btn:hover { opacity: 0.9; }
  .home-ai-icon { width: 42px; height: 42px; background: linear-gradient(135deg, #b8860b, #d4a017); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
  .home-ai-text { flex: 1; }
  .home-ai-title { font-size: 13px; font-weight: 600; color: #e8e0d0; margin-bottom: 2px; }
  .home-ai-sub { font-size: 11px; color: #9a9080; }
  .home-ai-arrow { color: #b8860b; font-size: 18px; }

  
  /* HOME SCREEN REDESIGN */
  .home { display: flex; flex-direction: column; min-height: 100vh; background: var(--bg); padding: 0; align-items: unset; justify-content: unset; text-align: unset; }

  .home-topbar {
    background: #1a1714;
    padding: 48px 24px 20px;
    text-align: center;
    position: relative;
  }

  .home-greeting { font-size: 13px; color: #6a6258; margin-bottom: 4px; }
  .home-title { font-size: 26px; font-weight: 600; color: #f0ece4; margin-bottom: 4px; }
  .home-date { font-size: 12px; color: #4a4440; }

  .home-scroll { flex: 1; overflow-y: auto; padding: 0 0 80px; }

  .home-ai-btn {
    margin: 16px 16px 0;
    background: #1e1c18;
    border-radius: 16px;
    padding: 16px 18px;
    border: 1px solid #2e2a20;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
  }

  .home-ai-icon { width: 44px; height: 44px; background: linear-gradient(135deg, #b8860b, #d4a017); border-radius: 13px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
  .home-ai-text { flex: 1; }
  .home-ai-title { font-size: 14px; font-weight: 600; color: #e8e0d0; margin-bottom: 2px; }
  .home-ai-sub { font-size: 11px; color: #9a9080; }

  .home-section-label { padding: 20px 20px 10px; font-size: 10px; letter-spacing: 3px; text-transform: uppercase; color: #9a9088; font-weight: 500; }

  .home-grid { display: none; } /* replaced by home-grid-3 */

  .home-feature {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.15s;
  }

  .home-feature.active { background: #1a1714; border-color: #2a2520; }
  .home-feature.coming { cursor: default; opacity: 0.85; }

  .home-feature-icon { font-size: 26px; display: block; margin-bottom: 10px; }
  .home-feature-name { font-size: 14px; font-weight: 600; color: #2a2420; margin-bottom: 3px; }
  .home-feature.active .home-feature-name { color: #e8e0d0; }
  .home-feature-sub { font-size: 11px; color: #9a9088; line-height: 1.4; }
  .home-feature.active .home-feature-sub { color: #8a8278; }

  .home-coming-badge {
    position: absolute;
    top: 10px; right: 10px;
    background: #c9a84c;
    color: white;
    font-size: 8px;
    padding: 3px 7px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    font-weight: 600;
    text-transform: uppercase;
  }

  .home-arwah-btn {
    margin: 10px 16px 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
  }

  .home-bottom-nav {
    position: sticky;
    bottom: 0;
    background: #1a1714;
    border-top: 1px solid #2a2520;
    padding: 10px 0 20px;
    display: flex;
    justify-content: space-around;
    z-index: 20;
  }

  .home-nav-item { display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; padding: 4px 16px; }
  .home-nav-icon { font-size: 20px; }
  .home-nav-label { font-size: 9px; letter-spacing: 1px; text-transform: uppercase; color: #6a6460; font-family: var(--body); }
  .home-nav-item.active .home-nav-label { color: #c9a84c; }
  .home-nav-dot { width: 4px; height: 4px; background: #c9a84c; border-radius: 50%; margin-top: 2px; }

  
  /* TAHLIL MENU SCREEN */
  .tahlil-menu-screen { display: none; min-height: 100vh; flex-direction: column; background: #1a1714; }
  .tahlil-menu-screen.active { display: flex; }

  .tahlil-menu-header {
    background: #1a1714;
    padding: 48px 24px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
  }

  .tahlil-menu-back { background: none; border: none; color: #6a6258; font-size: 20px; cursor: pointer; padding: 4px; }

  .tahlil-menu-title {
    flex: 1;
    text-align: center;
  }

  .tahlil-menu-ar { font-family: var(--arabic); font-size: 40px; color: #c9a84c; margin-bottom: 4px; }
  .tahlil-menu-ms { font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: #8a8278; }

  .tahlil-menu-list {
    flex: 1;
    padding: 8px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
  }

  .tahlil-menu-item {
    background: #221f1c;
    border: 1px solid #2e2b28;
    border-radius: 14px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
  }

  .tahlil-menu-item:hover { background: #2a2520; border-color: #3a3530; }

  .tahlil-menu-num { font-size: 10px; color: #c9a84c; letter-spacing: 1px; width: 24px; flex-shrink: 0; }

  .tahlil-menu-info { flex: 1; }
  .tahlil-menu-item-ar { font-family: var(--arabic); font-size: 16px; color: #e8e0d0; margin-bottom: 2px; }
  .tahlil-menu-item-ms { font-size: 12px; color: #9a9890; }

  .tahlil-menu-arrow { color: #3a3530; font-size: 16px; }

  .tahlil-menu-start {
    margin: 8px 16px 24px;
    background: #c9a84c;
    color: #0f0c08;
    border: none;
    border-radius: 50px;
    padding: 16px;
    font-family: var(--body);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    width: calc(100% - 32px);
    letter-spacing: 1px;
    transition: background 0.2s;
  }

  .tahlil-menu-start:hover { background: #d4a017; }

  
  /* GOLD TYPOGRAPHY — elegant on dark */


  /* Sulhafs AI title */
  .home-ai-title { color: #c9a84c !important; }

  /* Home section label */
  .home-section-label { color: #c9a84c !important; letter-spacing: 3px; }

  /* Bottom nav active */
  .home-nav-item.active .home-nav-label { color: #c9a84c; }
  .home-nav-item.active .home-nav-icon { filter: none; }

  .tahlil-menu-num { color: #c9a84c !important; }
  .tahlil-menu-arrow { color: #5a4a2a !important; }

  /* Reader header section label */
  .reader-title { color: #c9a84c !important; }
  .progress-text { color: #c9a84c !important; }


  /* Ayah labels */
  .ayah-label { color: #c9a84c !important; }

  /* Repeat tags */
  .repeat-tag { border-color: #c9a84c !important; color: #c9a84c !important; background: rgba(201,168,76,0.08) !important; }

  /* Counter */
  .counter-target { color: #c9a84c !important; }




  /* Translation bar label */
  .trans-toggle-label { color: #c9a84c !important; }

  /* Nav buttons primary */
  .nav-btn.primary { background: #c9a84c !important; color: #0f0c08 !important; border-color: #c9a84c !important; }

  /* Tahlil start button */
  .tahlil-menu-start { background: #c9a84c !important; }
  .tahlil-menu-start:hover { background: #d4a017 !important; }

  /* Start button on home */
  .start-btn { background: #c9a84c !important; }

  
  /* PRAYER TIMES WIDGET */
  .prayer-widget { margin: 14px 16px 0; background: white; border-radius: 16px; border: 1px solid var(--border); overflow: hidden; }

  .prayer-header { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; }

  .prayer-header-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

  .prayer-next-pill { background: #1a1714; border-radius: 10px; padding: 6px 12px; display: flex; align-items: center; gap: 8px; }
  .pill-label { font-size: 9px; color: var(--gold); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 1px; }
  .pill-name { font-size: 13px; font-weight: 600; color: #f0ece4; }
  .pill-sep { color: #3a3530; }
  .pill-time { font-size: 13px; color: var(--gold); font-weight: 500; }

  .prayer-location { font-size: 10px; color: var(--text-dim); display: flex; align-items: center; gap: 3px; }

  .prayer-chevron { color: var(--text-dim); font-size: 11px; transition: transform 0.3s ease; flex-shrink: 0; }
  .prayer-chevron.open { transform: rotate(180deg); }

  .prayer-rows { border-top: 1px solid var(--border); max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
  .prayer-rows.open { max-height: 280px; }

  .prayer-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-bottom: 1px solid var(--border); }
  .prayer-row:last-child { border-bottom: none; }
  .prayer-row.active { background: #fdf8ee; }
  .prayer-row.passed { opacity: 0.4; }

  .prayer-row-left { display: flex; align-items: center; gap: 10px; }
  .prayer-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--border); flex-shrink: 0; }
  .prayer-row.active .prayer-dot { background: var(--gold); }

  .prayer-name-text { font-size: 13px; color: var(--text); }
  .prayer-row.active .prayer-name-text { color: #8b6914; font-weight: 600; }

  .prayer-time-text { font-size: 13px; color: var(--text); }
  .prayer-row.active .prayer-time-text { color: #8b6914; font-weight: 600; }

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

  .countdown-badge { background: #fdf3d8; border: 1px solid #e8d08a; border-radius: 6px; padding: 2px 7px; font-size: 10px; color: #8b6914; font-weight: 500; }

  .prayer-loading { padding: 14px 16px; font-size: 12px; color: var(--text-dim); display: flex; align-items: center; gap: 8px; }

  
  /* SOLAT MUSAFIR SCREEN */
  .musafir-screen { display: none; min-height: 100vh; flex-direction: column; background: var(--dark); }
  .musafir-screen.active { display: flex; }

  .musafir-header { background: var(--dark); padding: 48px 20px 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-bottom: 1px solid #2a2520; text-align: center; }
  .musafir-back { background: none; border: none; color: #6a6258; font-size: 20px; cursor: pointer; }
  .musafir-header-info { flex: 1; }
  .musafir-header-title { font-size: 15px; font-weight: 600; color: #e8e0d0; }
  .musafir-header-sub { font-size: 11px; color: #4a4440; margin-top: 1px; }

  .musafir-body { flex: 1; overflow-y: auto; padding-bottom: 80px; background: #f7f3ed; border-radius: 24px 24px 0 0; }

  .musafir-banner {
    margin: 14px 16px 0;
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .musafir-banner.active-mode { background: #1e2818; border: 1px solid #2e4020; }
  .musafir-banner.inactive-mode { background: #1e1c18; border: 1px solid #2e2a20; }

  .musafir-banner-icon { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
  .musafir-banner.active-mode .musafir-banner-icon { background: #2a4020; }
  .musafir-banner.inactive-mode .musafir-banner-icon { background: #2a2418; }

  .musafir-banner-text { flex: 1; }
  .musafir-banner-status { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
  .musafir-banner.active-mode .musafir-banner-status { color: #7aba50; }
  .musafir-banner.inactive-mode .musafir-banner-status { color: #c0b8a8; }
  .musafir-banner-detail { font-size: 10px; color: #6a6050; }

  .musafir-override-btn { font-size: 10px; color: var(--gold); letter-spacing: 0.5px; cursor: pointer; border: 1px solid #3a3020; padding: 5px 10px; border-radius: 8px; background: none; font-family: var(--body); flex-shrink: 0; }

  .musafir-sec-label { padding: 16px 18px 8px; font-size: 10px; letter-spacing: 3px; text-transform: uppercase; color: var(--gold); font-weight: 500; }

  .musafir-cards { padding: 0 16px; display: flex; flex-direction: column; gap: 8px; }

  .musafir-card { background: white; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }

  .musafir-card-header { padding: 13px 14px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; -webkit-tap-highlight-color: transparent; }

  .musafir-card-left { display: flex; align-items: center; gap: 10px; }
  .musafir-card-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--border); }
  .musafir-card-dot.current { background: var(--gold); }
  .musafir-card-name { font-size: 13px; font-weight: 600; color: var(--text); }
  .musafir-card-time { font-size: 11px; color: var(--text-dim); margin-top: 1px; }

  .musafir-card-right { display: flex; align-items: center; gap: 6px; }

  .qasar-badge { background: #fdf3d8; border: 1px solid #e8d08a; border-radius: 6px; padding: 3px 7px; font-size: 9px; color: #8b6914; font-weight: 600; }
  .jamak-badge { background: #f0f4ff; border: 1px solid #b0c4f0; border-radius: 6px; padding: 3px 7px; font-size: 9px; color: #2a4090; font-weight: 600; }
  .musafir-chevron { color: var(--text-dim); font-size: 11px; transition: transform 0.3s; margin-left: 4px; }
  .musafir-chevron.open { transform: rotate(180deg); }

  .musafir-card-body { border-top: 1px solid var(--border); padding: 14px; background: #fafaf8; display: none; }
  .musafir-card-body.open { display: block; }

  .rakaat-row { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
  .rakaat-box { background: var(--dark); border-radius: 8px; padding: 8px 14px; text-align: center; }
  .rakaat-num { font-size: 22px; font-weight: 600; color: var(--gold); line-height: 1; }
  .rakaat-lbl { font-size: 8px; color: #6a6258; text-transform: uppercase; letter-spacing: 1px; margin-top: 2px; }
  .rakaat-arrow { color: var(--text-dim); font-size: 18px; }

  .niat-option { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
  .niat-option:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
  .niat-option-title { font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-bottom: 8px; }

  .niat-ar-text { font-family: var(--arabic); font-size: 16px; line-height: 1.9; text-align: right; direction: rtl; color: var(--text); background: white; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); margin-bottom: 7px; }
  .niat-rumi-text { font-size: 11px; color: var(--text-dim); font-style: italic; line-height: 1.6; margin-bottom: 5px; }
  .niat-ms-text { font-size: 11px; color: #6a6258; line-height: 1.6; background: var(--warm); padding: 8px 10px; border-radius: 8px; }

  /* Info card for non-musafir */
  .musafir-info-card { margin: 14px 16px 0; background: white; border: 1px solid var(--border); border-radius: 14px; padding: 16px; }
  .musafir-info-item { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
  .musafir-info-item:last-child { margin-bottom: 0; }
  .musafir-info-icon { width: 28px; height: 28px; background: var(--dark); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; }
  .musafir-info-title { font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
  .musafir-info-sub { font-size: 11px; color: var(--text-dim); line-height: 1.4; }

  .musafir-manual-btn { margin: 10px 16px 0; background: #1e1c18; border: 1px solid #2e2a20; border-radius: 14px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; cursor: pointer; }

  /* READABILITY FIXES — subtle but clear */
  .home-feature.active .home-feature-sub { color: #7a7268 !important; }
  .feat.dark .feat-sub { color: #7a7268 !important; }
  .home-date { color: #7a7268 !important; }
  .home-nav-label span { color: #6a6460 !important; }
  .tahlil-menu-item-ms span { color: #8a8278 !important; }
  .musafir-header-sub { color: #7a7268 !important; }
  .musafir-banner-detail { color: #8a8070 !important; }
  .waqaf-ai-status { color: #7a7268 !important; }
  .waqaf-ai-status span { color: #7a7268 !important; }
  .home-greeting { color: #7a7268 !important; }

  @keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

  /* ===== RESPONSIVE — iPad & Tablet ===== */
  

  


  /* ================================================================
     RESPONSIVE DESKTOP
  ================================================================ */

  
</style

  /* ================================================================
     RESPONSIVE — ONE CLEAN BLOCK
  ================================================================ */

  /* HIDE SIDEBAR ON MOBILE */
  #desktop-sidebar { display: none; }
  #desktop-right { display: none; }

  /* TABLET 768px+ */
  

  /* DESKTOP 1280px+ */

/* ===========================================
   RESPONSIVE — CLEAN BUILD
   Phone < 768 | iPad 768-1279 | Desktop 1280+
   =========================================== */

/* SIDEBAR & RIGHT PANEL — hidden on mobile by default */
#desktop-sidebar { display: none; }
#desktop-right   { display: none; }

