/* Saros v30.9 — «الجانب الروحي». Saros's tokens only.
   «Violet» of the mockup = Saros's accent (the ink colour; the season's accent when a season is picked).
   «Gold» (light point, time gone on the arc) = the same quiet silver as «مكتبتي» (Saros has no gold); the season's accent with a season. */
body{--sp-acc:var(--button-bg);--sp-acc-ink:var(--button-text);--sp-gilt:#bdb7ab;--sp-gilt-glow:rgba(189,183,171,.45);--sp-tint-a:rgba(205,199,188,.22);--sp-tint-b:rgba(38,38,38,.06)}
body[data-theme="dark"]{--sp-gilt:#d9d4ca;--sp-gilt-glow:rgba(217,212,202,.35);--sp-tint-a:rgba(217,212,202,.08);--sp-tint-b:rgba(237,237,237,.04)}
body[data-season]{--sp-acc:var(--s-acc);--sp-acc-ink:#fff;--sp-gilt:color-mix(in srgb,var(--s-acc) 45%,#d8cdb8);--sp-gilt-glow:color-mix(in srgb,var(--s-acc) 30%,transparent);--sp-tint-b:color-mix(in srgb,var(--s-acc) 8%,transparent)}

.sp-page{display:flex;flex-direction:column;gap:10px;min-width:0}
.sp-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap}
.sp-head-r{display:flex;flex-direction:column;gap:6px}
.sp-head-r .page-title{margin:0}
.sp-daynav{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.sp-date{font-size:13px;font-weight:600;color:var(--muted)}
.sp-head-l{display:flex;align-items:center;gap:8px}
.sp-city{gap:6px;min-height:36px;padding:6px 12px;font-size:12.5px}
.sp-city span{max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* the line of remembrance */
.sp-line-row{position:relative;display:flex;align-items:center;justify-content:center;gap:8px;min-height:40px;padding:4px 12px;text-align:center}
.sp-line-text{margin:0;font-size:17px;line-height:1.9;font-weight:600;color:var(--text);max-width:70ch}
.sp-line-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:.14;border-radius:14px;pointer-events:none}
.sp-line-edit{opacity:.55}.sp-line-row:hover .sp-line-edit,.sp-line-edit:focus-visible{opacity:1}
.sp-line-add{border:0;background:none;color:var(--muted-2);font-size:13px;padding:6px 10px;border-radius:10px}
.sp-line-add:hover{color:var(--text);background:var(--surface-2)}

/* ===== the day's arc ===== */
.sp-arc{position:relative;height:clamp(200px,calc(100vh - 565px),310px);min-width:0}
.sp-arc-svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.sp-g1{stop-color:var(--sp-tint-a)}.sp-g2{stop-color:var(--sp-tint-b)}
.sp-fill{fill:url(#sp-glow)}
.sp-line{fill:none;stroke:var(--border);stroke-width:1.5;vector-effect:non-scaling-stroke}
.sp-horizon{stroke:var(--border);stroke-width:1.5;stroke-dasharray:2 6;stroke-linecap:round;vector-effect:non-scaling-stroke}
.sp-gone{fill:none;stroke:var(--sp-gilt);stroke-width:3;stroke-linecap:round;vector-effect:non-scaling-stroke}
.sp-sun{fill:var(--sp-gilt)}
.sp-sun-glow{fill:var(--sp-gilt-glow);filter:blur(4px)}
.sp-node{position:absolute;transform:translate(-50%,-50%);display:grid;justify-items:center;grid-template-rows:auto 44px auto;gap:2px;width:110px;margin-top:-6px}
.sp-node-name{font-size:13px;font-weight:700;color:var(--text);transform:translateY(2px)}
.sp-node-time{font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}
.sp-dot{width:44px;height:44px;min-height:0;padding:0;border:0;background:none;display:grid;place-items:center;cursor:pointer;border-radius:50%;color:var(--sp-acc-ink)}
.sp-dot::before{content:"";grid-area:1/1;width:40px;height:40px;border-radius:50%;border:1.5px solid var(--border);background:var(--surface);transition:background .2s,border-color .2s,box-shadow .2s}
.sp-dot svg{grid-area:1/1;position:relative}
.sp-dot:hover::before{border-color:var(--muted)}
.sp-dot:focus-visible{outline:2px solid var(--text);outline-offset:2px}
.sp-dot:disabled{cursor:default}
.sp-dot[aria-pressed="true"]::before{background:var(--sp-acc);border-color:var(--sp-acc)}
.is-next>.sp-dot::before,.sp-list .is-next .sp-dot::before{border:2.5px solid var(--sp-acc);box-shadow:0 0 0 6px color-mix(in srgb,var(--sp-acc) 12%,transparent)}
.is-next>.sp-dot[aria-pressed="true"]::before{box-shadow:0 0 0 6px color-mix(in srgb,var(--sp-acc) 12%,transparent)}
.sp-node.is-next .sp-node-name{color:var(--sp-acc)}
.sp-node.is-next .sp-node-time{color:var(--text);font-weight:700}
.sp-centre{position:absolute;left:50%;top:48%;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;gap:2px;text-align:center;width:min(420px,80%)}
.sp-count{font-size:40px;line-height:1.1;font-weight:700;font-variant-numeric:tabular-nums;color:var(--text)}
.sp-count small{font-size:16px;font-weight:600}
.sp-centre span{font-size:13px;color:var(--muted)}
.sp-centre.is-ask{top:40%;gap:10px}
.sp-centre.is-ask p{margin:0;font-size:14px;font-weight:600;color:var(--muted)}
.sp-centre-btns{display:flex;gap:8px;flex-wrap:wrap;justify-content:center}
.sp-list{display:none}

/* city window */
.sp-city-list{list-style:none;margin:0;padding:0;display:grid;gap:2px;max-height:260px;overflow:auto}
.sp-city-row{width:100%;display:flex;align-items:baseline;justify-content:space-between;gap:10px;padding:9px 12px;border:1px solid transparent;border-radius:10px;background:none;color:var(--text);text-align:right}
.sp-city-row:hover,.sp-city-row:focus-visible{background:var(--surface-2);border-color:var(--border)}
.sp-city-row small{color:var(--muted);font-size:11px}
.sp-none{color:var(--muted);font-size:12.5px;padding:8px 12px}
.sp-city-alt{display:flex;flex-direction:column;gap:10px;align-items:flex-start}
.sp-manual{width:100%}.sp-manual summary{cursor:pointer;font-size:12.5px;font-weight:600;color:var(--muted)}
.sp-manual[open]{display:grid;gap:10px}
.sp-two{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.sp-calc{border:1px solid var(--border);border-radius:14px;padding:12px 14px;display:grid;gap:10px;margin:0}
.sp-calc legend{font-size:12px;font-weight:700;color:var(--muted);padding:0 6px}
.sp-err{margin:0;font-size:12px;font-weight:600;color:var(--text)}.sp-err:empty{display:none}.sp-err::before{content:"⚠︎ "}
.sp-city-now{margin:0;font-size:12.5px;color:var(--muted)}
.sp-check{display:flex;align-items:center;gap:8px;font-size:13px}
/* the toast with «تراجع» */
#toast.sp-has-undo{pointer-events:auto}
.sp-undo{border:0;background:none;color:inherit;font:inherit;font-weight:700;text-decoration:underline;text-underline-offset:3px;margin-inline-start:6px;padding:2px 4px;cursor:pointer}

/* small screens: the arc becomes a list */
@media (max-width:640px){
 .sp-arc{height:auto}
 .sp-arc-svg,.sp-node{display:none}
 .sp-centre{position:static;transform:none;width:auto;margin:6px auto 12px}
 .sp-centre.is-ask{margin-top:0}
 .sp-list{display:grid;gap:4px;list-style:none;margin:0;padding:0}
 .sp-list li{display:grid;grid-template-columns:1fr auto 44px;align-items:center;gap:10px;padding:6px 12px;border:1px solid var(--border);border-radius:14px;background:var(--surface)}
 .sp-list-name{font-weight:700;font-size:14px}
 .sp-list-time{font-size:13px;color:var(--muted);font-variant-numeric:tabular-nums}
 .sp-list .is-next{border-color:var(--sp-acc)}.sp-list .is-next .sp-list-name{color:var(--sp-acc)}.sp-list .is-next .sp-list-time{color:var(--text);font-weight:700}
 .sp-head-l{width:100%;justify-content:flex-start}
 .sp-two{grid-template-columns:1fr}
}
@media (prefers-reduced-motion:reduce){.sp-dot::before{transition:none}}

/* ===== ختمتي ===== */
.sp-kh{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:28px;min-height:96px;padding:14px 22px}
.sp-kh.is-empty{grid-template-columns:auto 1fr auto}
.sp-kh-who{display:flex;flex-direction:column;gap:2px}
.sp-kh-name,.sp-kh-pos{border:0;background:none;padding:0;min-height:0;color:var(--text);text-align:right;cursor:pointer;font:inherit}
.sp-kh-name{font-size:13px;font-weight:700;color:var(--muted)}
.sp-kh-pos{font-size:15px}.sp-kh-pos b{font-size:28px;font-variant-numeric:tabular-nums}
.sp-kh-mid{display:flex;flex-direction:column;gap:6px;align-items:center;text-align:center;font-size:13.5px}
.sp-kh-bar{display:block;width:min(360px,100%);height:4px;border-radius:2px;background:var(--surface-3);overflow:hidden}
.sp-kh-bar span{display:block;height:100%;background:var(--sp-acc);border-radius:2px;margin-inline-start:0}
.sp-kh-empty{margin:0;color:var(--muted);font-size:13.5px;text-align:center}
.sp-kh-add{gap:6px;white-space:nowrap}

/* ===== the habit line ===== */
.sp-hl{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:18px;min-width:0}
.sp-hl-head{display:flex;flex-direction:column;align-items:flex-start;gap:4px}
.sp-hl-head b{font-size:15px}
.sp-hl-arrange{border:0;background:none;padding:2px 0;min-height:0;color:var(--muted);font-size:12px;text-decoration:underline;text-underline-offset:3px}
.sp-hl-body{display:flex;flex-direction:column;gap:6px;min-width:0}
.sp-hl-ask{margin:0;font-size:13px;color:var(--muted);text-align:center}
.sp-hl-chips{display:flex;flex-wrap:wrap;gap:6px;justify-content:center}
.sp-hl-dot>span{grid-area:1/1;position:relative}
.sp-hl-track{position:relative;min-width:0}
.sp-hl-row{position:relative;display:flex;justify-content:space-between;gap:10px;overflow-x:auto;scrollbar-width:none;padding:6px 8px 2px;scroll-behavior:smooth}
.sp-hl-row::-webkit-scrollbar{display:none}
.sp-hl-rail{position:absolute;top:28px;right:8px;left:8px;height:1px;background:var(--border)}
.sp-hl-item{position:relative;flex:1 0 76px;display:flex;flex-direction:column;align-items:center;gap:4px;min-width:76px}
.sp-hl-dot{width:44px;height:44px;min-height:0;padding:0;border:0;background:none;display:grid;place-items:center;border-radius:50%;cursor:pointer;color:var(--sp-acc-ink);--sp-hc:var(--sp-acc)}
.sp-hl-dot::before{content:"";grid-area:1/1;width:38px;height:38px;border-radius:50%;border:1.5px solid var(--border);background:var(--bg);transition:background .2s,border-color .2s}
.sp-hl-dot svg{grid-area:1/1;position:relative}
.sp-hl-dot:hover::before{border-color:var(--muted)}
.sp-hl-dot.is-on::before{background:var(--sp-hc);border-color:var(--sp-hc)}
.sp-hl-dot:focus-visible{outline:2px solid var(--text);outline-offset:2px}
.sp-hl-dot.is-add{font-size:18px;color:var(--muted)}
.sp-hl-dot.is-add::before{border-style:dashed}
.sp-hl-name{font-size:12px;color:var(--text);text-align:center;line-height:1.35;max-width:96px}
.sp-hl-item.is-add .sp-hl-name{color:var(--muted)}
.sp-hl-track .lib-nav{top:22px}

/* ===== windows ===== */
.sp-form{gap:14px}
.sp-cust{display:grid;gap:8px}.sp-cust .outline-btn{justify-content:flex-start}
.sp-tabs{display:grid;grid-template-columns:repeat(auto-fit,minmax(0,1fr))}
.sp-dhikr{border:1px solid var(--border);border-radius:16px;padding:14px 16px;display:flex;flex-direction:column;gap:8px;background:var(--surface-2)}
.sp-dhikr-text{margin:0;font-size:17px;line-height:2.1;white-space:pre-wrap;overflow-wrap:anywhere}
.sp-dhikr-src{color:var(--muted);font-size:11.5px}
.sp-dhikr-foot{display:flex;align-items:center;justify-content:space-between;gap:8px}
.sp-counter{min-height:40px;min-width:88px;padding:0 14px;border:1px solid var(--border);border-radius:99px;background:var(--surface);color:var(--text);font-weight:700;font-variant-numeric:tabular-nums}
.sp-counter.is-full{background:var(--sp-acc);border-color:var(--sp-acc);color:var(--sp-acc-ink)}
.sp-none-text{margin:0;padding:18px;text-align:center;color:var(--muted);border:1px dashed var(--border);border-radius:14px}
.sp-add-dhikr summary{cursor:pointer;font-weight:700;font-size:13px}
.sp-add-dhikr form{display:grid;gap:10px;margin-top:10px}
.sp-big{width:100%;min-height:48px}
.sp-tb{display:flex;flex-direction:column;align-items:center;gap:14px;padding:6px 0}
.sp-tb-n{font-size:54px;line-height:1;font-variant-numeric:tabular-nums}
.sp-tb-btn{width:168px;height:168px;border-radius:50%;border:0;background:var(--sp-acc);color:var(--sp-acc-ink);font-size:17px;font-weight:700;box-shadow:0 0 0 12px color-mix(in srgb,var(--sp-acc) 12%,transparent);cursor:pointer;padding:18px;overflow-wrap:anywhere}
.sp-tb-btn:active{transform:scale(.98)}
.sp-tb-btn:focus-visible{outline:3px solid var(--text);outline-offset:16px}
.sp-tb-ask{display:flex;align-items:center;gap:8px;font-size:13.5px}
.sp-new-phrase{display:flex;gap:8px}.sp-new-phrase input{flex:1;min-height:40px;border:1px solid var(--border);border-radius:10px;background:var(--surface-2);color:var(--text);padding:0 10px}
.sp-sessions ul,.sp-read-log ul{list-style:none;margin:6px 0 0;padding:0;display:grid;gap:4px}
.sp-sessions li,.sp-read-log li{display:grid;grid-template-columns:1fr auto auto;gap:12px;align-items:center;padding:7px 10px;border:1px solid var(--border);border-radius:10px;font-size:13px}
.sp-sessions small{color:var(--muted)}
.sp-kinds{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.sp-kind{position:relative;cursor:pointer}
.sp-kind input{position:absolute;opacity:0;inset:0}
.sp-kind span{display:flex;flex-direction:column;gap:2px;padding:10px 12px;border:1px solid var(--border);border-radius:12px;min-height:58px}
.sp-kind b{font-size:13px}.sp-kind small{color:var(--muted);font-size:11.5px}
.sp-kind input:checked+span{border:2px solid var(--text);background:var(--surface-2)}
.sp-kind input:focus-visible+span{outline:2px solid var(--text);outline-offset:2px}
.sp-target-row{display:flex;align-items:center;gap:10px}.sp-target-row input{max-width:120px}
.sp-days{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}
.lg-colour.is-none span{background:var(--surface-2);border:1.5px dashed var(--border)}
.sp-arr{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.sp-arr li{display:grid;grid-template-columns:auto 1fr auto auto;align-items:center;gap:10px;padding:6px 10px;border:1px solid var(--border);border-radius:12px;background:var(--surface)}
.sp-arr li.is-off .sp-arr-name{color:var(--muted-2)}
.sp-arr li.is-drag{opacity:.5}
.sp-grip{border:0;background:none;color:var(--muted);cursor:grab;min-height:36px;min-width:30px;padding:0;letter-spacing:-2px}
.sp-grip:focus-visible{outline:2px solid var(--text);outline-offset:2px;border-radius:6px}
.sp-read-title{display:flex;align-items:center;gap:8px;font-weight:700}
.sp-read-title input{min-height:36px;border:1px solid var(--border);border-radius:10px;background:var(--surface-2);color:var(--text);padding:0 10px}
.sp-result{margin:0;font-size:13.5px;font-weight:600}.sp-result:empty{display:none}
.sp-total{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.sp-total input{width:90px;min-height:34px;border:1px solid var(--border);border-radius:9px;background:var(--surface-2);color:var(--text);padding:0 8px}
.sp-log-acts{display:inline-flex;gap:2px}
@media (max-width:640px){
 .sp-kh{grid-template-columns:1fr;gap:10px;text-align:center}.sp-kh-who{align-items:center}
 .sp-hl{grid-template-columns:1fr}
 #modal-root .modal-overlay:has(.sp-modal){align-items:flex-end;padding:0}
 #modal-root .modal.sp-modal{border-radius:22px 22px 0 0;max-height:92vh}
 .sp-tb-btn{width:150px;height:150px}
}
@media (prefers-reduced-motion:reduce){.sp-hl-dot::before{transition:none}.sp-hl-row{scroll-behavior:auto}}
.sp-ready-in{justify-content:flex-start}
