@font-face { font-family: "Amiri Quran"; src: url(/fonts/amiri-quran.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Fraunces"; font-weight: 400; src: url(/fonts/fraunces-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; font-display: swap; }
@font-face { font-family: "Fraunces"; font-weight: 400; src: url(/fonts/fraunces-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; font-display: swap; }
@font-face { font-family: "Fraunces"; font-weight: 600; src: url(/fonts/fraunces-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; font-display: swap; }
@font-face { font-family: "Fraunces"; font-weight: 600; src: url(/fonts/fraunces-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; font-display: swap; }

:root {
  --bg: #f7f2e8;
  --paper: #fffdf8;
  --glass: rgba(255, 253, 248, .55);
  --ink: #1f2a27;
  --muted: #6b726d;
  --line: #e7dfcf;
  --green: #0f4c45;
  --green-2: #1d6b60;
  --green-soft: #e3efe9;
  --gold: #b8913f;
  --gold-soft: #f4ead2;
  --forgot: #c2410c; --forgot-bg: #fdebe0;
  --mixed: #a16207; --mixed-bg: #fbf1d3;
  --tajwid: #7c3aed; --tajwid-bg: #efe7fd;
  --spelling: #1d4ed8; --spelling-bg: #e3ebfd;
  --good: #15803d;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(31, 42, 39, .05), 0 6px 18px rgba(31, 42, 39, .05);
  --serif: "Fraunces", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --arabic: "Amiri Quran", "Amiri", "Scheherazade New", serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--sans); }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .07; z-index: -1;
  background: url(/bg.jpg) center / 420px repeat; filter: saturate(.85); }
a { color: var(--green); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; margin: 0 0 .3em; }
h1 { font-size: 1.75rem; line-height: 1.15; }
h2 { font-size: 1.1rem; }
h3 { font-size: 1.1rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; justify-content: center; }
.loading { padding: 3rem 1rem; color: var(--muted); }
.row { display: flex; gap: .5rem; align-items: center; margin-top: .75rem; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; text-align: right; }

/* ---------- shell ---------- */
.top { position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: .5rem;
  padding: calc(.6rem + env(safe-area-inset-top)) 1rem .6rem; background: rgba(247, 242, 232, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { font-family: var(--serif); font-weight: 600; font-size: 1.2rem; text-decoration: none; color: var(--green); display: flex; align-items: center; gap: .4rem; }
.brand .logo { width: 30px; height: 30px; filter: drop-shadow(0 1px 2px rgba(120, 95, 40, .25)); }
.top-right { display: flex; align-items: center; gap: .5rem; }
.lang { display: inline-flex; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.lang button { border: 0; background: none; padding: .25rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 600; color: var(--muted); cursor: pointer; }
.lang button.on { background: var(--green); color: #fff; }
.auth .lang { margin: 1.5rem auto 0; display: flex; width: max-content; }
main { max-width: 760px; margin: 0 auto; padding: 1rem 1rem calc(6rem + env(safe-area-inset-bottom)); }
nav.bottom { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; display: flex; justify-content: center; gap: .25rem;
  padding: .4rem .5rem calc(.4rem + env(safe-area-inset-bottom)); background: rgba(255, 253, 248, .96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
nav.bottom a { flex: 1; max-width: 120px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: .35rem .25rem; border-radius: 12px;
  text-decoration: none; color: var(--muted); font-size: .72rem; font-weight: 600; }
nav.bottom svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
nav.bottom a { transition: background .2s, color .2s; -webkit-tap-highlight-color: transparent; }
nav.bottom a:hover { background: #f5f0fb; color: #7a5ea8; }
nav.bottom a.on, nav.bottom a:active { color: #6f5499; background: #ebe2f6; }
.viewing { max-width: 760px; margin: .75rem auto 0; padding: .6rem 1rem; display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap;
  background: var(--gold-soft); border: 1px solid #e6d3a5; border-radius: 12px; font-size: .9rem; width: calc(100% - 2rem); }

/* ---------- common blocks ---------- */
.hero { padding: .75rem 0 .5rem; }
.salam { margin: 0; color: var(--gold); font-weight: 600; font-size: .95rem; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin: .9rem 0; box-shadow: var(--shadow); }
.card.empty, .empty { text-align: center; color: var(--muted); padding: 1.5rem 1rem; }
.empty .btn { margin-top: .5rem; }
.back { display: inline-block; margin: .25rem 0; text-decoration: none; font-weight: 600; font-size: .9rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; border: 1px solid var(--green); background: var(--green); color: #fff;
  border-radius: 12px; padding: .6rem 1rem; font-weight: 600; text-decoration: none; cursor: pointer; transition: transform .08s, background .15s; }
.btn:active { transform: scale(.97); }
.btn:hover { background: var(--green-2); }
.btn.ghost { background: transparent; color: var(--green); border-color: var(--line); }
.btn.ghost:hover { background: var(--green-soft); }
.btn.small { padding: .35rem .7rem; font-size: .85rem; border-radius: 10px; }
.btn.danger { color: #b42318; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .7; cursor: default; }
button.ghost { background: none; border: 1px solid var(--line); border-radius: 10px; padding: .3rem .6rem; cursor: pointer; color: var(--muted); }
button.ghost.small { font-size: .8rem; }
.linkish { background: none; border: 0; color: var(--green); font-weight: 600; cursor: pointer; padding: .4rem 0; }
.pill { font-size: .75rem; background: var(--line); border-radius: 999px; padding: .1rem .5rem; color: var(--muted); }
.badge { background: var(--forgot); color: #fff; border-radius: 999px; font-size: .75rem; font-weight: 700; min-width: 1.4rem; height: 1.4rem; display: inline-grid; place-items: center; padding: 0 .35rem; }
section.center { display: flex; justify-content: center; margin: 1.25rem 0; }

/* ---------- today ---------- */
.progress { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin-top: .5rem; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--green), var(--gold)); border-radius: 99px; transition: width .4s; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; padding: .2rem 0; margin: .4rem 0; }
.tile { position: relative; aspect-ratio: 1; display: block; text-decoration: none; color: var(--ink); isolation: isolate; -webkit-tap-highlight-color: transparent; }
/* rotated square with gold patterned band */
.tile::before { content: ""; position: absolute; inset: 10%; z-index: -1; border-radius: 22%; transform: rotate(45deg);
  border: 7px solid transparent;
  background: linear-gradient(#fbfaf6, #fbfaf6) padding-box, repeating-linear-gradient(45deg, #c9a24a 0 1.5px, #f1e3bd 1.5px 4px) border-box;
  box-shadow: 0 0 0 2px #fffdf8, 0 0 0 3px #e6d3a5, 0 6px 16px rgba(120, 95, 40, .08);
  transition: box-shadow .25s, filter .25s, transform .25s; }
/* front square with thin gold inner line */
.tile-in { position: absolute; inset: 12%; border-radius: 17%; background: #fdfcf8; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: .3rem;
  box-shadow: inset 0 0 0 6px #fdfcf8, inset 0 0 0 7.5px #d1b26a, 0 0 0 1px #ece2cb, 0 6px 18px rgba(31, 42, 39, .07);
  transition: box-shadow .25s, background .25s, transform .25s; }
.tile b { display: block; font-family: var(--serif); font-size: 1.7rem; color: var(--green); line-height: 1.1; }
.tile span span, .tile-in > span { font-size: .74rem; color: var(--muted); line-height: 1.2; }
.tile:hover .tile-in, .tile:focus-visible .tile-in { background: #fffaf0; transform: scale(1.03);
  box-shadow: inset 0 0 0 6px #fffaf0, inset 0 0 0 7.5px #c9a24a, 0 0 0 1px #e6d3a5, 0 0 24px rgba(201, 162, 74, .35); }
.tile:hover::before, .tile:focus-visible::before { transform: rotate(45deg) scale(1.03); filter: brightness(1.04) saturate(1.15);
  box-shadow: 0 0 0 2px #fffdf8, 0 0 0 3px #d9bf7f, 0 0 26px rgba(201, 162, 74, .4); }
.tile:active .tile-in { transform: scale(.98); background: #fff6e2; box-shadow: inset 0 0 0 6px #fff6e2, inset 0 0 0 7.5px #b8913f, 0 0 0 1px #d9bf7f, 0 0 34px rgba(201, 162, 74, .55); }
.tile:active::before { transform: rotate(45deg) scale(.98); box-shadow: 0 0 0 2px #fffdf8, 0 0 0 3px #c9a24a, 0 0 34px rgba(201, 162, 74, .55); }
.tile:focus-visible { outline: none; }
.tasks { display: grid; gap: .5rem; }
.task { display: flex; align-items: center; gap: .75rem; padding: .6rem; border-radius: 12px; border: 1px solid var(--line); background: #fff; transition: background .2s; }
.task.done { background: var(--green-soft); border-color: transparent; }
.task.done .task-title { text-decoration: line-through; text-decoration-color: rgba(15, 76, 69, .35); }
.task-body { flex: 1; min-width: 0; }
.task-title { font-weight: 600; }
.check { width: 40px; height: 40px; flex: none; border-radius: 50%; border: 2px solid var(--green); background: #fff; display: grid; place-items: center; cursor: pointer; }
.check svg { width: 22px; height: 22px; fill: none; stroke: transparent; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.task.done .check { background: var(--green); }
.task.done .check svg { stroke: #fff; }
.alldone { text-align: center; font-family: var(--serif); color: var(--green); font-size: 1.1rem; margin: 0 0 .75rem; }
.upcoming { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.upcoming li { display: flex; gap: .75rem; font-size: .92rem; }
.upcoming .when { min-width: 5.5rem; color: var(--gold); font-weight: 600; }
.heat { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, auto); grid-auto-columns: 1fr; gap: clamp(3px, 1vw, 8px); }
.heat i { --c: #efe7d6; --g: #d9c48f; position: relative; aspect-ratio: 1; display: block; isolation: isolate; cursor: pointer;
  transition: transform .2s, filter .2s; -webkit-tap-highlight-color: transparent; }
.heat i::before { content: ""; position: absolute; inset: 14%; z-index: -1; border-radius: 26%; transform: rotate(45deg);
  background: var(--c); box-shadow: 0 0 0 1.5px var(--g); filter: brightness(.97); }
.heat i::after { content: ""; position: absolute; inset: 19%; border-radius: 22%; background: var(--c);
  box-shadow: inset 0 0 0 max(1px, .09em) rgba(255, 255, 255, .55), 0 0 0 1px var(--g); }
.heat i.l1 { --c: #c4ddd3; --g: #d6bf85; } .heat i.l2 { --c: #84b8a8; --g: #cfb36d; }
.heat i.l3 { --c: #2f8f7f; --g: #c9a24a; } .heat i.l4 { --c: var(--green); --g: #c9a24a; }
.heat i.lx { cursor: default; opacity: .45; --c: transparent; --g: #e3d8bf; }
.heat i:not(.lx):hover { transform: scale(1.18); z-index: 2; filter: brightness(1.06) drop-shadow(0 0 5px rgba(201, 162, 74, .7)); }
.heat i:not(.lx):active { transform: scale(1.08); filter: brightness(1.12) drop-shadow(0 0 9px rgba(201, 162, 74, .95)); }

/* ---------- quran ---------- */
.juz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.juz { position: relative; display: flex; flex-direction: column; gap: .15rem; text-decoration: none; color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: 14px; padding: .8rem; box-shadow: var(--shadow); transition: transform .1s, border-color .15s; }
.juz:hover { border-color: var(--gold); transform: translateY(-1px); }
.juz .jn { font-family: var(--serif); font-size: 1.6rem; color: var(--green); font-weight: 600; line-height: 1; }
.juz .jt { font-size: .82rem; color: var(--muted); }
.juz .jl { font-size: .72rem; color: var(--good); }
.juz .badge { position: absolute; top: .6rem; right: .6rem; }
.list { padding: .25rem; }
.surah-row, .student { display: flex; align-items: center; gap: .75rem; padding: .75rem; border-radius: 12px; text-decoration: none; color: var(--ink); }
.surah-row:hover, .student:hover { background: var(--green-soft); }
.surah-row + .surah-row, .student + .student { border-top: 1px solid var(--line); }
.sn { width: 2.2rem; height: 2.2rem; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--gold-soft); color: var(--gold); font-weight: 700; font-size: .9rem; transform: rotate(45deg); }
.sn { transform: none; clip-path: polygon(50% 0, 85% 15%, 100% 50%, 85% 85%, 50% 100%, 15% 85%, 0 50%, 15% 15%); border-radius: 0; }
.sinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sar { font-family: var(--arabic); font-size: 1.35rem; color: var(--green); direction: rtl; }
.sar.big { font-size: 2.2rem; margin: 0; line-height: 1.6; }
.surah-head { text-align: center; padding: .5rem 0 .25rem; }
.toggle { display: inline-flex; align-items: center; gap: .4rem; font-size: .9rem; cursor: pointer; }
.toggle input { accent-color: var(--green); width: 18px; height: 18px; }
.bism { font-family: var(--arabic); text-align: center; font-size: 1.7rem; color: var(--green); margin: .5rem 0; }
.ayat { display: grid; gap: .6rem; }
.ayah { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem 1rem; box-shadow: var(--shadow); border-left: 4px solid transparent; scroll-margin-top: 80px; }
.ayah.has-open.t-forgot { border-left-color: var(--forgot); } .ayah.has-open.t-mixed { border-left-color: var(--mixed); }
.ayah.has-open.t-tajwid { border-left-color: var(--tajwid); } .ayah.has-open.t-spelling { border-left-color: var(--spelling); }
.ayah.flash { animation: flash 2s ease-out; }
@keyframes flash { 0%, 30% { background: var(--gold-soft); } 100% { background: var(--paper); } }
.ayah-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.ref { font-size: .78rem; font-weight: 700; color: var(--gold); background: var(--gold-soft); border-radius: 6px; padding: .1rem .4rem; }
.chips { display: flex; gap: .3rem; flex-wrap: wrap; flex: 1; }
.add { margin-left: auto; background: none; border: 1px dashed #cdbf9f; color: var(--muted); border-radius: 999px; padding: .2rem .65rem; font-size: .8rem; cursor: pointer; }
.add:hover { border-color: var(--forgot); color: var(--forgot); }
.ar { font-family: var(--arabic); font-size: 1.85rem; line-height: 2.25; text-align: right; margin: .4rem 0 .2rem; color: #10201c; word-spacing: .05em; }
.ar .end { color: var(--gold); white-space: nowrap; }
.small-ar { font-size: 1.4rem; line-height: 2; }
.tr { margin: 0; color: #3f4744; font-size: .98rem; }
.chip { border: 1px solid transparent; border-radius: 999px; padding: .18rem .6rem; font-size: .78rem; font-weight: 600; cursor: pointer; background: var(--line); color: var(--ink); white-space: nowrap; }
.chip small { font-weight: 500; opacity: .8; }
.chip.t-forgot { background: var(--forgot-bg); color: var(--forgot); } .chip.t-mixed { background: var(--mixed-bg); color: var(--mixed); }
.chip.t-tajwid { background: var(--tajwid-bg); color: var(--tajwid); } .chip.t-spelling { background: var(--spelling-bg); color: var(--spelling); }
.chip.fixed { background: #e2f3e8; color: var(--good); }
.chip.sel { border-color: currentColor; box-shadow: 0 0 0 1px currentColor inset; }
.filters { display: flex; gap: .4rem; flex-wrap: wrap; margin: .25rem 0 .5rem; }
.mrow { padding: .75rem 0; }
.mrow + .mrow { border-top: 1px solid var(--line); }
.mtop { display: flex; align-items: center; gap: .5rem; }
.note { margin: .2rem 0; font-size: .9rem; color: #4b524f; font-style: italic; }
.fixed-list { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; gap: .45rem; }

/* ---------- plans ---------- */
.plan.paused { opacity: .65; }
.plan-top { display: flex; justify-content: space-between; align-items: start; gap: .5rem; }
.plan .next { margin: .4rem 0 0; color: var(--green); font-weight: 600; font-size: .9rem; }
.form { display: grid; gap: 1rem; }
.form label { display: grid; gap: .3rem; font-weight: 600; font-size: .9rem; }
.form label.radio { display: flex; align-items: center; gap: .5rem; font-weight: 500; }
.form label.radio input { accent-color: var(--green); width: 18px; height: 18px; }
.form input:not([type=radio]):not([type=checkbox]), .sheet input { width: 100%; padding: .65rem .75rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-weight: 400; }
.form input:focus, .sheet input:focus { outline: 2px solid var(--green-2); outline-offset: 0; border-color: transparent; }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: .6rem; }
legend { font-weight: 600; font-size: .9rem; margin-bottom: .4rem; }
.seg { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 3px; width: max-content; max-width: 100%; }
.seg button { border: 0; background: none; padding: .45rem .9rem; border-radius: 9px; font-weight: 600; cursor: pointer; color: var(--muted); }
.seg button.on { background: var(--paper); color: var(--green); box-shadow: var(--shadow); }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: .35rem; }
.pick { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: .55rem 0; font-weight: 600; cursor: pointer; }
.pick.on { background: var(--green); border-color: var(--green); color: #fff; }
.pick-days { display: flex; gap: .3rem; flex-wrap: wrap; }
.pick.day { padding: .5rem .65rem; }
.pick-list { max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.pick-row { display: flex; justify-content: space-between; align-items: center; width: 100%; border: 0; background: none; padding: .5rem .75rem; cursor: pointer; text-align: left; border-bottom: 1px solid var(--line); }
.pick-row.on { background: var(--green-soft); font-weight: 600; }
.pick-row.on::before { content: "✓"; color: var(--green); margin-right: .4rem; }
.pick-row span:first-child { flex: 1; }
.pick-row .sar { font-size: 1.1rem; }
.formerr { color: #b42318; margin: 0; min-height: 1em; font-size: .9rem; }

/* ---------- students ---------- */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.avatar { width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.mini { display: flex; gap: .6rem; font-size: .85rem; color: var(--muted); }
.tools .row { margin-top: .5rem; }

/* ---------- sheet + toast ---------- */
.sheet { position: fixed; inset: 0; z-index: 50; display: none; }
.sheet.open { display: block; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(20, 30, 27, .35); animation: fade .2s; }
.sheet-panel { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: min(560px, 100%); background: var(--paper); border-radius: 20px 20px 0 0;
  padding: 1.25rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom)); box-shadow: 0 -10px 40px rgba(0, 0, 0, .15); animation: up .22s ease-out; display: grid; gap: .8rem; }
.sheet-panel label { display: grid; gap: .3rem; font-weight: 600; }
.type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.type { border: 2px solid transparent; border-radius: 14px; padding: .9rem .5rem; font-weight: 700; cursor: pointer; }
.type.t-forgot { background: var(--forgot-bg); color: var(--forgot); } .type.t-mixed { background: var(--mixed-bg); color: var(--mixed); }
.type.t-tajwid { background: var(--tajwid-bg); color: var(--tajwid); } .type.t-spelling { background: var(--spelling-bg); color: var(--spelling); }
.type.sel { border-color: currentColor; }
@keyframes up { from { transform: translate(-50%, 30px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.toast { position: fixed; left: 50%; bottom: calc(5.5rem + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: var(--ink); color: #fff;
  padding: .65rem 1.1rem; border-radius: 999px; font-weight: 600; opacity: 0; pointer-events: none; transition: .25s; z-index: 60; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.good { background: var(--green); }
.toast.bad { background: #b42318; }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; }
.auth-card { width: min(420px, 100%); background: var(--paper); border: 1px solid var(--line); border-radius: 24px; padding: 2rem 1.5rem; box-shadow: var(--shadow); text-align: center; }
.auth-card .form { text-align: left; margin-top: 1.25rem; }
.auth-mark { font-family: var(--arabic); font-size: 2.6rem; color: var(--gold); line-height: 1.6; }

@media (max-width: 520px) {
  h1 { font-size: 1.45rem; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: .2rem; padding: 0 .6rem; }
  .tile b { font-size: 1.6rem; }
  .grid2 { grid-template-columns: 1fr; }
  .ar { font-size: 1.65rem; }
  .top .ghost.small { padding: .25rem .45rem; }
}

/* ---------- semi-transparent white surfaces ---------- */
.card, .ayah, .juz, .auth-card, .task { background: var(--glass); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
.task.done { background: rgba(227, 239, 233, .6); }
.pick-list, .form input:not([type=radio]):not([type=checkbox]) { background: rgba(255, 255, 255, .7); }
@keyframes flash { 0%, 30% { background: rgba(244, 234, 210, .9); } 100% { background: var(--glass); } }

/* ---------- juz squares light up ---------- */
.juz { transition: transform .2s, border-color .2s, box-shadow .2s, background .2s; -webkit-tap-highlight-color: transparent; }
.juz:hover, .juz:focus-visible { background: rgba(255, 250, 240, .85); border-color: #d1b26a; transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 0 1px #e6d3a5, 0 0 22px rgba(201, 162, 74, .35); outline: none; }
.juz:active { transform: scale(.98); background: rgba(255, 246, 226, .95); border-color: #c9a24a; box-shadow: 0 0 0 1px #c9a24a, 0 0 30px rgba(201, 162, 74, .55); }

/* ---------- glowing ayah banner ---------- */
@property --lx { syntax: "<percentage>"; inherits: true; initial-value: 20%; }
@property --ly { syntax: "<percentage>"; inherits: true; initial-value: 30%; }
@property --ang { syntax: "<angle>"; inherits: true; initial-value: 100deg; }
.ayah-banner { text-align: center; padding: 1.1rem .5rem .6rem; margin: .2rem 0 .4rem; position: relative;
  animation: lightDrift 9s ease-in-out infinite, lightTurn 14s linear infinite; }
.ayah-banner.follow { --lx: var(--px); --ly: var(--py); animation: lightTurn 14s linear infinite; }
.glow-ar { font-family: var(--arabic); font-size: clamp(1.55rem, 4.6vw, 2.35rem); line-height: 2.1; margin: 0; direction: rtl;
  background:
    radial-gradient(circle at var(--lx) var(--ly), #f4d77e 0%, #e2bd5a 10%, rgba(226, 189, 90, 0) 28%),
    linear-gradient(var(--ang), #6a4d12 0%, #9c7626 18%, #d2ae55 32%, #a8822d 46%, #765614 60%, #c59f45 76%, #8c6820 100%);
  background-size: 100% 100%, 220% 220%;
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  animation: goldPan 7s ease-in-out infinite alternate, glowPulse 4.5s ease-in-out infinite; }
.glow-tr { margin: .2rem auto 0; max-width: 34rem; font-family: var(--serif); font-style: italic; color: #7a5b1c; font-size: .98rem; line-height: 1.45; }
.glow-ref { margin: .3rem 0 0; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.glow-ref::before, .glow-ref::after { content: "۞"; font-family: var(--arabic); margin: 0 .5rem; opacity: .7; text-transform: none; letter-spacing: 0; }
@keyframes goldPan { from { background-position: 0 0, 0% 30%; } to { background-position: 0 0, 100% 70%; } }
@keyframes glowPulse { 0%, 100% { filter: drop-shadow(0 0 2px rgba(201, 162, 74, .3)); } 50% { filter: drop-shadow(0 0 8px rgba(214, 170, 70, .65)); } }
@keyframes lightDrift { 0% { --lx: 5%; --ly: 20%; } 25% { --lx: 60%; --ly: 85%; } 50% { --lx: 95%; --ly: 25%; } 75% { --lx: 35%; --ly: 70%; } 100% { --lx: 5%; --ly: 20%; } }
@keyframes lightTurn { from { --ang: 0deg; } to { --ang: 360deg; } }
@media (prefers-reduced-motion: reduce) { .ayah-banner, .glow-ar { animation: none; } }
.auth-card .ayah-banner { padding-top: 0; }
.auth-logo { width: 72px; height: 72px; margin: .4rem auto .2rem; display: block; filter: drop-shadow(0 3px 8px rgba(160, 125, 50, .25)); }
