/* ==========================================================================================================
   Sakinah — app design system
   Warm paper surfaces, emerald & gold, a living sky. Tokens come from App\Support\Theme (light + dark).
   ========================================================================================================== */

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { margin: 0; }

body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-ui);
    font-size: 15.5px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior-y: none;
}
html[lang="bn"] body { font-size: 16px; line-height: 1.62; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; line-height: 1.2; letter-spacing: -.01em; }
p { margin: 0; }
[hidden] { display: none !important; }
::selection { background: var(--gold-soft); }

.icon { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 18px; height: 18px; }
.icon-xs { width: 15px; height: 15px; }
.icon-lg { width: 28px; height: 28px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.display { font-family: var(--font-display); font-weight: 600; letter-spacing: -.02em; font-optical-sizing: auto; }
.arabic { font-family: var(--font-quran); direction: rtl; text-align: right; font-weight: 400; line-height: 2.05; }
.naskh { font-family: var(--font-naskh); direction: rtl; line-height: 1.95; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.gold { color: var(--gold-ink); }
.green { color: var(--primary-ink); }
.small { font-size: 13px; }
.tiny { font-size: 11.5px; letter-spacing: .02em; }
.caps { text-transform: uppercase; letter-spacing: .12em; font-size: 11px; font-weight: 700; }
html[lang="bn"] .caps { text-transform: none; letter-spacing: .02em; font-size: 12.5px; font-weight: 600; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stack > * + * { margin-top: 14px; }
.mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 20px; } .mt-4 { margin-top: 28px; }

/* ----------------------------------------------------------------------------------------------------------
   Shell — a phone-width column; on large screens it floats on a patterned backdrop
   ---------------------------------------------------------------------------------------------------------- */
.shell {
    position: relative;
    max-width: 480px;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0 auto;
    background: var(--paper);
    padding-bottom: calc(92px + env(safe-area-inset-bottom));
}
.shell.no-tabbar { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }

@media (min-width: 720px) {
    body { background: var(--paper-2); }
    body::before {
        content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .55;
        background-image: url("../img/pattern.svg"); background-size: 180px;
    }
    .shell { box-shadow: 0 0 0 1px var(--line), 0 30px 80px -30px rgba(10, 30, 25, .35); }
}

.screen { padding: 0 18px; }
.screen-flush { padding: 0; }

/* ----------------------------------------------------------------------------------------------------------
   Top bar (inner screens)
   ---------------------------------------------------------------------------------------------------------- */
.topbar {
    position: sticky; top: 0; z-index: 30;
    display: flex; align-items: center; gap: 8px;
    min-height: 58px;
    padding: calc(env(safe-area-inset-top) + 8px) 12px 8px;
    background: color-mix(in srgb, var(--paper) 82%, transparent);
    -webkit-backdrop-filter: saturate(1.4) blur(16px);
    backdrop-filter: saturate(1.4) blur(16px);
    transition: box-shadow .2s;
}
.topbar.is-scrolled { box-shadow: 0 1px 0 var(--line); }
.topbar-title { flex: 1; min-width: 0; font-weight: 700; font-size: 16.5px; text-align: center; opacity: 0; transform: translateY(4px); transition: .2s; }
.topbar.is-scrolled .topbar-title, .topbar.always .topbar-title { opacity: 1; transform: none; }
.topbar .spacer { flex: 1; }

.icon-btn {
    width: 42px; height: 42px; flex: none;
    display: inline-grid; place-items: center;
    border-radius: 14px;
    color: var(--ink);
    background: var(--card);
    box-shadow: inset 0 0 0 1px var(--line);
    transition: transform .15s, background .15s;
}
.icon-btn:active { transform: scale(.94); }
.icon-btn.ghost { background: transparent; box-shadow: none; }
.icon-btn .dot { position: absolute; }

.page-head { padding: 4px 20px 18px; }
.page-head h1 { font-family: var(--font-display); font-size: 31px; font-weight: 600; letter-spacing: -.025em; }
html[lang="bn"] .page-head h1 { font-size: 28px; }
.page-head p { color: var(--muted); margin-top: 4px; }
.page-head .eyebrow { color: var(--gold-ink); margin-bottom: 6px; }

/* ----------------------------------------------------------------------------------------------------------
   Tab bar
   ---------------------------------------------------------------------------------------------------------- */
.tabbar {
    position: fixed; z-index: 40; left: 50%; bottom: 0;
    width: 100%; max-width: 480px; transform: translateX(-50%);
    padding: 0 14px calc(10px + env(safe-area-inset-bottom));
    pointer-events: none;
}
.tabbar nav {
    pointer-events: auto;
    display: grid; grid-template-columns: repeat(5, 1fr);
    padding: 7px;
    border-radius: 26px;
    background: color-mix(in srgb, var(--card) 86%, transparent);
    -webkit-backdrop-filter: saturate(1.6) blur(20px);
    backdrop-filter: saturate(1.6) blur(20px);
    box-shadow: inset 0 0 0 1px var(--line), 0 12px 36px -12px rgba(8, 28, 22, .28);
}
.tabbar a {
    position: relative;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 7px 2px 6px;
    border-radius: 19px;
    color: var(--muted);
    font-size: 11.5px; font-weight: 600;
    transition: color .2s, background .2s;
}
html[lang="bn"] .tabbar a { font-size: 12.5px; }
.tabbar a .icon { width: 23px; height: 23px; }
.tabbar a.is-active { color: var(--primary-ink); background: var(--primary-wash); }
.tabbar a.is-active::before {
    content: ""; position: absolute; top: 3px; width: 4px; height: 4px; border-radius: 50%; background: var(--gold);
}

/* ----------------------------------------------------------------------------------------------------------
   The sky — home & prayer headers painted for the time of day
   ---------------------------------------------------------------------------------------------------------- */
.sky {
    --sky: linear-gradient(180deg, #123A33 0%, #0B1F1B 100%);
    --sky-ink: #FFFFFF;
    position: relative;
    isolation: isolate;
    color: var(--sky-ink);
    background: var(--sky);
    padding: calc(env(safe-area-inset-top) + 12px) 20px 112px;
    overflow: hidden;
}
.sky[data-sky="night"] { --sky: radial-gradient(130% 90% at 85% -10%, #235247 0%, #0F2B26 45%, #0A1A17 100%); }
.sky[data-sky="dawn"] { --sky: linear-gradient(180deg, #243150 0%, #54506F 42%, #B77B78 76%, #EBA985 100%); }
.sky[data-sky="morning"] { --sky: linear-gradient(180deg, #3F8FA4 0%, #7DB6BA 50%, #E7D6A8 100%); }
.sky[data-sky="noon"] { --sky: linear-gradient(180deg, #1F7389 0%, #4FA0A6 55%, #D8D3A2 100%); }
.sky[data-sky="afternoon"] { --sky: linear-gradient(180deg, #A2653A 0%, #D2934E 48%, #F0CF95 100%); }
.sky[data-sky="dusk"] { --sky: linear-gradient(180deg, #221E38 0%, #5C3F5E 45%, #C66E5C 82%, #E89A6B 100%); }
.sky-static { --sky: linear-gradient(160deg, var(--primary-deep), var(--night)) !important; }

.sky-stars { position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity 1s; background-image:
    radial-gradient(1px 1px at 12% 22%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 28% 12%, #fff 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 46% 30%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 62% 16%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 78% 36%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 90% 10%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 8% 48%, #fff 50%, transparent 51%), radial-gradient(1.3px 1.3px at 36% 52%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 70% 58%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 55% 6%, #fff 50%, transparent 51%); }
.sky[data-sky="night"] .sky-stars, .sky[data-sky="dusk"] .sky-stars { opacity: .75; animation: twinkle 6s ease-in-out infinite alternate; }
@keyframes twinkle { to { opacity: .35; } }

.sky-glow { position: absolute; z-index: -1; width: 340px; height: 340px; border-radius: 50%; right: -120px; top: -150px; background: radial-gradient(circle, rgba(255, 236, 190, .45), transparent 65%); }
.sky[data-sky="night"] .sky-glow { background: radial-gradient(circle, rgba(170, 230, 210, .18), transparent 65%); }

.skyline { position: absolute; z-index: 1; left: 0; right: 0; bottom: -1px; height: 86px; color: var(--paper); pointer-events: none; }
.skyline svg { width: 100%; height: 100%; }
.skyline .far { color: var(--paper); opacity: .18; }

.sky-top { position: relative; z-index: 2; display: flex; align-items: center; gap: 10px; }
.loc-pill {
    display: inline-flex; align-items: center; gap: 6px; max-width: 62%;
    padding: 8px 12px 8px 10px; border-radius: 999px;
    background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    font-size: 13.5px; font-weight: 600;
}
.loc-pill .icon { width: 16px; height: 16px; }
.sky .icon-btn { background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); color: inherit; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.sky .badge-dot { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 2px rgba(0, 0, 0, .15); }

.sky-body { position: relative; z-index: 2; margin-top: 26px; }
.sky-dates { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13.5px; opacity: .92; }
.sky-dates .sep { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .6; }
.sky-now { margin-top: 18px; font-size: 13px; font-weight: 600; opacity: .85; display: flex; align-items: center; gap: 8px; }
.sky-now .live { width: 8px; height: 8px; border-radius: 50%; background: #8EF0C6; box-shadow: 0 0 0 4px rgba(142, 240, 198, .22); animation: pulse 2.4s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(142, 240, 198, 0); } }
.sky-next { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 4px; }
.sky-next h2 { font-family: var(--font-display); font-weight: 600; font-size: 46px; letter-spacing: -.035em; line-height: 1; }
html[lang="bn"] .sky-next h2 { font-family: var(--font-bangla); font-size: 42px; letter-spacing: 0; font-weight: 600; }
.sky-next .at { text-align: right; }
.sky-next .at b { display: block; font-family: var(--font-display); font-size: 27px; font-weight: 500; line-height: 1.05; }
html[lang="bn"] .sky-next .at b { font-family: var(--font-bangla); font-weight: 600; }
.sky-next .at span { font-size: 12.5px; opacity: .85; }
.countdown {
    display: inline-flex; align-items: center; gap: 8px; margin-top: 14px;
    padding: 7px 14px 7px 8px; border-radius: 999px;
    background: rgba(0, 0, 0, .16); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
    font-size: 14px; font-weight: 600;
}
.countdown .icon { width: 17px; height: 17px; }
.countdown .ring { width: 24px; height: 24px; }
.countdown .num { letter-spacing: .02em; }

.sun-arc { position: absolute; z-index: 0; left: -8%; right: -8%; top: 58px; height: 190px; pointer-events: none; opacity: .9; }
.sun-arc path { fill: none; stroke: rgba(255, 255, 255, .28); stroke-width: 1.2; stroke-dasharray: 2 6; }
.sun-arc .body { filter: drop-shadow(0 0 10px rgba(255, 230, 170, .9)); }

/* Prayer tab: a progress ring for the current window instead of the home headline */
.sky-ring { padding-bottom: 104px; }
.ring-body { position: relative; z-index: 2; display: flex; align-items: center; gap: 22px; margin-top: 22px; }
.ring { position: relative; width: 150px; height: 150px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: rgba(255, 255, 255, .16); stroke-width: 6; }
.ring-fill { fill: none; stroke: #F3D48B; stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; line-height: 1.25; }
.ring-center b { font-family: var(--font-display); font-size: 26px; font-weight: 600; }
html[lang="bn"] .ring-center b { font-family: var(--font-bangla); }
.ring-side { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.ring-side b { font-family: var(--font-display); font-size: 30px; font-weight: 600; letter-spacing: -.02em; }
html[lang="bn"] .ring-side b { font-family: var(--font-bangla); }
.ring-side .num { font-size: 18px; font-weight: 700; }
.sky[data-sky="morning"] .ring-track, .sky[data-sky="noon"] .ring-track { stroke: rgba(14, 38, 33, .14); }
.sky[data-sky="morning"] .ring-fill, .sky[data-sky="noon"] .ring-fill { stroke: #0E6B58; }

/* Morning skies are bright: switch to dark type */
.sky[data-sky="morning"], .sky[data-sky="noon"] { --sky-ink: #0E2621; }
.sky[data-sky="morning"] .loc-pill, .sky[data-sky="noon"] .loc-pill,
.sky[data-sky="morning"] .icon-btn, .sky[data-sky="noon"] .icon-btn { background: rgba(255, 255, 255, .38); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5); }
.sky[data-sky="morning"] .countdown, .sky[data-sky="noon"] .countdown { background: rgba(255, 255, 255, .34); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5); }
.sky[data-sky="morning"] .sun-arc path, .sky[data-sky="noon"] .sun-arc path { stroke: rgba(14, 38, 33, .25); }

/* ----------------------------------------------------------------------------------------------------------
   Surfaces
   ---------------------------------------------------------------------------------------------------------- */
.panel {
    position: relative;
    background: var(--card);
    border-radius: 24px;
    box-shadow: inset 0 0 0 1px var(--line);
}
.panel-pad { padding: 18px; }
.panel.lift { box-shadow: inset 0 0 0 1px var(--line), 0 18px 40px -24px rgba(10, 35, 28, .35); }
.panel.tint { background: var(--primary-wash); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 14%, transparent); }
.panel.gold-tint { background: var(--gold-soft); box-shadow: none; }
.panel.night { background: linear-gradient(155deg, var(--night-2), var(--night)); color: #F3EEE2; box-shadow: none; }
.panel.night .muted { color: rgba(243, 238, 226, .66); }
.panel.patterned::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    background: url("../img/pattern.svg") right -30px top -30px / 150px; opacity: .06;
}
.panel.night.patterned::after { opacity: .09; filter: invert(1); }

.section { margin-top: 26px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 2px 12px; }
.section-head h3 { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.section-head .link { font-size: 13.5px; font-weight: 600; color: var(--primary-ink); display: inline-flex; align-items: center; gap: 2px; }
.section-head .link .icon { width: 16px; height: 16px; }

.overlap { position: relative; z-index: 5; margin-top: -30px; }

.divider { height: 1px; background: var(--line); margin: 14px 0; }

/* Ornamented frame used for the ayah of the day and the surah header */
.ornate { position: relative; padding: 26px 20px 20px; border-radius: 26px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.ornate::before { content: ""; position: absolute; inset: 7px; border-radius: 20px; border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); pointer-events: none; }
.ornate .corner { position: absolute; width: 22px; height: 22px; color: var(--gold); }
.ornate .corner.tl { top: 1px; left: 1px; } .ornate .corner.tr { top: 1px; right: 1px; transform: scaleX(-1); }
.ornate .corner.bl { bottom: 1px; left: 1px; transform: scaleY(-1); } .ornate .corner.br { bottom: 1px; right: 1px; transform: scale(-1); }

/* ----------------------------------------------------------------------------------------------------------
   Today's five prayers strip (home)
   ---------------------------------------------------------------------------------------------------------- */
.today { padding: 14px 10px 12px; }
.today-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; }
.today-item {
    position: relative;
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 10px 2px 9px; border-radius: 18px;
    text-align: center;
}
.today-item .icon { width: 21px; height: 21px; color: var(--muted); }
.today-item .name { font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
html[lang="bn"] .today-item .name { font-size: 13.5px; }
.today-item .time { font-size: 13px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.today-item.is-now { background: var(--primary); color: var(--on-primary); box-shadow: 0 10px 22px -12px var(--primary); }
.today-item.is-now .icon, .today-item.is-now .name, .today-item.is-now .time { color: var(--on-primary); }
.today-item.is-next .icon { color: var(--gold-ink); }
.today-item.is-past .time { color: var(--muted); }

.tick {
    width: 24px; height: 24px; margin-top: 4px;
    display: grid; place-items: center; border-radius: 50%;
    box-shadow: inset 0 0 0 1.5px var(--line-2);
    color: transparent; transition: .2s;
}
.tick .icon { width: 14px; height: 14px; stroke-width: 3; }
.tick.is-done { background: var(--gold); box-shadow: none; color: #fff; }
.tick:disabled { opacity: .3; }
.today-item.is-now .tick { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .5); }
.today-item.is-now .tick.is-done { background: #fff; color: var(--primary); }
.today-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 8px 0; margin-top: 8px; border-top: 1px dashed var(--line-2); font-size: 13px; color: var(--muted); }
.today-foot b { color: var(--ink); }

/* ----------------------------------------------------------------------------------------------------------
   Shortcut grid
   ---------------------------------------------------------------------------------------------------------- */
.shortcuts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 6px; }
.shortcut { display: flex; flex-direction: column; align-items: center; gap: 7px; text-align: center; font-size: 12.5px; font-weight: 600; color: var(--ink-2); line-height: 1.25; }
html[lang="bn"] .shortcut { font-size: 13px; }
.shortcut .glyph {
    --c: var(--primary);
    width: 58px; height: 58px; display: grid; place-items: center;
    border-radius: 20px;
    color: color-mix(in srgb, var(--c) 88%, var(--ink));
    background: color-mix(in srgb, var(--c) 13%, var(--card));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 16%, transparent);
    transition: transform .18s;
}
:root[data-theme="dark"] .shortcut .glyph { color: color-mix(in srgb, var(--c) 60%, #fff); background: color-mix(in srgb, var(--c) 20%, var(--card)); }
.shortcut .glyph .icon { width: 26px; height: 26px; }
.shortcut:active .glyph { transform: scale(.92); }

/* ----------------------------------------------------------------------------------------------------------
   Buttons, chips, controls
   ---------------------------------------------------------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 48px; padding: 0 20px;
    border-radius: 16px;
    font-weight: 700; font-size: 15px;
    background: var(--card); color: var(--ink);
    box-shadow: inset 0 0 0 1px var(--line-2);
    transition: transform .15s, filter .15s, background .15s;
    white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn .icon { width: 19px; height: 19px; }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 12px 24px -14px var(--primary); }
.btn-gold { background: var(--gold); color: #2A1D05; box-shadow: none; }
.btn-night { background: var(--night); color: #F3EEE2; box-shadow: none; }
.btn-soft { background: var(--primary-wash); color: var(--primary-ink); box-shadow: none; }
.btn-ghost { background: transparent; box-shadow: none; }
.btn-block { display: flex; width: 100%; }
.btn-sm { min-height: 38px; padding: 0 14px; border-radius: 12px; font-size: 13.5px; }
.btn[disabled], .btn.is-loading { opacity: .6; pointer-events: none; }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 18px; margin: 0 -18px; scroll-snap-type: x proximity; }
.chips::-webkit-scrollbar { display: none; }
.chip {
    flex: none; display: inline-flex; align-items: center; gap: 6px;
    height: 36px; padding: 0 14px; border-radius: 999px;
    background: var(--card); box-shadow: inset 0 0 0 1px var(--line-2);
    font-size: 13.5px; font-weight: 600; color: var(--ink-2); scroll-snap-align: start;
}
.chip .icon { width: 16px; height: 16px; }
.chip.is-active { background: var(--ink); color: var(--paper); box-shadow: none; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--paper-3); color: var(--ink-2); }
.pill.green { background: var(--primary-soft); color: var(--primary-ink); }
.pill.gold { background: var(--gold-soft); color: var(--gold-ink); }
.pill.rose { background: var(--rose-soft); color: #9A4A2C; }
:root[data-theme="dark"] .pill.rose { color: #F2B79C; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 16px; background: var(--paper-3); }
.seg button, .seg a { height: 38px; border-radius: 12px; font-size: 14px; font-weight: 650; color: var(--muted); display: grid; place-items: center; }
.seg .is-active { background: var(--card); color: var(--ink); box-shadow: 0 2px 8px -3px rgba(0, 0, 0, .18); }

.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 2; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--paper-3); box-shadow: inset 0 0 0 1px var(--line-2); transition: .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); transition: .22s cubic-bezier(.3, .7, .4, 1.2); }
.switch input:checked + span { background: var(--primary); box-shadow: none; }
.switch input:checked + span::after { transform: translateX(20px); }

.field { display: block; }
.field + .field { margin-top: 14px; }
.field label, .field .label { display: block; font-size: 13.5px; font-weight: 650; color: var(--ink-2); margin: 0 2px 6px; }
.input, .select, .textarea {
    width: 100%; min-height: 50px; padding: 12px 15px;
    border-radius: 15px; border: 0; outline: 0;
    background: var(--card); box-shadow: inset 0 0 0 1px var(--line-2);
    font-size: 16px; transition: box-shadow .15s;
    appearance: none; -webkit-appearance: none;
}
.textarea { min-height: 110px; resize: vertical; }
.select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23889' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 42px; }
.input:focus, .select:focus, .textarea:focus { box-shadow: inset 0 0 0 2px var(--primary); }
.field .error { display: block; color: #C0492B; font-size: 13px; margin: 6px 2px 0; }
.field .help { display: block; color: var(--muted); font-size: 12.5px; margin: 6px 2px 0; }
.search-field { position: relative; }
.search-field .icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-field .input { padding-left: 46px; border-radius: 18px; }

input[type="range"] { width: 100%; accent-color: var(--primary); }

/* ----------------------------------------------------------------------------------------------------------
   Lists
   ---------------------------------------------------------------------------------------------------------- */
.list { background: var(--card); border-radius: 22px; box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.list-item { position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 16px; min-height: 64px; }
.list-item + .list-item::before { content: ""; position: absolute; top: 0; left: 64px; right: 0; height: 1px; background: var(--line); }
.list.plain .list-item + .list-item::before { left: 16px; }
.list-item:active { background: var(--paper-2); }
.list-item .lead { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--paper-2); color: var(--ink-2); }
.list-item .lead .icon { width: 20px; height: 20px; }
.list-item .title { font-weight: 650; font-size: 15.5px; }
.list-item .sub { color: var(--muted); font-size: 13px; margin-top: 1px; }
.list-item .trail { color: var(--faint); display: flex; align-items: center; gap: 6px; font-size: 14px; }
.list-item .trail .icon { width: 18px; height: 18px; }
.list-label { margin: 22px 6px 8px; color: var(--muted); }

/* 8-point star number badge */
.star-num { position: relative; width: 42px; height: 42px; flex: none; display: grid; place-items: center; color: var(--gold-ink); font-size: 13px; font-weight: 750; font-variant-numeric: tabular-nums; }
.star-num svg { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--gold); opacity: .75; }
.star-num span { position: relative; color: var(--ink); }

/* ----------------------------------------------------------------------------------------------------------
   Ayah & Quran reader
   ---------------------------------------------------------------------------------------------------------- */
.surah-row .arabic-name { font-family: var(--font-quran); font-size: 22px; line-height: 1.3; color: var(--primary-ink); direction: rtl; }

.surah-hero { text-align: center; padding: 30px 22px 24px; overflow: hidden; }
.surah-hero .calligraphy { font-family: var(--font-quran); font-size: 44px; line-height: 1.5; color: var(--primary-ink); }
.surah-hero h1 { font-family: var(--font-display); font-size: 25px; margin-top: 2px; }
html[lang="bn"] .surah-hero h1 { font-family: var(--font-bangla); }
.surah-hero .meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.basmala { font-family: var(--font-quran); font-size: 30px; text-align: center; color: var(--ink); margin: 22px 0 6px; line-height: 1.8; }

.ayah { padding: 18px 2px 20px; border-bottom: 1px solid var(--line); scroll-margin-top: 80px; }
.ayah.is-playing { background: linear-gradient(90deg, transparent, var(--primary-wash), transparent); }
.ayah-bar { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; }
.ayah-bar .key { font-size: 12.5px; font-weight: 700; color: var(--muted); padding: 4px 10px; border-radius: 999px; background: var(--paper-2); margin-right: auto; font-variant-numeric: tabular-nums; }
.ayah-bar .icon-btn { width: 36px; height: 36px; border-radius: 12px; background: transparent; box-shadow: none; color: var(--muted); }
.ayah-bar .icon-btn.is-on { color: var(--gold-ink); }
.ayah-text { font-family: var(--font-quran); font-size: var(--reader-size, var(--arabic-size)); line-height: 2.15; direction: rtl; text-align: right; color: var(--ink); word-spacing: .04em; }
.ayah-end { font-family: var(--font-quran); color: var(--gold-ink); margin-inline-start: .15em; white-space: nowrap; }
.ayah-trans { margin-top: 10px; color: var(--ink-2); font-size: var(--trans-size, 15.5px); line-height: 1.7; }
.ayah-trans + .ayah-trans { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.ayah-trans .who { display: block; font-size: 11.5px; color: var(--faint); margin-bottom: 2px; }
.sajda-mark { display: inline-flex; align-items: center; gap: 4px; }

.player {
    position: fixed; z-index: 45; left: 50%; transform: translateX(-50%);
    bottom: calc(86px + env(safe-area-inset-bottom)); width: calc(100% - 28px); max-width: 452px;
    display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px;
    border-radius: 20px; background: var(--night); color: #F3EEE2;
    box-shadow: 0 16px 40px -14px rgba(0, 0, 0, .5);
}
.player .icon-btn { background: rgba(255, 255, 255, .1); box-shadow: none; color: #fff; width: 40px; height: 40px; }
.player .icon-btn.main { background: var(--gold); color: #2A1D05; }
.player .info { flex: 1; min-width: 0; font-size: 13px; line-height: 1.3; }
.player .info b { display: block; font-size: 14px; }
.player .bar { position: absolute; left: 14px; right: 14px; bottom: 3px; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.player .bar i { display: block; height: 100%; width: 0; background: var(--gold); }
.shell.no-tabbar .player { bottom: calc(16px + env(safe-area-inset-bottom)); }

/* Ayah / hadith / dua of the day */
.verse-card .arabic { font-size: 27px; text-align: center; line-height: 2; color: var(--ink); }
.verse-card .meaning { text-align: center; color: var(--ink-2); margin-top: 8px; font-size: 15.5px; }
.verse-card .ref { text-align: center; margin-top: 10px; }
.card-actions { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.card-actions .icon-btn { width: 40px; height: 40px; border-radius: 13px; background: var(--paper-2); box-shadow: none; color: var(--ink-2); }

/* ----------------------------------------------------------------------------------------------------------
   Prayer screen
   ---------------------------------------------------------------------------------------------------------- */
.day-switch { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 10px; }
.day-switch .label { text-align: center; line-height: 1.3; }
.day-switch .label b { display: block; font-size: 15.5px; }
.day-switch .label span { font-size: 12.5px; color: var(--muted); }

.prayer-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 18px; }
.prayer-row + .prayer-row { margin-top: 2px; }
.prayer-row .lead { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 15px; background: var(--paper-2); color: var(--ink-2); flex: none; }
.prayer-row .name { font-weight: 700; font-size: 16.5px; }
.prayer-row .hint { font-size: 12.5px; color: var(--muted); }
.prayer-row .time { font-family: var(--font-display); font-size: 21px; font-weight: 600; font-variant-numeric: tabular-nums; }
html[lang="bn"] .prayer-row .time { font-family: var(--font-bangla); font-weight: 650; }
.prayer-row .bell { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: var(--faint); }
.prayer-row .bell.is-on { color: var(--gold-ink); background: var(--gold-soft); }
.prayer-row.is-now { background: var(--primary); color: var(--on-primary); }
.prayer-row.is-now .lead { background: rgba(255, 255, 255, .16); color: inherit; }
.prayer-row.is-now .hint { color: rgba(255, 255, 255, .8); }
.prayer-row.is-now .bell { color: rgba(255, 255, 255, .75); }
.prayer-row.is-now .bell.is-on { background: rgba(255, 255, 255, .18); color: #fff; }
.prayer-row.is-muted { opacity: .72; }
.prayer-row.is-muted .name { font-weight: 600; }

.mini-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.mini { padding: 14px; border-radius: 20px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.mini .k { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.mini .k .icon { width: 16px; height: 16px; }
.mini .v { font-family: var(--font-display); font-size: 20px; font-weight: 600; margin-top: 3px; font-variant-numeric: tabular-nums; }
html[lang="bn"] .mini .v { font-family: var(--font-bangla); }

.timeline { position: relative; padding-left: 20px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--line-2); border-radius: 2px; }
.timeline .t-item { position: relative; padding: 8px 0 8px 10px; }
.timeline .t-item::before { content: ""; position: absolute; left: -19px; top: 14px; width: 12px; height: 12px; border-radius: 50%; background: var(--card); box-shadow: inset 0 0 0 2px var(--rose); }

table.timetable { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.timetable th { position: sticky; top: 58px; background: var(--paper); color: var(--muted); font-weight: 650; font-size: 11.5px; text-align: center; padding: 10px 4px; z-index: 2; }
.timetable td { text-align: center; padding: 11px 4px; border-top: 1px solid var(--line); }
.timetable td:first-child { text-align: left; padding-left: 10px; }
.timetable tr.is-today td { background: var(--primary-wash); font-weight: 700; }
.timetable tr.is-friday td:first-child b { color: var(--primary-ink); }
.table-scroll { overflow-x: auto; border-radius: 20px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }

/* ----------------------------------------------------------------------------------------------------------
   Qibla
   ---------------------------------------------------------------------------------------------------------- */
.qibla-screen { background: radial-gradient(120% 70% at 50% 0%, var(--night-2), var(--night)); color: #F3EEE2; min-height: 100dvh; }
.qibla-screen .topbar { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.qibla-screen .icon-btn { background: rgba(255, 255, 255, .1); box-shadow: none; color: #fff; }
.compass-wrap { position: relative; width: min(84vw, 360px); aspect-ratio: 1; margin: 18px auto 0; }
.compass-dial { position: absolute; inset: 0; transition: transform .25s linear; }
.compass-dial svg { width: 100%; height: 100%; }
.compass-center { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.compass-center .deg { display: grid; place-items: center; width: 42%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(11, 31, 27, .96) 62%, rgba(11, 31, 27, 0) 63%); font-family: var(--font-display); font-size: 40px; font-weight: 600; letter-spacing: -.03em; }
.compass-pointer { position: absolute; left: 50%; top: -14px; transform: translateX(-50%); width: 0; height: 0; border-left: 10px solid transparent; border-right: 10px solid transparent; border-top: 16px solid var(--gold); filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .4)); }
.compass-wrap.is-aligned .compass-pointer { border-top-color: #8EF0C6; }
.compass-wrap.is-aligned::after { content: ""; position: absolute; inset: -10px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(142, 240, 198, .5), 0 0 60px rgba(142, 240, 198, .25); animation: pulse 2s infinite; }
.qibla-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 28px; }
.qibla-facts div { text-align: center; padding: 12px 6px; border-radius: 18px; background: rgba(255, 255, 255, .06); }
.qibla-facts b { display: block; font-family: var(--font-display); font-size: 20px; font-weight: 600; }
.qibla-facts span { font-size: 12px; opacity: .7; }

/* ----------------------------------------------------------------------------------------------------------
   Tasbih & adhkar counters
   ---------------------------------------------------------------------------------------------------------- */
.tasbih-stage { display: grid; place-items: center; padding: 18px 0 8px; }
.tasbih-btn { position: relative; width: min(74vw, 300px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.tasbih-btn svg.ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.tasbih-btn .ring circle { fill: none; stroke-width: 10; }
.tasbih-btn .ring .track { stroke: var(--paper-3); }
.tasbih-btn .ring .fill { stroke: var(--primary); stroke-linecap: round; transition: stroke-dashoffset .25s; }
.tasbih-btn .core { width: 78%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; align-content: center; background: radial-gradient(circle at 35% 30%, var(--card), var(--paper-2)); box-shadow: inset 0 0 0 1px var(--line), 0 24px 50px -24px rgba(10, 35, 28, .45); transition: transform .08s; }
.tasbih-btn:active .core { transform: scale(.97); }
.tasbih-btn .count { font-family: var(--font-display); font-size: 76px; font-weight: 600; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.tasbih-btn .of { color: var(--muted); font-size: 14px; margin-top: 6px; }
.tasbih-btn.is-complete .ring .fill { stroke: var(--gold); }
.dhikr-text { text-align: center; font-family: var(--font-naskh); font-size: 30px; direction: rtl; line-height: 1.7; }

.adhkar-hero { border-radius: 26px; }
.adhkar-hero.is-morning { background: linear-gradient(160deg, #FFF6E4, var(--gold-soft)); box-shadow: none; color: #3B2A0B; }
.adhkar-hero-icon { width: 54px; height: 54px; flex: none; border-radius: 18px; display: grid; place-items: center; background: rgba(255, 255, 255, .7); color: var(--gold-ink); }
.adhkar-hero-sub { color: var(--gold-ink); }
.adhkar-hero-track { height: 8px; border-radius: 8px; background: rgba(255, 255, 255, .7); overflow: hidden; }
.adhkar-hero-track i { display: block; height: 100%; width: 0; background: var(--gold); border-radius: 8px; transition: width .3s; }
.adhkar-hero.is-evening .adhkar-hero-icon, .adhkar-hero.is-evening .adhkar-hero-track { background: rgba(255, 255, 255, .1); }
.adhkar-hero.is-evening .adhkar-hero-sub { color: rgba(243, 238, 226, .7); }
:root[data-theme="dark"] .adhkar-hero.is-morning { background: linear-gradient(160deg, #3A2E16, #231C0E); color: #F6E7C1; }
:root[data-theme="dark"] .adhkar-hero.is-morning .adhkar-hero-icon, :root[data-theme="dark"] .adhkar-hero.is-morning .adhkar-hero-track { background: rgba(255, 255, 255, .08); }
:root[data-theme="dark"] .adhkar-hero.is-morning .adhkar-hero-sub { color: #E0B865; }
@media (prefers-color-scheme: dark) {
    :root[data-theme="system"] .adhkar-hero.is-morning { background: linear-gradient(160deg, #3A2E16, #231C0E); color: #F6E7C1; }
    :root[data-theme="system"] .adhkar-hero.is-morning .adhkar-hero-icon, :root[data-theme="system"] .adhkar-hero.is-morning .adhkar-hero-track { background: rgba(255, 255, 255, .08); }
    :root[data-theme="system"] .adhkar-hero.is-morning .adhkar-hero-sub { color: #E0B865; }
}

.dhikr-card .counter-btn {
    display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 56px; margin-top: 14px;
    border-radius: 18px; background: var(--primary-wash); color: var(--primary-ink); font-weight: 750; font-size: 17px;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 18%, transparent); transition: transform .1s;
}
.dhikr-card .counter-btn:active { transform: scale(.98); }
.dhikr-card.is-done .counter-btn { background: var(--gold-soft); color: var(--gold-ink); box-shadow: none; }
.dhikr-card.is-done { opacity: .78; }

/* ----------------------------------------------------------------------------------------------------------
   Duas, hadith, names, articles
   ---------------------------------------------------------------------------------------------------------- */
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.cat-card { --c: var(--primary); position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 14px; min-height: 132px; padding: 16px; border-radius: 22px; background: color-mix(in srgb, var(--c) 9%, var(--card)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 14%, transparent); }
.cat-card .glyph { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: color-mix(in srgb, var(--c) 18%, var(--card)); color: color-mix(in srgb, var(--c) 85%, var(--ink)); }
:root[data-theme="dark"] .cat-card .glyph { color: color-mix(in srgb, var(--c) 55%, #fff); }
.cat-card b { font-size: 15.5px; line-height: 1.3; margin-top: auto; }
.cat-card small { color: var(--muted); font-size: 12.5px; }
.cat-card::after { content: ""; position: absolute; right: -26px; bottom: -26px; width: 90px; height: 90px; background: url("../img/pattern-star.svg") center/contain no-repeat; opacity: .07; }

.text-card { padding: 18px; }
.text-card .arabic, .text-card .naskh { font-size: 25px; text-align: right; color: var(--ink); }
.text-card .translit { margin-top: 10px; font-style: italic; color: var(--ink-2); font-size: 14.5px; }
html[lang="bn"] .text-card .translit { font-style: normal; }
.text-card .meaning { margin-top: 10px; font-size: 15.5px; color: var(--ink); }
.text-card .ref { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--muted); font-size: 12.5px; }
.text-card .actions { display: flex; gap: 4px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.text-card .actions .icon-btn { width: 38px; height: 38px; background: transparent; box-shadow: none; color: var(--muted); }
.text-card .actions .icon-btn.is-on { color: var(--gold-ink); }

.book-card { --c: var(--primary); display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 22px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.book-card .spine { width: 54px; height: 70px; flex: none; border-radius: 6px 12px 12px 6px; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 70%, #000) 0 6px, var(--c) 6px); color: rgba(255, 255, 255, .92); display: grid; place-items: center; box-shadow: 0 10px 18px -10px var(--c); }
.book-card .spine .icon { width: 22px; height: 22px; }
.book-card b { display: block; font-size: 16px; }
.book-card .ar { font-family: var(--font-naskh); color: var(--muted); font-size: 15px; }

.names-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.name-card { text-align: center; padding: 16px 6px 12px; border-radius: 20px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.name-card .ar { font-family: var(--font-naskh); font-size: 25px; color: var(--primary-ink); line-height: 1.5; }
.name-card .tr { font-size: 12.5px; font-weight: 700; margin-top: 2px; }
.name-card .mn { font-size: 11.5px; color: var(--muted); line-height: 1.35; margin-top: 2px; }
.name-card .n { font-size: 10.5px; color: var(--faint); }

.article-card { display: flex; gap: 14px; padding: 12px; border-radius: 22px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.article-card .thumb { --c: var(--primary); width: 84px; height: 84px; flex: none; border-radius: 16px; display: grid; place-items: center; color: #fff; background: radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--c) 70%, #fff), var(--c)); overflow: hidden; }
.article-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.article-card b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 15.5px; line-height: 1.35; }
.prose { font-size: 16.5px; line-height: 1.8; color: var(--ink); }
.prose h2 { font-family: var(--font-display); font-size: 22px; margin: 26px 0 10px; }
html[lang="bn"] .prose h2 { font-family: var(--font-bangla); }
.prose h3 { font-size: 18px; margin: 20px 0 8px; }
.prose p { margin: 0 0 14px; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 14px; }
.prose li { margin: 4px 0; }
.prose blockquote { margin: 18px 0; padding: 14px 18px; border-radius: 18px; background: var(--gold-soft); color: var(--ink); }
.prose a { color: var(--primary-ink); text-decoration: underline; text-underline-offset: 3px; }

/* ----------------------------------------------------------------------------------------------------------
   Calendar & tracker
   ---------------------------------------------------------------------------------------------------------- */
.cal { padding: 14px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.cal-head .t { text-align: center; }
.cal-head .t b { display: block; font-size: 17px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-grid .dow { text-align: center; font-size: 11.5px; color: var(--muted); font-weight: 650; padding: 4px 0; }
.cal-day { position: relative; aspect-ratio: 1 / 1.08; border-radius: 13px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.cal-day .h { font-size: 16px; font-weight: 700; line-height: 1.1; }
.cal-day .g { font-size: 10.5px; color: var(--muted); }
.cal-day.is-today { background: var(--primary); color: var(--on-primary); }
.cal-day.is-today .g { color: rgba(255, 255, 255, .8); }
.cal-day.has-event::after { content: ""; position: absolute; bottom: 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.cal-day.is-friday .h { color: var(--primary-ink); }
.cal-day.is-today.is-friday .h { color: inherit; }
.cal-day.is-blank { visibility: hidden; }

.event-row { display: flex; gap: 14px; align-items: center; padding: 12px 14px; }
.event-date { width: 52px; flex: none; text-align: center; padding: 6px 0; border-radius: 14px; background: var(--gold-soft); color: var(--gold-ink); line-height: 1.1; }
.event-date b { display: block; font-family: var(--font-display); font-size: 21px; }
html[lang="bn"] .event-date b { font-family: var(--font-bangla); }
.event-date span { font-size: 11px; font-weight: 700; }

.week-grid { display: grid; grid-template-columns: 58px repeat(7, 1fr); gap: 6px; align-items: center; }
.week-grid .h { text-align: center; font-size: 11.5px; color: var(--muted); font-weight: 650; }
.week-grid .h.is-today { color: var(--primary-ink); }
.week-grid .p { font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
.week-cell { aspect-ratio: 1; border-radius: 10px; background: var(--paper-2); display: grid; place-items: center; color: transparent; transition: .15s; }
.week-cell .icon { width: 14px; height: 14px; stroke-width: 3; }
.week-cell.prayed { background: var(--primary); color: #fff; }
.week-cell.jamaah { background: var(--gold); color: #fff; }
.week-cell.late { background: var(--rose-soft); color: #9A4A2C; }
.week-cell.missed { background: var(--paper-3); color: var(--faint); }
.week-cell.is-future { opacity: .35; pointer-events: none; }

.stat-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { padding: 14px 12px; border-radius: 20px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.stat b { display: block; font-family: var(--font-display); font-size: 26px; font-weight: 600; line-height: 1.1; }
html[lang="bn"] .stat b { font-family: var(--font-bangla); }
.stat span { font-size: 12.5px; color: var(--muted); }

/* ----------------------------------------------------------------------------------------------------------
   More screen
   ---------------------------------------------------------------------------------------------------------- */
.profile-card { display: flex; align-items: center; gap: 14px; padding: 16px; }
.avatar { width: 54px; height: 54px; flex: none; border-radius: 18px; display: grid; place-items: center; font-weight: 800; font-size: 18px; color: var(--on-primary); background: linear-gradient(145deg, var(--primary), var(--primary-deep)); overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.feature { --c: var(--primary); display: flex; flex-direction: column; gap: 10px; padding: 14px 12px; border-radius: 20px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); font-size: 13.5px; font-weight: 650; line-height: 1.25; }
.feature .icon { width: 24px; height: 24px; color: color-mix(in srgb, var(--c) 85%, var(--ink)); }
:root[data-theme="dark"] .feature .icon { color: color-mix(in srgb, var(--c) 55%, #fff); }

/* ----------------------------------------------------------------------------------------------------------
   Sheets, toasts, banners, empty states
   ---------------------------------------------------------------------------------------------------------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(6, 18, 15, .45); opacity: 0; transition: opacity .25s; }
.sheet {
    position: fixed; z-index: 81; left: 50%; bottom: 0; width: 100%; max-width: 480px;
    max-height: 88dvh; overflow-y: auto; overscroll-behavior: contain;
    transform: translate(-50%, 105%); transition: transform .32s cubic-bezier(.2, .8, .2, 1);
    padding: 10px 18px calc(22px + env(safe-area-inset-bottom));
    background: var(--paper); border-radius: 28px 28px 0 0;
    box-shadow: 0 -20px 50px -20px rgba(0, 0, 0, .35);
}
.sheet::before { content: ""; display: block; width: 44px; height: 5px; border-radius: 5px; background: var(--line-2); margin: 0 auto 14px; }
.sheet-open .sheet-backdrop { opacity: 1; }
.sheet.is-open { transform: translate(-50%, 0); }
.sheet h3 { font-family: var(--font-display); font-size: 22px; margin-bottom: 4px; }
html[lang="bn"] .sheet h3 { font-family: var(--font-bangla); }
.sheet-list .opt { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 14px; border-radius: 16px; text-align: left; font-weight: 600; }
.sheet-list .opt.is-active { background: var(--primary-wash); color: var(--primary-ink); }
.sheet-list .opt .check { margin-left: auto; opacity: 0; }
.sheet-list .opt.is-active .check { opacity: 1; }

.toast-wrap { position: fixed; z-index: 90; left: 50%; top: calc(env(safe-area-inset-top) + 12px); transform: translateX(-50%); width: calc(100% - 32px); max-width: 440px; display: grid; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 16px; background: var(--night); color: #F3EEE2; font-size: 14px; font-weight: 600; box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .45); animation: toast-in .3s cubic-bezier(.2, .8, .2, 1); }
.toast .icon { width: 18px; height: 18px; color: #8EF0C6; }
.toast.error .icon { color: #F2A58A; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-10px) scale(.98); } }

.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 20px; }
.notice .icon { margin-top: 1px; }
.notice.tone-emerald { background: var(--primary-wash); color: var(--primary-ink); }
.notice.tone-gold { background: var(--gold-soft); color: var(--gold-ink); }
.notice.tone-night { background: var(--night); color: #F3EEE2; }
.notice.tone-rose { background: var(--rose-soft); color: #8B3F22; }
.notice.tone-sky { background: color-mix(in srgb, #3F8FA4 14%, var(--card)); color: #1F5B6B; }
:root[data-theme="dark"] .notice.tone-sky { color: #9ED3E0; }
:root[data-theme="dark"] .notice.tone-rose { color: #F2B79C; }
.notice b { display: block; color: inherit; }
.notice p { color: inherit; opacity: .88; font-size: 14px; margin-top: 2px; }

.announce { overflow: hidden; border-radius: 24px; }
.announce img { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; }

.empty { text-align: center; padding: 42px 22px; color: var(--muted); }
.empty .art { width: 150px; height: 150px; margin: 0 auto 12px; }
.empty b { display: block; color: var(--ink); font-size: 17px; margin-bottom: 4px; }

.skeleton { background: linear-gradient(90deg, var(--paper-2) 25%, var(--paper-3) 50%, var(--paper-2) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 12px; }
@keyframes shimmer { to { background-position: -200% 0; } }

.flash { margin: 0 18px 14px; }

/* Onboarding */
.onboard { min-height: 100dvh; display: flex; flex-direction: column; background: radial-gradient(120% 60% at 50% 0%, var(--night-2), var(--night)); color: #F3EEE2; padding: calc(env(safe-area-inset-top) + 16px) 22px calc(24px + env(safe-area-inset-bottom)); }
.onboard .slides { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr); }
.onboard .slide { grid-area: 1 / 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; text-align: center; opacity: 0; transform: translateX(24px); transition: .45s cubic-bezier(.2, .8, .2, 1); pointer-events: none; }
.onboard .slide.is-active { opacity: 1; transform: none; pointer-events: auto; }
.onboard .slide .art { width: min(72vw, 300px); height: auto; margin: 0 auto 26px; }
.onboard h1 { font-family: var(--font-display); font-size: 32px; font-weight: 600; letter-spacing: -.02em; }
html[lang="bn"] .onboard h1 { font-family: var(--font-bangla); font-size: 29px; }
.onboard p { opacity: .78; margin-top: 10px; font-size: 16px; }
.dots { display: flex; justify-content: center; gap: 6px; margin: 18px 0; }
.dots i { width: 7px; height: 7px; border-radius: 7px; background: rgba(255, 255, 255, .3); transition: .3s; }
.dots i.is-active { width: 24px; background: var(--gold); }
.onboard .btn { background: rgba(255, 255, 255, .1); color: #fff; box-shadow: none; }
.onboard .btn-gold { background: var(--gold); color: #2A1D05; }
.onboard .choice { display: flex; align-items: center; gap: 12px; width: 100%; padding: 16px; border-radius: 18px; background: rgba(255, 255, 255, .07); text-align: left; font-weight: 650; }
.onboard .choice + .choice { margin-top: 10px; }
.onboard .choice.is-active { background: rgba(255, 255, 255, .16); box-shadow: inset 0 0 0 1.5px var(--gold); }

/* Auth */
.auth-hero { padding: calc(env(safe-area-inset-top) + 64px) 24px 92px; text-align: center; }
.auth-hero .mark { width: 64px; height: 64px; margin: 0 auto 14px; }
.auth-hero h1 { font-family: var(--font-display); font-size: 30px; font-weight: 600; }
html[lang="bn"] .auth-hero h1 { font-family: var(--font-bangla); }

/* Motion preferences */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Page enter */
.screen, .page-head, .overlap { animation: rise .45s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
