@font-face{font-family:Noto Arabic;src:url("/assets/noto-sans-arabic.woff") format("woff");font-weight:400;font-display:swap}
@font-face{font-family:Noto Arabic;src:url("/assets/noto-sans-arabic-bold.woff") format("woff");font-weight:700;font-display:swap}
@font-face{font-family:Naskh;src:url("/assets/noto-naskh-arabic-bold.woff") format("woff");font-weight:700;font-display:swap}

:root{
  color-scheme:light;
  --bg:#f5f0e6;--surface:#fffcf6;--side:#fbf8f0;--border:#e6dfd0;
  --ink:#233f35;--muted:#596a5e;--soft:#eee9dc;--sage:#849b8a;
  --green:#24483e;--pine:#1b3930;--accent:#c3a574;--accent-text:#72582e;
  --light-green:#e7eee5;--track:#d9d3c5;--danger:#a13f37;
  --shadow:0 6px 22px #30271a08;--radius:17px;--sidebar-width:225px;
  --ui:"Noto Arabic",Tahoma,Arial,sans-serif;--display:Naskh,"Noto Arabic",serif;
}
:root[data-theme=dark]{
  color-scheme:dark;
  --bg:#151e19;--surface:#1d2a22;--side:#19251e;--border:#34463a;
  --ink:#f4eee2;--muted:#bdc4b8;--soft:#28372d;--sage:#a4b4a0;--accent-text:#e1c494;
  --light-green:#2a4435;--track:#34463b;--danger:#ffad9f;--shadow:0 6px 22px #10180f38;
}
*,*::before,*::after{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--ink);font-family:var(--ui);font-size:1rem;line-height:1.65;min-height:100vh;accent-color:var(--green)}
button,input,select{font:inherit;color:inherit}
button,a,input,select{-webkit-tap-highlight-color:transparent}
a{color:inherit;text-underline-offset:.25em}
button{cursor:pointer}
button:disabled{cursor:default;opacity:.55}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:2px solid var(--accent);outline-offset:4px}
main:focus{outline:0}
::selection{background:#d1b47e80;color:var(--ink)}
h1,h2,h3,p{margin:0}
h2,h3{line-height:1.45}
[hidden]{display:none!important}
.icon{display:inline-block;width:21px;height:21px;vertical-align:middle;flex:none}
.skip-link{position:fixed;z-index:12;inset:12px auto auto 12px;background:var(--surface);padding:.65rem 1rem;transform:translateY(-150%);border-radius:9px}
.skip-link:focus{transform:none}
.app-shell{min-height:100vh;display:flex;flex-direction:column}
.main{width:100%;max-width:1210px;margin-inline:auto;padding:1.7rem 1rem 1.1rem}
.sidebar{position:fixed;inset:auto 0 0;z-index:5;background:var(--side);border-top:1px solid var(--border);padding:4px 8px max(env(safe-area-inset-bottom),5px)}
.brand{display:flex;align-items:center;gap:.7rem;text-decoration:none;width:max-content}
.brand-mark{display:grid;place-items:center;flex:none;width:44px;height:44px;border-radius:13px;background:#24483e;color:#e6d3a8}
.brand-mark svg{width:30px;height:30px}
.brand-name{display:flex;flex-direction:column;align-items:flex-start;font-family:var(--display);font-size:2rem;font-weight:700;line-height:.9}
.brand-name small{direction:ltr;font-family:system-ui,sans-serif;font-size:.5rem;letter-spacing:.26em;font-weight:650;margin-block-start:.35rem}
.sidebar .brand,.side-footer{display:none}
.nav{display:flex;justify-content:space-around;gap:.15rem}
.nav-link{min-width:0;flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.22rem;min-height:55px;border-radius:9px;text-align:center;text-decoration:none;color:var(--muted);font-size:.73rem;white-space:nowrap;transition:background .18s,color .18s}
.nav-link:hover{background:var(--soft);color:var(--ink)}
.nav-link[aria-current=page]{background:var(--light-green);color:var(--ink);font-weight:700}
.nav-link[aria-current=page] .icon{color:var(--accent-text)}
.topbar{background:var(--side);border-bottom:1px solid var(--border);min-height:65px;padding:.5rem 1rem;display:flex;align-items:center;justify-content:space-between;gap:.8rem}
.topbar .brand-mark{width:37px;height:37px;border-radius:10px}
.topbar .brand-mark svg{width:25px;height:25px}
.topbar .brand-name{font-size:1.63rem}
.top-location{display:none}
.top-actions{display:flex;align-items:center;gap:.75rem;color:var(--muted)}
.top-date{display:none}
.icon-button{width:44px;height:44px;padding:0;display:inline-grid;place-items:center;flex:none;border:1px solid var(--border);border-radius:11px;background:var(--surface);color:var(--ink);transition:background .18s}
.icon-button:hover{background:var(--light-green)}
.page-heading{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:.5rem 1.3rem;margin-bottom:1.3rem}
.page-heading h1{font-family:var(--display);font-weight:700;font-size:2.25rem;line-height:1.25;letter-spacing:-.02em}
.page-heading p{color:var(--muted);margin-top:.25rem}
.heading-date{display:none;align-items:center;gap:.55rem;color:var(--muted);font-size:.84rem;white-space:nowrap}
.heading-date .icon{color:var(--accent-text)}
.hero{position:relative;isolation:isolate;overflow:hidden;min-height:279px;background:#1c3d32;color:#fff8e9;border-radius:var(--radius);padding:1.25rem 1.25rem 1.3rem;display:flex;flex-direction:column;justify-content:space-between}
.hero-photo{position:absolute;inset:0;z-index:-2;background:url("/assets/masjid.webp") no-repeat left 53% / cover;opacity:.82}
.hero::before{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(263deg,#1e4136 7%,#1e4136f2 35%,#1b3b2eb0 65%,#10272041)}
.hero-header,.hero-location,.hero-countdown{display:flex;align-items:center}
.hero-header{justify-content:space-between;flex-wrap:wrap;gap:.35rem 1.1rem}
.hero-label{font-weight:700;color:#ecd7ae;display:flex;align-items:center;gap:.45rem;font-size:.87rem}
.hero-label .icon{width:17px;height:17px}
.hero-location{color:#f5e9d1;gap:.35rem;font-size:.8rem}
.hero-location .icon{width:16px;height:16px;color:#e5cfa5}
.hero-main{position:relative;width:max-content;max-width:100%;margin-block:.32rem .4rem}
.hero h2{font-family:var(--display);font-size:2.8rem;line-height:1.22;letter-spacing:-.03em;min-height:1.2em}
.hero-time{color:#eadab8;min-height:1.4rem;font-size:.88rem}
.hero-countdown{direction:ltr;width:max-content;max-width:100%;gap:.34rem}
.count-unit{width:48px;background:#102e259e;border:1px solid #d7cba23d;border-radius:10px;text-align:center;padding:.25rem 0 .28rem}
.count-unit b{display:block;font:600 1.3rem/1.24 system-ui,sans-serif;font-variant-numeric:tabular-nums;color:#fff3d9}
.count-unit span{font-size:.635rem;color:#e8d9b8;display:block}
.count-colon{color:#d9bf8c;align-self:flex-start;padding-top:.23rem}
.hero-ornament{position:absolute;left:6%;bottom:-3rem;width:186px;height:186px;opacity:.11;z-index:-1;color:#eed5a0;pointer-events:none}
.hero[data-empty=true] .hero-countdown{opacity:.62}
.hero[data-empty=true] h2{font-size:2rem}
.notice{display:flex;align-items:flex-start;gap:.6rem;color:var(--muted);border:1px solid var(--border);background:var(--surface);border-radius:11px;padding:.65rem .8rem;margin-top:.8rem;font-size:.84rem}
.notice .icon{color:var(--accent-text);width:17px;height:17px;margin-top:.16rem}
.notice a{font-weight:700}
.dashboard-grid{display:grid;gap:1rem;margin-top:1.25rem}
.panel{min-width:0;border-radius:var(--radius);background:var(--surface);box-shadow:var(--shadow);padding:1rem}
.panel-head{display:flex;align-items:center;justify-content:space-between;gap:.6rem;margin-bottom:.75rem}
.panel-head h2{font-weight:700;font-size:1.03rem}
.panel-head h2 .icon{margin-inline-end:.45rem;color:var(--accent-text);width:19px;height:19px}
.panel-head a,.text-link{display:inline-flex;align-items:center;gap:.28rem;font-size:.81rem;color:var(--accent-text);text-decoration:none;min-height:37px}
.panel-head a:hover,.text-link:hover{text-decoration:underline}
.panel-head a .icon{width:15px;height:15px}
.panel-subtitle{color:var(--muted);font-size:.83rem;margin-top:.18rem}
.prayer-list{list-style:none;margin:0;padding:0;display:grid;gap:.1rem}
.prayer-row{display:grid;grid-template-columns:minmax(92px,1fr) auto 37px;align-items:center;gap:.48rem;min-height:52px;border-bottom:1px solid var(--border);padding:.25rem .25rem .25rem .15rem}
.prayer-row:last-child{border-bottom:0}
.prayer-row.is-next{background:var(--light-green);border-radius:9px;border-bottom-color:transparent}
.prayer-identity{display:flex;align-items:center;gap:.52rem;font-weight:700;font-size:.88rem;min-width:0}
.prayer-identity .symbol{color:var(--accent-text);border-radius:9px;background:var(--soft);display:grid;place-items:center;width:32px;height:32px;flex:none}
.prayer-identity .icon{width:18px;height:18px}
.prayer-time{font-family:system-ui,var(--ui);font-variant-numeric:tabular-nums;font-size:.91rem;font-weight:650;white-space:nowrap;color:var(--muted)}
.next-chip{font-size:.64rem;font-weight:400;color:var(--accent-text);margin-inline-start:.25rem;white-space:nowrap}
.mini-status{justify-self:center;width:18px;height:18px;border:1px solid var(--sage);border-radius:50%;opacity:.65}
.mini-status.marked{display:grid;place-items:center;background:var(--green);color:#fff5de;border-color:var(--green);opacity:1}
.mini-status .icon{width:13px;height:13px}
.source-line{margin-top:.62rem;font-size:.75rem;color:var(--muted);overflow-wrap:anywhere}
.source-line a{color:var(--accent-text)}
.side-panels{display:grid;align-content:start;gap:.85rem}
.progress-num{display:flex;align-items:baseline;gap:.45rem;margin-block:.15rem .44rem}
.progress-num strong{font:700 2.1rem/1 system-ui,var(--ui);font-variant-numeric:tabular-nums;color:var(--ink)}
.progress-num span{color:var(--muted);font-size:.83rem}
.progress-track{display:block;width:100%;height:.48rem;border:0;border-radius:99px;overflow:hidden;background:var(--track);appearance:none}
.progress-track::-webkit-progress-bar{background:var(--track);border-radius:99px}
.progress-track::-webkit-progress-value{background:#708c75;border-radius:99px}
.progress-track::-moz-progress-bar{background:#708c75;border-radius:99px}
.progress-note{font-size:.81rem;color:var(--muted);margin-top:.62rem}
.verse{position:relative;overflow:hidden;background:var(--light-green);box-shadow:none;padding:1rem 1.1rem}
.verse .icon{width:19px;height:19px;color:var(--accent-text)}
.verse p{position:relative;font:700 1.25rem/1.8 var(--display);margin:.27rem 0 .1rem}
.verse a{position:relative;color:var(--accent-text);font-size:.77rem}
.verse-decoration{position:absolute;left:-1.6rem;bottom:-2.4rem;width:115px;height:115px;color:var(--sage);opacity:.19}
.site-footer{margin-top:auto;display:flex;justify-content:center;align-items:center;gap:.45rem;color:var(--muted);font-size:.73rem;padding:.5rem 1rem calc(77px + env(safe-area-inset-bottom))}
.site-footer span:first-child{font-family:var(--display);font-size:1rem;font-weight:700}
.site-footer span:first-child::after{content:"·";font-family:var(--ui);padding-inline-start:.45rem}
.prayers-layout{display:grid;gap:1rem}
.daily-cards{display:grid;gap:.6rem;list-style:none;padding:0;margin:0}
.prayer-card{background:var(--green);color:#fff4dc;border:1px solid #cfdbb92a;border-radius:13px;display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:.55rem;min-height:74px;padding:.55rem .7rem;transition:background .2s,border-color .2s}
.prayer-card.marked{background:#315749;border-color:#baad7880}
.prayer-card .symbol{background:#f4edcb1e;color:#e8cfa1;width:37px;height:37px}
.prayer-card .prayer-identity{font-weight:700;font-size:.94rem;gap:.63rem}
.prayer-card .prayer-time{color:#f4dfb7}
.prayer-card .prayer-state{font-size:.72rem;font-weight:400;color:#e9dec5;display:block}
.mark-button{width:44px;height:44px;border:1px solid #f1e4ba8c;background:transparent;color:#e1d8b8;border-radius:10px;display:grid;place-items:center;transition:background .2s,color .2s,border-color .2s}
.mark-button:hover{background:#f1e4ba24}
.mark-button[aria-pressed=true]{background:#f3dfb8;color:#203e31;border-color:#f3dfb8;box-shadow:0 2px 10px #f1d89c48}
.mark-button.pop[aria-pressed=true]{animation:mark-glow .42s ease-out}
.mark-button .icon{width:23px;height:23px}
.mark-button.pop .icon{animation:mark .26s cubic-bezier(.2,.85,.2,1)}
@keyframes mark{from{transform:scale(.6);opacity:.65}to{transform:scale(1);opacity:1}}
@keyframes mark-glow{from{box-shadow:0 3px 19px #f1d89c94}to{box-shadow:0 2px 10px #f1d89c48}}
.nav-date{display:flex;align-items:center;gap:.55rem;font-size:.85rem;color:var(--muted)}
.nav-date .icon{color:var(--accent-text)}
.section-stack{display:grid;gap:1rem}
.stats-grid{display:grid;gap:.65rem;grid-template-columns:repeat(3,minmax(0,1fr))}
.stat{padding:.7rem .55rem;border-radius:12px;background:var(--surface);box-shadow:var(--shadow)}
.stat strong{font:700 1.37rem/1.4 system-ui,var(--ui);display:block;font-variant-numeric:tabular-nums}
.stat span{font-size:.69rem;color:var(--muted);display:block}
.stat .progress-track{margin-top:.35rem;height:.32rem}
.analytics{display:grid;gap:1rem;align-items:start}
.calendar-head{display:flex;align-items:center;justify-content:space-between;gap:.45rem;margin-bottom:.75rem}
.calendar-head h2{font-size:.95rem;text-align:center}
.controls{display:flex;gap:.35rem}
.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:.23rem}
.weekday{text-align:center;color:var(--muted);font-size:.72rem;padding:.35rem 0}
.day-cell{display:grid;align-content:center;gap:.1rem;text-align:center;border-radius:8px;border:1px solid transparent;background:var(--soft);min-height:44px;padding:0;line-height:1.3;min-width:0;font-variant-numeric:tabular-nums}
.day-cell strong{font-weight:700;font-size:.83rem}
.day-cell small{font-size:.65rem;color:var(--muted)}
.day-cell:hover{background:var(--light-green)}
.day-cell[aria-pressed=true]{border-color:var(--accent-text);background:var(--light-green)}
.day-cell.current{outline:1px solid var(--sage);outline-offset:-3px}
.day-cell.full{background:#547761;color:#fff9e8}
.day-cell.full small{color:#fff9e8}
.week-chart{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));align-items:end;gap:.36rem;margin:.65rem 0 0;padding:0;list-style:none}
.chart-col{min-width:0;display:grid;text-align:center;gap:.25rem;justify-items:center;color:var(--muted);font-size:.7rem}
.chart-col b{font-size:.77rem;color:var(--ink)}
.chart-bar{height:77px;width:100%;max-width:30px;border-radius:6px;background:var(--track);display:flex;align-items:flex-end;overflow:hidden}
.chart-bar i{width:100%;background:#708f77;border-radius:6px;color:transparent}
.chart-bar .count-1{height:20%}.chart-bar .count-2{height:40%}.chart-bar .count-3{height:60%}.chart-bar .count-4{height:80%}.chart-bar .count-5{height:100%;background:#547761}
.settings-grid{display:grid;gap:1rem;align-items:start}
.settings-panel h2 .icon{width:20px;height:20px;color:var(--accent-text);margin-inline-end:.45rem}
.settings-panel h2{font-size:1.02rem}
.settings-panel .panel-subtitle{margin:.4rem 0 .65rem}
.fields{display:grid;gap:.7rem}
.field{display:grid;gap:.27rem;min-width:0}
.field>span{font-weight:700;font-size:.81rem}
.field input,.field select{width:100%;min-height:44px;border:1px solid var(--border);border-radius:9px;background:var(--bg);padding:.35rem .65rem}
.select-wrap{position:relative;display:block}
.select-wrap select{appearance:none;padding-inline-end:2rem}
.select-wrap .icon{pointer-events:none;position:absolute;inset-inline-end:.67rem;inset-block-start:50%;transform:translateY(-50%);width:17px;height:17px}
.form-actions{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.8rem}
.button{min-height:44px;display:inline-flex;align-items:center;justify-content:center;gap:.4rem;border:1px solid transparent;border-radius:9px;background:var(--green);color:#fff6df;padding:.4rem .85rem;text-decoration:none;font-weight:700;font-size:.83rem;transition:background .18s}
.button:hover{background:#365d4f}
.button.outline{background:var(--surface);color:var(--ink);border-color:var(--border)}
.button.outline:hover{background:var(--light-green)}
.button.danger{background:var(--surface);color:var(--danger);border-color:var(--border)}
.button.danger:hover{background:var(--soft)}
.button .icon{width:17px;height:17px}
.theme-options{display:flex;gap:.35rem;flex-wrap:wrap;margin-top:.75rem}
.theme-options .button[aria-pressed=true]{background:var(--light-green);border-color:var(--sage);color:var(--ink)}
.switch-list{display:grid;gap:.15rem;margin-block:.55rem}
.switch{display:flex;align-items:center;justify-content:space-between;min-height:44px;border-bottom:1px solid var(--border);gap:.7rem;font-size:.88rem}
.switch input{appearance:none;width:40px;height:24px;border:1px solid var(--sage);border-radius:30px;background:var(--track);position:relative;cursor:pointer;flex:none}
.switch input::before{content:"";display:block;position:absolute;top:3px;right:3px;width:16px;height:16px;border-radius:50%;background:var(--sage);transition:transform .18s}
.switch input:checked{background:#416a56;border-color:#416a56}
.switch input:checked::before{background:#fff9e8;transform:translateX(-16px)}
.toast{position:fixed;z-index:7;inset-inline:1rem;bottom:calc(84px + env(safe-area-inset-bottom));margin-inline:auto;width:max-content;max-width:calc(100% - 2rem);border-radius:11px;background:#24483e;color:#fff4dd;padding:.65rem 1rem;box-shadow:0 10px 25px #10261645;font-size:.86rem}
.dialog{width:min(calc(100% - 2rem),440px);border:1px solid var(--border);border-radius:var(--radius);padding:1.25rem;background:var(--surface);color:var(--ink);box-shadow:0 14px 33px #0c201e49}
.dialog::backdrop{background:#101d1acc}
.dialog h2{font-size:1.12rem;margin-bottom:.45rem}
.dialog p{color:var(--muted)}
@media(min-width:520px){
  .main{padding-inline:1.4rem}
  .hero{padding:1.3rem 1.6rem}
  .hero h2{font-size:3.32rem}
  .hero-countdown{gap:.46rem}
  .count-unit{width:55px}
  .panel{padding:1.12rem 1.2rem}
  .prayer-row{grid-template-columns:minmax(130px,1fr) minmax(48px,1fr) 37px;padding-inline:.5rem}
  .stats-grid{gap:.9rem}
  .stat{padding:.9rem 1rem}
  .stat strong{font-size:1.7rem}
  .stat span{font-size:.81rem}
  .day-cell{min-height:52px}
  .prayer-card{padding-inline:.9rem}
}
@media(min-width:700px){
  .topbar{padding-inline:1.6rem}
  .top-date,.heading-date{display:flex;align-items:center;gap:.42rem}
  .main{padding:1.68rem 1.7rem 1.35rem}
  .page-heading h1{font-size:2.6rem}
  .dashboard-grid{grid-template-columns:minmax(0,1.65fr) minmax(0,1fr);align-items:start;gap:1.05rem}
  .hero{min-height:271px;padding:1.35rem 1.8rem}
  .hero-photo{background-position:left 54%;background-size:84% auto}
  .hero::before{background:linear-gradient(266deg,#1f4136 8%,#1e4136 35%,#1c3c31e6 48%,#17372b69 74%,#152a2131)}
  .settings-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .prayers-layout{grid-template-columns:minmax(0,1.65fr) minmax(0,1fr);align-items:start}
  .analytics{grid-template-columns:minmax(0,1.25fr) minmax(0,1fr)}
}
@media(min-width:950px){
  .app-shell{margin-inline-start:var(--sidebar-width)}
  .sidebar{inset:0 0 0 auto;width:var(--sidebar-width);border-top:0;border-inline-end:1px solid var(--border);padding:1.55rem 1.15rem 1.05rem;display:flex;flex-direction:column;gap:2.25rem}
  .sidebar .brand{display:flex;margin-inline:.42rem}
  .side-footer{display:block;margin-top:auto;border-top:1px solid var(--border);padding:.72rem .3rem 0;color:var(--muted);font-size:.75rem}
  .side-footer .icon{color:var(--accent-text);width:15px;height:15px;margin-inline-end:.25rem}
  .nav{flex-direction:column;gap:.35rem}
  .nav-link{position:relative;flex-direction:row;justify-content:flex-start;text-align:start;gap:.67rem;min-height:45px;padding:.42rem .75rem;font-size:.88rem}
  .nav-link[aria-current=page]::after{content:"";position:absolute;inset-inline-end:.7rem;width:5px;height:5px;border-radius:50%;background:var(--accent-text)}
  .topbar{min-height:70px;padding-inline:clamp(1.7rem,3.8vw,3.4rem)}
  .topbar .brand{display:none}
  .top-location{display:flex;align-items:center;gap:.55rem;font-size:.9rem;color:var(--ink)}
  .top-location .icon,.top-date .icon{color:var(--accent-text);width:18px;height:18px}
  .top-date{font-size:.83rem}
  .main{padding-inline:clamp(1.7rem,3.8vw,3.4rem)}
  .hero{min-height:272px}
  .hero-photo{background-size:76% auto}
  .site-footer{padding-bottom:1.15rem}
  .toast{bottom:1.2rem;margin-inline-start:calc(var(--sidebar-width) + 1.2rem)}
}
@media(min-width:1250px){
  :root{--sidebar-width:242px}
  .main{padding-top:1.98rem}
  .page-heading{margin-bottom:1.45rem}
  .hero{padding-inline:2rem}
  .hero-location{font-size:.84rem}
  .dashboard-grid{gap:1.2rem;margin-top:1.35rem}
  .panel{padding:1.2rem 1.4rem}
  .prayer-row{min-height:55px}
}
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}
}
.home-heading .heading-date{display:flex;font-size:.77rem;white-space:normal;flex-wrap:wrap;column-gap:.3rem;row-gap:0}
.home-heading .heading-date .icon{width:16px;height:16px}
@media(min-width:700px){.mobile-gregorian{display:none}}
.page-heading>div:first-child{min-width:0;max-width:100%}
.page-heading h1{overflow-wrap:anywhere}
