/* BOKRA — dark grey edition of the .ATHR brand system (tokens §5.4 lifted off pure black) */
:root {
  --bg: #1C1B1A; --card: #252423; --raise: #2E2D2B; --raise2: #363431;
  --line: #383634; --line2: #46433F;
  --text: #F7F5F2; --text2: #C4BFB8; --muted: #8E8983; --disabled: #5F5B57;
  --accent: #F24A3D; --accent-2: #FF6B5F; --accent-soft: rgba(242, 74, 61, .14);
  --success: #22C55E; --success-soft: rgba(34, 197, 94, .14); --warning: #F59E0B; --error: #EF4444;
  --inv: #F7F5F2; --inv-text: #1C1B1A;
  --ar: 'Alexandria', system-ui, sans-serif; --en: 'Readex Pro', system-ui, sans-serif;
  --r-sm: 8px; --r-md: 16px; --r-lg: 24px; --r-full: 999px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --side: 264px;
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; background: var(--bg); touch-action: manipulation; }
body {
  background: var(--bg); color: var(--text); font-family: var(--ar); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; min-height: 100vh; padding-bottom: calc(104px + var(--safe-b));
  overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: #fff; }
.en { font-family: var(--en); }
.num { font-family: var(--en); font-variant-numeric: tabular-nums; }
.ic { display: block; flex-shrink: 0; }
[hidden] { display: none !important; }

/* signature: three diamonds */
.dm3 { display: inline-flex; gap: 5px; align-items: center; vertical-align: middle; }
.dm3 i { width: 6px; height: 6px; background: var(--text); transform: rotate(45deg); display: block; }
.dm3 i:last-child { background: var(--accent); }
.dm3.big { gap: 9px; }
.dm3.big i { width: 11px; height: 11px; }
.dm3.load i { animation: dmf 1.2s infinite ease-in-out; }
.dm3.load i:nth-child(2) { animation-delay: .15s; }
.dm3.load i:nth-child(3) { animation-delay: .3s; }
@keyframes dmf { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }

/* shell */
.side { display: none; }
.main { max-width: 640px; margin: 0 auto; padding: 0 20px; }
.main.enter .vh, .main.enter .card, .main.enter .tile, .main.enter .sec, .main.enter .sugg, .main.enter .quick { animation: rise .55s var(--ease) both; animation-delay: var(--d, 0ms); }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.bump { animation: bump .5s var(--ease); }
@keyframes bump { 0% { opacity: 1; transform: none; } 35% { opacity: .35; transform: translateY(-4px); } 100% { opacity: 1; transform: none; } }

/* header + Anchor Line */
.vh { padding: 12px 0 4px; }
.vh-row { display: flex; justify-content: space-between; align-items: center; height: 48px; }
.mark { font-weight: 900; font-size: 18px; display: inline-flex; gap: 10px; align-items: center; }
.vh-tools { display: flex; gap: 8px; align-items: center; }
.ibtn { width: 40px; height: 40px; border-radius: var(--r-full); display: grid; place-items: center; border: 1px solid var(--line); background: var(--card); color: var(--text2); transition: background .2s, transform .15s; flex-shrink: 0; }
.ibtn:active { transform: scale(.92); background: var(--raise); }
.sync { width: 28px; height: 40px; display: grid; place-items: center; }
.sync i { width: 8px; height: 8px; border-radius: 50%; background: var(--disabled); transition: background .3s; }
.sync.s-ok i { background: var(--success); box-shadow: 0 0 0 4px var(--success-soft); }
.sync.s-syncing i { background: var(--warning); animation: dmf 1s infinite; }
.sync.s-error i { background: var(--error); }
.greet { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; margin-top: 16px; }
.greet .ic { color: var(--accent); }
.vh-title { font-family: var(--en); font-size: 40px; font-weight: 700; line-height: 1.1; letter-spacing: .01em; margin-top: 6px; display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.vh-title .t { direction: ltr; }
.vh-title .t.ar { font-family: var(--ar); font-weight: 900; direction: rtl; }
.anchor { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.anchor > span:not(.dm3) { display: block; width: 33%; height: 2px; background: var(--text); border-radius: 2px; }
.vh-sub { color: var(--muted); font-size: 15px; margin-top: 12px; }
.vh-nav { display: flex; gap: 8px; }

/* cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px; margin-top: 16px; }
.card-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; min-height: 36px; }
.card-h h2 { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.card-h h2.en { font-family: var(--en); letter-spacing: .01em; }
.card-h h2 .hi { width: 30px; height: 30px; border-radius: 10px; background: var(--raise); display: grid; place-items: center; color: var(--text2); }
.ov { font-size: 14px; font-weight: 500; color: var(--accent); }
.ov.en { font-family: var(--en); letter-spacing: .04em; }
.meta { font-size: 14px; color: var(--muted); }
.hint { font-size: 14px; color: var(--muted); margin-top: 8px; line-height: 1.65; }
.sec { font-size: 17px; font-weight: 700; margin: 28px 2px 0; display: flex; justify-content: space-between; align-items: baseline; }
.sec.en { font-family: var(--en); }
.sec .meta { font-weight: 400; font-family: var(--ar); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: var(--r-full); font-weight: 500; font-size: 15px; border: 1px solid var(--line2); background: var(--raise); color: var(--text); white-space: nowrap; transition: transform .15s var(--ease), background .2s, border-color .2s, color .2s; }
.btn:active { transform: scale(.96); }
.btn-primary { background: var(--inv); border-color: var(--inv); color: var(--inv-text); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-danger { color: var(--error); }
.btn:disabled { opacity: .4; pointer-events: none; }
.link { text-decoration: underline; text-underline-offset: 4px; font-size: 14px; font-weight: 500; color: var(--text2); }

/* Today layout */
.today-grid { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "pray" "tasks"; }
.today-grid > section { min-width: 0; }
.a-pray { grid-area: pray; } .a-top3 { grid-area: top3; } .a-trk { grid-area: trk; } .a-tasks { grid-area: tasks; }

/* prayer hero */
.pray { position: relative; overflow: hidden; padding-bottom: 14px; }
.pray-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; position: relative; }
.pray-name { font-size: 42px; font-weight: 900; line-height: 1.15; margin-top: 2px; }
.pray-meta { color: var(--text2); font-size: 15px; margin-top: 4px; }
.pray-meta b { color: var(--accent); font-weight: 500; }
.pray-cta { height: 52px; padding: 0 22px; font-size: 16px; font-weight: 700; }
@media (max-width: 899px) {
  .pray-top { flex-direction: column; align-items: stretch; gap: 14px; }
  .pray-cta { width: 100%; height: 54px; font-size: 17px; }
}
.arc { display: block; width: 100%; height: auto; max-height: 112px; margin: 10px 0 2px; overflow: visible; }
.arc .track { fill: none; stroke: var(--line2); stroke-width: 1.5; stroke-dasharray: 2 5; stroke-linecap: round; }
.arc .past { fill: none; stroke: var(--text2); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 800; stroke-dashoffset: 800; animation: draw 1.6s var(--ease) .2s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.arc .pt { fill: var(--card); stroke: var(--muted); stroke-width: 1.5; transition: fill .3s; }
.arc .pt.done { fill: var(--text); stroke: var(--text); }
.arc .pt.now { fill: var(--accent); stroke: var(--accent); }
.arc .pt.miss { fill: var(--card); stroke: var(--accent); stroke-dasharray: 2 2; }
.arc .sun { fill: var(--accent); }
.arc .sun-halo { fill: var(--accent-soft); transform-box: fill-box; transform-origin: center; animation: halo 2.8s ease-in-out infinite; }
@keyframes halo { 0%, 100% { opacity: .45; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }
.pray-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 6px; }
.pchip { padding: 10px 0 8px; text-align: center; background: var(--raise); border-radius: var(--r-md); border: 1px solid var(--line); line-height: 1.35; transition: background .25s, border-color .25s, color .25s, transform .15s var(--ease); }
.pchip:active { transform: scale(.94); }
.pchip b { display: block; font-size: 15px; font-weight: 700; }
.pchip span { font-family: var(--en); font-size: 14px; color: var(--muted); }
.pchip.done { background: var(--inv); border-color: var(--inv); color: var(--inv-text); }
.pchip.done span { color: #6E6A65; }
.pchip.now { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.pchip.miss { border-style: dashed; border-color: var(--line2); }
.pray-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }

/* tasks */
.tl { list-style: none; }
.task { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.tl > .task:first-child { border-top: 0; }
.cb { width: 28px; height: 28px; border-radius: var(--r-sm); border: 1.5px solid var(--line2); display: grid; place-items: center; color: var(--inv-text); flex-shrink: 0; transition: background .2s, border-color .2s, transform .15s var(--ease); background: var(--raise); }
.cb:active { transform: scale(.88); }
.cb .ic path { stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset .4s var(--ease) .05s; }
.task.done .cb, .cb.on { background: var(--inv); border-color: var(--inv); }
.task.done .cb .ic path, .cb.on .ic path { stroke-dashoffset: 0; }
.t-main { flex: 1; min-width: 0; cursor: pointer; }
.t-title { font-size: 16px; overflow-wrap: anywhere; transition: color .2s; }
.task.done .t-title { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--disabled); }
.t-meta { font-size: 14px; color: var(--muted); margin-top: 2px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.t-meta .late { color: var(--accent); }
.t-meta .tag { display: inline-flex; align-items: center; gap: 4px; }
.star { width: 40px; height: 40px; display: grid; place-items: center; color: var(--disabled); flex-shrink: 0; transition: color .2s, transform .15s; }
.star:active { transform: scale(.85); }
.star.on { color: var(--accent); }
.star.on .ic path { fill: currentColor; }
.quick { display: flex; gap: 8px; margin-top: 8px; }
.quick .in { flex: 1; }
.quick .btn { width: 48px; height: 48px; padding: 0; flex-shrink: 0; }

/* tracker tiles */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; display: flex; flex-direction: column; min-height: 176px; min-width: 0; transition: border-color .25s, background .25s; }
.tile.met { border-color: var(--success); background: linear-gradient(var(--success-soft), var(--success-soft)) , var(--card); }
.tile-h { display: flex; align-items: center; gap: 10px; color: var(--text2); font-size: 14px; font-weight: 500; cursor: pointer; min-width: 0; }
.tile-h .ti { width: 34px; height: 34px; border-radius: 11px; background: var(--raise); display: grid; place-items: center; color: var(--text); flex-shrink: 0; }
.tile.met .tile-h .ti { background: var(--success); color: #10291A; }
.tile-h span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-v { font-family: var(--en); font-size: 30px; font-weight: 500; line-height: 1.2; margin-top: 12px; }
.tile-v.ar { font-family: var(--ar); font-size: 24px; font-weight: 700; }
.tile-v small { font-family: var(--ar); font-size: 14px; color: var(--muted); font-weight: 400; margin-inline-start: 4px; }
.tile-v.hide { filter: blur(10px); cursor: pointer; user-select: none; transition: filter .3s; }
.tile-s { font-size: 14px; color: var(--muted); margin-top: 2px; line-height: 1.45; overflow-wrap: anywhere; }
.tile .bar { margin-top: 12px; }
.tile-a { display: flex; gap: 8px; margin-top: auto; padding-top: 12px; }
.tile-a .btn { flex: 1; height: 42px; padding: 0 6px; font-size: 14px; min-width: 0; }
.tile-a .btn.sq { flex: 0 0 42px; }
.tile-a .btn.on { background: var(--inv); border-color: var(--inv); color: var(--inv-text); }
.tile.add-tile { border-style: dashed; border-color: var(--line2); background: transparent; align-items: center; justify-content: center; gap: 10px; color: var(--text2); font-size: 15px; text-align: center; transition: background .2s; }
.tile.add-tile:active { background: var(--card); }
.tile.add-tile .ti { width: 44px; height: 44px; border-radius: 14px; border: 1px dashed var(--line2); display: grid; place-items: center; }
.bar { height: 4px; background: var(--raise2); border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--text); border-radius: 4px; transition: width .5s var(--ease); }
.bar.thick { height: 8px; border-radius: 8px; }
.bar i.ok, .tile.met .bar i { background: var(--success); }

/* capture (دماغي) */
.capture {
  position: fixed; z-index: 20; left: 50%; transform: translateX(-50%); width: min(616px, calc(100% - 24px));
  bottom: calc(84px + var(--safe-b)); display: flex; gap: 8px; align-items: center; background: var(--raise);
  border: 1px solid var(--line2); border-radius: var(--r-full); padding: 6px; box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .6);
  transition: transform .25s var(--ease), opacity .2s;
}
.capture .cap-add, .capture .cap-mic { background: var(--card); color: var(--text); border: 1px solid var(--line2); }
.capture .cap-mic { color: var(--accent); }
@media (max-width: 899px) { .capture .cap-mic { display: none; } }
.capture input { flex: 1; border: 0; outline: 0; background: transparent; padding: 0 8px; height: 42px; font-size: 16px; min-width: 0; }
.capture input::placeholder { color: var(--muted); }
.capture button { width: 42px; height: 42px; border-radius: 50%; background: var(--inv); color: var(--inv-text); display: grid; place-items: center; flex-shrink: 0; transition: transform .15s; }
.capture button:active { transform: scale(.9); }
body.no-capture .capture { opacity: 0; pointer-events: none; transform: translate(-50%, 20px); }

/* tab bar (mobile) */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 21; background: rgba(37, 36, 35, .94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr); align-items: start;
  padding: 8px 8px calc(8px + var(--safe-b)); height: calc(72px + var(--safe-b));
}
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-family: var(--en); font-size: 13px; color: var(--muted); padding-top: 2px; transition: color .2s; }
.tabbar a .ic { transition: transform .25s var(--ease); }
.tabbar a.on { color: var(--text); font-weight: 500; }
.tabbar a.on .ic { transform: translateY(-1px); color: var(--text); }
.tabbar a::after { content: ''; width: 5px; height: 5px; transform: rotate(45deg) scale(0); margin-top: 1px; background: var(--accent); transition: transform .25s var(--ease); }
.tabbar a.on::after { transform: rotate(45deg) scale(1); }
.tab-mic { justify-self: center; position: relative; width: 62px; height: 62px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; margin-top: -30px; box-shadow: 0 12px 26px -8px rgba(242, 74, 61, .6), 0 0 0 6px var(--bg); transition: transform .15s var(--ease); }
.tab-mic:active { transform: scale(.9); }
.tab-mic::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 1.5px solid var(--accent); opacity: 0; animation: micpulse 3.4s var(--ease) infinite; pointer-events: none; }
@keyframes micpulse { 0% { transform: scale(.92); opacity: .55; } 55%, 100% { transform: scale(1.28); opacity: 0; } }
.tab-mic .badge { position: absolute; top: -4px; left: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--inv); color: var(--inv-text); font-family: var(--en); font-size: 12px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg); }
.tabbar a.on .ic { animation: tabin .4s var(--ease); }
@keyframes tabin { from { transform: translateY(4px); opacity: .4; } to { transform: translateY(-1px); opacity: 1; } }

/* sheet */
#sheet { position: fixed; inset: 0; z-index: 50; display: none; }
#sheet.open { display: block; }
.sheet-bg { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fade .25s; transition: opacity .2s; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 90vh; overflow-y: auto; background: var(--card);
  border: 1px solid var(--line); border-bottom: 0;
  border-radius: var(--r-lg) var(--r-lg) 0 0; padding: 4px 20px calc(24px + var(--safe-b)); animation: up .3s var(--ease);
  transition: transform .22s var(--ease);
  overscroll-behavior: contain;
}
#sheet.closing .sheet { transform: translateY(105%); }
#sheet.closing .sheet-bg { opacity: 0; }
.sheet-grip { width: 44px; height: 5px; border-radius: 5px; background: var(--line2); margin: 10px auto 16px; }
.sheet h2 { font-size: 24px; font-weight: 800; line-height: 1.3; }
.sheet h2.en { font-family: var(--en); font-weight: 700; }
.sheet .anchor { margin: 12px 0 8px; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* forms */
.field { margin-top: 20px; }
.lbl { display: block; font-size: 14px; font-weight: 500; color: var(--text2); margin-bottom: 8px; }
.in { width: 100%; height: 50px; border: 1px solid var(--line2); border-radius: var(--r-sm); background: var(--raise); padding: 0 14px; font-size: 16px; outline: 0; color: var(--text); transition: border-color .2s, background .2s; }
.in::placeholder { color: var(--muted); }
.in:focus { border-color: var(--text2); background: var(--raise2); }
.in.ltr { direction: ltr; text-align: left; font-family: var(--en); }
textarea.in { height: auto; min-height: 104px; padding: 12px 14px; line-height: 1.6; resize: vertical; }
select.in { appearance: none; }
input[type=time].in, input[type=date].in { color-scheme: dark; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip > span { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 16px; border-radius: var(--r-full); border: 1px solid var(--line2); background: var(--raise); font-size: 15px; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .15s; }
.chip > span:active { transform: scale(.95); }
.chip input:checked + span { background: var(--inv); color: var(--inv-text); border-color: var(--inv); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.types { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.types .chip > span { flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; padding: 12px 14px; border-radius: var(--r-md); width: 100%; min-height: 68px; }
.types .chip small { font-size: 14px; color: var(--muted); }
.types .chip input:checked + span small { color: #5A5652; }
.icons .chip > span { width: 46px; height: 46px; padding: 0; justify-content: center; border-radius: 14px; }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; min-width: 0; }
.toggle { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); cursor: pointer; }
.toggle input { width: 22px; height: 22px; accent-color: var(--accent); flex-shrink: 0; }
.toggle small { display: block; font-size: 14px; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.actions .btn { flex: 1 1 120px; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.err { color: var(--error); font-size: 14px; margin-top: 8px; }

/* add menu */
.addgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.addcard { text-align: right; background: var(--raise); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px; display: flex; flex-direction: column; gap: 8px; min-height: 132px; transition: transform .15s var(--ease), background .2s; }
.addcard:active { transform: scale(.97); background: var(--raise2); }
.addcard .ai { width: 42px; height: 42px; border-radius: 13px; background: var(--card); border: 1px solid var(--line2); display: grid; place-items: center; color: var(--text); }
.addcard .ai.acc { background: var(--accent); border-color: var(--accent); color: #fff; }
.addcard b { font-size: 16px; font-weight: 700; }
.addcard b.en { font-family: var(--en); }
.addcard span { font-size: 14px; color: var(--muted); line-height: 1.45; }
.addcard.wide { grid-column: 1 / -1; min-height: 0; flex-direction: row; align-items: center; gap: 14px; }

/* review */
.verdict { font-size: 21px; font-weight: 700; line-height: 1.65; padding-inline-start: 16px; border-inline-start: 2px solid var(--accent); margin-top: 12px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin-top: 16px; }
.stat { border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 8px; text-align: center; background: var(--raise); }
.stat b { font-family: var(--en); font-size: 22px; font-weight: 500; display: block; line-height: 1.3; }
.stat span { font-size: 14px; color: var(--muted); }
.insight { padding: 12px 0; border-top: 1px solid var(--line); font-size: 16px; line-height: 1.7; display: flex; gap: 12px; }
.insight::before { content: ''; flex-shrink: 0; width: 7px; height: 7px; background: var(--accent); transform: rotate(45deg); margin-top: 10px; }
.insight:first-of-type { border-top: 0; }
.sugg { border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px; background: var(--card); margin-top: 12px; display: flex; gap: 14px; }
.sugg .si { width: 38px; height: 38px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex-shrink: 0; }
.sugg .sb { flex: 1; min-width: 0; }
.sugg h3 { font-size: 16px; font-weight: 700; line-height: 1.5; }
.sugg p { font-size: 14px; color: var(--muted); margin-top: 2px; }
.sugg .actions { margin-top: 12px; }
.plan { list-style: none; margin-top: 8px; }
.plan li { display: flex; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); align-items: baseline; }
.plan li:first-child { border-top: 0; }
.plan li b { font-family: var(--en); font-weight: 500; font-size: 14px; color: var(--accent); }
details.old { border-top: 1px solid var(--line); padding: 12px 0; }
details.old summary { cursor: pointer; font-size: 15px; list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.old summary::-webkit-details-marker { display: none; }
details summary { list-style: none; }
details summary::-webkit-details-marker { display: none; }

/* week */
.shrow { display: grid; grid-template-columns: 84px 1fr auto; align-items: center; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer; transition: background .2s; }
.shrow:first-child { border-top: 0; }
.shrow:active { background: var(--raise); }
.shrow b { font-size: 15px; }
.shrow .d { display: block; font-size: 14px; color: var(--muted); font-weight: 400; font-family: var(--en); }
.shrow .s { font-family: var(--en); font-size: 15px; display: inline-flex; align-items: center; gap: 8px; }
.shrow .s.off { font-family: var(--ar); font-weight: 700; color: var(--success); }
.shrow .s.none { font-family: var(--ar); color: var(--disabled); font-size: 14px; }
.shrow .ic { color: var(--disabled); }
.shrow.is-today b { color: var(--accent); }
.goal { padding: 14px 0; border-top: 1px solid var(--line); cursor: pointer; }
.goal:first-child { border-top: 0; }
.goal-r { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; font-size: 16px; align-items: center; }
.goal-r .gt { display: flex; align-items: center; gap: 10px; }
.goal-r .gt .ic { color: var(--muted); }
.goal-r span.v { font-family: var(--en); color: var(--text2); white-space: nowrap; }
.goal .why { font-size: 14px; color: var(--muted); margin-top: 8px; }
.wk { width: 100%; border-collapse: collapse; font-size: 15px; }
.wk td { padding: 11px 0; border-top: 1px solid var(--line); }
.wk tr:first-child td { border-top: 0; }
.wk td:first-child { display: flex; align-items: center; gap: 10px; }
.wk td:first-child .ic { color: var(--muted); }
.wk td:last-child { text-align: left; font-family: var(--en); color: var(--text2); }
.exp { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; gap: 8px; }
.exp:first-child { border-top: 0; }
.exp .amt { font-family: var(--en); }

/* settings */
.srow { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.srow:first-child { border-top: 0; }
.srow .nm { display: flex; align-items: center; gap: 12px; min-width: 0; }
.srow .nm .ti { width: 34px; height: 34px; border-radius: 11px; background: var(--raise); display: grid; place-items: center; flex-shrink: 0; }
.srow .nm span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srow .tools { display: flex; gap: 4px; flex-shrink: 0; }
.srow .tools .ibtn { width: 36px; height: 36px; }
.srow.arch { opacity: .5; }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--disabled); }
.status.ok i { background: var(--success); }
.status.bad i { background: var(--error); }
input[type=range] { width: 100%; accent-color: var(--accent); }
.range-l { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); margin-top: 4px; }

/* history strip */
.hist { display: flex; gap: 4px; align-items: flex-end; height: 64px; margin-top: 12px; direction: ltr; }
.hist i { flex: 1; background: var(--raise2); border-radius: 3px; min-height: 4px; }
.hist i.met { background: var(--success); }
.hist i.today { outline: 1.5px solid var(--accent); outline-offset: 1px; }

/* empty states + illustrations */
.empty { text-align: center; padding: 24px 16px 16px; color: var(--muted); }
.empty svg { display: block; margin: 0 auto 14px; }
.empty p { font-size: 15px; max-width: 300px; margin: 0 auto; line-height: 1.7; }
.illus .l { stroke: var(--line2); }
.illus .t { stroke: var(--text2); }
.illus .f { fill: var(--text); }
.illus .a { fill: var(--accent); }
.illus .s { fill: var(--raise2); }

/* misc */
#toast { position: fixed; left: 50%; bottom: calc(96px + var(--safe-b)); transform: translate(-50%, 16px); background: var(--inv); color: var(--inv-text); padding: 12px 20px; border-radius: var(--r-full); font-size: 15px; font-weight: 500; opacity: 0; pointer-events: none; transition: .3s var(--ease); z-index: 60; max-width: calc(100% - 48px); text-align: center; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .6); }
#toast.on { opacity: 1; transform: translate(-50%, 0); }
#splash { position: fixed; inset: 0; z-index: 100; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; transition: opacity .4s; }
#splash b { font-size: 56px; font-weight: 900; line-height: 1; }
#splash small { font-family: var(--en); font-size: 14px; color: var(--muted); letter-spacing: .08em; }
#splash.gone { opacity: 0; pointer-events: none; }
.foot { text-align: center; font-size: 14px; color: var(--muted); margin-top: 40px; font-family: var(--en); }

/* desktop */
@media (min-width: 900px) {
  body { padding-bottom: 48px; }
  .shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
  .side { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; padding: 40px 20px 24px; border-inline-end: 1px solid var(--line); background: #201F1E; }
  .side-mark { display: flex; flex-direction: column; gap: 12px; margin: 0 8px 40px; }
  .side-mark b { font-size: 32px; font-weight: 900; line-height: 1; }
  .side-nav a { display: flex; align-items: center; gap: 12px; height: 48px; padding: 0 14px; border-radius: 12px; color: var(--muted); font-size: 16px; font-family: var(--en); position: relative; transition: background .2s, color .2s; }
  .side-nav a:hover { background: var(--card); color: var(--text2); }
  .side-nav a.on { color: var(--text); font-weight: 500; background: var(--card); border: 1px solid var(--line); }
  .side-nav a.on::before { content: ''; position: absolute; left: 16px; width: 7px; height: 7px; background: var(--accent); transform: rotate(45deg); }
  .side-add { margin-top: 24px; }
  .side-add2 { margin-top: 8px; }
  .side-foot { margin: auto 8px 0; font-family: var(--en); font-size: 14px; color: var(--muted); }
  .main { max-width: 1120px; width: 100%; padding: 8px 56px 140px; margin: 0; }
  .tabbar { display: none; }
  .capture { left: calc((100% - var(--side)) / 2); bottom: 24px; width: min(720px, calc(100% - var(--side) - 112px)); }
  body.no-capture .capture { transform: translate(-50%, 20px); }
  #toast { left: calc((100% - var(--side)) / 2); bottom: 100px; }
  .vh-title { font-size: 56px; }
  .card { padding: 22px; }
  .today-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "pray tasks"; column-gap: 24px; align-items: start; }
  .cols2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
  .sheet { left: 50%; right: auto; bottom: auto; top: 50%; transform: translate(-50%, -50%); width: 580px; border-radius: var(--r-lg); border-bottom: 1px solid var(--line); max-height: 88vh; padding: 16px 32px 32px; animation: pop .25s var(--ease); }
  #sheet.closing .sheet { transform: translate(-50%, -46%); opacity: 0; transition: transform .18s, opacity .18s; }
  .sheet-grip { display: none; }
  @keyframes pop { from { opacity: 0; transform: translate(-50%, -46%); } to { opacity: 1; transform: translate(-50%, -50%); } }
}
@media (max-width: 360px) {
  .main { padding: 0 14px; }
  .grid { gap: 10px; }
  .tile { padding: 12px; }
  .pray-name { font-size: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
.bar.ok-bar i { background: var(--success); }

/* voice */
.voice { text-align: center; padding-top: 4px; }
.vmic { position: relative; width: 112px; height: 112px; margin: 6px auto 0; display: grid; place-items: center; }
.vmic .core { position: relative; z-index: 2; width: 78px; height: 78px; border-radius: 50%; background: var(--raise2); color: var(--text); display: grid; place-items: center; transition: background .35s, color .35s, transform .35s var(--ease); }
.voice[data-state=on] .vmic .core { background: var(--accent); color: #fff; transform: scale(1.05); }
.vmic .ring { position: absolute; inset: 17px; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; }
.voice[data-state=on] .vmic .ring { animation: ring 1.9s var(--ease) infinite; }
.voice[data-state=on] .vmic .ring.r2 { animation-delay: .95s; }
@keyframes ring { 0% { transform: scale(.85); opacity: .7; } 100% { transform: scale(1.55); opacity: 0; } }
.vbars { display: flex; justify-content: center; gap: 5px; height: 28px; align-items: center; margin: 4px 0; }
.vbars i { width: 4px; height: 6px; border-radius: 3px; background: var(--line2); transition: background .3s; }
.voice[data-state=on] .vbars i { background: var(--accent); animation: vbar 1.1s ease-in-out infinite; }
.voice[data-state=on] .vbars i:nth-child(2n) { animation-duration: .9s; }
.voice[data-state=on] .vbars i:nth-child(3n) { animation-duration: 1.3s; }
.voice[data-state=on] .vbars i:nth-child(1) { animation-delay: .1s; } .voice[data-state=on] .vbars i:nth-child(4) { animation-delay: .25s; }
.voice[data-state=on] .vbars i:nth-child(6) { animation-delay: .15s; } .voice[data-state=on] .vbars i:nth-child(8) { animation-delay: .3s; }
@keyframes vbar { 0%, 100% { height: 6px; } 50% { height: 26px; } }
.vstate { color: var(--text2); font-size: 15px; margin: 2px 0 14px; min-height: 24px; }
.voice textarea, .voice .hint { text-align: right; }

/* voice results on Today */
.vres { padding: 10px 0; border-top: 1px solid var(--line); }
.vres:first-of-type { border-top: 0; }
.vres .vq { font-size: 14px; color: var(--muted); }
.vres .va { font-size: 15px; margin-top: 4px; display: flex; gap: 8px; align-items: baseline; }
.vres .va .ic { color: var(--accent); flex-shrink: 0; transform: translateY(2px); }
.t-meta .tag.voice { color: var(--accent); }

/* diamond burst when you mark a prayer */
.burst { position: fixed; z-index: 70; pointer-events: none; width: 0; height: 0; }
.burst i { position: absolute; width: 9px; height: 9px; margin: -4.5px; background: var(--accent); transform: rotate(45deg); animation: burst .75s var(--ease) forwards; }
.burst i:nth-child(even) { background: var(--text); width: 6px; height: 6px; margin: -3px; }
@keyframes burst { from { opacity: 1; transform: translate(0, 0) rotate(45deg) scale(1); } to { opacity: 0; transform: translate(var(--x), var(--y)) rotate(45deg) scale(.3); } }

/* desktop hover polish */
@media (hover: hover) {
  .tile { transition: border-color .25s, background .25s, transform .3s var(--ease); }
  .tile:hover { border-color: var(--line2); transform: translateY(-2px); }
  .card { transition: border-color .25s; }
  .card:hover { border-color: var(--line2); }
  .btn:hover { border-color: var(--text2); }
  .btn-primary:hover { background: #FFFFFF; border-color: #FFFFFF; }
  .btn-accent:hover { background: var(--accent-2); border-color: var(--accent-2); }
  .pchip:hover { border-color: var(--line2); }
  .task:hover .t-title { color: var(--text); }
  .star:hover { color: var(--text2); }
}

.demo-pill { font-family: var(--en); font-size: 12px; font-weight: 500; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 1px 9px; margin-inline-start: 4px; letter-spacing: .04em; }

/* habits: a list where each row fills like liquid from the start edge as you progress */
.habits { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.habit { position: relative; overflow: hidden; isolation: isolate; min-width: 0; border-radius: var(--r-md); background: var(--card); border: 1px solid var(--line); transition: border-color .5s, background .5s; width: 100%; text-align: right; color: inherit; }
.hfill { position: absolute; inset-block: 0; inset-inline-start: 0; z-index: -1; width: var(--p, 0%); background: rgba(247, 245, 242, .075); transition: width 1.1s var(--ease), background .6s; }
.hfill::after {
  content: ''; position: absolute; inset-block: 0; inset-inline-end: -11px; width: 12px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='28' viewBox='0 0 12 28'><path d='M12 0H6C1 7 1 7 6 14S11 21 6 28H12Z' fill='rgba(247,245,242,0.075)'/></svg>") repeat-y;
  background-size: 12px 28px; animation: wave 2.6s linear infinite; transition: opacity .4s;
}
.habit.empty .hfill::after, .habit.done .hfill::after, .habit.gauge .hfill::after { opacity: 0; }
@keyframes wave { from { background-position: 0 0; } to { background-position: 0 28px; } }
.habit.gauge .hfill { background: rgba(247, 245, 242, .045); }
.habit.over .hfill { background: var(--accent-soft); }
.habit.done { border-color: rgba(34, 197, 94, .42); }
.habit.done .hfill { background: var(--success-soft); }
.hrow { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 74px; }
.hic { width: 44px; height: 44px; border-radius: 14px; background: var(--raise); display: grid; place-items: center; color: var(--text); flex-shrink: 0; cursor: pointer; transition: background .5s, color .5s; }
.habit.done .hic { background: var(--success); color: #0F2A19; }
.hmain { flex: 1; min-width: 0; cursor: pointer; }
.hname { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; min-width: 0; }
.hname > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hwk { flex-shrink: 0; font-size: 12px; font-weight: 500; color: var(--muted); border: 1px solid var(--line2); border-radius: 999px; padding: 0 8px; line-height: 20px; }
.hmeta { font-size: 14px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hmeta b { color: var(--text); font-weight: 500; font-family: var(--en); }
.habit.done .hmeta { color: var(--text2); }
.hmeta .hide { filter: blur(6px); cursor: pointer; transition: filter .3s; }
.hact { display: flex; gap: 6px; flex-shrink: 0; align-items: center; }
.hbtn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line2); background: var(--raise); color: var(--text); display: grid; place-items: center; transition: transform .15s var(--ease), background .3s, color .3s, border-color .3s; }
.hbtn:active { transform: scale(.86); }
.hbtn.primary { background: var(--inv); border-color: var(--inv); color: var(--inv-text); }
.hbtn.txt { width: auto; padding: 0 14px; border-radius: 999px; font-family: var(--en); font-size: 14px; font-weight: 500; }
.hbtn.tick .ic path { stroke-dasharray: 24; stroke-dashoffset: 0; }
.hbtn.tick.on { background: var(--success); border-color: var(--success); color: #0F2A19; }
.hbtn.tick.on .ic path { animation: tickdraw .45s var(--ease); }
@keyframes tickdraw { from { stroke-dashoffset: 24; } to { stroke-dashoffset: 0; } }
.habit.add { border-style: dashed; border-color: var(--line2); background: transparent; cursor: pointer; }
.habit.add .hic { background: transparent; border: 1px dashed var(--line2); color: var(--text2); }
.habit.add:active { background: var(--card); }

/* when a habit gets done: one soft light sweep + the icon settles. Simple, not loud. */
.habit.celebrate::before { content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .13) 50%, transparent 70%); transform: translateX(110%); animation: sweep 1.1s var(--ease) .1s forwards; }
@keyframes sweep { from { transform: translateX(110%); } to { transform: translateX(-110%); } }
.habit.celebrate .hic { animation: settle .55s var(--ease); }
@keyframes settle { 0% { transform: scale(1); } 35% { transform: scale(1.12); } 100% { transform: scale(1); } }
.burst.sm i { width: 6px; height: 6px; margin: -3px; }
.burst.sm i:nth-child(even) { background: var(--success); width: 5px; height: 5px; margin: -2.5px; }

@media (hover: hover) {
  .habit:not(.add):hover { border-color: var(--line2); }
  .habit.done:hover { border-color: rgba(34, 197, 94, .6); }
}

/* ---- v1.4: calmer, drawn, fewer words ---- */
.hchip { display: inline-flex; align-items: center; gap: 6px; font-family: var(--en); font-size: 14px; font-weight: 500; color: var(--text2); background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; direction: rtl; white-space: nowrap; }
.count { font-family: var(--en); font-size: 14px; font-weight: 500; color: var(--muted); background: var(--raise); border-radius: 999px; padding: 2px 10px; }
.ch-r { display: inline-flex; align-items: center; gap: 8px; }
.ibtn.on { color: var(--accent); border-color: var(--accent); }
.pray-meta { display: flex; align-items: center; gap: 6px; }
.pray-meta .ic { color: var(--muted); }
.pray-row { margin-top: 16px; }
.more-link { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 12px 2px 2px; border-top: 1px solid var(--line); color: var(--text2); font-size: 15px; }
.more-link span { flex: 1; }
.more-link .ic { color: var(--muted); }
.vcard { position: relative; padding-inline-end: 52px; }
.vcard .va { display: flex; gap: 10px; align-items: baseline; font-size: 15px; padding: 4px 0; }
.vcard .va .ic { color: var(--accent); flex-shrink: 0; transform: translateY(2px); }
.vcard .va.muted { color: var(--muted); }
.vcard .va.muted .ic { color: var(--muted); }
.vcard .vx { position: absolute; top: 12px; inset-inline-end: 12px; width: 32px; height: 32px; }
.habit.add .hrow { min-height: 56px; justify-content: center; }
.habit.add .hic { width: 36px; height: 36px; }
.hwk { border: 0; padding: 0; color: var(--muted); display: inline-flex; }

/* week: shifts drawn on a 6 AM to 6 AM line */
.tl { margin-top: 4px; }
.tl-ticks { position: relative; height: 18px; margin-inline-start: 64px; }
.tl-ticks span { position: absolute; top: 0; font-family: var(--en); font-size: 12px; color: var(--muted); transform: translateX(50%); }
.tl-ticks span:first-child { transform: none; }
.tl-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 6px 0; text-align: right; }
.tl-day { width: 52px; flex-shrink: 0; display: flex; align-items: baseline; gap: 6px; }
.tl-day b { font-size: 14px; font-weight: 700; }
.tl-day i { font-style: normal; font-size: 12px; color: var(--muted); }
.tl-row.is-today .tl-day b { color: var(--accent); }
.tl-track { position: relative; flex: 1; height: 30px; border-radius: 10px; background-color: var(--raise); overflow: hidden;
  background-image: linear-gradient(to left, transparent calc(25% - 1px), var(--line2) calc(25% - 1px), var(--line2) 25%, transparent 25%, transparent calc(50% - 1px), var(--line2) calc(50% - 1px), var(--line2) 50%, transparent 50%, transparent calc(75% - 1px), var(--line2) calc(75% - 1px), var(--line2) 75%, transparent 75%); }
.tl-track.none { background: transparent; border: 1px dashed var(--line2); }
.tl-track.off { display: grid; place-items: center; color: var(--success); background-color: var(--success-soft); background-image: none; }
.tl-block { position: absolute; top: 3px; bottom: 3px; border-radius: 8px; background: var(--inv); color: var(--inv-text); display: grid; place-items: center; overflow: hidden; min-width: 8px; }
.tl-block span { font-family: var(--en); font-size: 12px; font-weight: 500; white-space: nowrap; padding: 0 6px; }
.tl-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--accent); border-radius: 2px; }

/* week: habits x days */
.hg-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; cursor: pointer; }
.hg-head { padding-bottom: 2px; cursor: default; }
.hg-name { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text2); }
.hg-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hg-name .ic { color: var(--muted); flex-shrink: 0; }
.hg-cells { display: grid; grid-template-columns: repeat(7, 22px); gap: 6px; direction: rtl; flex-shrink: 0; }
.hg-head .hg-cells span { font-size: 12px; color: var(--muted); text-align: center; }
.hg-head .hg-cells span.is-today { color: var(--accent); font-weight: 700; }
.hc { width: 22px; height: 22px; border-radius: 6px; background: color-mix(in srgb, var(--success) calc(var(--r, 0) * 70%), var(--raise2)); display: block; }
.hc.on { background: var(--success); }
.hc.slip { background: var(--accent); }
.hc.rest { background: transparent; }
.hc.future { background: transparent; border: 1px dashed var(--line2); }

/* week: money per day */
.money-total { font-size: 15px; color: var(--muted); margin: 2px 0 10px; }
.money-total b { font-size: 26px; color: var(--text); font-weight: 500; }
.mbars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; height: 96px; align-items: end; direction: rtl; }
.mb { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 6px; }
.mb i { width: 100%; max-width: 28px; min-height: 4px; border-radius: 6px 6px 3px 3px; background: var(--raise2); transition: height .6s var(--ease); }
.mb.is-today i { background: var(--text); }
.mb em { font-style: normal; font-size: 12px; color: var(--muted); }

/* More folds */
details.more { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
details.more > summary { display: flex; align-items: center; gap: 8px; cursor: pointer; color: var(--muted); font-size: 14px; list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary span { flex: 1; }
details.more[open] > summary .ic:last-child { transform: rotate(180deg); }

/* forms, lighter */
.in.big { height: 56px; font-size: 18px; font-weight: 500; }
.iconfield { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.iconfield .in { flex: 1; }
.toggle-chip { display: flex; }
.toggle-chip > span { width: 100%; justify-content: center; min-height: 50px; border-radius: var(--r-sm); }
.types { grid-template-columns: repeat(4, 1fr); }
.types .chip > span { align-items: center; text-align: center; min-height: 72px; gap: 4px; padding: 10px 4px; }
.types .chip small { font-size: 12px; }
.addgrid.five { grid-template-columns: repeat(3, 1fr); }
.addgrid.five .addcard { min-height: 104px; align-items: center; justify-content: center; text-align: center; }
.lvl { display: flex; align-items: center; gap: 8px; color: var(--muted); margin-bottom: 8px; }
.lvl b { color: var(--text); font-weight: 500; font-size: 15px; }
.sq-btn { width: 50px; height: 50px; padding: 0; border-radius: var(--r-sm); flex: 0 0 50px !important; }

/* v1.5: tasks on the opening screen, folds for later */
.shell { overflow-x: clip; } /* clip, not hidden: never turns the page into a stuck scroll box */
.sub { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin: 14px 2px 2px; }
.ini { width: 32px; height: 32px; border-radius: 10px; background: var(--raise); color: var(--muted); display: grid; place-items: center; flex-shrink: 0; }
details.fold > summary { list-style: none; cursor: pointer; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary .card-h { margin-bottom: 0; }
details.fold[open] > summary .card-h { margin-bottom: 4px; }
details.fold[open] > summary .ch-r .ic:last-child { transform: rotate(180deg); }
.a-tasks .card:first-child { margin-top: 16px; }

/* ================= motion v2: clear, quick, never loud (Athr: fade, slide, mask, tracking, diamonds) ================= */
:root { --out: cubic-bezier(.16, 1, .3, 1); }

/* page entrance: title tracks in, the Anchor Line draws, its diamonds appear, then cards rise one after another */
.main.enter .vh-title .t { animation: trackin .8s var(--out) both; }
@keyframes trackin { from { opacity: 0; letter-spacing: .28em; filter: blur(6px); } to { opacity: 1; letter-spacing: .01em; filter: none; } }
.main.enter .vh-title .t.ar { animation-name: fadeup; }
.main.enter .anchor > span:not(.dm3) { animation: linegrow .9s var(--out) .12s both; transform-origin: right center; }
@keyframes linegrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.main.enter .anchor .dm3 i { animation: dmin .45s var(--out) both; }
.main.enter .anchor .dm3 i:nth-child(1) { animation-delay: .5s; }
.main.enter .anchor .dm3 i:nth-child(2) { animation-delay: .58s; }
.main.enter .anchor .dm3 i:nth-child(3) { animation-delay: .66s; }
@keyframes dmin { from { opacity: 0; transform: rotate(45deg) scale(0); } to { opacity: 1; transform: rotate(45deg) scale(1); } }
.main.enter .vh-sub, .main.enter .greet { animation: fadeup .6s var(--out) .2s both; }
.main.enter .card, .main.enter .habit, .main.enter .sec, .main.enter .sugg, .main.enter .quick, .main.enter .vh-row { animation: cardin .7s var(--out) both; animation-delay: var(--d, 0ms); }
.main.enter .vh { animation: none; }
@keyframes cardin { from { opacity: 0; transform: translateY(26px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes fadeup { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* prayer: the name is revealed from the right, chips arrive in order */
.main.enter .pray-name { animation: maskin .9s var(--out) .15s both; }
@keyframes maskin { from { clip-path: inset(0 0 0 100%); opacity: .2; } to { clip-path: inset(0 0 0 0); opacity: 1; } }
.main.enter .pchip { animation: chipin .55s var(--out) both; animation-delay: calc(var(--i, 0) * 55ms + .25s); }
@keyframes chipin { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.main.enter .pray-cta { animation: fadeup .6s var(--out) .35s both; }

/* bars and fills grow in on entrance */
.main.enter .bar i { animation: fillin 1.1s var(--out) .3s both; }
.main.enter .hfill { animation: fillin 1.3s var(--out) both; animation-delay: calc(var(--d, 0ms) + .15s); }
@keyframes fillin { from { width: 0; } }

/* week, drawn: blocks sweep in, squares fill like a wave, money bars rise */
.main.enter .tl-block { animation: blockin .8s var(--out) both; animation-delay: calc(var(--i, 0) * 55ms + .2s); transform-origin: right center; }
@keyframes blockin { from { opacity: 0; transform: scaleX(.2); } to { opacity: 1; transform: none; } }
.main.enter .hc { animation: cellin .5s var(--out) both; animation-delay: calc(var(--i, 0) * 18ms + .2s); }
@keyframes cellin { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
.main.enter .mb i { animation: barup .9s var(--out) both; animation-delay: calc(var(--i, 0) * 60ms + .2s); transform-origin: bottom center; }
@keyframes barup { from { transform: scaleY(0); } to { transform: none; } }

/* sliding tab indicator */
.tabbar { position: fixed; }
.tab-ind { position: absolute; top: 6px; height: 52px; border-radius: 16px; background: rgba(247, 245, 242, .07); transition: transform .55s var(--out), width .55s var(--out), opacity .3s; pointer-events: none; opacity: 0; }
.tab-ind.on { opacity: 1; }
.tabbar a { position: relative; z-index: 1; }
.tabbar a::after { display: none; }
.tabbar a.on .ic { animation: none; transform: translateY(-1px) scale(1.08); }
.tabbar a .ic { transition: transform .45s var(--out), color .3s; }

/* press ripple */
.btn, .hbtn, .ibtn, .pchip, .addcard, .tab-mic, .tabbar a, .tl-row, .chip > span { position: relative; overflow: hidden; }
.rip { position: absolute; border-radius: 50%; pointer-events: none; background: currentColor; opacity: .18; transform: scale(0); animation: rip .6s var(--out) forwards; }
@keyframes rip { to { transform: scale(1); opacity: 0; } }

/* +1 that floats up from the button you pressed */
.floater { position: fixed; z-index: 70; pointer-events: none; font-family: var(--en); font-weight: 700; font-size: 15px; color: var(--text); transform: translate(-50%, -50%); animation: floatup .8s var(--out) forwards; text-shadow: 0 2px 10px rgba(0, 0, 0, .5); }
@keyframes floatup { from { opacity: 0; transform: translate(-50%, -30%); } 25% { opacity: 1; } to { opacity: 0; transform: translate(-50%, -190%); } }

/* a finished task: a line draws across it (right to left) */
.task .t-title { background: linear-gradient(var(--muted), var(--muted)) no-repeat right center / 0% 1.5px; transition: background-size .45s var(--out), color .35s; }
.task.done .t-title { text-decoration: none; background-size: 100% 1.5px; }
.task { transition: opacity .35s; }

/* sheets: smooth arrival, contents follow */
.sheet { animation: sheetup .5s var(--out); }
@keyframes sheetup { from { transform: translateY(60px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet > h2, .sheet > .anchor, .sheet > form > *, .sheet > .addgrid > *, .sheet > .voice > *, .sheet > ul > li { animation: fadeup .5s var(--out) both; }
.sheet > form > *:nth-child(2), .sheet > .addgrid > *:nth-child(2), .sheet > .voice > *:nth-child(2) { animation-delay: .04s; }
.sheet > form > *:nth-child(3), .sheet > .addgrid > *:nth-child(3), .sheet > .voice > *:nth-child(3) { animation-delay: .08s; }
.sheet > form > *:nth-child(4), .sheet > .addgrid > *:nth-child(4), .sheet > .voice > *:nth-child(4) { animation-delay: .12s; }
.sheet > form > *:nth-child(n+5), .sheet > .addgrid > *:nth-child(n+5), .sheet > .voice > *:nth-child(n+5) { animation-delay: .16s; }
@media (min-width: 900px) { .sheet { animation: pop .3s var(--out); } }

/* intro: three diamonds come together into «ث», the word follows */
#splash .dm3 i { animation: dmfly .7s var(--out) both; }
#splash .dm3 i:nth-child(1) { animation-delay: .05s; --fx: 40px; --fy: -30px; }
#splash .dm3 i:nth-child(2) { animation-delay: .12s; --fx: 0px; --fy: 40px; }
#splash .dm3 i:nth-child(3) { animation-delay: .19s; --fx: -40px; --fy: -30px; }
@keyframes dmfly { from { opacity: 0; transform: translate(var(--fx), var(--fy)) rotate(45deg) scale(.4); } to { opacity: 1; transform: rotate(45deg); } }
#splash b { animation: maskin .7s var(--out) .2s both; }
#splash small { animation: fadeup .6s var(--out) .35s both; }
#splash.gone { transition: opacity .45s, transform .45s var(--out); transform: scale(1.04); }

/* pull down at the top to sync */
#ptr { position: fixed; top: 0; left: 50%; z-index: 40; transform: translate(-50%, -60px); width: 44px; height: 44px; border-radius: 50%; background: var(--raise); border: 1px solid var(--line2); display: grid; place-items: center; pointer-events: none; transition: transform .35s var(--out), opacity .3s; opacity: 0; }
#ptr.pull { transition: none; }
#ptr.go .dm3 i { animation: dmf 1s infinite ease-in-out; }
#ptr.go .dm3 i:nth-child(2) { animation-delay: .15s; }
#ptr.go .dm3 i:nth-child(3) { animation-delay: .3s; }

@media (prefers-reduced-motion: reduce) {
  .main.enter *, .sheet, .sheet *, #splash * { animation: none !important; }
}

/* routine rows inside the tasks area */
.task.routine .rt-ic { width: 32px; height: 32px; display: grid; place-items: center; color: var(--muted); flex-shrink: 0; }
.cb.shift { border-style: solid; border-color: var(--line2); background: var(--raise); color: var(--text2); }
.cb.shift .ic path { stroke-dasharray: none; stroke-dashoffset: 0; }
.task.routine.done .cb.shift { background: var(--raise); border-color: var(--line2); color: var(--muted); }
