/* ════════════════════════════════════════════════════════════════
   Tasbih v2 — Glassmorphism premium aligné sur le header
   Loaded after style.css. Tokens héritent de style.css :root.
   Préfixe : .tx-*  (Tasbih X = v2)
   ════════════════════════════════════════════════════════════════ */

.page-tasbih-v2 {
    --tx-accent:        #D4A574;
    --tx-accent-soft:   #E8C9A0;
    --tx-accent-deep:   #A07C52;
    --tx-bg:            var(--bg-primary, #0B0E18);
    --tx-bg-deep:       var(--bg-deep, #070A12);
    --tx-surface:       rgba(255, 255, 255, 0.03);
    --tx-surface-hi:    rgba(255, 255, 255, 0.06);
    --tx-border:        rgba(255, 255, 255, 0.07);
    --tx-border-strong: rgba(212, 165, 116, 0.30);
    --tx-line:          rgba(255, 255, 255, 0.18);
    --tx-text:          var(--text-primary, #E8E6E3);
    --tx-muted:         var(--text-secondary, #9CA3AF);
    --tx-radius:        18px;
    --tx-shadow:        0 16px 48px -20px rgba(0, 0, 0, 0.55),
                        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    --tx-grad:          linear-gradient(135deg, var(--tx-accent-soft), var(--tx-accent), var(--tx-accent-deep));
    --tx-ring-size:     320px;
    background:
        radial-gradient(1100px 580px at 12% -10%, rgba(212, 165, 116, 0.10), transparent 60%),
        radial-gradient(800px 480px at 92% -6%, rgba(122, 162, 247, 0.08), transparent 60%),
        var(--tx-bg-deep);
    min-height: 100vh;
}

[data-theme="light"] .page-tasbih-v2 {
    --tx-surface:       rgba(255, 255, 255, 0.55);
    --tx-surface-hi:    rgba(255, 255, 255, 0.85);
    --tx-border:        rgba(28, 35, 51, 0.10);
    --tx-border-strong: rgba(182, 132, 74, 0.45);
    --tx-line:          rgba(28, 35, 51, 0.18);
    --tx-shadow:        0 14px 40px -18px rgba(28, 35, 51, 0.20),
                        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    background:
        radial-gradient(1100px 580px at 10% -10%, rgba(212, 165, 116, 0.18), transparent 60%),
        radial-gradient(700px 360px at 95% -4%, rgba(122, 162, 247, 0.16), transparent 60%),
        #F5F0E6;
}

.page-tasbih-v2[data-tx-accent="emerald"]  { --tx-accent:#5EC9A6; --tx-accent-soft:#9CE6CB; --tx-accent-deep:#2F8A6D; --tx-grad:linear-gradient(135deg,#9CE6CB,#5EC9A6,#2F8A6D); }
.page-tasbih-v2[data-tx-accent="sapphire"] { --tx-accent:#7AA2F7; --tx-accent-soft:#B6CCFB; --tx-accent-deep:#3D6FD1; --tx-grad:linear-gradient(135deg,#B6CCFB,#7AA2F7,#3D6FD1); }
.page-tasbih-v2[data-tx-accent="rose"]     { --tx-accent:#E08FB1; --tx-accent-soft:#F2BCD2; --tx-accent-deep:#A85B81; --tx-grad:linear-gradient(135deg,#F2BCD2,#E08FB1,#A85B81); }

.page-tasbih-v2[data-tx-size="s"]  { --tx-ring-size: 260px; }
.page-tasbih-v2[data-tx-size="l"]  { --tx-ring-size: 380px; }
.page-tasbih-v2[data-tx-size="xl"] { --tx-ring-size: 440px; }

/* Container & layout */
.tx-shell { color: var(--tx-text); padding-bottom: 80px; }
.tx-container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 28px); }
.tx-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    margin-top: 28px;
}
@media (max-width: 980px) { .tx-grid { grid-template-columns: 1fr; } }

/* ════════ HERO ════════ */
.tx-hero {
    position: relative;
    padding: clamp(36px, 6vw, 72px) 0 clamp(20px, 3vw, 40px);
    overflow: hidden;
    text-align: center;
}
.tx-hero-glow {
    position: absolute;
    inset: -10% 10% auto 10%;
    height: 70%;
    background: radial-gradient(60% 60% at 50% 30%, rgba(212, 165, 116, 0.22), transparent 70%);
    filter: blur(20px);
    pointer-events: none;
}
.tx-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--tx-surface);
    border: 1px solid var(--tx-border-strong);
    color: var(--tx-muted);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.tx-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tx-grad); box-shadow: 0 0 12px var(--tx-accent); }
.tx-hero-title {
    margin: 16px 0 10px;
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    font-weight: 800;
    background: var(--tx-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -.02em;
}
.tx-hero-sub { color: var(--tx-muted); font-size: 1.05rem; margin: 0 auto 22px; max-width: 580px; }
.tx-hero-kpis {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    max-width: 720px;
    margin: 0 auto;
}
@media (max-width: 640px) { .tx-hero-kpis { grid-template-columns: repeat(2, 1fr); } }
.tx-kpi {
    background: var(--tx-surface);
    border: 1px solid var(--tx-border);
    border-radius: 14px;
    padding: 12px 10px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex; flex-direction: column; gap: 4px; align-items: center;
}
.tx-kpi-num { font-size: 1.4rem; font-weight: 800; color: var(--tx-text); font-variant-numeric: tabular-nums; }
.tx-kpi-lbl { font-size: .68rem; color: var(--tx-muted); text-transform: uppercase; letter-spacing: .12em; }

/* ════════ Card base ════════ */
.tx-counter-card,
.tx-stats-card,
.tx-side-card {
    position: relative;
    background: var(--tx-surface);
    border: 1px solid var(--tx-border);
    border-radius: var(--tx-radius);
    box-shadow: var(--tx-shadow);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    padding: clamp(18px, 2.4vw, 28px);
    margin-bottom: 20px;
}
.tx-aside .tx-side-card { padding: 18px; }
.tx-card-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; margin-bottom: 14px;
}
.tx-card-head h2 {
    margin: 0; display: inline-flex; align-items: center; gap: 8px;
    font-size: 1.05rem; font-weight: 700; color: var(--tx-text);
}
.tx-card-head h2 .material-icons-round { color: var(--tx-accent); font-size: 22px; }
.tx-card-meta { font-size: .8rem; color: var(--tx-muted); }
.tx-link-btn {
    background: none; border: 0; color: var(--tx-muted); font-size: .82rem;
    cursor: pointer; transition: color .2s;
}
.tx-link-btn:hover { color: var(--tx-accent); }

/* ════════ Counter card ════════ */
.tx-dhikr-btn {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px 18px;
    background: var(--tx-surface-hi);
    border: 1px solid var(--tx-border);
    border-radius: 14px;
    color: var(--tx-text);
    cursor: pointer;
    transition: border-color .25s, transform .2s;
    text-align: left;
}
.tx-dhikr-btn:hover { border-color: var(--tx-border-strong); transform: translateY(-1px); }
.tx-dhikr-ar { font-family: var(--font-arabic, 'Amiri', serif); font-size: 1.6rem; line-height: 1; }
.tx-dhikr-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tx-dhikr-tr { font-weight: 600; }
.tx-dhikr-meaning { color: var(--tx-muted); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-dhikr-chev { color: var(--tx-muted); }

/* Program banner */
.tx-program-banner {
    display: flex; align-items: center; gap: 12px;
    margin-top: 14px; padding: 12px 14px;
    background: linear-gradient(135deg, rgba(212,165,116,.18), rgba(212,165,116,.06));
    border: 1px solid var(--tx-border-strong);
    border-radius: 12px;
}
.tx-program-banner .material-icons-round:first-child { color: var(--tx-accent); }
.tx-program-info { flex: 1; display: flex; flex-direction: column; }
.tx-program-info small { color: var(--tx-muted); font-size: .78rem; }
.tx-program-stop {
    background: transparent; border: 0; color: var(--tx-muted); cursor: pointer;
    width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px;
}
.tx-program-stop:hover { background: var(--tx-surface-hi); color: var(--tx-text); }

/* Ring */
.tx-ring-wrap {
    display: grid; place-items: center;
    margin: 28px auto 12px;
}
.tx-ring {
    position: relative;
    width: var(--tx-ring-size); height: var(--tx-ring-size);
    border-radius: 50%;
    background: transparent;
    border: 0;
    cursor: pointer;
    display: grid; place-items: center;
    isolation: isolate;
    transition: transform .2s var(--ease, ease);
}
.tx-ring::before {
    content: "";
    position: absolute; inset: 14%;
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 25%, rgba(255,255,255,.08), transparent 60%),
        radial-gradient(circle at 70% 80%, rgba(212,165,116,.18), transparent 60%),
        var(--tx-surface-hi);
    border: 1px solid var(--tx-border-strong);
    box-shadow:
        0 30px 80px -30px rgba(212,165,116,.55),
        inset 0 1px 0 rgba(255,255,255,.06);
    z-index: -1;
    transition: box-shadow .3s, background .3s;
}
.tx-ring:active { transform: scale(.98); }
.tx-ring.tx-pulse::before {
    animation: txPulse .55s var(--ease, ease);
}
@keyframes txPulse {
    0%   { box-shadow: 0 30px 80px -30px rgba(212,165,116,.55), inset 0 1px 0 rgba(255,255,255,.06), 0 0 0 0 rgba(212,165,116,.45); }
    60%  { box-shadow: 0 30px 80px -30px rgba(212,165,116,.55), inset 0 1px 0 rgba(255,255,255,.06), 0 0 0 28px rgba(212,165,116,0); }
    100% { box-shadow: 0 30px 80px -30px rgba(212,165,116,.55), inset 0 1px 0 rgba(255,255,255,.06), 0 0 0 0 rgba(212,165,116,0); }
}
.tx-ring-svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.tx-ring-track    { fill: none; stroke: var(--tx-line); stroke-width: 8; opacity: .8; }
.tx-ring-progress {
    fill: none;
    stroke: url(#txRingGrad);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 603.18;
    stroke-dashoffset: 603.18;
    transition: stroke-dashoffset .35s cubic-bezier(.4,0,.2,1);
}
.tx-ring-inner    { fill: none; stroke: var(--tx-line); stroke-width: 1; opacity: .45; stroke-dasharray: 2 4; }
.tx-ring.tx-done .tx-ring-progress { filter: url(#txRingGlow) drop-shadow(0 0 14px var(--tx-accent)); }
.tx-ring-count {
    font-size: clamp(2.6rem, 8vw, 4.2rem);
    font-weight: 800;
    color: var(--tx-text);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}
.tx-ring-target {
    margin-top: 6px;
    color: var(--tx-muted);
    font-size: 1rem;
}
.tx-ring-pct {
    position: absolute;
    bottom: 22%;
    font-size: .72rem;
    color: var(--tx-accent);
    font-weight: 700;
    letter-spacing: .15em;
}

/* Controls */
.tx-controls {
    display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
    gap: 10px; margin-top: 22px;
}
.tx-ctrl {
    width: 44px; height: 44px;
    display: inline-grid; place-items: center;
    background: var(--tx-surface-hi);
    border: 1px solid var(--tx-border);
    border-radius: 12px;
    color: var(--tx-text);
    cursor: pointer;
    transition: all .2s;
}
.tx-ctrl:hover { background: var(--tx-surface); border-color: var(--tx-border-strong); transform: translateY(-1px); color: var(--tx-accent); }
.tx-ctrl-primary {
    width: auto; padding: 0 18px; gap: 8px; display: inline-flex; font-weight: 600;
    background: var(--tx-grad); color: #1C1408; border-color: transparent;
    box-shadow: 0 6px 18px -8px rgba(212,165,116,.65);
}
.tx-ctrl-primary:hover { color: #1C1408; transform: translateY(-1px); filter: brightness(1.05); }

/* Bars */
.tx-bar { margin-top: 22px; }
.tx-bar-head { display: flex; justify-content: space-between; font-size: .82rem; color: var(--tx-muted); margin-bottom: 8px; }
.tx-bar-head span:last-child { color: var(--tx-text); font-weight: 600; font-variant-numeric: tabular-nums; }
.tx-bar-track { height: 8px; background: var(--tx-line); border-radius: 999px; overflow: hidden; opacity: .55; }
.tx-bar-fill {
    height: 100%; width: 0%;
    background: linear-gradient(90deg, var(--tx-accent-soft), var(--tx-accent));
    border-radius: 999px;
    transition: width .35s var(--ease, ease);
}
.tx-bar-fill-gold { background: var(--tx-grad); }
.tx-bar-actions { margin-top: 10px; display: grid; gap: 6px; }
.tx-bar-actions label { font-size: .78rem; color: var(--tx-muted); }
.tx-bar-actions input[type="range"] { width: 100%; accent-color: var(--tx-accent); }

.tx-virtue {
    margin-top: 18px;
    text-align: center;
    color: var(--tx-muted);
    font-style: italic;
    font-size: .92rem;
}

/* ════════ Stats card ════════ */
.tx-tabs { display: inline-flex; padding: 4px; background: var(--tx-surface-hi); border: 1px solid var(--tx-border); border-radius: 10px; gap: 2px; }
.tx-tabs button {
    background: transparent; border: 0; padding: 6px 12px; border-radius: 8px;
    color: var(--tx-muted); cursor: pointer; font-size: .82rem; font-weight: 600;
    transition: all .2s;
}
.tx-tabs button:hover { color: var(--tx-text); }
.tx-tabs button.active { background: var(--tx-grad); color: #1C1408; }

.tx-stats-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
    margin-bottom: 22px;
}
@media (max-width: 540px) { .tx-stats-grid { grid-template-columns: repeat(2, 1fr); } }
.tx-stat { background: var(--tx-surface-hi); border: 1px solid var(--tx-border); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 4px; align-items: center; }
.tx-stat-num { font-size: 1.4rem; font-weight: 800; color: var(--tx-text); font-variant-numeric: tabular-nums; }
.tx-stat-lbl { font-size: .7rem; color: var(--tx-muted); text-transform: uppercase; letter-spacing: .1em; text-align: center; }

.tx-stats-sub { font-size: .78rem; color: var(--tx-muted); text-transform: uppercase; letter-spacing: .14em; margin: 18px 0 10px; }

/* Chart */
.tx-chart { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; height: 140px; align-items: end; padding: 8px 4px 0; border-bottom: 1px solid var(--tx-border); }
.tx-chart-col { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; }
.tx-chart-bar {
    width: 100%; max-width: 28px;
    background: var(--tx-grad); border-radius: 6px 6px 2px 2px;
    transition: height .4s cubic-bezier(.34,1.56,.64,1);
    box-shadow: 0 6px 18px -10px rgba(212,165,116,.6);
    position: relative;
}
.tx-chart-bar[data-h="0"] { background: var(--tx-line); box-shadow: none; opacity: .6; min-height: 6px; }
.tx-chart-bar::after {
    content: attr(data-v);
    position: absolute; bottom: 100%; left: 50%; transform: translate(-50%, -4px);
    font-size: .7rem; color: var(--tx-muted); white-space: nowrap;
    opacity: 0; transition: opacity .2s;
}
.tx-chart-col:hover .tx-chart-bar::after { opacity: 1; }
.tx-chart-lbl { font-size: .7rem; color: var(--tx-muted); }

/* Calendar 30 days */
.tx-cal { display: grid; grid-template-columns: repeat(15, 1fr); gap: 6px; }
.tx-cal-cell {
    aspect-ratio: 1;
    border-radius: 6px;
    background: var(--tx-line);
    opacity: .55;
    position: relative;
    transition: transform .2s;
    cursor: default;
}
.tx-cal-cell[data-level="1"] { background: rgba(212,165,116,.25); opacity: 1; }
.tx-cal-cell[data-level="2"] { background: rgba(212,165,116,.45); opacity: 1; }
.tx-cal-cell[data-level="3"] { background: rgba(212,165,116,.7);  opacity: 1; }
.tx-cal-cell[data-level="4"] { background: var(--tx-grad); opacity: 1; box-shadow: 0 4px 12px -4px rgba(212,165,116,.55); }
.tx-cal-cell[data-today="1"] { outline: 2px solid var(--tx-accent); outline-offset: 1px; }
.tx-cal-cell:hover { transform: scale(1.15); z-index: 1; }

/* ════════ Aside ════════ */
.tx-programs { display: flex; flex-direction: column; gap: 8px; }
.tx-program {
    display: grid; grid-template-columns: 36px 1fr auto; align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--tx-surface-hi);
    border: 1px solid var(--tx-border);
    border-radius: 12px;
    color: var(--tx-text);
    cursor: pointer;
    text-align: left;
    transition: all .2s;
}
.tx-program:hover { border-color: var(--tx-border-strong); transform: translateY(-1px); }
.tx-program-icon {
    width: 36px; height: 36px; display: grid; place-items: center;
    border-radius: 10px; background: rgba(212,165,116,.12);
    color: var(--tx-accent); font-size: 20px;
}
.tx-program-text { display: flex; flex-direction: column; min-width: 0; }
.tx-program-text strong { font-size: .95rem; }
.tx-program-text small { color: var(--tx-muted); font-size: .76rem; line-height: 1.4; }
.tx-program-arrow { color: var(--tx-muted); }
.tx-program.active { background: linear-gradient(135deg, rgba(212,165,116,.18), rgba(212,165,116,.04)); border-color: var(--tx-border-strong); }

.tx-achievements { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.tx-ach {
    background: var(--tx-surface-hi);
    border: 1px solid var(--tx-border);
    border-radius: 12px;
    padding: 10px;
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    text-align: center;
    filter: grayscale(.8); opacity: .55;
    transition: all .25s;
}
.tx-ach.unlocked { filter: none; opacity: 1; border-color: var(--tx-border-strong); background: linear-gradient(135deg, rgba(212,165,116,.16), rgba(212,165,116,.04)); }
.tx-ach-icon { font-size: 1.6rem; }
.tx-ach-name { font-size: .8rem; font-weight: 600; }
.tx-ach-desc { font-size: .7rem; color: var(--tx-muted); }

.tx-history { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto; }
.tx-history li {
    display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center;
    padding: 8px 10px;
    background: var(--tx-surface-hi);
    border: 1px solid var(--tx-border);
    border-radius: 10px;
    font-size: .85rem;
}
.tx-history-empty { color: var(--tx-muted); font-style: italic; text-align: center; }
.tx-history .tx-h-cnt { color: var(--tx-accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.tx-history .tx-h-date { color: var(--tx-muted); font-size: .76rem; }

.tx-reminder p { margin: 0 0 10px; color: var(--tx-muted); font-size: .85rem; }
.tx-reminder-row { display: flex; gap: 8px; align-items: center; }
.tx-reminder input[type="time"] {
    padding: 8px 10px; background: var(--tx-surface-hi); border: 1px solid var(--tx-border);
    border-radius: 10px; color: var(--tx-text); font-size: .9rem;
}
.tx-muted { color: var(--tx-muted); }

.tx-data-tools { display: flex; flex-direction: column; gap: 8px; }
.tx-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 14px;
    background: var(--tx-surface-hi);
    border: 1px solid var(--tx-border);
    border-radius: 10px;
    color: var(--tx-text);
    cursor: pointer;
    font-size: .88rem;
    transition: all .2s;
}
.tx-btn:hover { border-color: var(--tx-border-strong); transform: translateY(-1px); color: var(--tx-accent); }
.tx-btn-gold { background: var(--tx-grad); color: #1C1408; border-color: transparent; }
.tx-btn-gold:hover { color: #1C1408; filter: brightness(1.05); }
.tx-btn-danger { color: #E08FB1; }
.tx-btn-danger:hover { color: #E08FB1; border-color: rgba(224,143,177,.4); }

.tx-noor-card { background: linear-gradient(135deg, rgba(212,165,116,.10), rgba(122,162,247,.06)); }
.tx-noor-spark { color: var(--tx-accent); font-size: 1.1rem; animation: txSpin 8s linear infinite; display: inline-block; }
@keyframes txSpin { from {transform: rotate(0);} to {transform: rotate(360deg);} }
.tx-noor-text { color: var(--tx-muted); font-size: .9rem; line-height: 1.5; margin: 6px 0 12px; }
.tx-noor-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tx-noor-actions .tx-btn { flex: 1 1 auto; }

/* Shortcuts row */
.tx-shortcuts {
    margin-top: 24px; padding: 14px 18px;
    background: var(--tx-surface);
    border: 1px solid var(--tx-border);
    border-radius: 12px;
    color: var(--tx-muted);
    font-size: .82rem;
    display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center;
}
.tx-shortcuts strong { color: var(--tx-text); }
.tx-shortcuts kbd {
    display: inline-block; padding: 2px 6px; min-width: 22px; text-align: center;
    background: var(--tx-surface-hi); border: 1px solid var(--tx-border);
    border-radius: 6px; font-family: var(--font-ui, 'Inter', sans-serif);
    font-size: .76rem; color: var(--tx-text);
}

/* ════════ DIALOG ════════ */
.tx-dialog {
    width: min(560px, 92vw);
    max-height: 86vh;
    border: 1px solid var(--tx-border-strong);
    border-radius: 18px;
    background: rgba(11, 14, 24, 0.94);
    color: var(--tx-text);
    box-shadow: var(--tx-shadow);
    backdrop-filter: blur(22px) saturate(160%);
    padding: 0;
    overflow: hidden;
}
[data-theme="light"] .tx-dialog { background: rgba(255,255,255,.97); color: #1C2333; }
.tx-dialog-tall { width: min(680px, 94vw); }
.tx-dialog::backdrop { background: rgba(0,0,0,.55); backdrop-filter: blur(6px); }
.tx-dialog-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid var(--tx-border);
    position: sticky; top: 0; background: inherit; z-index: 1;
}
.tx-dialog-head h3 { margin: 0; font-size: 1.05rem; }
.tx-dialog-close { background: transparent; border: 0; color: var(--tx-muted); cursor: pointer; width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; }
.tx-dialog-close:hover { background: var(--tx-surface-hi); color: var(--tx-text); }
.tx-dialog-body { padding: 18px 20px; overflow-y: auto; max-height: calc(86vh - 64px); }

/* Library */
.tx-search {
    width: 100%; padding: 10px 14px;
    background: var(--tx-surface-hi);
    border: 1px solid var(--tx-border);
    border-radius: 10px;
    color: var(--tx-text);
    font-size: .92rem;
    margin-bottom: 12px;
}
.tx-cats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tx-cat {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px;
    background: var(--tx-surface-hi);
    border: 1px solid var(--tx-border);
    border-radius: 999px;
    color: var(--tx-muted);
    font-size: .82rem;
    cursor: pointer;
    transition: all .2s;
}
.tx-cat .material-icons-round { font-size: 16px; }
.tx-cat:hover { color: var(--tx-text); border-color: var(--tx-border-strong); }
.tx-cat.active { background: var(--tx-grad); color: #1C1408; border-color: transparent; }
.tx-library { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-direction: column; gap: 6px; }
.tx-library li {
    display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px;
    padding: 10px 12px;
    background: var(--tx-surface-hi);
    border: 1px solid var(--tx-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all .2s;
}
.tx-library li:hover { border-color: var(--tx-border-strong); transform: translateY(-1px); }
.tx-library li.active { background: linear-gradient(135deg, rgba(212,165,116,.18), rgba(212,165,116,.04)); border-color: var(--tx-border-strong); }
.tx-l-ar { font-family: var(--font-arabic, 'Amiri', serif); font-size: 1.3rem; }
.tx-l-meta { color: var(--tx-muted); font-size: .82rem; }
.tx-l-tr { display: block; color: var(--tx-text); font-weight: 600; font-size: .85rem; }
.tx-l-actions { display: flex; gap: 4px; }
.tx-l-act-btn { background: transparent; border: 0; color: var(--tx-muted); cursor: pointer; padding: 4px; border-radius: 6px; }
.tx-l-act-btn:hover { background: var(--tx-surface); color: var(--tx-accent); }

.tx-custom-form { padding-top: 14px; border-top: 1px dashed var(--tx-border); display: flex; flex-direction: column; gap: 8px; }
.tx-custom-form h4 { margin: 0 0 4px; font-size: .9rem; color: var(--tx-text); }
.tx-custom-form input { padding: 8px 12px; background: var(--tx-surface-hi); border: 1px solid var(--tx-border); border-radius: 10px; color: var(--tx-text); }

/* Targets */
.tx-targets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 18px; }
@media (max-width: 480px) { .tx-targets { grid-template-columns: repeat(3, 1fr); } }
.tx-target {
    padding: 14px 0;
    background: var(--tx-surface-hi);
    border: 1px solid var(--tx-border);
    border-radius: 12px;
    color: var(--tx-text);
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
    font-variant-numeric: tabular-nums;
}
.tx-target:hover { border-color: var(--tx-border-strong); transform: translateY(-1px); }
.tx-target.active { background: var(--tx-grad); color: #1C1408; border-color: transparent; }
.tx-target-custom { padding-top: 14px; border-top: 1px dashed var(--tx-border); }
.tx-target-custom label { display: block; color: var(--tx-muted); font-size: .82rem; margin-bottom: 6px; }
.tx-target-input { display: flex; gap: 8px; }
.tx-target-input input { flex: 1; padding: 10px 12px; background: var(--tx-surface-hi); border: 1px solid var(--tx-border); border-radius: 10px; color: var(--tx-text); }

/* Settings */
.tx-setting {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 0; border-bottom: 1px solid var(--tx-border);
    gap: 14px;
}
.tx-setting:last-child { border-bottom: 0; }
.tx-setting label { font-size: .9rem; color: var(--tx-text); }
.tx-setting select, .tx-setting input[type="text"] {
    padding: 8px 10px; background: var(--tx-surface-hi); border: 1px solid var(--tx-border);
    border-radius: 8px; color: var(--tx-text); font-size: .88rem;
}
.tx-setting input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--tx-accent); }
.tx-accents { display: flex; gap: 6px; }
.tx-accents button {
    width: 32px; height: 32px; border-radius: 50%; border: 2px solid transparent;
    background: var(--a, var(--tx-accent)); cursor: pointer; font-size: 0;
}
.tx-accents button.active { border-color: var(--tx-text); box-shadow: 0 0 0 2px var(--tx-bg-deep); }

/* Quick mode */
.tx-quick {
    position: fixed; inset: 0; z-index: 9000;
    background: radial-gradient(circle at 50% 30%, rgba(212,165,116,.15), var(--tx-bg-deep) 60%);
    display: grid; place-items: center;
    user-select: none;
    cursor: pointer;
}
.tx-quick[hidden] { display: none; }
.tx-quick-close {
    position: absolute; top: 16px; right: 16px;
    width: 44px; height: 44px; border-radius: 12px;
    background: var(--tx-surface-hi); border: 1px solid var(--tx-border);
    color: var(--tx-text); cursor: pointer; display: grid; place-items: center;
}
.tx-quick-inner { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; padding: 0 20px; }
.tx-quick-ar { font-family: var(--font-arabic, 'Amiri', serif); font-size: clamp(2.4rem, 7vw, 4.6rem); background: var(--tx-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tx-quick-count { font-size: clamp(5rem, 18vw, 12rem); font-weight: 800; color: var(--tx-text); font-variant-numeric: tabular-nums; line-height: 1; }
.tx-quick-target { color: var(--tx-muted); font-size: 1.4rem; }
.tx-quick-hint { position: absolute; bottom: 32px; color: var(--tx-muted); font-size: .9rem; }

/* Toasts */
.tx-toasts {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
    display: flex; flex-direction: column; gap: 8px; z-index: 9999;
    pointer-events: none;
}
.tx-toast {
    padding: 12px 18px;
    background: rgba(11, 14, 24, .92);
    border: 1px solid var(--tx-border-strong);
    border-radius: 12px;
    color: var(--tx-text);
    font-size: .88rem;
    box-shadow: var(--tx-shadow);
    animation: txToastIn .3s ease, txToastOut .3s ease 2.4s forwards;
    backdrop-filter: blur(20px);
}
[data-theme="light"] .tx-toast { background: rgba(255,255,255,.95); color: #1C2333; }
@keyframes txToastIn  { from {opacity: 0; transform: translateY(8px);} }
@keyframes txToastOut { to   {opacity: 0; transform: translateY(8px);} }

/* RTL */
[dir="rtl"] .tx-dhikr-btn { grid-template-columns: auto 1fr auto; }
[dir="rtl"] .tx-program { grid-template-columns: 36px 1fr auto; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .tx-ring, .tx-ring::before, .tx-bar-fill, .tx-chart-bar, .tx-noor-spark { animation: none !important; transition: none !important; }
}

/* ----------------------------------------------------------------
   UNIVERS SPIRITUEL  Section au-dessus de la grille
---------------------------------------------------------------- */
.tx-universe {
    padding: 28px 0 12px;
}

/* -- Day Banner -- */
.tx-day-banner {
    display: flex; align-items: center; gap: 16px;
    padding: 16px 22px;
    background: var(--tx-surface-hi);
    border: 1px solid var(--tx-border-strong);
    border-radius: var(--tx-radius);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 4px 20px rgba(0,0,0,.15);
    margin-bottom: 20px;
    animation: tx-banner-in .7s cubic-bezier(.2,.7,.3,1) both;
}
@keyframes tx-banner-in {
    from { opacity: 0; transform: translateY(-18px); }
    to   { opacity: 1; transform: translateY(0); }
}
.tx-day-banner-icon { font-size: 36px; line-height: 1; flex-shrink: 0; }
.tx-day-banner-body { flex: 1; min-width: 0; }
.tx-day-banner-title {
    display: block;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 18px; font-weight: 700;
    color: var(--tx-accent-soft);
}
[data-theme="light"] .tx-day-banner-title { color: var(--tx-accent-deep); }
.tx-day-banner-sub {
    font-size: 13px;
    color: var(--tx-muted);
    line-height: 1.5;
    margin-top: 2px;
    display: block;
}
.tx-day-banner-cta { flex-shrink: 0; }
.tx-day-banner-cta a {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: 50px;
    background: linear-gradient(135deg, var(--tx-accent) 0%, var(--tx-accent-deep) 100%);
    color: #fff; text-decoration: none;
    font-size: 13px; font-weight: 600;
    box-shadow: 0 4px 14px rgba(212,165,116,.30);
    transition: transform .3s, box-shadow .3s;
}
.tx-day-banner-cta a:hover { transform: scale(1.04); box-shadow: 0 6px 20px rgba(212,165,116,.45); }

/* -- Dhikr du jour strip -- */
.tx-dhikr-day-strip {
    display: flex; align-items: center; gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}
.tx-dds-label {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
    color: var(--tx-accent);
    white-space: nowrap; flex-shrink: 0;
}
.tx-dds-label .material-icons-round { font-size: 15px; animation: tx-star-pulse 2s ease-in-out infinite; }
@keyframes tx-star-pulse {
    0%,100% { transform: scale(1);   opacity: .7; }
    50%      { transform: scale(1.2); opacity: 1; }
}
.tx-dds-list { display: flex; gap: 8px; flex-wrap: wrap; }

.tx-dds-chip {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 18px;
    background: var(--tx-surface-hi);
    border: 1px solid var(--tx-border-strong);
    border-radius: 50px;
    color: var(--tx-text);
    cursor: pointer;
    font-size: 13.5px; font-weight: 500;
    transition: transform .3s cubic-bezier(.2,.7,.3,1), background .3s, box-shadow .3s;
    animation: tx-chip-in .5s cubic-bezier(.2,.7,.3,1) both;
    animation-delay: var(--chip-delay, 0ms);
}
@keyframes tx-chip-in {
    from { opacity: 0; transform: scale(.9) translateY(8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.tx-dds-chip:hover {
    transform: translateY(-3px) scale(1.03);
    background: rgba(212,165,116,.15);
    box-shadow: 0 6px 18px rgba(212,165,116,.18);
}
.tx-dds-chip-ar {
    font-family: var(--font-arabic, 'Scheherazade New', serif);
    font-size: 17px;
    color: var(--tx-accent);
    direction: rtl;
}
.tx-dds-chip-tr { color: var(--tx-muted); font-size: 12px; }
.tx-dds-chip .material-icons-round { font-size: 14px; color: var(--tx-accent); opacity: .7; }

/* -- Section head -- */
.tx-uni-section-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 12px; margin-bottom: 20px;
}
.tx-uni-head-text h2 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 26px; font-weight: 700;
    color: var(--tx-text); margin: 0 0 4px;
}
.tx-uni-head-text p { font-size: 13px; color: var(--tx-muted); margin: 0; }

/* -- Universe cards grid -- */
.tx-uni-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}
.tx-uni-card {
    position: relative; overflow: hidden;
    border-radius: 20px; padding: 20px 20px 16px;
    min-height: 200px;
    cursor: pointer;
    color: #fff;
    display: flex; flex-direction: column;
    isolation: isolate;
    transition: transform .42s cubic-bezier(.2,.7,.3,1), box-shadow .42s;
    border: 1px solid rgba(255,255,255,.10);
    box-shadow: 0 8px 24px rgba(0,0,0,.22);
    will-change: transform;
    -webkit-tap-highlight-color: transparent;
    opacity: 0; transform: translateY(24px);
}
.tx-uni-card.tx-revealed { opacity: 1; transform: translateY(0); transition: opacity .65s cubic-bezier(.2,.7,.3,1), transform .65s cubic-bezier(.2,.7,.3,1), box-shadow .42s; transition-delay: var(--card-delay, 0ms); }
.tx-uni-card:hover { transform: translateY(-5px) scale(1.012); box-shadow: 0 20px 48px rgba(0,0,0,.30), 0 0 0 1px var(--uni-accent); }
.tx-uni-card:focus-visible { outline: 2px solid var(--tx-accent); outline-offset: 3px; }

.tx-uni-bg { position: absolute; inset: 0; background: var(--uni-grad); opacity: .92; z-index: -2; transition: opacity .5s; }
.tx-uni-card:hover .tx-uni-bg { opacity: 1; }

.tx-uni-glow {
    position: absolute; width: 240px; height: 240px; border-radius: 50%;
    top: -80px; right: -80px;
    background: radial-gradient(circle, rgba(255,255,255,.30) 0%, transparent 70%);
    z-index: -1; pointer-events: none;
    animation: tx-uni-float 7s ease-in-out infinite;
}
@keyframes tx-uni-float { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-10px,8px) scale(1.06); } }

.tx-uni-card::before {
    content: ""; position: absolute; border-radius: 50%; pointer-events: none; z-index: -1;
    width: 100px; height: 100px; bottom: -28px; left: -28px;
    background: radial-gradient(circle, rgba(255,255,255,.15) 0%, transparent 70%);
    animation: tx-uni-orb 9s ease-in-out infinite;
}
@keyframes tx-uni-orb { 0%,100% { transform: translate(0,0); } 50% { transform: translate(12px,-10px) scale(1.1); } }

.tx-uni-icon {
    width: 50px; height: 50px; border-radius: 14px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.18); backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,.28);
    color: #fff; margin-bottom: 12px; flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(0,0,0,.20);
    transition: transform .42s cubic-bezier(.2,.7,.3,1);
}
.tx-uni-icon .material-icons-round { font-size: 26px; }
.tx-uni-card:hover .tx-uni-icon { transform: scale(1.10) rotate(-4deg); }

.tx-uni-body { flex: 1; }
.tx-uni-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 20px; font-weight: 700; color: #fff; margin: 0 0 4px;
    text-shadow: 0 1px 8px rgba(0,0,0,.20);
}
.tx-uni-sub { font-size: 12px; color: rgba(255,255,255,.80); margin: 0 0 8px; font-weight: 500; }
.tx-uni-tagline { font-size: 12.5px; color: rgba(255,255,255,.65); margin: 0; font-style: italic; line-height: 1.5; }

.tx-uni-foot {
    margin-top: 12px;
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.tx-uni-rotating {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 11px; color: rgba(255,255,255,.85);
    background: rgba(0,0,0,.22); padding: 4px 9px; border-radius: 999px;
    border: 1px solid rgba(255,255,255,.14); max-width: 68%; overflow: hidden;
    backdrop-filter: blur(4px);
}
.tx-uni-rotating .material-icons-round {
    font-size: 13px; color: var(--uni-accent, #e8d090);
    animation: tx-uni-pulse 1.5s ease-in-out infinite; flex-shrink: 0;
}
@keyframes tx-uni-pulse { 0%,100% { opacity: .5; transform: scale(.9); } 50% { opacity: 1; transform: scale(1.1); } }
.tx-uni-rot-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.tx-uni-fade-in { animation: tx-uni-text-fade .5s ease; }
@keyframes tx-uni-text-fade { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.tx-uni-play {
    width: 34px; height: 34px; border-radius: 50%;
    background: rgba(255,255,255,.92); color: var(--uni-accent, #c9a24a);
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 5px 14px rgba(0,0,0,.28); flex-shrink: 0;
    transition: transform .35s, box-shadow .35s;
}
.tx-uni-play .material-icons-round { font-size: 20px; }
.tx-uni-card:hover .tx-uni-play { transform: scale(1.10); box-shadow: 0 8px 20px rgba(0,0,0,.38); }

/* Ripple */
.tx-uni-ripple {
    position: absolute; inset: 0; border-radius: inherit;
    background: radial-gradient(circle at center, rgba(255,255,255,.40) 0%, transparent 60%);
    opacity: 0; transform: scale(.3); pointer-events: none; z-index: 1;
}
.tx-uni-card.tx-uni-clicked .tx-uni-ripple { animation: tx-uni-ripple-anim .7s ease-out; }
@keyframes tx-uni-ripple-anim { 0% { opacity: .8; transform: scale(.3); } 100% { opacity: 0; transform: scale(2.2); } }

/* -------- AUDIO COMPANION (aside card) -------- */
.tx-audio-companion { overflow: hidden; }
.tx-audio-companion-live {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 11px; font-weight: 700; color: var(--tx-accent);
    letter-spacing: .04em; text-transform: uppercase;
}
.tx-live-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: #e8a050;
    animation: tx-live-blink 1.6s ease-in-out infinite;
}
@keyframes tx-live-blink { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(.7); } }

.tx-audio-companion-cats {
    display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 12px;
}
.tx-ac-cat-btn {
    padding: 5px 11px; border-radius: 50px;
    border: 1px solid var(--tx-border); background: var(--tx-surface);
    color: var(--tx-muted); font-size: 12px; font-weight: 600;
    cursor: pointer; transition: all .25s;
}
.tx-ac-cat-btn.active,
.tx-ac-cat-btn:hover { background: rgba(212,165,116,.15); border-color: var(--tx-border-strong); color: var(--tx-accent); }

.tx-audio-companion-list { display: flex; flex-direction: column; gap: 6px; min-height: 80px; }

.tx-ac-loading { display: flex; justify-content: center; padding: 18px; }
.tx-spinner {
    width: 22px; height: 22px; border-radius: 50%;
    border: 2.5px solid rgba(212,165,116,.15);
    border-top-color: var(--tx-accent);
    animation: tx-spin .8s linear infinite;
}
@keyframes tx-spin { to { transform: rotate(360deg); } }

.tx-ac-track {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: 12px;
    background: var(--tx-surface); border: 1px solid var(--tx-border);
    cursor: pointer; transition: background .25s, transform .25s;
    color: var(--tx-text);
    animation: tx-chip-in .4s both; animation-delay: var(--track-delay, 0ms);
}
.tx-ac-track:hover { background: rgba(212,165,116,.12); transform: translateX(3px); }
.tx-ac-track-icon {
    width: 34px; height: 34px; flex-shrink: 0; border-radius: 9px;
    background: linear-gradient(135deg, var(--tx-accent-soft), var(--tx-accent));
    display: flex; align-items: center; justify-content: center;
    color: #fff;
}
.tx-ac-track-icon .material-icons-round { font-size: 17px; }
.tx-ac-track-name { font-size: 13px; font-weight: 600; flex: 1; min-width: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-ac-track-meta { font-size: 11px; color: var(--tx-muted); }
.tx-ac-track-play { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
    background: var(--tx-surface-hi); border: 1px solid var(--tx-border);
    display: flex; align-items: center; justify-content: center;
    color: var(--tx-accent); transition: background .25s, transform .25s; }
.tx-ac-track:hover .tx-ac-track-play { background: rgba(212,165,116,.20); transform: scale(1.08); }
.tx-ac-track-play .material-icons-round { font-size: 16px; }

.tx-audio-companion-more {
    display: flex; align-items: center; gap: 6px;
    margin-top: 10px; padding: 8px 12px;
    border-radius: 10px; text-decoration: none;
    background: var(--tx-surface); border: 1px solid var(--tx-border);
    color: var(--tx-muted); font-size: 12.5px; font-weight: 500;
    transition: color .25s, background .25s;
}
.tx-audio-companion-more:hover { color: var(--tx-accent); background: rgba(212,165,116,.10); }
.tx-audio-companion-more .material-icons-round { font-size: 16px; }

/* Responsive */
@media (max-width: 700px) {
    .tx-uni-grid { grid-template-columns: 1fr 1fr; gap: 11px; }
    .tx-uni-card { min-height: 180px; padding: 16px 14px 12px; }
    .tx-uni-title { font-size: 17px; }
    .tx-day-banner { flex-wrap: wrap; }
    .tx-day-banner-cta { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .tx-uni-card, .tx-uni-glow, .tx-dds-chip, .tx-day-banner,
    .tx-uni-rotating .material-icons-round, .tx-dds-label .material-icons-round { animation: none !important; }
    .tx-uni-card { opacity: 1; transform: none; }
}
/* ----------------------------------------------------------------
   ANIMATIONS & HARMONIE  v8  (appended, non-destructif)
   Palette chaude unifie : or #D4A574 ? or ple #E8C9A0 ? brun #A07C52
---------------------------------------------------------------- */

/* -- 1. Entrance animations ------------------------------------- */
@keyframes txFadeUp   { from { opacity:0; transform:translateY(32px);  } to { opacity:1; transform:translateY(0); }  }
@keyframes txFadeLeft { from { opacity:0; transform:translateX(28px);  } to { opacity:1; transform:translateX(0); } }
@keyframes txZoomIn   { from { opacity:0; transform:scale(.88);        } to { opacity:1; transform:scale(1); }       }

/* Hero section */
.tx-hero-eyebrow { animation: txFadeUp .55s cubic-bezier(.2,.7,.3,1) .05s both; }
.tx-hero-title   { animation: txFadeUp .62s cubic-bezier(.2,.7,.3,1) .13s both; }
.tx-hero-sub     { animation: txFadeUp .60s cubic-bezier(.2,.7,.3,1) .20s both; }
.tx-hero-kpis    { animation: txFadeUp .60s cubic-bezier(.2,.7,.3,1) .28s both; }

/* Universe section */
.tx-day-banner:not([hidden]) { animation: txFadeUp .70s cubic-bezier(.2,.7,.3,1) .10s both; }
.tx-dhikr-day-strip  { animation: txFadeUp .60s cubic-bezier(.2,.7,.3,1) .18s both; }
.tx-uni-section-head { animation: txFadeUp .55s cubic-bezier(.2,.7,.3,1) .22s both; }

/* Main cards */
.tx-counter-card { animation: txFadeUp .72s cubic-bezier(.2,.7,.3,1) .18s both; }
.tx-stats-card   { animation: txFadeUp .72s cubic-bezier(.2,.7,.3,1) .30s both; }

/* Aside cards  cascade from top */
.tx-aside .tx-side-card:nth-child(1)  { animation: txFadeLeft .65s cubic-bezier(.2,.7,.3,1) .20s both; }
.tx-aside .tx-side-card:nth-child(2)  { animation: txFadeLeft .65s cubic-bezier(.2,.7,.3,1) .28s both; }
.tx-aside .tx-side-card:nth-child(3)  { animation: txFadeLeft .65s cubic-bezier(.2,.7,.3,1) .36s both; }
.tx-aside .tx-side-card:nth-child(4)  { animation: txFadeLeft .65s cubic-bezier(.2,.7,.3,1) .44s both; }
.tx-aside .tx-side-card:nth-child(5)  { animation: txFadeLeft .65s cubic-bezier(.2,.7,.3,1) .52s both; }
.tx-aside .tx-side-card:nth-child(6)  { animation: txFadeLeft .65s cubic-bezier(.2,.7,.3,1) .60s both; }
.tx-aside .tx-side-card:nth-child(7)  { animation: txFadeLeft .65s cubic-bezier(.2,.7,.3,1) .68s both; }
.tx-aside .tx-side-card:nth-child(8)  { animation: txFadeLeft .65s cubic-bezier(.2,.7,.3,1) .76s both; }
.tx-aside .tx-side-card:nth-child(9)  { animation: txFadeLeft .65s cubic-bezier(.2,.7,.3,1) .84s both; }
.tx-aside .tx-side-card:nth-child(10) { animation: txFadeLeft .65s cubic-bezier(.2,.7,.3,1) .92s both; }

/* -- 2. Ring  orbiting decoration ----------------------------- */
.tx-ring-wrap {
    position: relative;
    isolation: isolate;
}

/* Outer glow halo behind ring */
.tx-ring-wrap::after {
    content: "";
    position: absolute;
    width: calc(var(--tx-ring-size) + 90px);
    height: calc(var(--tx-ring-size) + 90px);
    top: 50%; left: 50%;
    border-radius: 50%;
    pointer-events: none;
    z-index: -2;
    background: radial-gradient(circle, rgba(212,165,116,.16) 0%, transparent 62%);
    animation: txHaloBreath 5s ease-in-out infinite;
}
@keyframes txHaloBreath {
    0%, 100% { transform: translate(-50%,-50%) scale(1);    opacity: .7; }
    50%       { transform: translate(-50%,-50%) scale(1.08); opacity: 1;  }
}

/* Rotating orbit ring (inner) */
.tx-ring-wrap::before {
    content: "";
    position: absolute;
    width: calc(var(--tx-ring-size) + 52px);
    height: calc(var(--tx-ring-size) + 52px);
    top: 50%; left: 50%;
    border-radius: 50%;
    border: 1.5px dashed rgba(212,165,116,.25);
    pointer-events: none;
    z-index: -1;
    animation: txOrbitSpin 24s linear infinite;
}
@keyframes txOrbitSpin {
    from { transform: translate(-50%,-50%) rotate(0deg);   }
    to   { transform: translate(-50%,-50%) rotate(360deg); }
}

/* -- 3. Ring  ambient breath + count bounce -------------------- */
/* Breathing glow on ring inner face */
.tx-ring::before {
    animation: txRingBreath 5s ease-in-out infinite;
}
/* When pulsing, use original pulse animation instead */
.tx-ring.tx-pulse::before {
    animation: txPulse .55s var(--ease, ease);
}
@keyframes txRingBreath {
    0%, 100% {
        box-shadow: 0 30px 80px -30px rgba(212,165,116,.45),
                    inset 0 1px 0 rgba(255,255,255,.06);
    }
    50% {
        box-shadow: 0 30px 80px -30px rgba(212,165,116,.78),
                    inset 0 1px 0 rgba(255,255,255,.10),
                    0 0 34px 6px rgba(212,165,116,.18);
    }
}

/* Count number bounces on tap */
.tx-ring.tx-pulse .tx-ring-count {
    animation: txCountBump .42s cubic-bezier(.2,.7,.3,1);
}
@keyframes txCountBump {
    0%   { transform: scale(1);    color: inherit; }
    40%  { transform: scale(1.20); color: var(--tx-accent); }
    70%  { transform: scale(.95);  }
    100% { transform: scale(1);    color: inherit; }
}

/* Percentage label floats in */
.tx-ring-pct { animation: txFadeUp .5s cubic-bezier(.2,.7,.3,1) .5s both; }

/* Ring entrance scale-in */
.tx-ring-wrap { animation: txZoomIn .90s cubic-bezier(.2,.7,.3,1) .32s both; }

/* Completion shimmer */
.tx-ring.tx-done .tx-ring-count {
    background: var(--tx-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: txDoneShimmer 2s linear infinite;
}
@keyframes txDoneShimmer {
    0%, 100% { filter: brightness(1);   }
    50%       { filter: brightness(1.25); }
}

/* -- 4. Counter card  decorative geometric watermark ---------- */
.tx-counter-card {
    overflow: hidden;
}
.tx-counter-card::before {
    content: "";
    position: absolute;
    width: 340px; height: 340px;
    border-radius: 50%;
    border: 1px solid rgba(212,165,116,.06);
    top: -80px; right: -80px;
    pointer-events: none;
    animation: txOrbitSpin 55s linear infinite;
}
.tx-counter-card::after {
    content: "";
    position: absolute;
    width: 220px; height: 220px;
    border-radius: 50%;
    border: 1px solid rgba(212,165,116,.08);
    bottom: -50px; left: -50px;
    pointer-events: none;
    animation: txOrbitSpin 40s linear infinite reverse;
}

/* -- 5. Light-mode color harmony -------------------------------- */
[data-theme="light"] .tx-counter-card {
    background: rgba(255, 249, 237, 0.80);
    border-color: rgba(182, 132, 74, 0.20);
    box-shadow:
        0 12px 44px -16px rgba(140, 100, 50, 0.16),
        inset 0 1px 0 rgba(255,255,255,.90);
}

[data-theme="light"] .tx-ring::before {
    background:
        radial-gradient(circle at 28% 22%, rgba(255,255,255,.75), transparent 52%),
        radial-gradient(circle at 74% 80%, rgba(212,165,116,.22), transparent 52%),
        rgba(255, 248, 232, 0.90);
    border-color: rgba(182, 132, 74, .38);
    box-shadow:
        0 24px 70px -24px rgba(140, 100, 50, .35),
        inset 0 1px 0 rgba(255,255,255,.92);
}

[data-theme="light"] .tx-ring::before {
    animation: txRingBreathLight 5s ease-in-out infinite;
}
[data-theme="light"] .tx-ring.tx-pulse::before {
    animation: txPulse .55s var(--ease, ease);
}
@keyframes txRingBreathLight {
    0%, 100% {
        box-shadow: 0 24px 70px -24px rgba(140,100,50,.30),
                    inset 0 1px 0 rgba(255,255,255,.90);
    }
    50% {
        box-shadow: 0 24px 70px -24px rgba(140,100,50,.55),
                    inset 0 1px 0 rgba(255,255,255,.95),
                    0 0 36px 8px rgba(212,165,116,.20);
    }
}

[data-theme="light"] .tx-ring-count  { color: #2e1e08; }
[data-theme="light"] .tx-ring-target { color: #8a6030; }

[data-theme="light"] .tx-ring-wrap::after {
    background: radial-gradient(circle, rgba(200,140,60,.20) 0%, transparent 60%);
}
[data-theme="light"] .tx-ring-wrap::before {
    border-color: rgba(160, 100, 40, .22);
}

[data-theme="light"] .tx-dhikr-btn {
    background: rgba(255, 248, 228, 0.90);
    border-color: rgba(182, 132, 74, .28);
}
[data-theme="light"] .tx-dhikr-btn:hover {
    background: rgba(255, 241, 208, 0.96);
    border-color: rgba(182, 132, 74, .55);
}

[data-theme="light"] .tx-side-card {
    background: rgba(255, 249, 237, 0.75);
    border-color: rgba(182, 132, 74, .14);
    box-shadow:
        0 8px 28px -12px rgba(140, 100, 50, .12),
        inset 0 1px 0 rgba(255,255,255,.82);
}

[data-theme="light"] .tx-ctrl {
    background: rgba(255, 249, 237, 0.85);
    border-color: rgba(182, 132, 74, .20);
    color: #5a3e20;
}
[data-theme="light"] .tx-ctrl:hover {
    background: rgba(255, 243, 218, 0.95);
    border-color: rgba(182, 132, 74, .45);
    color: var(--tx-accent-deep);
}

[data-theme="light"] .tx-stats-card {
    background: rgba(255, 249, 237, 0.80);
    border-color: rgba(182, 132, 74, .16);
}

/* Chart bars in light mode */
[data-theme="light"] .tx-chart-bar { box-shadow: 0 6px 14px -8px rgba(160,100,40,.45); }

/* Calendar */
[data-theme="light"] .tx-cal-cell[data-level="1"] { background: rgba(212,165,116,.30); }
[data-theme="light"] .tx-cal-cell[data-level="2"] { background: rgba(212,165,116,.55); }
[data-theme="light"] .tx-cal-cell[data-level="3"] { background: rgba(180,120,60,.75);  }
[data-theme="light"] .tx-cal-cell[data-level="4"] { background: var(--tx-grad);         }

/* -- 6. Dhikr strip  light mode ------------------------------- */
[data-theme="light"] .tx-dds-chip {
    background: rgba(255, 248, 228, 0.92);
    border-color: rgba(182, 132, 74, .28);
    color: #3d2808;
}
[data-theme="light"] .tx-dds-chip:hover {
    background: rgba(255, 237, 195, 0.98);
    border-color: rgba(182, 132, 74, .55);
    box-shadow: 0 6px 18px rgba(160,100,40,.18);
}
[data-theme="light"] .tx-dds-chip-ar  { color: var(--tx-accent-deep); }
[data-theme="light"] .tx-dds-chip-tr  { color: #a07c52; }

/* -- 7. Universe section  light mode harmony ------------------ */
[data-theme="light"] .tx-universe {
    position: relative;
}
[data-theme="light"] .tx-universe::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(900px 400px at 20% 50%, rgba(212,165,116,.08), transparent 60%),
        radial-gradient(600px 300px at 80% 30%, rgba(122,162,247,.06), transparent 60%);
    pointer-events: none;
}

[data-theme="light"] .tx-uni-head-text h2 { color: #2e1e08; }
[data-theme="light"] .tx-uni-section-head p { color: #8a6030; }

/* Card shadow in light mode */
[data-theme="light"] .tx-uni-card {
    box-shadow: 0 12px 36px -12px rgba(0,0,0,.30), inset 0 1px 0 rgba(255,255,255,.18);
}
[data-theme="light"] .tx-uni-card:hover {
    box-shadow: 0 22px 54px -16px rgba(0,0,0,.38), 0 0 0 1px var(--uni-accent);
}

/* -- 8. Progress bar animated load ----------------------------- */
@keyframes txBarIn { from { transform: scaleX(0); } }
.tx-bar-fill    { transform-origin: left; }

/* -- 9. Program cards micro-interaction ----------------------- */
.tx-program { position: relative; overflow: hidden; }
.tx-program::after {
    content: "";
    position: absolute;
    inset: 0; border-radius: inherit;
    background: linear-gradient(90deg, transparent 0%, rgba(212,165,116,.08) 50%, transparent 100%);
    transform: translateX(-100%);
    transition: transform .5s ease;
    pointer-events: none;
}
.tx-program:hover::after { transform: translateX(100%); }

/* -- 10. KPI cards pulse glow on hover ------------------------- */
.tx-kpi {
    transition: transform .25s cubic-bezier(.2,.7,.3,1), box-shadow .25s;
}
.tx-kpi:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 10px 24px -10px rgba(212,165,116,.28);
    border-color: var(--tx-border-strong);
}

/* -- 11. Scrollbar warm tint ------------------------------------ */
[data-theme="light"] .tx-history::-webkit-scrollbar-track  { background: rgba(240,230,210,.6); }
[data-theme="light"] .tx-history::-webkit-scrollbar-thumb  { background: rgba(182,132,74,.35); border-radius: 4px; }
[data-theme="light"] .tx-history::-webkit-scrollbar-thumb:hover { background: rgba(182,132,74,.60); }

/* -- 12. Audio companion light --------------------------------- */
[data-theme="light"] .tx-ac-track {
    background: rgba(255, 248, 228, 0.80);
    border-color: rgba(182,132,74,.18);
}
[data-theme="light"] .tx-ac-track:hover {
    background: rgba(255, 238, 198, 0.95);
}
[data-theme="light"] .tx-ac-cat-btn {
    background: rgba(255,248,228,.80);
    border-color: rgba(182,132,74,.22);
    color: #7a5a30;
}
[data-theme="light"] .tx-ac-cat-btn.active,
[data-theme="light"] .tx-ac-cat-btn:hover {
    background: rgba(212,165,116,.18);
    border-color: rgba(182,132,74,.50);
    color: var(--tx-accent-deep);
}
[data-theme="light"] .tx-audio-companion-more {
    background: rgba(255,248,228,.80);
    border-color: rgba(182,132,74,.18);
    color: #8a6030;
}
[data-theme="light"] .tx-audio-companion-more:hover {
    background: rgba(212,165,116,.15);
    color: var(--tx-accent-deep);
}

/* -- 13. Background ambient orbs on page ---------------------- */
.page-tasbih-v2 {
    position: relative;
}
.page-tasbih-v2::before {
    content: "";
    position: fixed;
    width: 500px; height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212,165,116,.07) 0%, transparent 70%);
    top: 10%; left: -15%;
    pointer-events: none;
    animation: txAmbOrb1 18s ease-in-out infinite;
    z-index: 0;
}
.page-tasbih-v2::after {
    content: "";
    position: fixed;
    width: 400px; height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(122,162,247,.05) 0%, transparent 70%);
    bottom: 15%; right: -12%;
    pointer-events: none;
    animation: txAmbOrb2 22s ease-in-out infinite;
    z-index: 0;
}
@keyframes txAmbOrb1 {
    0%, 100% { transform: translate(0, 0)  scale(1); }
    33%       { transform: translate(40px, 30px) scale(1.1); }
    66%       { transform: translate(-20px, 50px) scale(.95); }
}
@keyframes txAmbOrb2 {
    0%, 100% { transform: translate(0, 0)  scale(1); }
    40%       { transform: translate(-35px, -25px) scale(1.08); }
    70%       { transform: translate(20px, -45px)  scale(.96); }
}

/* -- 14. Reduce motion ------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    .tx-hero-eyebrow, .tx-hero-title, .tx-hero-sub, .tx-hero-kpis,
    .tx-counter-card, .tx-stats-card, .tx-side-card,
    .tx-dhikr-day-strip, .tx-uni-section-head, .tx-day-banner,
    .tx-ring-wrap, .tx-ring-pct,
    .tx-ring::before, .tx-ring.tx-pulse .tx-ring-count,
    .tx-ring-wrap::before, .tx-ring-wrap::after,
    .tx-counter-card::before, .tx-counter-card::after,
    .page-tasbih-v2::before, .page-tasbih-v2::after {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}
/* ----------------------------------------------------------------
   CITATION DU JOUR + DHIKR RAPIDE  v9
---------------------------------------------------------------- */

/* -- Citation du jour ------------------------------------------- */
.tx-quote-card {
    overflow: hidden;
}
.tx-quote-card::before {
    content: "\201C";
    position: absolute;
    top: -10px; left: 14px;
    font-size: 120px;
    font-family: Georgia, serif;
    line-height: 1;
    color: var(--tx-accent);
    opacity: .08;
    pointer-events: none;
    user-select: none;
}

.tx-quote-body {
    min-height: 110px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 8px 0 6px;
    transition: opacity .4s, transform .4s;
}
.tx-quote-body.tx-quote-fade {
    opacity: 0;
    transform: translateY(8px);
}

.tx-quote-ar {
    font-family: var(--font-arabic, 'Scheherazade New', 'Amiri', serif);
    font-size: 1.45rem;
    line-height: 1.8;
    color: var(--tx-accent-soft);
    text-align: right;
    padding: 10px 14px;
    background: rgba(212,165,116,.07);
    border-right: 3px solid var(--tx-accent);
    border-radius: 0 10px 10px 0;
}
[data-theme="light"] .tx-quote-ar {
    color: var(--tx-accent-deep);
    background: rgba(212,165,116,.10);
}

.tx-quote-fr {
    font-size: .96rem;
    line-height: 1.65;
    color: var(--tx-text);
    font-style: italic;
}

.tx-quote-source {
    font-size: .78rem;
    color: var(--tx-accent);
    font-weight: 700;
    letter-spacing: .04em;
    display: flex;
    align-items: center;
    gap: 5px;
}
.tx-quote-source::before {
    content: "";
    display: inline-block;
    width: 18px; height: 2px;
    background: var(--tx-accent);
    border-radius: 2px;
    flex-shrink: 0;
}

/* Dot indicator */
.tx-quote-dots {
    display: flex;
    gap: 5px;
    justify-content: center;
    margin-top: 10px;
}
.tx-quote-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--tx-line);
    cursor: pointer;
    transition: background .25s, transform .25s;
    border: none;
}
.tx-quote-dot.active {
    background: var(--tx-accent);
    transform: scale(1.35);
}

/* -- Dhikr rapide grid ------------------------------------------ */
.tx-quick-dhikr-card {}

.tx-qd-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

.tx-qd-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 14px 14px 10px;
    background: var(--tx-surface-hi);
    border: 1px solid var(--tx-border);
    border-radius: 14px;
    cursor: pointer;
    text-align: left;
    overflow: hidden;
    transition: transform .28s cubic-bezier(.2,.7,.3,1), border-color .25s, box-shadow .25s;
    -webkit-tap-highlight-color: transparent;
}
.tx-qd-btn:hover {
    transform: translateY(-3px) scale(1.02);
    border-color: var(--tx-border-strong);
    box-shadow: 0 8px 22px -10px rgba(212,165,116,.25);
}
.tx-qd-btn:active { transform: scale(.96); }

/* Color accents per dhikr */
.tx-qd-btn[data-color="emerald"]  { --qd-c: #5EC9A6; }
.tx-qd-btn[data-color="gold"]     { --qd-c: #D4A574; }
.tx-qd-btn[data-color="rose"]     { --qd-c: #E08FB1; }
.tx-qd-btn[data-color="sapphire"] { --qd-c: #7AA2F7; }
.tx-qd-btn[data-color="violet"]   { --qd-c: #B48EF5; }
.tx-qd-btn[data-color="amber"]    { --qd-c: #E8B84B; }

.tx-qd-btn::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 3px; height: 100%;
    background: var(--qd-c, var(--tx-accent));
    border-radius: 0 2px 2px 0;
    transition: width .3s;
}
.tx-qd-btn:hover::before { width: 5px; }

/* Ripple on click */
.tx-qd-btn::after {
    content: "";
    position: absolute;
    inset: 0; border-radius: inherit;
    background: radial-gradient(circle at center, rgba(255,255,255,.22) 0%, transparent 65%);
    opacity: 0; transform: scale(.3); pointer-events: none;
}
.tx-qd-btn.tx-qd-tapped::after {
    animation: txQdRipple .55s ease-out;
}
@keyframes txQdRipple {
    0%   { opacity: .8; transform: scale(.3); }
    100% { opacity: 0;  transform: scale(2.2); }
}

.tx-qd-ar {
    font-family: var(--font-arabic, 'Scheherazade New', 'Amiri', serif);
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--qd-c, var(--tx-accent));
    width: 100%;
    text-align: right;
    direction: rtl;
}
.tx-qd-tr {
    font-size: .78rem;
    font-weight: 600;
    color: var(--tx-text);
}
.tx-qd-n {
    font-size: .73rem;
    color: var(--tx-muted);
    margin-top: 1px;
}

/* Live tap counter badge */
.tx-qd-count {
    position: absolute;
    top: 9px; right: 10px;
    min-width: 24px; height: 24px;
    border-radius: 999px;
    padding: 0 6px;
    background: var(--qd-c, var(--tx-accent));
    color: #fff;
    font-size: .76rem;
    font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    opacity: 0;
    transform: scale(.6);
    transition: opacity .25s, transform .35s cubic-bezier(.2,.7,.3,1);
    pointer-events: none;
    font-variant-numeric: tabular-nums;
}
.tx-qd-btn.tx-qd-active .tx-qd-count {
    opacity: 1;
    transform: scale(1);
}
.tx-qd-bump { animation: txQdBump .35s cubic-bezier(.2,.7,.3,1); }
@keyframes txQdBump {
    0%   { transform: scale(1);    }
    45%  { transform: scale(1.35); }
    100% { transform: scale(1);    }
}

.tx-qd-hint {
    font-size: .76rem;
    color: var(--tx-muted);
    margin: 4px 0 0;
    text-align: center;
}

[data-theme="light"] .tx-qd-btn {
    background: rgba(255,249,237,.85);
    border-color: rgba(182,132,74,.16);
}
[data-theme="light"] .tx-qd-btn:hover {
    background: rgba(255,243,218,.95);
    border-color: rgba(182,132,74,.40);
}
/* ----------------------------------------------------------------
   VERSET DU JOUR  v10
---------------------------------------------------------------- */
.tx-verse-card {
    background:
        linear-gradient(135deg, rgba(212,165,116,.10) 0%, rgba(212,165,116,.02) 100%),
        var(--tx-surface);
    border-color: var(--tx-border-strong);
    overflow: hidden;
}

/* Decorative arabesque watermark */
.tx-verse-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'%3E%3Ccircle cx='100' cy='100' r='80' fill='none' stroke='rgba(212,165,116,0.07)' stroke-width='1'/%3E%3Ccircle cx='100' cy='100' r='60' fill='none' stroke='rgba(212,165,116,0.05)' stroke-width='1'/%3E%3Ccircle cx='100' cy='100' r='40' fill='none' stroke='rgba(212,165,116,0.04)' stroke-width='1'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right -40px top -40px;
    background-size: 260px 260px;
    pointer-events: none;
    opacity: .7;
}

[data-theme="light"] .tx-verse-card {
    background:
        linear-gradient(135deg, rgba(255,245,220,.90) 0%, rgba(255,249,237,.80) 100%);
    border-color: rgba(182,132,74,.30);
    box-shadow: 0 10px 36px -16px rgba(140,100,50,.18), inset 0 1px 0 rgba(255,255,255,.9);
}

/* Body */
.tx-verse-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 8px 0 14px;
    transition: opacity .45s, transform .45s;
}
.tx-verse-body.tx-verse-fade {
    opacity: 0;
    transform: translateY(10px);
}

/* Arabic text  the centrepiece */
.tx-verse-ar {
    font-family: var(--font-arabic, 'Scheherazade New', 'Amiri', serif);
    font-size: clamp(1.55rem, 3vw, 2rem);
    line-height: 2.0;
    color: var(--tx-accent-soft);
    text-align: center;
    padding: 22px 20px;
    background: rgba(212,165,116,.06);
    border-top: 1px solid var(--tx-border-strong);
    border-bottom: 1px solid var(--tx-border-strong);
    border-radius: 12px;
    letter-spacing: .03em;
    word-spacing: .12em;
    position: relative;
}
[data-theme="light"] .tx-verse-ar {
    color: #5a3008;
    background: rgba(212,165,116,.10);
    border-color: rgba(182,132,74,.25);
}

/* Ornamental corners */
.tx-verse-ar::before,
.tx-verse-ar::after {
    content: "?";
    position: absolute;
    font-size: 1rem;
    color: var(--tx-accent);
    opacity: .45;
}
.tx-verse-ar::before { top: 8px;  left: 12px; }
.tx-verse-ar::after  { bottom: 8px; right: 12px; transform: scaleX(-1); }

/* French translation */
.tx-verse-fr {
    font-size: .97rem;
    line-height: 1.72;
    color: var(--tx-text);
    padding: 0 4px;
}
[data-theme="light"] .tx-verse-fr { color: #2e1e08; }

/* Reference badge */
.tx-verse-ref {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .78rem;
    font-weight: 700;
    color: var(--tx-accent);
    letter-spacing: .06em;
    text-transform: uppercase;
}
.tx-verse-ref::before {
    content: "";
    display: inline-block;
    width: 22px; height: 2px;
    background: linear-gradient(90deg, var(--tx-accent), transparent);
    border-radius: 2px;
}

/* CTA button */
.tx-verse-action { margin-top: 4px; }
.tx-verse-dhikr-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 12px 18px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(212,165,116,.16), rgba(212,165,116,.06));
    border: 1px solid var(--tx-border-strong);
    color: var(--tx-accent-soft);
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .28s, transform .28s cubic-bezier(.2,.7,.3,1), box-shadow .28s;
    justify-content: center;
}
.tx-verse-dhikr-cta:hover {
    background: linear-gradient(135deg, rgba(212,165,116,.28), rgba(212,165,116,.12));
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -8px rgba(212,165,116,.30);
    color: var(--tx-accent-soft);
}
.tx-verse-dhikr-cta .material-icons-round { font-size: 20px; }

[data-theme="light"] .tx-verse-dhikr-cta {
    color: var(--tx-accent-deep);
    background: rgba(212,165,116,.14);
    border-color: rgba(182,132,74,.35);
}
[data-theme="light"] .tx-verse-dhikr-cta:hover {
    background: rgba(212,165,116,.26);
}

/* Entrance */
.tx-verse-card { animation: txFadeUp .72s cubic-bezier(.2,.7,.3,1) .40s both; }
/* ─── Dhikr badge — premium pill with live indicator ─── */
.dhikr-badge{
  display:inline-flex !important;
  align-items:center;
  gap:10px;

  padding:8px 18px !important;

  border-radius:999px !important;

  background:linear-gradient(180deg, #faf6ed, #f2e6c9) !important;
  border:1px solid rgba(180,140,60,.25) !important;

  box-shadow:0 4px 14px rgba(0,0,0,.05) !important;

  font-family:system-ui, -apple-system, 'Inter', sans-serif;

  width:auto !important;
  max-width:none;

  transition:transform .2s ease, box-shadow .2s ease;
}

.dhikr-badge:hover{
  transform:translateY(-1px);
  box-shadow:0 8px 22px rgba(0,0,0,.08) !important;
}

/* Live dot (green pulse) */
.dhikr-live-dot{
  width:8px;
  height:8px;
  border-radius:50%;

  background:#22c55e;

  box-shadow:0 0 0 rgba(34,197,94,.7);

  animation:dhikrLivePulse 2s infinite;
  flex:none;
}

@keyframes dhikrLivePulse{
  0%   { box-shadow:0 0 0 0   rgba(34,197,94,.7); }
  70%  { box-shadow:0 0 0 6px rgba(34,197,94,0); }
  100% { box-shadow:0 0 0 0   rgba(34,197,94,0); }
}

@media (prefers-reduced-motion: reduce){
  .dhikr-live-dot{ animation:none; }
  .dhikr-badge:hover{ transform:none; }
}

/* Text container */
.dhikr-text{
  display:flex;
  align-items:center;
  gap:6px;

  font-size:13px;
  letter-spacing:.08em;
  text-transform:uppercase;

  color:#4b5563;
}

/* Arabic — elegant, no uppercase */
.dhikr-ar{
  font-family:'Amiri','Noto Naskh Arabic','Scheherazade New',serif;
  font-size:15px;
  direction:rtl;
  text-transform:none;
  letter-spacing:normal;
  color:#6b4a1e;
  font-weight:400;
}

.dhikr-fr,
.dhikr-en{
  font-weight:600;
}

.dhikr-sep{
  opacity:.5;
  font-weight:400;
}

/* Hide any legacy tx-dot if present alongside */
.dhikr-badge .tx-dot{ display:none !important; }

/* Mobile */
@media (max-width: 520px){
  .dhikr-badge{ padding:7px 14px !important; gap:8px; }
  .dhikr-text{ font-size:12px; gap:5px; }
  .dhikr-ar{ font-size:14px; }
}

/* Dark theme */
[data-theme="dark"] .dhikr-badge{
  background:linear-gradient(180deg, #2c2010, #1d150a) !important;
  border-color:rgba(212,165,80,.3) !important;
  box-shadow:0 4px 14px rgba(0,0,0,.4) !important;
}
[data-theme="dark"] .dhikr-text{ color:#cbd5e1; }
[data-theme="dark"] .dhikr-ar{ color:#f0d68f; }

/* TASBIH-NOOR-AUDIO-V1 */
.tx-noor-actions .tx-btn-noor {
    display:inline-flex;align-items:center;gap:6px;
    padding:9px 12px;background:#ffffff;
    border:1px solid rgba(139,106,63,.18);border-radius:12px;
    color:#4a3a28;font-weight:600;font-size:.85rem;
    cursor:pointer;transition:transform .25s ease,box-shadow .25s ease,border-color .25s,background .25s;
}
.tx-noor-actions .tx-btn-noor .material-icons-round{font-size:16px;color:var(--tx-accent,#8b6a3f);}
.tx-noor-actions .tx-btn-noor:hover{transform:translateY(-2px);border-color:rgba(139,106,63,.45);box-shadow:0 8px 22px rgba(139,106,63,.18);background:linear-gradient(135deg,#fff,#fbf3e6);}
[data-theme="dark"] .tx-noor-actions .tx-btn-noor{background:rgba(36,52,80,.85);border-color:rgba(212,165,116,.22);color:#f0e6d6;}
[data-theme="dark"] .tx-noor-actions .tx-btn-noor:hover{background:rgba(212,165,116,.18);border-color:rgba(212,165,116,.5);}
.tx-ac-track{opacity:0;transform:translateY(8px);animation:txAcIn .42s cubic-bezier(.22,1,.36,1) forwards;animation-delay:var(--track-delay,0ms);}
@keyframes txAcIn{to{opacity:1;transform:translateY(0);}}
.tx-ac-track-info{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px;}
.tx-ac-track-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.tx-ac-track-meta{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.tx-ac-emoji{font-size:18px;line-height:1;}
.tx-ac-track-icon{transition:transform .3s cubic-bezier(.34,1.56,.64,1);}
.tx-ac-track:hover .tx-ac-track-icon{transform:scale(1.1) rotate(-6deg);}
