/* Generated from css/home.css by tools/rtl/gen.js (rtlcss) — do not edit */
/* ═══════════════════════════════════════════
   HOMEPAGE — PrayerTime Dashboard
   Premium card-based layout with theme integration
   Uses shared --t-* variables from theme.css
   ═══════════════════════════════════════════ */

/* ─── Homepage body ─── */
body.home-page {
    background: var(--t-bg);
    color: var(--t-text);
    font-family: 'Inter', sans-serif;
    transition: background 0.35s, color 0.35s;
    margin: 0;
    padding: 0;
    min-height: 100dvh;
}

/* ─── Hero uses dynamic sky background — no per-theme gradients needed ─── */

/* ─── Main container ─── */
.home-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 80px 24px 48px;
    box-sizing: border-box;
}

/* ─── Grid layout ─── */
.home-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

/* Span helpers */
.h-span-2 { grid-column: span 2; }
.h-span-1 { grid-column: span 1; }

/* ─── Base card ─── */
.h-card {
    border-radius: 24px;
    padding: 32px;
    position: relative;
    overflow: hidden;
    transition: background 0.35s, border-color 0.35s, box-shadow 0.3s, transform 0.3s;
    display: flex;
    flex-direction: column;
}

.h-card-light {
    background: var(--t-card);
    border: 1px solid var(--t-border);
}
.h-card-light:hover {
    box-shadow: var(--t-shadow);
    transform: translateY(-2px);
}

/* ─── Section labels ─── */
.h-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--t-text-dim);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}
.h-label svg {
    width: 16px;
    height: 16px;
    opacity: 0.6;
}

/* ═══════════════════════════════════════════
   CARD 1: HERO — Prayer Countdown
   ═══════════════════════════════════════════ */
.h-hero {
    color: #fff;
    padding: 40px 48px;
    min-height: 320px;
    justify-content: space-between;
    border: none;
    background: #020205; /* fallback before sky layers load */
}

/* Dynamic sky background container */
.h-hero-bg {
    position: absolute;
    inset: 0;
    border-radius: 24px;
    overflow: hidden;
    z-index: 0;
}

/* Individual sky layers */
.h-hero-layer {
    position: absolute;
    inset: 0;
    opacity: 0;
    will-change: opacity;
    pointer-events: none;
    transition: opacity 1.5s ease;
}

#h-bg-night { background: linear-gradient(to bottom, #020205 0%, #0d0d26 100%); }
#h-bg-stars { z-index: 1; }
#h-starsCanvas { width: 100%; height: 100%; display: block; }
#h-bg-dawn  { background: linear-gradient(to bottom, #0d1236 0%, #3d204a 50%, #d46b57 100%); }
#h-bg-day   { background: linear-gradient(to bottom, #0b2e59 0%, #2e74b5 100%); }
#h-bg-dusk  { background: linear-gradient(to bottom, #0f1533 0%, #3a1a3b 40%, #b34233 80%, #e68a45 100%); }

.h-hero-ring {
    position: absolute;
    left: -80px;
    top: -120px;
    width: 360px;
    height: 360px;
    border: 40px solid rgba(255, 255, 255, 0.04);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}

/* Three-zone flex layout for hero card content */
.h-hero-body {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    flex: 1;
    height: 100%;
}

.h-hero-top-row {
    flex: 0 0 auto;
}

.h-hero-meta {
    flex: 0 0 auto;
    margin-top: auto;
}

.h-hero-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.55);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
    font-size: 15px;
}

.h-hero-location {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 5px 8px 5px 10px;
    backdrop-filter: blur(4px);
    white-space: nowrap;
    transition: color 0.3s, background 0.2s;
    cursor: pointer;
    user-select: none;
}
.h-hero-location:hover {
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.85);
}
.h-hero-location svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    color: #10b981;
    transition: color 0.3s;
}
.h-hero-location.locating #h-hero-loc-icon {
    animation: spin 1s linear infinite;
    color: rgba(255,255,255,0.5);
}
.h-hero-label svg {
    width: 18px;
    height: 18px;
    color: #ffcc00;
}

.h-hero-countdown {
    display: flex;
    align-items: center;   /* vertically centres the inner row */
    justify-content: flex-start;
    flex: 1 1 auto;
    margin: 2rem 0;
}

.h-hero-countdown-inner {
    display: flex;
    align-items: flex-end; /* units sit at the bottom of the numbers */
    gap: 4px;
    flex-wrap: wrap;
}
.h-hero-num {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(88px, 14vw, 148px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -4px;
    background: linear-gradient(-180deg, #fff 30%, rgba(255, 255, 255, 0.45));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.h-hero-unit {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(44px, 6vw, 68px);
    font-weight: 300;
    color: rgba(255, 255, 255, 0.45);
    margin-left: 24px;
}

/* Minutes + seconds group */
.h-hero-min-sec {
    position: relative;
    display: inline-flex;
    align-items: baseline;
}
.h-hero-min-sec .h-hero-unit {
    margin-left: 0;
}
.h-hero-sec {
    position: absolute;
    top: 0;
    left: 0;
    transform: translateY(-190%);
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(16px, 2.2vw, 24px);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 1px;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.h-hero-meta {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
}

.h-hero-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.82);
}

.h-hero-icon .h-icon-mask {
    width: 42px;
    height: 42px;
}

.h-hero-meta-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.h-hero-meta-time {
    text-align: right;
}

.h-hero-meta-sep {
    width: 1px;
    height: 36px;
    background: rgba(255, 255, 255, 0.3);
    opacity: 0.55;
    flex-shrink: 0;
}

.h-hero-meta-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
}

.h-hero-meta-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(20px, 2vw, 28px);
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #fff;
}

.h-hero-meta.h-hero-prayer-fajr .h-hero-icon,
.h-hero-meta.h-hero-prayer-isha .h-hero-icon {
    color: #b59af6;
}

.h-hero-meta.h-hero-prayer-dhuhr .h-hero-icon,
.h-hero-meta.h-hero-prayer-asr .h-hero-icon {
    color: #f4c542;
}

.h-hero-meta.h-hero-prayer-sunrise .h-hero-icon,
.h-hero-meta.h-hero-prayer-maghrib .h-hero-icon {
    color: #f28b30;
}

.h-hero-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.2s;
}
.h-hero-link:hover { color: #fff; }
.h-hero-link svg {
    width: 14px;
    height: 14px;
    transition: transform 0.2s;
}
.h-hero-link:hover svg { transform: translateX(-3px); }


/* ═══════════════════════════════════════════
   LEFT COLUMN WRAPPER: hero + prayer bar
   ═══════════════════════════════════════════ */
.h-hero-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
    min-height: 0;
}

.h-hero-col .h-hero {
    flex: 1 1 auto;
    min-height: 0;
}

/* ═══════════════════════════════════════════
   PRAYER BAR — full-width horizontal strip
   (below hero + calendar row)
   ═══════════════════════════════════════════ */
.h-prayer-bar {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(120px, 1fr);
    gap: 12px;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--t-scroll, rgba(0,0,0,0.15)) transparent;
    padding-bottom: 4px;
}

.h-prayer-bar::-webkit-scrollbar { height: 4px; }
.h-prayer-bar::-webkit-scrollbar-track { background: transparent; }
.h-prayer-bar::-webkit-scrollbar-thumb {
    background: var(--t-scroll, rgba(0,0,0,0.15));
    border-radius: 999px;
}

/* Individual prayer card inside the bar */
.h-pcard {
    display: grid;
    grid-template-rows: auto 1fr auto auto;
    row-gap: 8px;
    align-content: stretch;
    min-height: 120px;
    padding: 14px 14px 12px;
    border-radius: 20px;
    background: none;
    border: 1px solid transparent;
    transition: transform 0.2s, box-shadow 0.2s;
    scroll-snap-align: start;
    text-decoration: none;
    color: inherit;
}

.h-pcard:hover {
    transform: translateY(-2px);
    box-shadow: var(--t-shadow);
}

.h-pcard-name {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--t-text-dim);
}

.h-pcard-icon {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    align-self: stretch;
}

.h-pcard-icon svg {
    width: 24px;
    height: 24px;
    color: var(--t-text-dim);
    opacity: 0.5;
}

.h-pcard-icon .h-icon-mask {
    width: 24px;
    height: 24px;
}

.h-icon-mask {
    display: inline-block;
    flex-shrink: 0;
    background-color: currentColor;
    color: inherit;
    opacity: inherit;
    -webkit-mask-position: center;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-position: center;
    mask-repeat: no-repeat;
    mask-size: contain;
}

.h-icon-mask-maghrib {
    -webkit-mask-image: url('../../assets/icon/sunset.svg');
    mask-image: url('../../assets/icon/sunset.svg');
}

.h-icon-mask-isha {
    -webkit-mask-image: url('../../assets/icon/isha.svg');
    mask-image: url('../../assets/icon/isha.svg');
}

.h-icon-mask-fajr {
    -webkit-mask-image: url('../../assets/icon/fajr.svg');
    mask-image: url('../../assets/icon/fajr.svg');
}

.h-icon-mask-sunrise {
    -webkit-mask-image: url('../../assets/icon/sunrise-alt.svg');
    mask-image: url('../../assets/icon/sunrise-alt.svg');
}

.h-icon-mask-dhuhr {
    -webkit-mask-image: url('../../assets/icon/dhuhr.svg');
    mask-image: url('../../assets/icon/dhuhr.svg');
}

.h-icon-mask-asr {
    -webkit-mask-image: url('../../assets/icon/asr.svg');
    mask-image: url('../../assets/icon/asr.svg');
}

.h-pcard.active .h-pcard-icon svg,
.h-pcard.active .h-pcard-icon .h-icon-mask,
.h-pcard.next .h-pcard-icon svg,
.h-pcard.next .h-pcard-icon .h-icon-mask {
    opacity: 0.75;
}

.h-pcard.active.h-prayer-dhuhr .h-pcard-icon svg,
.h-pcard.active.h-prayer-dhuhr .h-pcard-icon .h-icon-mask,
.h-pcard.next.h-prayer-dhuhr .h-pcard-icon svg,
.h-pcard.next.h-prayer-dhuhr .h-pcard-icon .h-icon-mask,
.h-pcard.active.h-prayer-asr .h-pcard-icon svg,
.h-pcard.active.h-prayer-asr .h-pcard-icon .h-icon-mask,
.h-pcard.next.h-prayer-asr .h-pcard-icon svg,
.h-pcard.next.h-prayer-asr .h-pcard-icon .h-icon-mask {
    color: #f4c542;
    opacity: 0.9;
}

.h-pcard.active.h-prayer-sunrise .h-pcard-icon svg,
.h-pcard.active.h-prayer-sunrise .h-pcard-icon .h-icon-mask,
.h-pcard.next.h-prayer-sunrise .h-pcard-icon svg,
.h-pcard.next.h-prayer-sunrise .h-pcard-icon .h-icon-mask,
.h-pcard.active.h-prayer-maghrib .h-pcard-icon svg,
.h-pcard.active.h-prayer-maghrib .h-pcard-icon .h-icon-mask,
.h-pcard.next.h-prayer-maghrib .h-pcard-icon svg,
.h-pcard.next.h-prayer-maghrib .h-pcard-icon .h-icon-mask {
    color: #f28b30;
    opacity: 0.9;
}

.h-pcard.active.h-prayer-fajr .h-pcard-icon svg,
.h-pcard.active.h-prayer-fajr .h-pcard-icon .h-icon-mask,
.h-pcard.next.h-prayer-fajr .h-pcard-icon svg,
.h-pcard.next.h-prayer-fajr .h-pcard-icon .h-icon-mask,
.h-pcard.active.h-prayer-isha .h-pcard-icon svg,
.h-pcard.active.h-prayer-isha .h-pcard-icon .h-icon-mask,
.h-pcard.next.h-prayer-isha .h-pcard-icon svg,
.h-pcard.next.h-prayer-isha .h-pcard-icon .h-icon-mask {
    color: #8d6adf;
    opacity: 0.9;
}

.h-pcard-time {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(16px, 1.6vw, 24px);
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--t-text);
    align-self: end;
    display: flex;
    align-items: baseline;
    gap: 3px;
    white-space: nowrap;
}

.h-pcard-ampm {
    font-size: 0.42em;
    font-weight: 700;
    letter-spacing: 0.5px;
    opacity: 0.65;
    text-transform: uppercase;
    line-height: 1;
}

.h-pcard-rel {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--t-text-dim);
    align-self: end;
}

/* Active (current) prayer */
.h-pcard.active {
    background: linear-gradient(-135deg, var(--t-card), rgba(var(--t-accent-rgb), 0.08));
    border-color: transparent;
}
.h-pcard.active .h-pcard-name,
.h-pcard.active .h-pcard-time {
    color: var(--t-accent);
}

/* Next (upcoming) prayer */
.h-pcard.next {
    background: linear-gradient(-135deg, var(--t-card), rgba(var(--t-accent-rgb), 0.12));
    border-color: transparent;
}
.h-pcard.next .h-pcard-name,
.h-pcard.next .h-pcard-time {
    color: var(--t-accent);
}

/* Past prayers */
.h-pcard.past {
    opacity: 0.55;
}

/* Active dot */
.h-pcard-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--t-accent);
    margin-left: 5px;
    vertical-align: middle;
    animation: h-pcard-pulse 1.6s infinite;
}
@keyframes h-pcard-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(var(--t-accent-rgb), 0.5); }
    70%  { box-shadow: 0 0 0 5px rgba(var(--t-accent-rgb), 0); }
    100% { box-shadow: 0 0 0 0 rgba(var(--t-accent-rgb), 0); }
}

/* ═══════════════════════════════════════════
   CARD 2: TODAY'S PRAYERS (old vertical — kept for reference)
.h-prayers {
    justify-content: space-between;
    padding: 28px;
    cursor: pointer;
}

.h-prayer-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    justify-content: center;
}

.h-prayer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-radius: 16px;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.h-prayer-row:hover { background: var(--t-hover); }

.h-prayer-row.passed { opacity: 0.35; }

.h-prayer-row.current {
    background: var(--t-accent);
    color: #fff;
    box-shadow: 0 6px 24px rgba(var(--t-accent-rgb), 0.3);
    transform: scaleX(1.02);
    transform-origin: left;
}
/* Override text colors inside the active row */
.h-prayer-row.current .h-prayer-name,
.h-prayer-row.current .h-prayer-time,
.h-prayer-row.current .h-prayer-rel {
    color: #fff;
}
.h-prayer-row.current .h-prayer-rel {
    opacity: 0.7;
}

/* Prayer row for upcoming (next) */
.h-prayer-row.upcoming .h-prayer-name,
.h-prayer-row.upcoming .h-prayer-time {
    color: var(--t-accent);
}

.h-prayer-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.h-prayer-name {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--t-text);
}
.h-prayer-rel {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--t-text-dim);
}

.h-prayer-time-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}
.h-prayer-time {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--t-text);
}

/* Current prayer status indicator */
.h-prayer-status {
    display: flex;
    align-items: center;
    gap: 6px;
}
.h-prayer-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}
.h-prayer-status-text {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.85;
}

/* Phase: Just Started — green pulse */
.h-phase-started .h-prayer-dot {
    background: #34d399;
    animation: h-pulse-green 1.5s infinite;
}
.h-phase-started .h-prayer-status-text { color: #a7f3d0; }
@keyframes h-pulse-green {
    0%   { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6); }
    70%  { box-shadow: 0 0 0 4px rgba(52, 211, 153, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

/* Phase: Active — white steady glow */
.h-phase-active .h-prayer-dot {
    background: #fff;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.3);
}
.h-phase-active .h-prayer-status-text { color: rgba(255, 255, 255, 0.8); }

/* Phase: Ending Soon — orange pulse */
.h-phase-ending .h-prayer-dot {
    background: #fb923c;
    animation: h-pulse-orange 1.2s infinite;
}
.h-phase-ending .h-prayer-status-text { color: #fed7aa; }
@keyframes h-pulse-orange {
    0%   { box-shadow: 0 0 0 0 rgba(251, 146, 60, 0.6); }
    70%  { box-shadow: 0 0 0 4px rgba(251, 146, 60, 0); }
    100% { box-shadow: 0 0 0 0 rgba(251, 146, 60, 0); }
}

/* Phase: Final Call — red fast pulse */
.h-phase-final .h-prayer-dot {
    background: #f87171;
    animation: h-pulse-red 0.8s infinite;
}
.h-phase-final .h-prayer-status-text { color: #fecaca; }
@keyframes h-pulse-red {
    0%   { box-shadow: 0 0 0 0 rgba(248, 113, 113, 0.7); }
    70%  { box-shadow: 0 0 0 5px rgba(248, 113, 113, 0); }
    100% { box-shadow: 0 0 0 0 rgba(248, 113, 113, 0); }
}

/* Countdown relative text — color matches phase */
.h-prayer-countdown-rel.h-phase-ending { color: #fed7aa !important; opacity: 1; font-weight: 700; }
.h-prayer-countdown-rel.h-phase-final  { color: #fecaca !important; opacity: 1; font-weight: 700; }


/* ═══════════════════════════════════════════
   CARD 3: QUR'AN INDEX
   ═══════════════════════════════════════════ */
.h-quran-index {
    justify-content: space-between;
}

.h-quran-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--t-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--t-accent);
    margin-bottom: 20px;
    transition: transform 0.3s;
}
.h-card:hover .h-quran-icon { transform: scale(1.05); }
.h-quran-icon svg { width: 28px; height: 28px; }

.h-quran-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--t-text);
    margin: 0 0 8px;
    line-height: 1.3;
}
.h-quran-desc {
    font-size: 13px;
    color: var(--t-text-secondary);
    line-height: 1.6;
    margin: 0;
}

.h-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 14px;
    border-radius: 16px;
    border: none;
    background: var(--t-bg);
    color: var(--t-text);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 24px;
    text-decoration: none;
}
.h-btn:hover { background: var(--t-hover); }
.h-btn svg { width: 16px; height: 16px; opacity: 0.5; }


/* ═══════════════════════════════════════════
   CARD: DOWNLOAD ADD-ON
   ═══════════════════════════════════════════ */
.h-download-addon {
    margin: 34px 0 2px;
    padding: 0;
    border: 0;
    background: transparent;
}

.h-download-addon-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    width: 100%;
    min-height: 100%;
}

.h-download-addon-copy {
    flex: 1;
    min-width: 0;
}

.h-download-addon-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.15;
    letter-spacing: -0.4px;
    color: var(--t-text);
    margin: 0 0 10px;
}

.h-download-addon-desc {
    font-size: 14px;
    line-height: 1.7;
    color: var(--t-text-secondary);
    margin: 0;
    max-width: 580px;
}

.h-download-addon-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    align-items: stretch;
    width: 100%;
    gap: 10px;
    margin-top: 22px;
}

.h-download-addon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 48px;
    margin-top: 0;
    padding: 12px 18px;
    border: 1px solid var(--t-border);
    box-sizing: border-box;
    white-space: normal;
    line-height: 1.3;
}

.h-download-addon-btn.is-disabled {
    border-radius: 14px;
    border: 1px dashed var(--t-border);
    background: rgba(var(--t-accent-rgb), 0.04);
    color: var(--t-text-dim);
    justify-content: flex-start;
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.88;
}

.h-download-addon-btn.is-disabled:hover {
    background: rgba(var(--t-accent-rgb), 0.04);
}

.h-download-addon-btn svg,
.h-download-addon-btn .h-browser-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.h-browser-icon {
    width: 18px;
    height: 18px;
    display: block;
    object-fit: contain;
}

.h-download-addon-media {
    width: min(240px, 42%);
    flex-shrink: 0;
}

.h-download-addon-media img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 20px;
    border: 0;
    background: transparent;
}


/* ═══════════════════════════════════════════
   CARD 4: CONTINUE LISTENING
   ═══════════════════════════════════════════ */
.h-continue {
    padding: 36px 40px;
}

.h-continue-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    flex: 1;
    gap: 32px;
}

.h-continue-info { flex: 1; }

.h-continue-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--t-accent);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.h-continue-label svg { width: 14px; height: 14px; }

.h-continue-surah {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    color: var(--t-text);
    margin: 0 0 6px;
    line-height: 1.15;
}
.h-continue-meta {
    font-size: 14px;
    color: var(--t-text-secondary);
    margin: 0;
}

/* Stats badges */
.h-continue-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}
.h-stat-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 12px;
    background: var(--t-bg);
    border: 1px solid var(--t-border);
    font-size: 13px;
    font-weight: 700;
    color: var(--t-text);
    text-decoration: none;
    cursor: pointer;
    transition: background .2s, border-color .2s;
}
.h-stat-badge:hover {
    background: var(--t-card-hover, var(--t-border));
    border-color: var(--t-accent);
}
.h-stat-badge svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
.h-stat-badge .h-stat-label {
    font-weight: 500;
    color: var(--t-text-secondary);
    margin-right: 2px;
}

/* Play button with progress ring */
.h-play-wrap {
    position: relative;
    width: 96px;
    height: 96px;
    flex-shrink: 0;
    cursor: pointer;
}

.h-play-glow {
    position: absolute;
    inset: 12px;
    background: var(--t-accent);
    border-radius: 50%;
    filter: blur(20px);
    opacity: 0.15;
    transition: opacity 0.3s;
}
.h-play-wrap:hover .h-play-glow { opacity: 0.3; }

.h-play-ring {
    position: absolute;
    inset: 0;
    transform: rotate(90deg);
}

.h-play-btn {
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    background: var(--t-accent);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 6px 24px rgba(var(--t-accent-rgb), 0.3);
    transition: transform 0.3s;
}
.h-play-wrap:hover .h-play-btn { transform: scale(1.05); }
.h-play-btn svg { width: 28px; height: 28px; margin-right: 3px; }

/* Progress tooltip */
.h-play-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    right: 50%;
    transform: translateX(50%);
    background: rgba(0, 0, 0, 0.88);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 8px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 10;
    text-align: center;
    line-height: 1.5;
}
.h-play-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 50%;
    transform: translateX(50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.88);
}
.h-play-wrap:hover .h-play-tooltip { opacity: 1; }


/* ═══════════════════════════════════════════
   CARD 5: ISLAMIC CALENDAR
   ═══════════════════════════════════════════ */
.h-calendar {
    justify-content: space-between;
}

.h-cal-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: auto;
}

.h-cal-date {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    margin-bottom: 6px;
}
.h-cal-day {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(56px, 6vw, 80px);
    font-weight: 800;
    color: var(--t-accent);
    line-height: 1;
}
.h-cal-hijri {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(14px, 1.5vw, 18px);
    font-weight: 700;
    color: var(--t-text);
    line-height: 1.2;
}
.h-cal-gregorian {
    font-size: 14px;
    color: var(--t-text-secondary);
    margin: 0;
}

.h-cal-event {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: left;
    gap: 3px;
    padding: 0;
    border-radius: 0;
    border: none;
    background: transparent;
    color: #ea580c;
}
.h-cal-event-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    opacity: .65;
}
.h-cal-event-name {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
}
.h-cal-event-date {
    font-size: 11px;
    font-weight: 500;
    opacity: .6;
}
/* Dark theme override for event badge */
[data-theme="midnight"] .h-cal-event,
[data-theme="slate"] .h-cal-event {
    color: #fb923c;
}


/* ═══════════════════════════════════════════
   CARD 6: QIBLA FINDER
   ═══════════════════════════════════════════ */
.h-qibla {
    justify-content: space-between;
    text-align: center;
    padding: 48px 24px 28px;
}

.h-qibla .h-label {
    position: absolute;
    top: 28px;
    right: 28px;
}

.h-qibla-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
}

.h-qibla-compass {
    position: relative;
    width: 170px;
    height: 170px;
    margin-bottom: 14px;
    flex-shrink: 0;
}

.h-qibla-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    color: var(--t-text);
}

/* Needle */
.h-qibla-needle {
    position: absolute;
    inset: 0;
    transition: transform 1.15s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
    pointer-events: none;
}
.h-qibla-needle-inner {
    position: absolute;
    top: 50%;
    right: 50%;
    transform: translate(50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 146px;
    width: 26px;
}
.h-qibla-needle-head {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.14);
    border: 1.5px solid rgba(245, 158, 11, 0.55);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f59e0b;
    flex-shrink: 0;
    z-index: 2;
}
.h-qibla-needle-shaft {
    flex: 1;
    width: 2px;
    background: linear-gradient(
        to bottom,
        rgba(245, 158, 11, 0.75) 0%,
        rgba(245, 158, 11, 0.25) 65%,
        transparent 100%
    );
    border-radius: 1px;
}
.h-qibla-needle-tail {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    flex-shrink: 0;
}

/* Light themes: softer tail */
[data-theme="sepia"] .h-qibla-needle-tail,
[data-theme="silver"] .h-qibla-needle-tail {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.1);
}

/* Center pivot */
.h-qibla-center {
    position: absolute;
    top: 50%;
    right: 50%;
    transform: translate(50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--t-text);
    opacity: 0.4;
    border: 1.5px solid var(--t-bg);
    z-index: 5;
}

/* Label */
.h-qibla-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: var(--t-text-secondary);
    margin: 0 0 14px;
}

/* Info row (bearing + distance) */
.h-qibla-info {
    display: flex;
    align-items: stretch;
    width: 100%;
    padding: 0 8px;
    gap: 0;
}
.h-qibla-info-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    align-items: center;
    text-align: center;
}
.h-qibla-info-divider {
    width: 1px;
    background: var(--t-border);
    margin: 0 6px;
    align-self: stretch;
}
.h-qibla-info-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--t-text-dim);
}
.h-qibla-info-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--t-text);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.5px;
    line-height: 1.1;
}


.h-qibla-coords {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.8px;
    color: var(--t-text-dim);
    text-align: center;
    margin: 8px 0 0;
    opacity: 0.6;
    font-variant-numeric: tabular-nums;
}

/* ── Method info bar ── */
.h-method-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--t-text-dim);
    padding: 2px 4px;
}

.h-method-bar strong {
    color: var(--t-text);
    font-weight: 600;
}

.h-method-sep {
    opacity: 0.4;
}

.h-method-change {
    color: var(--t-accent);
    font-weight: 600;
    text-decoration: none;
    font-size: 12px;
    opacity: 0.8;
    transition: opacity 0.15s;
}

.h-method-change:hover {
    opacity: 1;
    text-decoration: underline;
}

/* ── Section headings ── */
.h-section-heading {
    margin: 32px 0 0;
    padding: 32px 0 0;
}

.h-section-heading-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.h-section-heading-top svg {
    width: 28px;
    height: 28px;
    color: var(--t-accent);
    flex-shrink: 0;
}

.h-section-heading-rule {
    display: block;
    width: 48px;
    height: 3px;
    border-radius: 2px;
    background: var(--t-accent);
}

.h-section-heading-main {
    display: flex;
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(26px, 2.6vw, 38px);
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--t-text);
}

.h-section-heading-sub {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--t-text-dim);
    max-width: 680px;
    line-height: 1.55;
}

.h-qibla-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: auto;
    padding: 10px 0 0;
    color: var(--t-accent);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.2px;
    transition: opacity 0.2s;
}

.h-qibla-cta svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.h-qibla:hover .h-qibla-cta {
    opacity: 0.75;
}

/* ═══════════════════════════════════════════
   CARD 7: ABOUT
   ═══════════════════════════════════════════ */
.h-about {
    padding: 36px 40px;
}

.h-about-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.h-about-socials {
    display: flex;
    gap: 8px;
}
.h-about-socials a {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--t-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--t-text-dim);
    text-decoration: none;
    transition: color 0.2s, border-color 0.2s;
}
.h-about-socials a:hover {
    color: var(--t-accent);
    border-color: var(--t-accent);
}
.h-about-socials a svg { width: 14px; height: 14px; }

.h-about-body {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.h-about-text { flex: 1; }

.h-about-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--t-text);
    margin: 0 0 8px;
}
.h-about-desc {
    font-size: 14px;
    color: var(--t-text-secondary);
    line-height: 1.7;
    margin: 0 0 16px;
    max-width: 380px;
}

.h-about-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 700;
    color: var(--t-accent);
    text-decoration: none;
    transition: color 0.2s;
}
.h-about-link:hover { opacity: 0.8; }
.h-about-link svg {
    width: 14px;
    height: 14px;
    transition: transform 0.2s;
}
.h-about-link:hover svg { transform: translateX(-3px); }

/* Stats panel in About */
.h-about-stats {
    display: flex;
    gap: 0;
    padding: 0;
    border-radius: 16px;
    background: var(--t-bg);
    border: 1px solid var(--t-border);
    flex-shrink: 0;
    width: 100%;
}
.h-about-stat {
    display: flex;
    flex-direction: column;
    flex: 1;
    align-items: center;
    padding: 16px 8px;
}
.h-about-stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--t-accent-soft, rgba(var(--t-accent-rgb, 99,102,241), 0.12));
    margin-bottom: 6px;
}
.h-about-stat-icon svg {
    width: 14px;
    height: 14px;
    stroke: var(--t-accent);
}
.h-about-stat-val {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: var(--t-accent);
    font-variant-numeric: tabular-nums;
}
.h-about-stat-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--t-text-dim);
    margin-top: 2px;
}
.h-about-stats-divider {
    width: 1px;
    background: var(--t-border);
    border-radius: 1px;
    align-self: stretch;
}


/* ═══════════════════════════════════════════
   CARD 8: SUPPORT
   ═══════════════════════════════════════════ */
.h-support {
    align-items: center;
    justify-content: center;
    text-align: center;
}

.h-support-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: var(--t-bg);
    color: var(--t-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    transition: transform 0.3s;
    cursor: pointer;
}
.h-support-icon:hover { transform: scale(1.1); }
.h-support-icon svg { width: 24px; height: 24px; }

.h-support-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--t-text);
    margin: 0 0 8px;
}
.h-support-desc {
    font-size: 13px;
    color: var(--t-text-secondary);
    line-height: 1.7;
    margin: 0 0 24px;
    max-width: 280px;
}

.h-support-feedback {
    display: inline-block;
    margin-top: 12px;
    font-size: 12px;
    font-weight: 700;
    color: var(--t-text-dim);
    text-decoration: none;
    transition: color 0.2s;
}
.h-support-feedback:hover {
    color: var(--t-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}


/* ═══════════════════════════════════════════
   THEME CONTROLS (top-right)
   ═══════════════════════════════════════════ */
.home-topbar-right {
    position: absolute;
    top: 0;
    left: 20px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.3s;
}


/* ═══════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════ */
@keyframes h-fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes h-slideUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

.home-grid .h-card {
    animation: h-slideUp 0.6s ease both;
}
.home-grid .h-card:nth-child(1) { animation-delay: 0.05s; }
.home-grid .h-card:nth-child(2) { animation-delay: 0.10s; }
.home-grid .h-card:nth-child(3) { animation-delay: 0.15s; }
.home-grid .h-card:nth-child(4) { animation-delay: 0.20s; }
.home-grid .h-card:nth-child(5) { animation-delay: 0.25s; }
.home-grid .h-card:nth-child(6) { animation-delay: 0.30s; }
.home-grid .h-card:nth-child(7) { animation-delay: 0.35s; }
.home-grid .h-card:nth-child(8) { animation-delay: 0.40s; }
.home-grid .h-card:nth-child(9) { animation-delay: 0.45s; }
.home-grid .h-card:nth-child(10) { animation-delay: 0.50s; }


/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 1024px) {
    .home-main { padding: 80px 20px 40px; }
    .h-hero { padding: 32px 32px; min-height: 280px; }
    .h-continue { padding: 28px 32px; }
    .h-about { padding: 28px 32px; }
}

@media (max-width: 768px) {
    .home-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .h-span-2 { grid-column: span 1; }

    .home-topbar-right { left: 20px; }

    .h-hero { padding: 28px 24px; min-height: 260px; }
    .h-hero-num { letter-spacing: -2px; }
    .h-hero-sec { transform: translateY(-100%); }

    .h-download-addon-body {
        flex-direction: column;
        align-items: flex-start;
    }
    .h-download-addon-media {
        width: min(260px, 100%);
        align-self: center;
    }
    .h-download-addon-btn {
        width: 100%;
    }
    .h-download-addon-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .h-download-addon-btn.is-disabled {
        width: 100%;
        justify-content: flex-start;
    }

    .h-continue-body { flex-direction: column; align-items: flex-start; }
    .h-play-wrap { align-self: flex-end; }

    .h-cal-body { flex-direction: column; }
    .h-about-body { flex-direction: column; }
    .h-about-stats { width: 100%; }
}

@media (max-width: 480px) {
    .home-main { padding: 72px 14px 32px; }
    .home-grid { gap: 14px; }
    .h-card { padding: 24px; border-radius: 20px; }
    .h-hero { padding: 24px 20px; }
    .h-download-addon-title { font-size: 26px; }
    .h-download-addon-actions {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════
   HOME — Location Search Strip
   ═══════════════════════════════════════════ */
:root {
    --h-loc-gps-size: 44px;
}

.h-location-strip {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: center;
    margin-bottom: 4px;
    position: relative;
    z-index: 40;
}

.h-location-search-card {
    position: relative;
    overflow: visible;
    z-index: 60;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.h-location-city-row {
    display: none;
}

.h-location-current-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    gap: 3px;
    padding: 0;
}

.h-location-date-card {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: flex-end;
}

.h-loc-date-day {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(36px, 3.5vw, 52px);
    font-weight: 800;
    color: var(--t-accent);
    line-height: 1;
}

.h-loc-date-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding-top: 4px;
}

.h-loc-date-hijri {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(13px, 1.3vw, 16px);
    font-weight: 700;
    color: var(--t-text);
    line-height: 1.2;
}

.h-loc-date-greg {
    font-size: 12px;
    color: var(--t-text-dim);
}

.h-location-form {
    display: flex;
    align-items: center;
}

.h-location-input-wrap {
    flex: 1 1 auto;
    min-width: 0;
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px 0 12px;
    min-height: 54px;
    border-radius: 18px;
    background: rgba(var(--t-accent-rgb), 0.06);
    border: 1px solid rgba(var(--t-accent-rgb), 0.14);
    transition: border-color 0.2s, background 0.2s;
}

.h-location-input-wrap:focus-within {
    border-color: rgba(var(--t-accent-rgb), 0.32);
    background: rgba(var(--t-accent-rgb), 0.09);
}

.h-location-input-wrap > svg {
    width: 18px;
    height: 18px;
    color: var(--t-accent);
    flex-shrink: 0;
    opacity: 0.75;
}

.h-location-input-wrap input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    padding-left: calc(var(--h-loc-gps-size) + 14px);
    color: var(--t-text);
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
}

.h-location-input-wrap input::placeholder {
    color: var(--t-text-dim);
}

.h-location-inline-status {
    position: absolute;
    left: calc(var(--h-loc-gps-size) + 12px);
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    font-weight: 600;
    color: var(--t-text-dim);
    letter-spacing: 0.2px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.16s ease;
    white-space: nowrap;
}

.h-location-input-wrap.is-searching .h-location-inline-status {
    opacity: 1;
}

.h-location-input-wrap.is-searching input {
    padding-left: calc(var(--h-loc-gps-size) + 120px);
}

.h-location-gps {
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: var(--h-loc-gps-size);
    height: var(--h-loc-gps-size);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: transparent;
    border: 0;
    outline: 0;
    cursor: pointer;
    color: var(--t-accent);
    transition: background 0.2s;
}

.h-location-gps svg {
    width: 18px;
    height: 18px;
}

.h-location-gps:hover {
    background: rgba(var(--t-accent-rgb), 0.12);
}

.h-location-gps.is-locating svg {
    animation: h-loc-gps-spin 1s linear infinite;
    transform-origin: 50% 50%;
}

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

.h-location-search-status,
.h-location-search-status:not(:empty),
.h-location-search-status[data-state="error"] {
    display: none !important;
}

.h-location-results {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    display: grid;
    gap: 0;
    padding: 8px 16px;
    border-radius: 18px;
    background: var(--t-card);
    border: 1px solid rgba(var(--t-accent-rgb), 0.14);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    max-height: min(300px, 50vh);
    overflow-y: auto;
    z-index: 25;
}

.h-location-results[hidden] {
    display: none;
}

.h-location-result {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    padding: 11px 0;
    background: transparent;
    border: 0;
    border-bottom: 1px solid rgba(var(--t-accent-rgb), 0.09);
    color: var(--t-text);
    text-align: right;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.2s;
}

.h-location-result:last-child {
    border-bottom: 0;
}

.h-location-result:hover {
    opacity: 0.7;
}

.h-location-result-main {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.h-location-result-primary {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--t-text);
}

.h-location-result-secondary {
    font-size: 12px;
    color: var(--t-text-secondary, var(--t-text-dim));
}

.h-location-result-coords {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--t-accent);
    white-space: nowrap;
}

.h-location-current-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(15px, 1.4vw, 25px);
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--t-text);
    line-height: 1.1;
    text-align: left;
}

.h-location-current-meta {
    font-size: 12px;
    color: var(--t-text-dim);
    text-align: left;
}

/* Responsive */
@media (max-width: 768px) {
    .h-location-strip {
        grid-template-columns: 40% 1fr;
        grid-template-areas:
            "search search"
            "date   city";
        gap: 12px;
    }
    .h-location-search-card {
        grid-area: search;
    }
    .h-location-date-card {
        grid-area: date;
        justify-content: flex-start;
    }
    .h-location-current-card {
        grid-area: city;
        align-items: flex-end;
    }
    .h-location-current-name {
        font-size: clamp(14px, 4vw, 20px);
        text-align: left;
    }
    .h-location-current-meta {
        text-align: left;
        display: block;
    }
}

@media (max-width: 480px) {
    .h-location-input-wrap {
        min-height: 48px;
        border-radius: 14px;
    }
}

/* ═══════════════════════════════════════════
   ISLAMIC EVENTS MODULE
   ═══════════════════════════════════════════ */

/* ─── Module wrapper ─── */
.h-events-module {
    display: flex;
    gap: 16px;
    align-items: stretch;
    min-height: 220px;
    min-width: 0;
    max-width: 100%;
    margin-top: 0.5rem;
    border-top: 1px solid var(--t-border);
    padding-top: 2rem;
}

/* ─── Featured hero event card ─── */
.h-event-hero {
    flex: 0 0 38%;
    min-width: 0;
    max-width: 100%;
    border-left: 1px solid var(--t-border);
    padding-left: 24px;
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 12px;
    overflow: hidden;
    position: relative;
    transition: opacity 0.2s;
}

.h-event-hero:hover {
    opacity: 0.88;
}

/* Left content */
.h-event-hero-body {
    display: flex;
    flex-direction: column;
    gap: 0;
    z-index: 1;
    flex: 1;
    min-width: 0;
}

.h-event-hero-eyebrow {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--t-accent);
    margin-bottom: 8px;
}
.h-event-hero-eyebrow svg { flex-shrink: 0; }

.h-event-hero-name {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: clamp(20px, 2.2vw, 28px);
    font-weight: 800;
    color: var(--t-text);
    margin: 0 0 5px;
    letter-spacing: -0.5px;
    line-height: 1.1;
    white-space: nowrap;
}

.h-event-hero-also {
    font-size: 11px;
    color: var(--t-text-secondary);
    margin: 0 0 16px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

/* Countdown inside hero */
.h-event-hero-cd {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
}

.h-ehcd-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.h-ehcd-num {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: clamp(22px, 2.5vw, 32px);
    font-weight: 800;
    color: var(--t-text);
    line-height: 1;
    letter-spacing: -0.5px;
    min-width: 42px;
    text-align: center;
    background: rgba(var(--t-accent-rgb), 0.08);
    border-radius: 8px;
    padding: 6px 8px;
}

.h-ehcd-lbl {
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--t-text-secondary);
}

.h-ehcd-sep {
    font-size: 20px;
    font-weight: 700;
    color: var(--t-accent);
    opacity: 0.5;
    align-self: flex-start;
    padding-top: 4px;
    line-height: 1;
}

/* Date/Hijri meta */
.h-event-hero-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--t-text-secondary);
    font-weight: 500;
    margin-bottom: 14px;
}
.h-event-hero-sep { opacity: 0.4; }

/* CTA link line */
.h-event-hero-cta {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    font-size: 12px;
    font-weight: 700;
    color: var(--t-accent);
    margin-top: auto;
    transition: gap 0.2s;
}
.h-event-hero:hover .h-event-hero-cta { gap: 8px; }
.h-event-hero-cta svg { flex-shrink: 0; }

/* Decorative Arabic text on right */
.h-event-hero-deco {
    flex-shrink: 0;
    font-family: 'Traditional Arabic', 'Amiri', 'Arial', serif;
    font-size: clamp(34px, 4.5vw, 54px);
    font-weight: 700;
    color: var(--t-accent);
    opacity: 0.13;
    line-height: 1.2;
    text-align: left;
    direction: ltr;
    align-self: center;
    user-select: none;
    pointer-events: none;
    white-space: nowrap;
    z-index: 0;
}

/* ─── Slider side ─── */
.h-events-slider-wrap {
    flex: 1;
    min-width: 0;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.h-events-slider-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2px 10px;
}

.h-events-slider-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--t-text-secondary);
}
.h-events-slider-title svg { opacity: 0.6; }

.h-events-nav {
    display: flex;
    gap: 6px;
}

.h-eslider-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid var(--t-border);
    background: var(--t-card);
    color: var(--t-text-secondary);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    flex-shrink: 0;
}
.h-eslider-btn:hover {
    background: var(--t-hover);
    color: var(--t-text);
    border-color: var(--t-accent);
}

/* Scrollable slider track */
.h-events-slider {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
    flex: 1;
    /* hide scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.h-events-slider::-webkit-scrollbar { display: none; }

/* Individual event card */
.h-ecard {
    flex: 0 0 168px;
    scroll-snap-align: start;
    background: var(--t-card);
    border-radius: 14px;
    padding: 14px 14px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.15s;
    cursor: default;
    position: relative;
    overflow: hidden;
}
a.h-ecard { cursor: pointer; }
a.h-ecard:hover {
    opacity: 0.75;
}

.h-ecard-icon {
    display: none;
}

.h-ecard-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--t-text);
    line-height: 1.3;
}

.h-ecard-hijri {
    font-size: 10.5px;
    color: var(--t-text-secondary);
    line-height: 1.4;
}

.h-ecard-date {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--t-text-secondary);
    margin-top: auto;
}

/* Days badge */
.h-ecard-badge {
    display: inline-flex;
    align-items: center;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.5px;
    width: fit-content;
    margin-top: auto;
    padding: 0;
    background: none;
    border: none;
}
.h-ecard-badge-soon {
    color: var(--t-accent);
}
.h-ecard-badge-future {
    color: var(--t-text-secondary);
}
.h-ecard-badge-today {
    color: #16a34a;
}

/* Featured card highlight (Eid al-Adha) */
.h-ecard-featured .h-ecard-name {
    color: var(--t-accent);
}

/* Disclaimer line */
.h-events-approx {
    font-size: 10.5px;
    color: var(--t-text-dimmer, var(--t-text-dim));
    margin: 8px 2px 0 0;
    line-height: 1.4;
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
    .h-events-module {
        flex-direction: column;
    }
    .h-event-hero {
        flex: none;
        width: 100%;
        border-left: none;
        border-bottom: 1px solid var(--t-border);
        padding-left: 0;
        padding-bottom: 20px;
    }
    .h-event-hero-deco {
        font-size: 44px;
        opacity: 0.10;
    }
    .h-ecard { flex: 0 0 150px; }
}

@media (max-width: 600px) {
    .h-event-hero-name { white-space: normal; }
    .h-event-hero-deco { display: none; }
    .h-ecard { flex: 0 0 140px; }
}


/* ─── Prayer bar: all six prayers fit the column on desktop (no clipped last card, no scrollbar) ─── */
@media (min-width: 900px) {
    .h-prayer-bar {
        grid-auto-columns: minmax(0, 1fr);
        gap: 8px;
        overflow: visible;
        padding-bottom: 0;
    }
    .h-pcard { min-width: 0; padding: 14px 12px 12px; }
    .h-pcard-time { font-size: clamp(16px, 1.35vw, 21px); }
}
.h-pcard-rel {
    letter-spacing: 0.4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
@media (min-width: 900px) and (max-width: 1199px) {
    .h-pcard { padding: 12px 10px 10px; }
    .h-pcard-rel { font-size: 9px; letter-spacing: 0; }
}

/* Home cards that open a page (hero → city, location → country, date → calendar) */
.h-hero, .h-location-current-card, .h-location-date-card { position: relative; }
.h-card-link { position: absolute; inset: 0; z-index: 5; border-radius: inherit; }
.h-card-link:focus-visible { outline: 2px solid var(--t-accent); outline-offset: 4px; }
.h-hero:has(.h-card-link) { cursor: pointer; transition: transform .2s ease, box-shadow .2s ease; }
.h-hero:has(.h-card-link:hover) { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(0,0,0,.18); }
.h-location-current-name, .h-loc-date-hijri { transition: color .15s ease; }
.h-location-current-card:has(.h-card-link:hover) .h-location-current-name,
.h-location-date-card:has(.h-card-link:hover) .h-loc-date-hijri { color: var(--t-accent); text-decoration: underline; text-underline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .h-hero:has(.h-card-link:hover) { transform: none; } }

/* ═══════════════════════════════════════════
   CARD: QUR'AN PLAYER (top right, next to the prayer times) — js/quran-home-player.js
   ═══════════════════════════════════════════ */
.h-qtop { padding: 26px 26px 20px; align-items: stretch; text-align: center; }
.h-qp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.h-qp-head .h-label { margin: 0; }
.h-qp-state {
    display: inline-flex; align-items: center; gap: 7px; padding: 5px 9px 5px 10px; border-radius: 999px;
    background: rgba(var(--t-accent-rgb, 140, 115, 85), .12); color: var(--t-accent);
    font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; white-space: nowrap;
}
.h-qp-eq { display: none; align-items: flex-end; gap: 2px; height: 10px; }
.h-qtop.is-playing .h-qp-eq { display: inline-flex; }
.h-qp-eq b { display: block; width: 2px; height: 4px; border-radius: 1px; background: currentColor; opacity: .8; }
.h-qtop.is-playing .h-qp-eq b { animation: h-qp-eq 0.9s ease-in-out infinite; }
.h-qtop.is-playing .h-qp-eq b:nth-child(2) { animation-delay: -.3s; }
.h-qtop.is-playing .h-qp-eq b:nth-child(3) { animation-delay: -.6s; }
.h-qtop.is-playing .h-qp-eq b:nth-child(4) { animation-delay: -.15s; }
@keyframes h-qp-eq { 0%, 100% { height: 3px; } 50% { height: 10px; } }

.h-qp-title { margin: 22px 0 6px; }
.h-qp-ar { font-family: 'Amiri', 'Amiri Quran', serif; font-size: 44px; line-height: 1.25; color: var(--t-accent); font-weight: 700; }
.h-qp-name { margin-top: 2px; font-family: 'Space Grotesk', sans-serif; font-size: 22px; font-weight: 700; color: var(--t-text); }
.h-qp-meaning { margin-top: 2px; font-size: 13px; color: var(--t-text-secondary); }
.h-qp-meta {
    display: inline-block; margin-top: 10px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--t-border);
    font-size: 12px; font-weight: 600; color: var(--t-text-secondary); font-variant-numeric: tabular-nums;
}
.h-qp-name[hidden], .h-qp-meaning[hidden], .h-qp-stats[hidden], .h-qp-err[hidden] { display: none; }

.h-qp-controls { direction: rtl; flex: 1; display: flex; align-items: center; justify-content: center; gap: 18px; margin: 14px 0 10px; }
.h-qp-skip {
    width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--t-border); background: var(--t-bg);
    color: var(--t-text-secondary); display: grid; place-items: center; cursor: pointer; transition: color .2s, border-color .2s, transform .2s;
}
.h-qp-skip:hover { color: var(--t-accent); border-color: var(--t-accent); }
.h-qp-skip:active { transform: scale(.94); }
.h-qp-skip svg { width: 16px; height: 16px; }
.h-qp-play {
    position: relative; width: 148px; height: 148px; flex: 0 0 148px; border: 0; padding: 0; border-radius: 50%;
    background: transparent; cursor: pointer; color: #fff;
}
.h-qp-play::before { /* soft glow, breathing while it plays */
    content: ''; position: absolute; inset: 22px; border-radius: 50%; background: var(--t-accent);
    filter: blur(22px); opacity: .22; transition: opacity .3s;
}
.h-qtop.is-playing .h-qp-play::before { animation: h-qp-breathe 2.6s ease-in-out infinite; }
@keyframes h-qp-breathe { 0%, 100% { opacity: .2; transform: scale(.94); } 50% { opacity: .45; transform: scale(1.06); } }
.h-qp-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(90deg); transition: transform .35s cubic-bezier(.2,.8,.3,1.3); }
.h-qp-play:hover .h-qp-ring { transform: rotate(90deg) scale(1.05); }
.h-qp-ring-track { fill: none; stroke: rgba(var(--t-accent-rgb, 140, 115, 85), .16); stroke-width: 5; transition: stroke .3s; }
.h-qp-play:hover .h-qp-ring-track { stroke: rgba(var(--t-accent-rgb, 140, 115, 85), .32); }
.h-qp-ring-fill { fill: none; stroke: var(--t-accent); stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset .35s linear; }
.h-qp-disc {
    position: absolute; inset: 17px; border-radius: 50%; display: grid; place-items: center;
    background: var(--t-accent);
    box-shadow: 0 10px 28px rgba(var(--t-accent-rgb, 140, 115, 85), .32);
    transition: transform .25s cubic-bezier(.2,.8,.3,1.4);
}
.h-qp-play:hover .h-qp-disc { transform: scale(1.04); }
.h-qp-play:active .h-qp-disc { transform: scale(.96); }
.h-qp-play:focus-visible { outline: 3px solid rgba(var(--t-accent-rgb, 140, 115, 85), .45); outline-offset: 4px; }
.h-qp-disc svg { width: 40px; height: 40px; }
.h-qp-i-play { transform: translate(0.5px, .75px); } /* the triangle's own box is already set right of centre */
.h-qp-i-pause { display: none; }
.h-qtop.is-playing .h-qp-i-play { display: none; }
.h-qtop.is-playing .h-qp-i-pause { display: block; }
.h-qp-spin { position: absolute; inset: -6px; border-radius: 50%; border: 2px solid transparent; border-top-color: rgba(255,255,255,.85); opacity: 0; }
.h-qtop.is-loading .h-qp-spin { opacity: 1; animation: h-qp-spin .8s linear infinite; }
@keyframes h-qp-spin { to { transform: rotate(-360deg); } }
.h-qp-err { margin: 0 0 6px; font-size: 12.5px; color: var(--t-text-secondary); }

.h-qtop .h-qp-stats { justify-content: center; margin-top: 4px; gap: 8px; }
.h-qtop .h-stat-badge { padding: 6px 11px; font-size: 12px; }
.h-qp-foot {
    display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px;
    margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--t-border);
    font-size: 13px; font-weight: 700; color: var(--t-text-dim);
}
.h-qp-foot a { display: inline-flex; align-items: center; gap: 4px; color: var(--t-accent); text-decoration: none; }
.h-qp-foot a:hover { opacity: .75; }
.h-qp-foot svg { width: 14px; height: 14px; }
@media (prefers-reduced-motion: reduce) {
    .h-qtop.is-playing .h-qp-eq b, .h-qtop.is-playing .h-qp-play::before { animation: none; }
}
@media (max-width: 768px) {
    .h-qp-play { width: 136px; height: 136px; flex-basis: 136px; }
    .h-qp-ar { font-size: 40px; }
}

/* Qur'an index, wide (below), next to the Qibla card */
.h-quran-wide { justify-content: space-between; gap: 22px; }
.h-quran-wide-main { display: flex; align-items: center; gap: 20px; }
.h-quran-wide .h-quran-icon { margin: 0; flex-shrink: 0; }
.h-quran-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 10px; }
.h-quran-tile {
    display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px 14px;
    border-radius: 16px; border: 1px solid var(--t-border); background: var(--t-bg);
    color: var(--t-text); font-size: 13.5px; font-weight: 600; line-height: 1.3; text-decoration: none;
    transition: border-color .2s, transform .2s;
}
.h-quran-tile:hover { border-color: var(--t-accent); transform: translateY(-1px); }
.h-quran-tile svg { width: 20px; height: 20px; color: var(--t-accent); }
.h-quran-wide .h-btn { margin-top: 0; width: auto; align-self: flex-start; padding: 12px 22px; }
@media (max-width: 768px) {
    .h-quran-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .h-quran-tile:last-child { grid-column: 1 / -1; }
    .h-quran-wide-main { align-items: flex-start; }
    .h-quran-wide .h-btn { width: 100%; align-self: stretch; }
}

/* Qibla, small, in the location strip (the compass card is further down) */
.h-loc-qibla {
    position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 5px; margin-top: 4px;
    font-size: 12px; font-weight: 600; color: var(--t-text-secondary); text-decoration: none;
}
.h-loc-qibla:hover { color: var(--t-accent); }
.h-loc-qibla svg { width: 13px; height: 13px; }

/* ═══════════════════════════════════════════
   PLATFORM TOOLS — bento grid (js/home-tools.js)
   ═══════════════════════════════════════════ */
.h-tools {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: minmax(196px, auto);
    gap: 16px;
    grid-template-areas:
        "times times qibla quran"
        "cal   conv  qibla ai"
        "ram   ram   methods mp3"
        "hd    hd    az    mq";
}
.h-tool-times { grid-area: times; } .h-tool-qibla { grid-area: qibla; } .h-tool-quran { grid-area: quran; }
.h-tool-cal { grid-area: cal; } .h-tool-conv { grid-area: conv; } .h-tool-ai { grid-area: ai; }
.h-tool-ram { grid-area: ram; } .h-tool-mp3 { grid-area: mp3; } .h-tool-luna { grid-area: methods; }

.h-tool {
    --tint: var(--t-accent-rgb, 140, 115, 85);
    position: relative; isolation: isolate; overflow: hidden;
    display: flex; flex-direction: column; gap: 8px;
    padding: 22px; border-radius: 22px;
    background:
        radial-gradient(120% 90% at 100% 0%, rgba(var(--tint), .13), transparent 55%),
        var(--t-card);
    border: 1px solid var(--t-border);
    color: var(--t-text); text-decoration: none;
    transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s, border-color .35s;
}
/* light that follows the pointer, and a glowing edge near it */
.h-tool::before, .h-tool::after {
    content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    opacity: 0; transition: opacity .35s; z-index: -1;
}
.h-tool::before { background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--tint), .16), transparent 45%); }
.h-tool::after {
    z-index: 1; padding: 1px;
    background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--tint), .75), transparent 60%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.h-tool:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -18px rgba(var(--tint), .45); border-color: rgba(var(--tint), .35); }
.h-tool:hover::before, .h-tool:hover::after { opacity: 1; }
.h-tool:focus-visible { outline: 3px solid rgba(var(--tint), .5); outline-offset: 3px; }

.h-tool-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.h-tool-ic {
    width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
    background: rgba(var(--tint), .14); color: rgb(var(--tint));
    transition: transform .35s cubic-bezier(.2,.8,.3,1.4);
}
.h-tool:hover .h-tool-ic { transform: rotate(6deg) scale(1.06); }
.h-tool-ic svg { width: 21px; height: 21px; }
.h-tool-go {
    width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
    border: 1px solid var(--t-border); color: var(--t-text-secondary);
    transition: background .3s, color .3s, transform .35s, border-color .3s;
}
.h-tool-go svg { width: 15px; height: 15px; }
.h-tool:hover .h-tool-go { background: rgb(var(--tint)); border-color: transparent; color: #fff; transform: translate(-2px, -2px); }
.h-tool-title { margin: 0; font-family: 'Space Grotesk', sans-serif; font-size: 19px; font-weight: 700; line-height: 1.25; color: var(--t-text); }
.h-tool-desc { margin: 0; font-size: 13px; line-height: 1.55; color: var(--t-text-secondary); }
.h-tool-stats { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: auto; padding-top: 10px; font-size: 12.5px; color: var(--t-text-secondary); }
.h-tool-stats b { display: block; font-family: 'Space Grotesk', sans-serif; font-size: 24px; line-height: 1.1; color: var(--t-text); font-variant-numeric: tabular-nums; }

/* Prayer times */
.h-tool-times { --tint: 59, 130, 246; }
.h-tool-live {
    position: absolute; top: 24px; left: 70px; display: inline-flex; align-items: center; gap: 7px;
    padding: 5px 11px; border-radius: 999px; background: rgba(var(--tint), .12); color: rgb(var(--tint));
    font-size: 12px; font-weight: 700;
}
.h-tool-live[hidden] { display: none; }
.h-tool-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 0 rgba(var(--tint), .6); animation: h-tool-ping 1.8s ease-out infinite; }
@keyframes h-tool-ping { 0% { box-shadow: 0 0 0 0 rgba(var(--tint), .55); } 100% { box-shadow: 0 0 0 9px rgba(var(--tint), 0); } }

/* Qibla: the live compass */
.h-tool-qibla { --tint: 16, 150, 110; align-items: stretch; }
.h-tool-compass { flex: 1; display: grid; place-items: center; }
.h-tool-qibla .h-qibla-compass { width: 176px; height: 176px; margin: 0; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.h-tool-qibla:hover .h-qibla-compass { transform: scale(1.04) rotate(4deg); }
.h-tool-qibla-read { margin: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.h-tool-qibla-read b { font-family: 'Space Grotesk', sans-serif; font-size: 30px; line-height: 1; }
.h-tool-qibla-read #h-qibla-label { display: none; }
.h-tool-km { font-size: 13px; font-weight: 600; color: var(--t-text-secondary); }

/* Qur'an */
.h-tool-ar { margin-top: auto; font-family: 'Amiri Quran', 'Amiri', serif; font-size: 26px; line-height: 1.3; color: rgb(var(--tint)); text-align: left; transition: transform .5s; }
.h-tool-quran:hover .h-tool-ar { transform: translateX(4px); }
.h-tool-quran .h-tool-stats { margin-top: 0; padding-top: 4px; }

/* Hijri calendar */
.h-tool-cal { --tint: 139, 92, 246; }
.h-tool-big { margin-top: auto; display: flex; align-items: baseline; gap: 10px; }
.h-tool-big b { font-family: 'Space Grotesk', sans-serif; font-size: 50px; line-height: .95; color: rgb(var(--tint)); font-variant-numeric: tabular-nums; }
.h-tool-big span { font-size: 14px; font-weight: 600; color: var(--t-text); line-height: 1.3; }

/* Converter */
.h-tool-conv { --tint: 14, 165, 233; }
.h-tool-cover { position: absolute; inset: 0; z-index: 2; border-radius: inherit; }
.h-tool-conv-in, .h-tool-conv input { position: relative; z-index: 3; }
.h-tool-conv input {
    box-sizing: border-box; width: 100%; margin-top: auto; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--t-border);
    background: var(--t-bg); color: var(--t-text); font: 600 14px 'Inter', sans-serif; color-scheme: light dark;
}
.h-tool-conv input:focus { outline: 2px solid rgba(var(--tint), .45); border-color: transparent; }
.h-tool-conv-out { font-family: 'Space Grotesk', sans-serif; font-size: 17px; font-weight: 700; color: rgb(var(--tint)); min-height: 1.4em; }
.h-tool-conv-out.flash { animation: h-tool-flash .5s ease; }
@keyframes h-tool-flash { from { opacity: .2; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* AI search */
.h-tool-ai { --tint: 168, 85, 247; }
.h-tool-search {
    margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px;
    background: var(--t-bg); border: 1px solid rgba(var(--tint), .3); font-size: 13.5px; font-weight: 600; color: var(--t-text); min-height: 42px;
}
.h-tool-search svg { width: 16px; height: 16px; flex-shrink: 0; color: rgb(var(--tint)); }
.h-tool-caret { width: 2px; height: 16px; background: rgb(var(--tint)); animation: h-tool-blink 1s steps(1) infinite; }
@keyframes h-tool-blink { 50% { opacity: 0; } }

/* Ramadan: a night card */
.h-tool-ram {
    --tint: 250, 204, 21;
    background: radial-gradient(1.2px 1.2px at 20% 30%, #fff8, transparent), radial-gradient(1px 1px at 60% 20%, #fff7, transparent),
        radial-gradient(1.4px 1.4px at 80% 60%, #fff6, transparent), radial-gradient(1px 1px at 35% 75%, #fff5, transparent),
        radial-gradient(1px 1px at 70% 85%, #fff6, transparent),
        linear-gradient(-135deg, #14213d 0%, #1f3a68 60%, #2c4f86 100%);
    border-color: rgba(255,255,255,.08); color: #fff;
}
.h-tool-ram .h-tool-title { color: #fff; }
.h-tool-ram .h-tool-desc { color: rgba(255,255,255,.72); max-width: 60%; }
.h-tool-ram .h-tool-go { border-color: rgba(255,255,255,.25); color: #fff; }
.h-tool-ram:hover .h-tool-go { color: #14213d; }
.h-tool-ram .h-tool-ic { background: rgba(250, 204, 21, .16); color: #facc15; }
.h-tool-count { margin-top: auto; display: flex; align-items: baseline; gap: 8px; position: relative; z-index: 1; }
.h-tool-count b { font-family: 'Space Grotesk', sans-serif; font-size: 52px; line-height: 1; color: #facc15; font-variant-numeric: tabular-nums; }
.h-tool-count span { font-size: 14px; font-weight: 600; color: rgba(255,255,255,.8); }
.h-tool-moon {
    position: absolute; left: 30px; bottom: 18px; width: 92px; height: 104px; background-color: #facc15; opacity: .9;
    -webkit-mask: url('../../assets/icon/ramadan.svg') center / contain no-repeat; mask: url('../../assets/icon/ramadan.svg') center / contain no-repeat;
    filter: drop-shadow(0 0 18px rgba(250, 204, 21, .45)); transform-origin: 50% 0; transform: rotate(4deg); transition: transform .8s cubic-bezier(.2,.8,.2,1);
}
.h-tool-ram:hover .h-tool-moon { transform: rotate(-4deg) translateY(-3px); }

/* MP3 */
.h-tool-mp3 { --tint: 234, 88, 12; }
.h-tool-wave { margin-top: auto; display: flex; align-items: flex-end; gap: 4px; height: 30px; }
.h-tool-wave i { flex: 1; border-radius: 3px; background: rgba(var(--tint), .35); height: 30%; transition: height .4s; }
.h-tool-wave i:nth-child(3n) { height: 70%; } .h-tool-wave i:nth-child(4n) { height: 45%; } .h-tool-wave i:nth-child(5n) { height: 90%; }
.h-tool-mp3:hover .h-tool-wave i { animation: h-tool-wave 1s ease-in-out infinite; background: rgba(var(--tint), .7); }
.h-tool-mp3:hover .h-tool-wave i:nth-child(2n) { animation-delay: -.3s; } .h-tool-mp3:hover .h-tool-wave i:nth-child(3n) { animation-delay: -.6s; }
@keyframes h-tool-wave { 0%, 100% { height: 25%; } 50% { height: 100%; } }

/* Moon today */
.h-tool-luna { --tint: 207, 174, 108; }
.h-tool-luna-row { margin-top: auto; display: flex; align-items: center; gap: 14px; }
.h-tool-luna-disc { flex: none; width: 62px; height: 62px; filter: drop-shadow(0 6px 16px rgba(217, 181, 106, .4)); transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.h-tool-luna:hover .h-tool-luna-disc { transform: rotate(8deg) scale(1.06); }
.h-luna-dark { fill: color-mix(in srgb, var(--t-card) 72%, #5b4a33 28%); }
[data-theme="silver"] .h-luna-dark { fill: color-mix(in srgb, var(--t-card) 72%, #334155 28%); }
[data-theme="midnight"] .h-luna-dark, [data-theme="slate"] .h-luna-dark { fill: color-mix(in srgb, var(--t-card) 55%, #000 45%); }
.h-tool-luna-txt { display: grid; gap: 2px; min-width: 0; }
.h-tool-luna-txt b { font-family: 'Space Grotesk', sans-serif; font-size: 17px; line-height: 1.2; color: var(--t-text); }
.h-tool-luna-txt span { font-size: 12.5px; color: var(--t-text-secondary); font-variant-numeric: tabular-nums; }
.h-tool-luna-next { margin: 0; font-size: 12px; font-weight: 600; color: var(--t-accent); }

/* entrance */
.h-tools.will-in .h-tool { opacity: 0; }
.h-tools.is-in .h-tool { opacity: 1; animation: h-tool-in .7s cubic-bezier(.2,.8,.2,1) backwards; animation-delay: var(--d, 0ms); }
@keyframes h-tool-in { from { opacity: 0; transform: translateY(22px) scale(.98); } to { opacity: 1; transform: none; } }

@media (max-width: 1024px) {
    .h-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "times times" "qibla quran" "qibla cal" "conv ai" "ram ram" "methods mp3" "hd hd" "az mq"; }
}
@media (max-width: 600px) {
    .h-tools { gap: 12px; grid-auto-rows: minmax(170px, auto); grid-template-areas: "times times" "qibla qibla" "quran quran" "cal cal" "conv conv" "ai ai" "ram ram" "methods mp3" "hd hd" "az az" "mq mq"; }
    .h-tool { padding: 18px; border-radius: 20px; }
    .h-tool-live { position: static; align-self: flex-start; }
    .h-tool-title { font-size: 17px; }
    .h-tool-mp3 .h-tool-desc, .h-tool-quran .h-tool-stats span:last-child { display: none; }
    .h-tool-ram .h-tool-desc { max-width: 70%; }
    .h-tool-moon { width: 70px; height: 80px; left: 22px; bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    .h-tool, .h-tool-ic, .h-tool-go, .h-tool-moon, .h-tool-qibla .h-qibla-compass { transition: none; }
    .h-tools.is-in .h-tool, .h-tool-dot, .h-tool-caret, .h-tool-mp3:hover .h-tool-wave i { animation: none; }
}

/* ═══════════════════════════════════════════
   PRAYERTIME LIVE EVERYWHERE — browser add-on + mobile apps
   ═══════════════════════════════════════════ */
.h-apps {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 40px; align-items: center;
    margin-top: 28px; padding: 36px; border-radius: 28px; border: 1px solid var(--t-border);
    background: radial-gradient(90% 120% at 100% 100%, rgba(var(--t-accent-rgb, 140, 115, 85), .14), transparent 60%), var(--t-card);
}
.h-apps-title { margin: 6px 0 10px; font-family: 'Space Grotesk', sans-serif; font-size: clamp(26px, 3vw, 36px); line-height: 1.15; color: var(--t-text); }
.h-apps-desc { margin: 0 0 22px; max-width: 560px; font-size: 14.5px; line-height: 1.65; color: var(--t-text-secondary); }
.h-apps-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.h-app-tile {
    position: relative; display: flex; align-items: center; gap: 11px; min-width: 0;
    padding: 14px 13px 12px 12px; border-radius: 16px; border: 1px solid var(--t-border);
    background: var(--t-bg); color: var(--t-text); text-decoration: none;
    transition: transform .25s cubic-bezier(.2,.8,.3,1.3), border-color .2s, box-shadow .25s;
}
.h-app-tile:hover { transform: translateY(-2px); border-color: rgba(var(--t-accent-rgb, 140, 115, 85), .55); box-shadow: 0 14px 28px -18px rgba(0, 0, 0, .45); }
.h-app-tile img { width: 30px; height: 30px; flex-shrink: 0; }
.h-app-ic { width: 30px; height: 30px; display: grid; place-items: center; flex-shrink: 0; color: var(--t-text-secondary); }
.h-app-ic svg { width: 24px; height: 24px; }
.h-app-ic.is-win { color: #0a74d6; }
.h-app-ic.is-win svg { width: 22px; height: 22px; }
.h-app-tile-txt { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.h-app-tile-txt small { font-size: 11px; color: var(--t-text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-app-tile-txt b { font-family: 'Space Grotesk', sans-serif; font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-app-pill {
    position: absolute; top: -8px; inset-inline-end: 10px; padding: 2px 8px; border-radius: 999px; font-style: normal; font-size: 10px; font-weight: 700;
    letter-spacing: .3px; background: var(--t-card); border: 1px solid var(--t-border); color: var(--t-text-secondary); white-space: nowrap;
}
.h-app-pill.is-live { background: #16a34a; border-color: #16a34a; color: #fff; }
.h-app-tile.is-soon b { color: var(--t-text-secondary); }
.h-apps-all {
    display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 11px 18px; border-radius: 12px;
    background: var(--t-text); color: var(--t-bg); font-weight: 700; font-size: 14.5px; text-decoration: none;
    box-shadow: 0 10px 22px -14px rgba(0, 0, 0, .5); transition: transform .2s, box-shadow .2s;
}
.h-apps-all:hover { transform: translateY(-2px); box-shadow: 0 16px 28px -14px rgba(0, 0, 0, .55); }
.h-apps-media { position: relative; display: block; padding-inline-start: 30px; padding-block-end: 46px; }
.h-apps-media img { display: block; height: auto; }
.h-apps-wide { width: 100%; box-shadow: 0 28px 56px -24px rgba(0, 0, 0, .45), 0 0 0 1px rgba(0, 0, 0, .06); transition: transform .4s cubic-bezier(.2,.8,.3,1); }
.h-apps-tall { position: absolute; inset-inline-start: 0; bottom: 0; width: 26%; box-shadow: 0 22px 40px -16px rgba(0, 0, 0, .55); transition: transform .4s cubic-bezier(.2,.8,.3,1); }
.h-apps-media:hover .h-apps-wide { transform: translateY(-3px); }
.h-apps-media:hover .h-apps-tall { transform: translateY(-6px); }
@media (max-width: 900px) {
    .h-apps { grid-template-columns: 1fr; padding: 26px; gap: 26px; }
    .h-apps-media { order: -1; }
}
@media (max-width: 480px) {
    .h-apps { padding: 20px; border-radius: 22px; }
    .h-apps-grid { grid-template-columns: 1fr; }
    .h-apps-all { display: flex; justify-content: center; }
}

/* Qibla link at the end of the method row (right-aligned) */
.h-method-bar .h-loc-qibla { margin-right: auto; margin-top: 0; }

/* Hadiths (collections filled by js/home-tools.js from api/hadith-today.php) and Adhan (data/adhan.json) */
.h-tool-hd { grid-area: hd; --tint: 22, 163, 74; }
.h-tool-az { grid-area: az; --tint: 2, 132, 199; }
.h-tool-hd[hidden], .h-tool-az[hidden] { display: none; }
.h-hd-saw { font-family: 'Amiri', serif; font-weight: 400; font-size: .8em; }
.h-tool-hd .h-tool-desc, .h-tool-az .h-tool-desc { max-width: 34ch; }
.h-tool-deco { position: absolute; inset-inline-end: 22px; bottom: 6px; z-index: -1; font: 400 64px/1.2 'Amiri', serif; color: rgba(var(--tint), .09); pointer-events: none; white-space: nowrap; transition: transform .6s cubic-bezier(.2,.8,.2,1), color .4s; }
.h-tool:hover .h-tool-deco { transform: translateY(-4px); color: rgba(var(--tint), .14); }
.h-hd-chips { position: relative; z-index: 3; margin-top: auto; padding-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.h-hd-chips a { padding: 5px 11px; border-radius: 999px; background: rgba(var(--tint), .1); color: var(--t-text); font-size: 12.5px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background .2s; }
.h-hd-chips a:hover { background: rgba(var(--tint), .2); }
.h-hd-chips a.is-all { background: none; color: rgb(var(--tint)); padding-inline: 4px; }
.h-az-row { position: relative; z-index: 3; margin-top: auto; padding-top: 6px; display: flex; align-items: center; gap: 12px; min-width: 0; }
.h-az-play { flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; display: grid; place-items: center; background: rgb(var(--tint)); color: #fff; cursor: pointer; box-shadow: 0 8px 18px -8px rgba(var(--tint), .8); transition: transform .2s; }
.h-az-play:hover { transform: scale(1.07); }
.h-az-play:focus-visible { outline: 3px solid rgba(var(--tint), .45); outline-offset: 2px; }
.h-az-play svg { width: 18px; height: 18px; }
.h-az-play .i-pause, .h-az-play.is-playing .i-play { display: none; }
.h-az-play.is-playing .i-pause { display: block; }
.h-az-pl { display: flex; flex-direction: column; gap: 5px; min-width: 0; font-size: 13px; color: var(--t-text); }
.h-az-pl b { font-weight: 700; white-space: nowrap; }
.h-az-eq { display: flex; align-items: flex-end; gap: 3px; height: 14px; }
.h-az-eq i { width: 3px; height: 30%; border-radius: 2px; background: rgba(var(--tint), .45); }
.h-az-eq i:nth-child(2) { height: 70%; } .h-az-eq i:nth-child(3) { height: 50%; } .h-az-eq i:nth-child(4) { height: 90%; }
.h-tool-az.is-playing .h-az-eq i { background: rgb(var(--tint)); animation: h-tool-wave .9s ease-in-out infinite; }
.h-tool-az.is-playing .h-az-eq i:nth-child(2n) { animation-delay: -.3s; } .h-tool-az.is-playing .h-az-eq i:nth-child(3n) { animation-delay: -.55s; }
.h-az-flags { margin-inline-start: auto; display: flex; align-items: center; min-width: 0; }
.h-az-flags img { width: 26px; height: 19px; border-radius: 4px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0,0,0,.08); margin-inline-start: 4px; }
.h-az-flags img:first-child { margin-inline-start: 0; }
.h-az-flags span { margin-inline-start: 8px; font-size: 12.5px; font-weight: 700; color: rgb(var(--tint)); white-space: nowrap; }
@media (max-width: 760px) { .h-tool-deco { font-size: 52px; } }
@media (max-width: 420px) { .h-az-flags img:nth-child(n+4) { display: none; } }
.h-events-all { margin-inline-start: auto; margin-inline-end: 10px; font-size: 12.5px; font-weight: 700; color: var(--t-accent); text-decoration: none; white-space: nowrap; }
.h-events-all::after { content: ' →'; }
[dir="rtl"] .h-events-all::after { content: ' ←'; }
.h-events-all:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Nearest mosque (links to the Qibla map with ?near=1) */
.h-tool-mq { grid-area: mq; --tint: 15, 143, 99; }
.h-mq-map { position: relative; height: 54px; margin-top: auto; border-radius: 14px; overflow: hidden;
    background: linear-gradient(-90deg, rgba(var(--tint), .07) 1px, transparent 1px) 0 0 / 18px 18px, linear-gradient(rgba(var(--tint), .07) 1px, transparent 1px) 0 0 / 18px 18px, rgba(var(--tint), .06); }
.h-mq-map::before { content: ''; position: absolute; right: -10%; left: -10%; top: 58%; height: 6px; background: rgba(var(--tint), .14); transform: rotate(6deg); }
.h-mq-map i { position: absolute; width: 16px; height: 16px; border-radius: 50%; background: rgb(var(--tint)); border: 2px solid #fff; box-shadow: 0 3px 8px -2px rgba(var(--tint), .7); transition: transform .4s cubic-bezier(.3,1.5,.5,1); }
.h-mq-map i::after { content: ''; position: absolute; inset: 3px 3px 3px 5px; border-radius: 50%; box-shadow: 2px 0 0 0 #fff; }
.h-mq-map .p1 { right: 18%; top: 18%; } .h-mq-map .p2 { right: 58%; top: 52%; } .h-mq-map .p3 { right: 82%; top: 14%; }
.h-mq-map .me { right: 40%; top: 30%; width: 12px; height: 12px; background: #3e8dd0; box-shadow: 0 0 0 6px rgba(62, 141, 208, .2); }
.h-mq-map .me::after { display: none; }
.h-tool-mq:hover .h-mq-map .p1 { transform: translateY(-3px); } .h-tool-mq:hover .h-mq-map .p2 { transform: translateY(-3px) scale(1.15); } .h-tool-mq:hover .h-mq-map .p3 { transform: translateY(-3px); }
.h-mq-cta { font-size: 13px; font-weight: 700; color: rgb(var(--tint)); }
/* Adhan card in one column */
.h-tool-az .h-tool-desc { max-width: none; }
.h-tool-az .h-tool-deco { font-size: 46px; }

/* Qur'an card: reciters + translations, the mosaic of the Qur'an page behind (round 101) */
.h-tool-quran { background:
    radial-gradient(120% 90% at 100% 0%, rgba(var(--tint), .16), transparent 55%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23a07a4a' stroke-opacity='.16' stroke-width='1'%3E%3Crect x='16' y='16' width='24' height='24'/%3E%3Crect x='16' y='16' width='24' height='24' transform='rotate(45 28 28)'/%3E%3Ccircle cx='28' cy='28' r='5'/%3E%3C/g%3E%3C/svg%3E"),
    var(--t-card); }
.h-tool-quran .h-tool-ar { margin-top: 2px; font-size: 22px; opacity: .9; }
.h-qr-feats { list-style: none; margin: auto 0 0; padding: 0; display: grid; gap: 8px; }
.h-qr-feats li { display: flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 600; line-height: 1.3; color: var(--t-text); }
.h-qr-avs { flex: none; display: flex; }
.h-qr-avs img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; border: 2px solid var(--t-card); margin-inline-start: -9px; background: var(--t-card); transition: transform .3s; }
.h-qr-avs img:first-child { margin-inline-start: 0; }
.h-tool-quran:hover .h-qr-avs img:nth-child(2) { transform: translateY(-2px); } .h-tool-quran:hover .h-qr-avs img:nth-child(3) { transform: translateY(-4px); }

/* r115: loading state of the hero and the prayer bar — same size as the real content, a soft shimmer instead of --:-- */
@keyframes hSkShimmer { from { background-position: 0% 0; } to { background-position: 200% 0; } }
.h-hero.is-loading .h-hero-num, .h-hero.is-loading .h-hero-sec, .h-hero.is-loading .h-hero-meta-value, .h-hero.is-loading .h-hero-icon {
    color: transparent !important; border-radius: 12px;
    background: linear-gradient(-90deg, rgba(255,255,255,.07) 25%, rgba(255,255,255,.18) 50%, rgba(255,255,255,.07) 75%) 0 0 / 200% 100%;
    animation: hSkShimmer 1.4s linear infinite; }
.h-hero.is-loading .h-hero-sec, .h-hero.is-loading .h-hero-meta-value { border-radius: 7px; }
.h-hero.is-loading #h-hero-name { display: inline-block; min-width: 92px; }
.h-hero.is-loading .h-hero-icon { border-radius: 50%; }
.h-hero.is-loading .h-hero-icon * { visibility: hidden; }
.h-pcard.h-sk { pointer-events: none; }
.h-pcard.h-sk:hover { transform: none; box-shadow: none; }
.h-pcard.h-sk > div { color: transparent !important; justify-self: start; border-radius: 7px;
    background: linear-gradient(-90deg, color-mix(in srgb, var(--t-text, #1e293b) 6%, transparent) 25%, color-mix(in srgb, var(--t-text, #1e293b) 13%, transparent) 50%, color-mix(in srgb, var(--t-text, #1e293b) 6%, transparent) 75%) 0 0 / 200% 100%;
    animation: hSkShimmer 1.4s linear infinite; }
.h-pcard.h-sk .h-pcard-name { width: 56px; }
.h-pcard.h-sk .h-pcard-icon { width: 24px; height: 24px; align-self: center; border-radius: 50%; }
.h-pcard.h-sk .h-pcard-rel { width: 70px; }
@media (prefers-reduced-motion: reduce) { .h-hero.is-loading *, .h-pcard.h-sk > div { animation: none !important; } }
/* r115: the first row (hero, prayer bar, Qur'an player) stands still on load — no slide-in */
.home-grid .h-hero, .home-grid .h-qtop { animation: none; }
.h-hero.is-loading .h-hero-icon { width: 42px; height: 42px; }
/* the method row on phones: room for two lines from the start (the method name is filled in by script) */
@media (max-width: 600px) { .h-method-bar { min-height: 40px; align-content: center; } }
