  :root {
    /* Emerald default */
    --bg: #1a3a2a;
    --accent: #6ee7a0;

    /* Derived tokens (recomputed on theme switch via JS-set inline vars) */
    --bg-soft:  color-mix(in oklab, var(--bg) 86%, white 14%);
    --bg-card:  color-mix(in oklab, var(--bg) 78%, white 22%);
    --bg-chip:  color-mix(in oklab, var(--bg) 70%, white 30%);
    --line:     color-mix(in oklab, var(--bg) 55%, white 45% / 0.18);
    --fg:       color-mix(in oklab, white 92%, var(--accent) 8%);
    --fg-mute:  color-mix(in oklab, white 60%, var(--bg) 40%);
    --fg-faint: color-mix(in oklab, white 52%, var(--bg) 48%);
    --accent-soft: color-mix(in oklab, var(--accent) 18%, transparent);
    --accent-ink:  color-mix(in oklab, var(--bg) 80%, black 20%);

    --r-sm: 10px;
    --r-md: 16px;
    --r-lg: 22px;
    --r-xl: 28px;

    /* Skala spasi semantik — dipakai untuk ritme tata letak */
    --space-xs: 6px;
    --space-sm: 8px;
    --space-md: 10px;
    --space-lg: 16px;
    --space-xl: 22px;

    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bot: env(safe-area-inset-bottom, 0px);

    color-scheme: dark;
  }

  /* Light themes get adjusted foreground */
  html[data-theme="putih"] {
    --fg:       #14241c;
    --fg-mute:  #4a5b53;
    --fg-faint: #5f6d66;   /* digelapkan: kontras 5.4:1 di atas #fff (WCAG AA) */
    --bg-soft:  #ecebe4;
    --bg-card:  #ffffff;
    --bg-chip:  #e3e3db;
    --line:     #d6d4c8;
    --accent-ink: #ffffff;
    color-scheme: light;
  }

  * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

  /* Indikator fokus keyboard — terlihat jelas untuk navigasi tanpa tetikus */
  :focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }
  html, body { margin: 0; padding: 0; overscroll-behavior: none; }
  html { background: var(--bg); transition: background 0.4s ease; }
  body {
    font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
    color: var(--fg);
    min-height: 100vh;
    min-height: 100dvh;
    background:
      radial-gradient(1200px 600px at 50% -10%, color-mix(in oklab, var(--bg) 88%, white 12%), transparent 60%),
      var(--bg);
    transition: background 0.4s ease, color 0.4s ease;
    overflow-x: hidden;
  }
  body, body * { transition: background-color 0.4s ease, color 0.35s ease, border-color 0.4s ease, fill 0.35s ease, stroke 0.35s ease; }

  /* Halaman utama — fit satu layar, tanpa scroll */
  .app {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: calc(12px + var(--safe-top)) 16px 0;
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: hidden;
  }

  /* ---------- Header ---------- */
  .head {
    display: flex; align-items: center; justify-content: space-between;
    flex: 0 0 auto;
  }
  .head-actions { display: flex; gap: 8px; }
  .brand {
    display: flex; align-items: center; gap: 10px;
  }
  .brand-logo {
    width: 36px; height: 36px;
    border-radius: 10px;
    object-fit: cover;
    display: block;
    flex: 0 0 auto;
  }
  .brand-name {
    margin: 0;
    font-weight: 600; font-size: 16px; letter-spacing: -0.01em;
    line-height: 1.05;
  }
  .brand-sub {
    font-size: 11px; color: var(--fg-mute); margin-top: 2px;
    font-variant-numeric: tabular-nums;
  }
  .brand-sub b { color: var(--fg); font-weight: 600; }

  .icon-btn {
    width: 40px; height: 40px; border-radius: 12px;
    border: 1px solid var(--line);
    background: color-mix(in oklab, var(--bg-card) 70%, transparent);
    color: var(--fg);
    display: grid; place-items: center;
    cursor: pointer;
    backdrop-filter: blur(6px);
  }
  .icon-btn:active { transform: scale(0.96); }
  .icon-btn svg { width: 18px; height: 18px; }

  /* ---------- Section labels ---------- */
  .section-label {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em;
    color: var(--fg-faint);
    margin: 22px 2px 10px;
    font-weight: 600;
  }
  .section-label a {
    color: var(--accent); text-decoration: none; font-weight: 600;
    text-transform: none; letter-spacing: 0;
    font-size: 12px;
  }

  /* ---------- Counter card ---------- */
  .counter {
    flex: 0 0 auto;
    display: flex; flex-direction: column;
    background: linear-gradient(180deg,
      color-mix(in oklab, var(--bg-card) 92%, var(--accent) 8%),
      var(--bg-card));
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    padding: 14px 16px 14px;
    position: relative;
    overflow: hidden;
  }
  .counter::after {
    content: ""; position: absolute; inset: -1px;
    border-radius: inherit; pointer-events: none;
    background: radial-gradient(400px 140px at 50% 0%, var(--accent-soft), transparent 70%);
    opacity: 0.6;
  }
  .counter-top {
    position: relative; z-index: 1;
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 8px;
  }
  .counter-meta {
    display: flex; flex-direction: column; gap: 2px;
  }
  .counter-meta .label { font-size: 11px; color: var(--fg-faint); text-transform: uppercase; letter-spacing: 0.14em; }
  .counter-meta .target { font-size: 13px; color: var(--fg-mute); font-variant-numeric: tabular-nums; }
  .counter-meta .target b { color: var(--fg); font-weight: 600; }
  .counter-cycle {
    display: flex; align-items: center; gap: 6px;
    font-size: 11px; color: var(--fg-mute);
    background: color-mix(in oklab, var(--bg) 60%, white 8%);
    padding: 6px 9px 6px 10px; border-radius: 999px;
    border: 1px solid var(--line);
    font-variant-numeric: tabular-nums;
    font-family: inherit; cursor: pointer;
  }
  .counter-cycle:active { transform: scale(0.96); }
  .counter-cycle .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
  .mode-caret { width: 12px; height: 12px; color: var(--fg-faint); }

  /* ---------- Mode bebas: kartu dzikir disembunyikan, tombol fit ---------- */
  .app.no-dzikir #dzikir-text { display: none; }
  /* mode bebas = penghitung tanpa batas → tak ada target/siklus/progres */
  .app.no-dzikir .counter-meta .target { display: none; }
  .app.no-dzikir .prog-bar { display: none; }
  .app.no-dzikir .tap-of { display: none; }
  .app.no-dzikir .counter { flex: 1 1 auto; min-height: 0; }
  .app.no-dzikir .ring-wrap {
    flex: 1 1 auto; min-height: 0;
    display: flex; margin: 6px 0 2px;
  }
  .app.no-dzikir .tap-btn { height: 100%; }
  .dzp-ar-free {
    font-family: inherit !important;
    font-size: 24px; font-weight: 700;
    color: var(--accent); direction: ltr;
  }

  /* Horizontal progress bar above wide tap button */
  .prog-bar {
    position: relative;
    width: 100%; height: 8px;
    background: var(--line);
    border-radius: 999px;
    margin: 8px 0 10px;
    overflow: hidden;
  }
  .prog-bar .fill {
    position: absolute; inset: 0;
    background: var(--accent);
    border-radius: 999px;
    transform-origin: left center;
    transform: scaleX(0);
    transition: transform 0.35s cubic-bezier(.22,.61,.36,1);
    box-shadow: 0 0 16px color-mix(in oklab, var(--accent) 50%, transparent);
  }

  .ring-wrap {
    position: relative;
    width: 100%;
    margin: 4px 0 4px;
    z-index: 1;
  }

  .tap-btn {
    position: relative;
    width: 100%;
    height: clamp(132px, 20vh, 196px);
    border-radius: 28px;
    border: none;
    background: linear-gradient(165deg, color-mix(in oklab, var(--accent) 92%, white 12%) 0%, var(--accent) 55%, color-mix(in oklab, var(--accent) 82%, black 18%) 100%);
    color: var(--accent-ink);
    cursor: pointer;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    box-shadow:
      0 22px 44px -14px color-mix(in oklab, var(--accent) 55%, transparent),
      inset 0 1px 0 color-mix(in oklab, white 55%, transparent),
      inset 0 -10px 18px color-mix(in oklab, black 20%, transparent);
    transition: transform 0.12s ease, box-shadow 0.3s ease;
    font-family: inherit;
    overflow: hidden;
  }
  .tap-btn::before {
    content: ""; position: absolute; inset: 10px;
    border-radius: 20px; pointer-events: none;
    border: 1px solid color-mix(in oklab, white 30%, transparent);
    opacity: 0.5;
  }
  .tap-btn .tap-hint {
    position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
    font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
    opacity: 0.55; font-weight: 600;
  }
  .tap-btn:active { transform: scale(0.97); }
  .tap-btn.pulse { animation: pulse 0.35s ease; }
  .tap-btn.celebrate { animation: celebrate 0.9s ease; }
  @keyframes pulse {
    0% { transform: scale(1); }
    35% { transform: scale(0.94); }
    100% { transform: scale(1); }
  }
  @keyframes celebrate {
    0% { transform: scale(1); filter: brightness(1); }
    30% { transform: scale(1.08); filter: brightness(1.25); }
    100% { transform: scale(1); filter: brightness(1); }
  }
  .tap-count { display: flex; flex-direction: column; align-items: center; }
  .tap-num {
    font-size: clamp(46px, 10vh, 64px); font-weight: 700; line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
  }
  .tap-of {
    font-size: 12px; margin-top: 6px;
    font-variant-numeric: tabular-nums;
    opacity: 0.8;
  }
  /* Tampilan tombol untuk dzikir target 1× */
  .tap-action {
    display: none;
    font-size: clamp(28px, 6.4vh, 40px);
    font-weight: 700; letter-spacing: -0.02em;
    line-height: 1.1;
  }
  .tap-btn.once .tap-count { display: none; }
  .tap-btn.once .tap-action { display: block; }

  .counter-actions {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    margin: 6px 0 10px;
    position: relative; z-index: 1;
  }
  .mini-btn {
    height: 38px; padding: 0 14px;
    border-radius: 12px;
    background: color-mix(in oklab, var(--bg) 60%, white 4%);
    border: 1px solid var(--line);
    color: var(--fg);
    font-size: 13px; font-weight: 500;
    display: inline-flex; align-items: center; gap: 7px;
    cursor: pointer; font-family: inherit;
  }
  .mini-btn svg { width: 14px; height: 14px; }
  .mini-btn:active { transform: scale(0.97); }

  /* ---------- Dzikir text (tinggi fleksibel, dukung chunk) ---------- */
  .dzikir-text {
    flex: 1 1 auto;
    min-height: 0;
    border-radius: var(--r-lg);
    background: color-mix(in oklab, var(--bg-card) 65%, transparent);
    border: 1px solid var(--line);
    padding: 12px 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
  }
  .dzikir-text.tappable { cursor: pointer; }
  .dzikir-text.tappable:active { transform: scale(0.995); }

  .dz-head {
    flex: 0 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    gap: 8px;
  }
  .dz-title {
    font-size: 13px; font-weight: 600; color: var(--fg);
    letter-spacing: -0.01em;
  }
  .dz-tap-hint {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 10px; color: var(--fg-faint);
    text-transform: uppercase; letter-spacing: 0.08em;
  }
  .dz-tap-hint svg { width: 12px; height: 12px; }

  .dz-body {
    flex: 1 1 auto; min-height: 0;
    display: flex; flex-direction: column;
    /* "safe center": tetap pusatkan saat muat, tapi jangan potong saat konten
       lebih tinggi dari kotak (bisa di-scroll dari atas). */
    justify-content: safe center;
    overflow-y: auto;
    padding: 10px 2px;
  }
  .dz-seg + .dz-seg {
    margin-top: 14px; padding-top: 14px;
    border-top: 1px dashed var(--line);
  }
  .arabic {
    font-family: 'Amiri', serif;
    font-size: 27px; line-height: 1.8;
    direction: rtl;
    color: var(--fg);
    margin: 2px 0 8px;
    padding: 2px 0;
    font-weight: 400;
  }
  .latin {
    font-size: 13px; color: var(--fg);
    font-style: italic; font-weight: 500;
    line-height: 1.5;
  }
  .meaning {
    font-size: 13px; color: var(--fg-mute);
    margin-top: 5px; line-height: 1.6;
  }
  .virtue {
    margin-top: 10px; padding-top: 10px;
    border-top: 1px dashed var(--line);
    font-size: 12px;
    color: var(--fg-mute);
    line-height: 1.55;
  }
  .virtue b { color: var(--fg); font-weight: 600; }

  /* ---------- Ad slot ---------- */
  .ad-slot {
    flex: 0 0 auto;
    margin: 2px -16px 0;          /* lebar penuh — batalkan padding .app */
    text-align: center;
    opacity: 0.9;
  }
  .ad-label {
    font-size: 9px;
    color: var(--fg-faint);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0 0 4px;
  }
  .ad-slot {
    height: 90px;            /* dibatasi agar layout halaman utama tetap fit-layar */
    overflow: hidden;
  }
  .ad-slot .adsbygoogle {
    display: block;
    width: 100%;
    height: 72px;
  }

  /* ---------- Stats ----------
     Komposisi asimetris: "Hari Ini" sebagai angka dominan di kolom kiri,
     "Minggu Ini" & "Total" sebagai dua angka sekunder yang tenang di kanan.
     Sengaja BUKAN tiga kartu metrik identik (kesan dashboard). */
  .stats {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    grid-auto-rows: 1fr;
    gap: var(--space-sm);
  }
  .stat {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    display: flex; flex-direction: column; justify-content: center;
  }

  /* Featured — Hari Ini: mengisi kolom kiri penuh, angka besar */
  .stat-feature {
    grid-row: span 2;
    padding: var(--space-lg);
    gap: var(--space-xs);
  }
  .stat-feature .stat-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--fg-faint);
    font-weight: 600;
  }
  .stat-feature .stat-val {
    font-size: clamp(34px, 11vw, 44px); font-weight: 700;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
    color: var(--fg);
    line-height: 1;
  }
  .stat-feature .stat-sub {
    font-size: 11px; color: var(--fg-mute);
  }

  /* Quiet — Minggu Ini & Total: sekunder, ringkas */
  .stat-quiet {
    padding: var(--space-md) var(--space-lg);
  }
  .stat-q-val {
    font-size: 20px; font-weight: 700;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    color: var(--fg);
    line-height: 1;
  }
  .stat-q-label {
    font-size: 12px; font-weight: 500;
    color: var(--fg-mute);
    margin-top: 3px;
  }
  .stat-q-note {
    font-size: 10px; color: var(--fg-faint);
    margin-top: 1px;
  }

  /* ---------- History ---------- */
  .history {
    display: flex; flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    overflow: hidden;
  }
  .history-row {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    cursor: pointer;
    background: transparent;
    border-left: none; border-right: none; border-top: none;
    width: 100%; text-align: left;
    font-family: inherit; color: inherit;
    transition: background 0.18s ease;
  }
  .history-row:hover { background: color-mix(in oklab, var(--accent) 8%, transparent); }
  .history-row:active { background: color-mix(in oklab, var(--accent) 14%, transparent); }
  .history-row:last-child { border-bottom: none; }
  .history-arabic {
    font-family: 'Amiri', serif;
    font-size: 18px;
    color: var(--fg);
    flex: 0 0 auto;
    direction: rtl;
    min-width: 72px;
    text-align: right;
  }
  .history-mid { flex: 1; min-width: 0; }
  .history-name { font-size: 13px; font-weight: 500; color: var(--fg); }
  .history-time { font-size: 11px; color: var(--fg-faint); font-variant-numeric: tabular-nums; margin-top: 2px;}
  .history-count {
    font-size: 14px; font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--accent);
    background: var(--accent-soft);
    padding: 4px 10px;
    border-radius: 999px;
  }
  .history-empty {
    padding: 22px 16px; text-align: center;
    font-size: 12px; color: var(--fg-mute);
  }

  /* ---------- Collections ---------- */
  .coll-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .coll {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 12px;
    display: flex; flex-direction: column; gap: 8px;
    min-height: 130px;
  }
  .coll-head {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
  }
  .coll-name {
    font-size: 13px; font-weight: 600; color: var(--fg);
    line-height: 1.25;
    flex: 1; min-width: 0;
  }
  .coll-badge {
    font-size: 9px; text-transform: uppercase; letter-spacing: 0.12em;
    color: var(--fg-faint);
    padding: 3px 6px; border-radius: 6px;
    background: color-mix(in oklab, var(--bg) 55%, white 4%);
  }
  .coll-badge.custom { color: var(--accent); background: var(--accent-soft); }
  .coll-steps {
    display: flex; flex-direction: column; gap: 3px;
    font-size: 11px; color: var(--fg-mute);
    flex: 1;
  }
  .coll-step {
    display: flex; align-items: center; gap: 6px;
    line-height: 1.2;
  }
  .coll-step .dot {
    width: 4px; height: 4px; border-radius: 50%;
    background: color-mix(in oklab, var(--accent) 70%, transparent);
    flex: 0 0 auto;
  }
  .coll-step .step-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .coll-step .step-target { color: var(--fg-faint); font-variant-numeric: tabular-nums; }
  .coll-actions { display: flex; gap: 6px; margin-top: 2px; }
  .coll-actions button {
    flex: 1; height: 30px;
    border-radius: 9px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--fg);
    font-family: inherit; font-size: 11px; font-weight: 600;
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  }
  .coll-actions .btn-primary {
    background: var(--accent); color: var(--accent-ink);
    border-color: var(--accent);
  }
  .coll-actions button:active { transform: scale(0.97); }
  .coll-actions button:disabled { opacity: 0.4; cursor: not-allowed; }

  .coll-add {
    border: 1px dashed var(--line);
    background: transparent;
    display: grid; place-items: center;
    color: var(--fg-mute);
    font-size: 12px;
    gap: 4px;
    min-height: 130px;
    cursor: pointer;
    font-family: inherit;
    border-radius: var(--r-md);
  }
  .coll-add svg { width: 18px; height: 18px; }

  /* ---------- Sequence banner ---------- */
  .seq-banner {
    flex: 0 0 auto;
    background: color-mix(in oklab, var(--accent) 12%, var(--bg-card));
    border: 1px solid color-mix(in oklab, var(--accent) 28%, var(--line));
    border-radius: var(--r-md);
    padding: 10px 12px;
    display: flex; align-items: center; gap: 10px;
    font-size: 12px;
  }
  .seq-banner .seq-name { font-weight: 600; color: var(--fg); flex: 1; }
  .seq-banner .seq-step { color: var(--fg-mute); font-variant-numeric: tabular-nums; }
  .seq-banner .seq-close {
    width: 24px; height: 24px; border-radius: 8px;
    background: transparent; border: 1px solid var(--line);
    color: var(--fg-mute); cursor: pointer;
    display: grid; place-items: center; font-family: inherit;
  }

  /* ---------- Settings panel (slide up) ---------- */
  .scrim {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 40;
  }
  .scrim.open { opacity: 1; pointer-events: auto; }

  .sheet {
    position: fixed; left: 0; right: 0; bottom: 0;
    z-index: 41;
    background: var(--bg-soft);
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(.22,.61,.36,1);
    max-height: 85vh;
    overflow: hidden;
    display: flex; flex-direction: column;
    box-shadow: 0 -20px 60px -10px rgba(0,0,0,0.4);
  }
  .sheet.open { transform: translateY(0); }
  /* saat tertutup & ter-parkir di bawah viewport, matikan bayangan agar
     tidak bocor ke atas (pita blur hitam di bawah layar) */
  .sheet:not(.open) { box-shadow: none; }
  .sheet-inner {
    width: 100%; max-width: 480px;
    margin: 0 auto;
    padding: 8px 18px calc(20px + var(--safe-bot));
    overflow-y: auto;
    flex: 1;
  }
  .sheet-handle {
    width: 40px; height: 4px; border-radius: 999px;
    background: var(--line);
    margin: 10px auto 8px;
  }
  .sheet-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 4px 0 14px;
  }
  .sheet-title { font-size: 16px; font-weight: 600; }
  .sheet-close {
    width: 36px; height: 36px; border-radius: 10px;
    border: 1px solid var(--line);
    background: transparent; color: var(--fg);
    cursor: pointer;
    display: grid; place-items: center;
  }

  .settings-block {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 14px;
    margin-bottom: 12px;
  }
  .settings-block h3 {
    margin: 0 0 12px;
    font-size: 11px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.12em;
    color: var(--fg-faint);
  }

  .theme-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  }
  .theme-card {
    padding: 10px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: transparent;
    cursor: pointer;
    display: flex; align-items: center; gap: 10px;
    font-family: inherit;
    color: var(--fg);
    text-align: left;
  }
  .theme-card.active { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
  .theme-swatch {
    width: 36px; height: 36px; border-radius: 10px;
    position: relative; overflow: hidden;
    flex: 0 0 auto;
  }
  .theme-swatch .acc {
    position: absolute; right: 4px; bottom: 4px;
    width: 14px; height: 14px; border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.18);
  }
  .theme-meta { display: flex; flex-direction: column; min-width: 0; }
  .theme-name { font-size: 12px; font-weight: 600; line-height: 1.1; }
  .theme-tag { font-size: 10px; color: var(--fg-faint); margin-top: 2px; }

  .row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 0;
    gap: 12px;
  }
  .row + .row { border-top: 1px solid var(--line); }
  .row .row-meta { display: flex; flex-direction: column; min-width: 0; }
  .row-title { font-size: 14px; font-weight: 500; }
  .row-sub { font-size: 12px; color: var(--fg-faint); margin-top: 2px; line-height: 1.4; }

  .switch {
    width: 42px; height: 26px;
    border-radius: 999px;
    background: var(--bg-chip);
    border: 1px solid var(--line);
    position: relative;
    cursor: pointer;
    flex: 0 0 auto;
    padding: 0;
    -webkit-appearance: none; appearance: none;
  }
  .switch::after {
    content: ""; position: absolute;
    top: 2px; left: 2px;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: var(--fg);
    transition: transform 0.2s ease, background 0.2s ease;
  }
  .switch.on { background: var(--accent); border-color: var(--accent); }
  .switch.on::after { transform: translateX(16px); background: var(--accent-ink); }

  .num-input, .time-input {
    border: 1px solid var(--line);
    background: color-mix(in oklab, var(--bg) 55%, white 4%);
    color: var(--fg);
    border-radius: 10px;
    padding: 8px 12px;
    font: inherit;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    width: 84px;
    text-align: center;
  }
  .num-input:focus, .time-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

  /* ---------- Toast ---------- */
  .toast {
    position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(20px);
    background: var(--fg); color: var(--bg);
    padding: 10px 16px; border-radius: 999px;
    font-size: 13px; font-weight: 500;
    opacity: 0; pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
    z-index: 50;
    box-shadow: 0 12px 28px -10px rgba(0,0,0,0.5);
  }
  .toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

  /* ---------- Confetti dots for celebration ---------- */
  .conf {
    position: absolute; top: 50%; left: 50%;
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--accent);
    pointer-events: none;
    opacity: 0;
  }
  .conf.fire {
    animation: conf 0.9s ease-out forwards;
  }
  @keyframes conf {
    0%   { opacity: 1; transform: translate(-50%,-50%) scale(0.6); }
    100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.1); }
  }

  /* ---------- Install dialog ---------- */
  .install-card {
    position: fixed;
    left: 50%; bottom: 0;
    transform: translateX(-50%) translateY(110%);
    width: 100%; max-width: 420px;
    z-index: 61;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    padding: 18px 20px calc(20px + var(--safe-bot));
    box-shadow: 0 -20px 60px -10px rgba(0,0,0,0.45);
    transition: transform 0.34s cubic-bezier(.22,.61,.36,1);
    pointer-events: none;   /* saat tertutup tak menangkap klik */
  }
  .install-card.open { transform: translateX(-50%) translateY(0); pointer-events: auto; }
  .install-card:not(.open) { box-shadow: none; }
  @media (min-width: 460px) {
    .install-card {
      bottom: auto; top: 50%;
      transform: translate(-50%, -45%) scale(0.96);
      border-radius: var(--r-xl);
      border: 1px solid var(--line);
      opacity: 0;
    }
    .install-card.open { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  }
  .install-handle {
    width: 40px; height: 4px; border-radius: 999px;
    background: var(--line);
    margin: 0 auto 14px;
  }
  .install-top {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 12px;
  }
  .install-icon {
    width: 56px; height: 56px; border-radius: 16px;
    flex: 0 0 auto;
    background: var(--accent-soft);
    border: 1px solid color-mix(in oklab, var(--accent) 30%, transparent);
    object-fit: contain;
  }
  .install-titles { min-width: 0; }
  .install-title { font-size: 16px; font-weight: 600; line-height: 1.2; }
  .install-sub { font-size: 12px; color: var(--fg-mute); margin-top: 3px; }
  .install-points {
    list-style: none; margin: 4px 0 16px; padding: 0;
    display: flex; flex-direction: column; gap: 8px;
  }
  .install-points li {
    display: flex; align-items: center; gap: 9px;
    font-size: 13px; color: var(--fg);
  }
  .install-points svg {
    width: 16px; height: 16px; flex: 0 0 auto;
    color: var(--accent);
  }
  .install-actions { display: flex; gap: 10px; }
  .install-actions button {
    flex: 1; height: 46px;
    border-radius: 14px;
    font-family: inherit; font-size: 14px; font-weight: 600;
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  }
  .install-actions button:active { transform: scale(0.97); }
  .install-later {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--fg);
  }
  .install-now {
    background: var(--accent);
    border: 1px solid var(--accent);
    color: var(--accent-ink);
  }
  .install-now svg { width: 16px; height: 16px; }
  .ios-steps {
    display: none;
    margin: 4px 0 16px; padding: 12px;
    border-radius: var(--r-md);
    background: var(--bg-card);
    border: 1px solid var(--line);
    font-size: 13px; color: var(--fg); line-height: 1.6;
  }
  .ios-steps b { color: var(--accent); }
  .install-card.ios .install-points { display: none; }
  .install-card.ios .ios-steps { display: block; }
  .install-card.ios .install-later { display: none; }

  /* =========================================================
     Penumpukan overlay (settings < library < dz-picker < wirid-form)
  ========================================================= */
  #scrim      { z-index: 40; }
  #sheet      { z-index: 41; }
  #lib-scrim  { z-index: 42; }
  #library    { z-index: 43; }
  #dzp-scrim  { z-index: 44; }
  #dz-picker  { z-index: 45; }
  #wf-scrim   { z-index: 46; }
  #wirid-form { z-index: 47; }

  /* Panel besar (halaman kedua & form wirid) */
  .sheet-page { max-height: 94vh; max-height: 94dvh; }

  .sheet-note {
    font-size: 12px; color: var(--fg-mute);
    margin: -2px 2px 10px; line-height: 1.5;
  }

  /* ---------- Picker dzikir (mode bebas) ---------- */
  .dzp-list { display: flex; flex-direction: column; gap: 8px; padding-bottom: 4px; }
  .dzp-item {
    display: flex; align-items: center; gap: 12px;
    width: 100%; text-align: left;
    padding: 10px 12px;
    border-radius: var(--r-md);
    border: 1px solid var(--line);
    background: var(--bg-card);
    color: var(--fg);
    font-family: inherit; cursor: pointer;
  }
  .dzp-item:active { transform: scale(0.99); }
  .dzp-item.active { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
  .dzp-ar {
    font-family: 'Amiri', serif; font-size: 22px;
    direction: rtl; color: var(--fg);
    flex: 0 0 auto; min-width: 92px; text-align: right;
  }
  .dzp-mid { display: flex; flex-direction: column; min-width: 0; }
  .dzp-name { font-size: 14px; font-weight: 600; }
  .dzp-meta { font-size: 11px; color: var(--fg-faint); margin-top: 2px; }

  /* ---------- Koleksi: deskripsi & ringkasan langkah ---------- */
  .coll-desc { font-size: 12px; color: var(--fg-mute); line-height: 1.45; }
  .coll-step.coll-more { color: var(--fg-faint); font-style: italic; }

  /* ---------- Form tambah / edit wirid ---------- */
  .wf-field { display: block; margin-bottom: 4px; }
  .wf-label {
    display: block; font-size: 11px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.12em;
    color: var(--fg-faint); margin-bottom: 6px;
  }
  .wf-input {
    width: 100%;
    border: 1px solid var(--line);
    background: color-mix(in oklab, var(--bg) 55%, white 4%);
    color: var(--fg);
    border-radius: 10px;
    padding: 11px 12px;
    font: inherit; font-size: 14px;
  }
  .wf-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

  .wf-dz-options { display: flex; flex-direction: column; gap: 12px; }
  .wf-group-label {
    font-size: 10px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.12em;
    color: var(--fg-faint); margin-bottom: 6px;
  }
  .wf-chips { display: flex; flex-wrap: wrap; gap: 6px; }
  .wf-chip {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 7px 10px;
    border-radius: 999px;
    background: var(--bg-chip);
    border: 1px solid var(--line);
    color: var(--fg);
    font-family: inherit; font-size: 12px; font-weight: 500;
    cursor: pointer;
  }
  .wf-chip:active { transform: scale(0.96); }
  .wf-chip svg { width: 12px; height: 12px; color: var(--accent); }

  .wf-steps { display: flex; flex-direction: column; gap: 6px; }
  .wf-empty {
    padding: 18px 14px; text-align: center;
    font-size: 12px; color: var(--fg-mute);
    border: 1px dashed var(--line); border-radius: var(--r-md);
    line-height: 1.5;
  }
  .wf-step {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 10px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
  }
  .wf-step-no {
    flex: 0 0 auto;
    width: 22px; height: 22px; border-radius: 7px;
    display: grid; place-items: center;
    background: var(--accent-soft); color: var(--fg);
    font-size: 11px; font-weight: 700;
    font-variant-numeric: tabular-nums;
  }
  .wf-step-name { flex: 1; min-width: 0; font-size: 13px; font-weight: 500;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .wf-step-target {
    flex: 0 0 auto;
    width: 58px; text-align: center;
    border: 1px solid var(--line);
    background: color-mix(in oklab, var(--bg) 55%, white 4%);
    color: var(--fg);
    border-radius: 8px; padding: 6px 4px;
    font: inherit; font-size: 13px;
    font-variant-numeric: tabular-nums;
  }
  .wf-step-target:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
  .wf-step-x { font-size: 11px; color: var(--fg-faint); }
  .wf-step-btn {
    flex: 0 0 auto;
    width: 28px; height: 28px; border-radius: 8px;
    border: 1px solid var(--line);
    background: transparent; color: var(--fg);
    font-family: inherit; font-size: 13px; line-height: 1;
    cursor: pointer;
  }
  .wf-step-btn:disabled { opacity: 0.3; cursor: not-allowed; }
  .wf-step-btn:active:not(:disabled) { transform: scale(0.92); }
  .wf-step-btn.danger { color: #f87171; border-color: color-mix(in oklab, #f87171 40%, var(--line)); }

  .wf-footer {
    display: flex; gap: 10px;
    margin-top: 16px;
    padding-top: 4px;
  }
  .wf-btn {
    height: 46px;
    border-radius: 14px;
    font-family: inherit; font-size: 14px; font-weight: 600;
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--line);
    background: transparent; color: var(--fg);
  }
  .wf-btn:active { transform: scale(0.98); }
  .wf-btn.primary {
    flex: 1;
    background: var(--accent); color: var(--accent-ink);
    border-color: var(--accent);
  }
  .wf-btn.danger {
    flex: 0 0 auto; padding: 0 18px;
    color: #f87171;
    border-color: color-mix(in oklab, #f87171 45%, var(--line));
  }

  /* =========================================================
     Scroll bergaya native app — scrollbar disembunyikan,
     momentum scroll, tanpa rubber-band menembus latar
  ========================================================= */
  * { scrollbar-width: none; -ms-overflow-style: none; }
  ::-webkit-scrollbar { width: 0; height: 0; display: none; }
  .sheet-inner, .dz-body, .salat-month, .saran-list, .loc-results, .wf-steps {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  /* =========================================================
     Panel Kiblat & Jadwal Sholat
  ========================================================= */
  #salat-scrim { z-index: 48; }
  #salat       { z-index: 49; }

  .select-input {
    border: 1px solid var(--line);
    background: color-mix(in oklab, var(--bg) 55%, white 4%);
    color: var(--fg);
    border-radius: 10px;
    padding: 8px 10px;
    font: inherit; font-size: 13px;
    max-width: 168px;
  }
  .select-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

  .salat-loc {
    display: flex; align-items: center; gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 10px 12px;
  }
  .salat-loc > svg { width: 16px; height: 16px; color: var(--accent); flex: 0 0 auto; }
  .salat-loc-text {
    flex: 1; min-width: 0; font-size: 13px; font-weight: 500;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .salat-refresh {
    flex: 0 0 auto;
    border: 1px solid var(--line); background: transparent;
    color: var(--accent); font-family: inherit; font-size: 12px; font-weight: 600;
    padding: 6px 11px; border-radius: 9px; cursor: pointer;
  }
  .salat-refresh:active { transform: scale(0.96); }
  .salat-date {
    font-size: 11px; color: var(--fg-faint);
    text-transform: none; letter-spacing: 0; font-weight: 500;
  }

  /* ---- Kompas ---- */
  .qibla-wrap {
    display: flex; flex-direction: column; align-items: center; gap: 12px;
    padding: 4px 0 2px;
  }
  .compass {
    position: relative;
    width: clamp(184px, 60vw, 236px);
    aspect-ratio: 1;
  }
  .compass-rose {
    position: absolute; inset: 0; border-radius: 50%;
    background: radial-gradient(circle at 50% 38%,
      color-mix(in oklab, var(--bg-card) 86%, var(--accent) 14%), var(--bg-card));
    border: 2px solid var(--line);
    box-shadow: inset 0 2px 12px rgba(0,0,0,0.25);
    transition: transform 0.12s ease;
  }
  .compass-rose::before {
    content: ""; position: absolute; inset: 10px; border-radius: 50%;
    background: repeating-conic-gradient(
      color-mix(in oklab, var(--fg-faint) 60%, transparent) 0 0.6deg,
      transparent 0.6deg 6deg);
    -webkit-mask: radial-gradient(circle, transparent 0 calc(50% - 7px), #000 calc(50% - 7px));
            mask: radial-gradient(circle, transparent 0 calc(50% - 7px), #000 calc(50% - 7px));
    opacity: 0.55;
  }
  .compass-dir {
    position: absolute; font-size: 13px; font-weight: 700;
    color: var(--fg-mute);
  }
  .compass-n { top: 9px;  left: 50%; transform: translateX(-50%); color: var(--accent); }
  .compass-s { bottom: 9px; left: 50%; transform: translateX(-50%); }
  .compass-e { right: 11px; top: 50%; transform: translateY(-50%); }
  .compass-w { left: 11px;  top: 50%; transform: translateY(-50%); }

  .qibla-needle {
    position: absolute; inset: 0;
    transition: transform 0.12s ease;
    pointer-events: none;
  }
  .needle-body {
    position: absolute; left: 50%; top: 16%;
    width: 0; height: 0; transform: translateX(-50%);
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 40px solid var(--accent);
    filter: drop-shadow(0 3px 5px color-mix(in oklab, var(--accent) 55%, transparent));
  }
  .needle-kaaba {
    position: absolute; left: 50%; top: 3%;
    transform: translateX(-50%);
    font-size: 21px; line-height: 1;
  }
  .compass-hub {
    position: absolute; left: 50%; top: 50%;
    width: 14px; height: 14px; margin: -7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px var(--bg-card), 0 1px 4px rgba(0,0,0,0.4);
  }
  .compass-marker {
    position: absolute; left: 50%; top: -3px;
    transform: translateX(-50%);
    width: 0; height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 11px solid var(--fg-mute);
  }
  .qibla-info { text-align: center; }
  .qibla-deg {
    font-size: 24px; font-weight: 700; color: var(--fg);
    font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
  }
  .qibla-note {
    font-size: 12px; color: var(--fg-mute);
    margin-top: 2px; line-height: 1.5;
  }
  .qibla-enable {
    margin-top: 10px;
    border: 1px solid var(--accent);
    background: var(--accent); color: var(--accent-ink);
    font-family: inherit; font-size: 13px; font-weight: 600;
    padding: 9px 16px; border-radius: 11px; cursor: pointer;
  }
  .qibla-enable:active { transform: scale(0.97); }

  /* ---- Jadwal hari ini ---- */
  .salat-today { display: flex; flex-direction: column; gap: 6px; }
  .salat-row {
    display: flex; align-items: center; gap: 10px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 11px 14px;
  }
  .salat-row.minor { padding: 7px 14px; opacity: 0.72; }
  .salat-row.next {
    border-color: var(--accent);
    background: color-mix(in oklab, var(--accent) 13%, var(--bg-card));
  }
  .salat-name { flex: 1; font-size: 14px; font-weight: 600; color: var(--fg); }
  .salat-row.minor .salat-name { font-size: 13px; font-weight: 500; }
  .salat-time {
    font-size: 15px; font-weight: 700;
    font-variant-numeric: tabular-nums; color: var(--fg);
  }
  .salat-row.minor .salat-time { font-size: 13px; font-weight: 600; }
  .salat-badge {
    flex: 0 0 auto;
    font-size: 10px; font-weight: 600;
    color: var(--accent-ink); background: var(--accent);
    padding: 3px 8px; border-radius: 999px;
  }
  .salat-empty {
    padding: 18px 14px; text-align: center;
    font-size: 12px; color: var(--fg-mute); line-height: 1.5;
  }

  /* ---- Jadwal bulan ini ---- */
  .salat-month {
    max-height: 290px; overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--bg-card);
  }
  .sm-row {
    display: grid;
    grid-template-columns: 1.5fr repeat(5, 1fr);
    align-items: center;
    gap: 2px; padding: 7px 8px;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    border-bottom: 1px solid var(--line);
  }
  .sm-row:last-child { border-bottom: none; }
  .sm-row > span { text-align: center; color: var(--fg); }
  .sm-head {
    position: sticky; top: 0; z-index: 1;
    background: color-mix(in oklab, var(--bg-card) 78%, var(--bg));
    backdrop-filter: blur(4px);
    font-size: 9px; text-transform: uppercase; letter-spacing: 0.05em;
    font-weight: 700; color: var(--fg-faint);
  }
  .sm-head > span { color: var(--fg-faint); }
  .sm-date { display: flex; flex-direction: column; line-height: 1.25; text-align: left !important; }
  .sm-date b { font-size: 12px; font-weight: 700; }
  .sm-date small { font-size: 9px; color: var(--fg-faint); }
  .sm-row.today {
    background: color-mix(in oklab, var(--accent) 14%, var(--bg-card));
  }
  .sm-row.today b { color: var(--accent); }

  /* =========================================================
     Tombol tautan di panel Library (mis. Saran Dzikir)
  ========================================================= */
  .lib-link-btn {
    display: flex; align-items: center; gap: 12px;
    width: 100%; text-align: left;
    padding: 13px 14px;
    border-radius: var(--r-md);
    border: 1px solid var(--line);
    background: var(--bg-card);
    color: var(--fg);
    font-family: inherit; cursor: pointer;
  }
  .lib-link-btn:active { transform: scale(0.99); }
  .lib-link-icon {
    flex: 0 0 auto;
    width: 38px; height: 38px; border-radius: 11px;
    display: grid; place-items: center;
    background: var(--accent-soft);
    border: 1px solid color-mix(in oklab, var(--accent) 30%, transparent);
  }
  .lib-link-icon svg { width: 19px; height: 19px; color: var(--accent); }
  .lib-link-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .lib-link-title { font-size: 14px; font-weight: 600; }
  .lib-link-sub { font-size: 11px; color: var(--fg-mute); margin-top: 2px; }
  .lib-link-arrow { width: 18px; height: 18px; color: var(--fg-faint); flex: 0 0 auto; }

  /* =========================================================
     Panel Saran Dzikir
  ========================================================= */
  #saran-scrim { z-index: 52; }
  #saran       { z-index: 53; }

  .saran-form {
    display: flex; flex-direction: column; gap: 10px;
    margin-bottom: 6px;
  }
  .saran-submit { width: 100%; margin-top: 2px; }

  .saran-sort { display: flex; gap: 4px; }
  .saran-sort-btn {
    border: 1px solid var(--line);
    background: transparent;
    color: var(--fg-mute);
    font-family: inherit; font-size: 11px; font-weight: 600;
    padding: 5px 10px; border-radius: 999px;
    cursor: pointer;
    text-transform: none; letter-spacing: 0;
  }
  .saran-sort-btn.active {
    background: var(--accent); color: var(--accent-ink);
    border-color: var(--accent);
  }

  .saran-list { display: flex; flex-direction: column; gap: 8px; }
  .saran-item {
    display: flex; align-items: stretch; gap: 10px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 10px 12px;
  }
  .saran-vote {
    flex: 0 0 auto;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    min-width: 52px;
    padding: 8px 6px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: color-mix(in oklab, var(--bg) 60%, white 4%);
    color: var(--fg-mute);
    font-family: inherit; cursor: pointer;
  }
  .saran-vote svg { width: 20px; height: 20px; }
  .saran-vote-count {
    font-size: 13px; font-weight: 700;
    font-variant-numeric: tabular-nums;
  }
  .saran-vote:active { transform: scale(0.95); }
  .saran-vote.voted {
    background: var(--accent); color: var(--accent-ink);
    border-color: var(--accent);
  }
  .saran-vote.voted svg { fill: currentColor; }
  .saran-vote:disabled { opacity: 0.5; cursor: default; }

  .saran-item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
  .saran-item-nama { font-size: 14px; font-weight: 600; color: var(--fg); line-height: 1.3; }
  .saran-item-ket { font-size: 12px; color: var(--fg-mute); margin-top: 3px; line-height: 1.45; }
  .saran-item-meta {
    font-size: 11px; color: var(--fg-faint);
    margin-top: 5px;
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  }
  .saran-badge {
    font-size: 10px; font-weight: 700;
    color: var(--accent-ink); background: var(--accent);
    padding: 2px 8px; border-radius: 999px;
  }

  /* =========================================================
     Jadwal sebulan (dialog) & pengatur lokasi
  ========================================================= */
  #month-scrim { z-index: 54; }
  #month-sheet { z-index: 55; }
  #loc-scrim   { z-index: 56; }
  #loc-sheet   { z-index: 57; }

  /* Baris lokasi — kini 2 baris (nama + koordinat) */
  .salat-loc-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .salat-loc-coord {
    font-size: 11px; color: var(--fg-faint);
    font-variant-numeric: tabular-nums; margin-top: 1px;
  }

  /* Tombol "Lihat Jadwal Sebulan" */
  .salat-month-btn {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; margin-top: 10px;
    padding: 12px 14px;
    border-radius: var(--r-md);
    border: 1px solid var(--line);
    background: var(--bg-card);
    color: var(--fg);
    font-family: inherit; font-size: 13px; font-weight: 600;
    cursor: pointer;
  }
  .salat-month-btn:active { transform: scale(0.99); }
  .salat-month-btn svg { width: 17px; height: 17px; color: var(--fg-faint); }

  /* Pengatur lokasi */
  .loc-gps-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--accent);
    background: var(--accent); color: var(--accent-ink);
    font-family: inherit; font-size: 14px; font-weight: 600;
    cursor: pointer;
  }
  .loc-gps-btn:active { transform: scale(0.98); }
  .loc-gps-btn svg { width: 17px; height: 17px; }
  .loc-search { display: flex; gap: 8px; }
  .loc-search .wf-input { flex: 1; }
  .loc-search-btn {
    flex: 0 0 auto;
    border: 1px solid var(--accent);
    background: var(--accent-soft); color: var(--accent);
    font-family: inherit; font-size: 13px; font-weight: 600;
    padding: 0 16px; border-radius: 10px; cursor: pointer;
  }
  .loc-search-btn:active { transform: scale(0.97); }
  .loc-results { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
  .loc-result {
    text-align: left; width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--bg-card);
    color: var(--fg);
    font-family: inherit; font-size: 12px; line-height: 1.4;
    cursor: pointer;
  }
  .loc-result:active { transform: scale(0.99); background: var(--accent-soft); }
  .loc-current {
    margin-top: 12px;
    font-size: 12px; color: var(--fg-mute); line-height: 1.5;
  }

  /* =========================================================
     Dialog simpan hitungan bebas
  ========================================================= */
  #save-scrim { z-index: 58; }
  .save-dialog {
    position: fixed; left: 50%; top: 50%;
    transform: translate(-50%, -46%) scale(0.96);
    width: calc(100% - 48px); max-width: 360px;
    z-index: 59;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    padding: 20px;
    box-shadow: 0 20px 60px -10px rgba(0,0,0,0.5);
    opacity: 0; pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .save-dialog.open {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1; pointer-events: auto;
  }
  .save-dialog-title { font-size: 16px; font-weight: 700; color: var(--fg); }
  .save-dialog-sub {
    font-size: 12px; color: var(--fg-mute);
    margin: 4px 0 14px; line-height: 1.5;
  }
  .save-dialog-input {
    width: 100%;
    border: 1px solid var(--line);
    background: color-mix(in oklab, var(--bg) 55%, white 4%);
    color: var(--fg);
    border-radius: 11px; padding: 11px 12px;
    font: inherit; font-size: 14px;
  }
  .save-dialog-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
  .save-dialog-actions { display: flex; gap: 10px; margin-top: 14px; }
  .save-dialog-btn {
    flex: 1; height: 44px; border-radius: 12px;
    font-family: inherit; font-size: 14px; font-weight: 600;
    cursor: pointer;
  }
  .save-dialog-btn.cancel {
    background: transparent; border: 1px solid var(--line); color: var(--fg);
  }
  .save-dialog-btn.confirm {
    background: var(--accent); border: 1px solid var(--accent); color: var(--accent-ink);
  }
  .save-dialog-btn:active { transform: scale(0.97); }
  /* Tombol konfirmasi untuk aksi merusak (reset, bersihkan, pindah) */
  .save-dialog-btn.danger {
    background: #cf4040; border: 1px solid #cf4040; color: #fff;
  }

  /* Dialog konfirmasi — di atas seluruh panel & sheet */
  #confirm-scrim  { z-index: 62; }
  #confirm-dialog { z-index: 63; }

  /* =========================================================
     Hormati preferensi gerakan minimal (aksesibilitas)
  ========================================================= */
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
      scroll-behavior: auto !important;
    }
    .conf { display: none !important; }   /* lewati confetti sepenuhnya */
  }
