/* Prayer Stars: lapis night, morning mist, lantern gold, palm green.
   One bold element (the sky hero); everything else stays quiet. */
:root {
  --bg: #edf2f7;
  --surface: #ffffff;
  --surface-2: #e4ebf3;
  --ink: #13203f;
  --ink-soft: #4f5c7c;
  --line: #d3dce8;
  --line-strong: #9fb0c6;
  --lapis: #22377a;
  --lapis-deep: #182a60;
  --on-lapis: #ffffff;
  --gold: #f2b544;
  --gold-deep: #a8740f;
  --palm: #2e8b6e;
  --palm-deep: #1f6650;
  --amber: #d88a22;
  --amber-deep: #9c5f0f;
  --dusk: #6e5ba8;
  --dusk-deep: #4f3f80;
  --pome: #c2364b;
  --excused: #8a96ad;
  --radius-lg: 28px;
  --radius: 18px;
  --radius-sm: 12px;
  --font-display: 'El Messiri', 'Readex Pro', system-ui, sans-serif;
  --font-body: 'Readex Pro', system-ui, sans-serif;
  --font-quran: 'Amiri Quran', 'Amiri', serif;
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'%3E%3Cpolygon points='22,8 25.4,13.8 31.9,12.1 30.2,18.6 36,22 30.2,25.4 31.9,31.9 25.4,30.2 22,36 18.6,30.2 12.1,31.9 13.8,25.4 8,22 13.8,18.6 12.1,12.1 18.6,13.8' fill='none' stroke='%2322377a' stroke-opacity='.06' stroke-width='1'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c1430; --surface: #16204a; --surface-2: #1f2b5c; --ink: #eef2fb; --ink-soft: #a9b4d0;
    --line: #2a3970; --line-strong: #4a5a94; --lapis: #4a6bd1; --lapis-deep: #34509f;
    --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'%3E%3Cpolygon points='22,8 25.4,13.8 31.9,12.1 30.2,18.6 36,22 30.2,25.4 31.9,31.9 25.4,30.2 22,36 18.6,30.2 12.1,31.9 13.8,25.4 8,22 13.8,18.6 12.1,12.1 18.6,13.8' fill='none' stroke='%23ffffff' stroke-opacity='.05' stroke-width='1'/%3E%3C/svg%3E");
  }
}
:root[data-theme="dark"] {
  --bg: #0c1430; --surface: #16204a; --surface-2: #1f2b5c; --ink: #eef2fb; --ink-soft: #a9b4d0;
  --line: #2a3970; --line-strong: #4a5a94; --lapis: #4a6bd1; --lapis-deep: #34509f;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg) var(--pattern);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
#app { max-width: 560px; margin: 0 auto; padding: 12px 16px calc(92px + env(safe-area-inset-bottom)); }
#app.wide { max-width: 1040px; }
#app.bare { padding-bottom: 32px; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, select {
  font: inherit; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm); padding: 10px 12px; width: 100%; min-width: 0;
}
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 2px;
}
a { color: var(--lapis); }
h1, h2, h3 { font-family: var(--font-display); margin: 0; line-height: 1.2; font-weight: 700; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.15rem; }
p { margin: 0; }
.soft { color: var(--ink-soft); }
.small { font-size: .875rem; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.stack { display: grid; gap: 12px; }
.num { font-variant-numeric: tabular-nums; }
.ico { width: 22px; height: 22px; flex-shrink: 0; }
.mark { flex-shrink: 0; display: block; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--lapis); color: var(--on-lapis); font-weight: 600; font-size: 1rem;
  padding: 11px 20px; border-radius: 14px; box-shadow: inset 0 -3px 0 var(--lapis-deep);
  transition: transform .08s, box-shadow .08s;
}
.btn:active { transform: translateY(2px); box-shadow: inset 0 -1px 0 var(--lapis-deep); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn.go { background: var(--palm); box-shadow: inset 0 -3px 0 var(--palm-deep); }
.btn.late { background: var(--amber); box-shadow: inset 0 -3px 0 var(--amber-deep); }
.btn.qada { background: var(--dusk); box-shadow: inset 0 -3px 0 var(--dusk-deep); }
.btn.danger { background: var(--pome); box-shadow: inset 0 -3px 0 #8b2133; }
.btn.quiet { background: var(--surface-2); color: var(--ink); box-shadow: inset 0 -2px 0 var(--line); }
.btn.link { background: none; box-shadow: none; color: var(--lapis); padding: 6px 4px; }
.btn.small { padding: 7px 13px; font-size: .9rem; border-radius: 11px; }
.btn.block { width: 100%; }
.btn.huge { font-size: 1.25rem; padding: 15px 30px; border-radius: 18px; min-width: 220px; }
.iconbtn { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--ink); }
.iconbtn:active { background: var(--surface-2); }

/* ---------- panels ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.panel + .panel { margin-top: 12px; }
.section { margin-top: 22px; }
.section > h3 { margin-bottom: 10px; }
.divider { width: 120px; height: 12px; color: var(--gold); display: block; margin: 8px auto 0; }

/* ---------- top bar ---------- */
.topbar { display: flex; align-items: center; gap: 10px; padding: 4px 0 12px; }
.topbar .who { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; line-height: 1.1; }
.topbar .lvl { font-size: .8rem; color: var(--ink-soft); }
.counter { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px 5px 7px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; }
[dir="rtl"] .counter { padding: 5px 7px 5px 11px; }

/* ---------- sky hero (the one bold element) ---------- */
.hero { position: relative; margin: 0 -16px; }
.sky { display: block; width: 100%; height: auto; aspect-ratio: 360 / 230; min-height: 230px; max-height: 300px; }
.hero-text { position: absolute; inset: 12px 20px auto; text-align: center; color: #fff; text-shadow: 0 1px 12px rgba(10, 16, 40, .45); }
.hero.light .hero-text { color: var(--ink); text-shadow: 0 1px 10px rgba(255, 255, 255, .6); }
.hero-text .label { font-size: .95rem; opacity: .92; }
.hero-text .pname { font-family: var(--font-display); font-size: 2.6rem; font-weight: 700; line-height: 1.05; }
.hero-text .count .num { font-size: 1.3rem; font-weight: 600; }
.hero-text .count { font-size: 1rem; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.hero-action { position: relative; display: flex; justify-content: center; margin-top: -30px; z-index: 2; }
.hero-action .btn { box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .25), 0 8px 24px rgba(19, 32, 63, .25); }
.hero-note { text-align: center; color: var(--ink-soft); font-size: .9rem; margin-top: 10px; }

/* ---------- prayer timeline ---------- */
.timeline { list-style: none; margin: 22px 0 0; padding: 0; position: relative; }
.timeline::before { content: ''; position: absolute; inset-inline-start: 27px; top: 26px; bottom: 26px; width: 2px; background: var(--line); }
.tl { display: flex; align-items: center; gap: 12px; padding: 8px 0; position: relative; }
.tl .node { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--line); flex-shrink: 0; color: var(--ink); position: relative; z-index: 1; }
.tl.ontime .node { border-color: var(--palm); }
.tl.late .node { border-color: var(--amber); }
.tl.qada .node { border-color: var(--dusk); }
.tl.now .node { border-color: var(--lapis); box-shadow: 0 0 0 4px color-mix(in srgb, var(--lapis) 18%, transparent); }
.tl.locked { color: var(--ink-soft); }
.tl.locked .pico { opacity: .55; }
.tl .pn { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; line-height: 1.1; }
.tl .pt { color: var(--ink-soft); font-size: .9rem; font-variant-numeric: tabular-nums; }
.status { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: .9rem; white-space: nowrap; }
.status.ontime { color: var(--palm); }
.status.late { color: var(--amber-deep); }
.status.qada { color: var(--dusk); }
.status.missed { color: var(--pome); }
.status .ico { width: 18px; height: 18px; }

/* ---------- week of stars & streak ---------- */
.week { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; gap: 4px; }
.week .d { font-size: .75rem; color: var(--ink-soft); }
.week svg { width: 100%; max-width: 38px; height: auto; display: block; margin: 2px auto 0; }
.streak { display: flex; align-items: center; gap: 12px; }
.streak .big { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; line-height: 1; }
.slots { display: flex; gap: 4px; margin-top: 6px; }
.slots svg { width: 20px; height: 20px; }
.mark.lit { animation: none; }

/* ---------- learn ---------- */
.lesson-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); width: 100%; text-align: start; }
.lesson-row + .lesson-row { margin-top: 8px; }
.lesson-row .tile { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-2); color: var(--lapis); flex-shrink: 0; }
.lesson-row .tile svg { width: 26px; height: 26px; }
.lesson-row .t { font-weight: 600; }
.lesson-row.done .tile { background: var(--palm); color: #fff; }
.stepper { text-align: center; }
.stepper .n { font-family: var(--font-display); font-size: 3.4rem; font-weight: 700; color: var(--gold-deep); line-height: 1; }
.figbox { position: relative; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); max-width: 400px; margin: 0 auto; }
.figbox .fig { display: block; width: 100%; height: auto; }
.figbox .stepno { position: absolute; top: 8px; inset-inline-start: 8px; min-width: 34px; height: 34px; padding: 0 8px; border-radius: 17px; display: grid; place-items: center; background: var(--lapis); color: #fff; font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; }
.stepper .txt { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; line-height: 1.55; min-height: 3.4em; white-space: pre-line; display: grid; place-items: center; padding: 8px 4px; }
.proof { text-align: start; background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 12px 4px; margin: 4px 0 10px; font-size: .9rem; line-height: 1.7; }
.proof .proof-label { display: block; font-size: .75rem; font-weight: 600; color: var(--gold-deep); margin-bottom: 2px; }
.proof p { margin: 0; white-space: pre-line; }
.ref { color: var(--ink-soft); font-size: .8rem; margin: 2px 0 8px; }
.meaning { white-space: pre-line; }
.dots { display: flex; justify-content: center; gap: 5px; margin: 6px 0 14px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.dots i.on { background: var(--lapis); width: 18px; border-radius: 4px; }
.ayah { padding: 14px 0; border-bottom: 1px solid var(--line); }
.ayah:last-child { border-bottom: 0; }
.ayah .ar { font-family: var(--font-quran); font-size: 1.85rem; line-height: 2.1; direction: rtl; text-align: right; }
/* Dhikr (tashahhud, salawat) is not Quran, so it uses the normal Arabic font. */
.ayah .ar.plain { font-family: var(--font-body); font-size: 1.3rem; line-height: 2.1; font-weight: 500; }
.ayah .tr { color: var(--ink-soft); font-size: .95rem; margin-top: 4px; direction: ltr; text-align: left; font-style: italic; }
.ayah .no { display: inline-grid; place-items: center; min-width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--gold); color: var(--gold-deep); font-size: .8rem; font-weight: 600; }
.ayah .mean { margin-top: 8px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); line-height: 1.75; font-size: .95rem; }
.ayah .mean.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; padding-bottom: 0; border-bottom: 10px solid var(--surface-2); }
.bismillah { font-family: var(--font-quran); font-size: 1.7rem; text-align: center; padding: 6px 0 2px; }
.meaning { background: var(--surface-2); border-radius: var(--radius); padding: 14px 16px; line-height: 1.7; }
.rakah-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; text-align: center; }
.rakah-grid .c { font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: var(--lapis); line-height: 1.1; }

/* ---------- shop ---------- */
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 12px; display: flex; flex-direction: column; gap: 6px; text-align: center; }
.item .emoji { font-size: 2.4rem; width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; }
.item .t { font-weight: 600; line-height: 1.3; flex: 1; }
.item .cost { display: inline-flex; align-items: center; justify-content: center; gap: 4px; font-weight: 700; }
.thin { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.thin > i { display: block; height: 100%; background: var(--gold); border-radius: inherit; }

/* ---------- badges ---------- */
.medals { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 16px 8px; text-align: center; }
.medals .bn { font-weight: 600; font-size: .9rem; line-height: 1.25; margin-top: 4px; }
.medals .bh { font-size: .75rem; color: var(--ink-soft); line-height: 1.3; }
.medals .locked .bn { color: var(--ink-soft); }
.level { display: flex; align-items: center; gap: 14px; }
.level .lv { font-family: var(--font-display); font-size: 2.6rem; font-weight: 700; color: var(--lapis); line-height: 1; min-width: 48px; text-align: center; }
.statline { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; margin-top: 14px; }
.statline b { display: block; font-family: var(--font-display); font-size: 1.4rem; }
.statline span { font-size: .75rem; color: var(--ink-soft); }

/* ---------- family ---------- */
.member { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.member:last-child { border-bottom: 0; }
.member .rank { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; width: 26px; text-align: center; color: var(--ink-soft); }
.member .rank.first { color: var(--gold-deep); }
.pips { display: flex; gap: 4px; margin-top: 3px; }
.pips i { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--line-strong); }
.pips i.ontime { background: var(--palm); border-color: var(--palm); }
.pips i.late { background: var(--amber); border-color: var(--amber); }
.pips i.qada { background: var(--dusk); border-color: var(--dusk); }

/* ---------- bottom nav ---------- */
.nav { position: fixed; inset: auto 0 0; z-index: 10; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
.nav .in { display: flex; max-width: 560px; margin: 0 auto; }
.nav button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0 4px; color: var(--ink-soft); font-size: .75rem; font-weight: 500; position: relative; }
.nav button.on { color: var(--lapis); font-weight: 600; }
.nav button.on::before { content: ''; position: absolute; top: -7px; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--gold); }
.nav .badge-dot { position: absolute; top: 2px; inset-inline-end: calc(50% - 20px); background: var(--pome); color: #fff; border-radius: 999px; font-size: .65rem; padding: 0 5px; line-height: 1.5; }

/* ---------- welcome & auth ---------- */
.welcome .hero { margin: -12px -16px 0; }
.welcome .sky { max-height: 320px; }
.brand { position: absolute; inset: 34px 16px auto; text-align: center; color: #fff; text-shadow: 0 2px 16px rgba(10, 16, 40, .5); }
.brand h1 { font-size: 3.2rem; font-weight: 700; }
.brand p { font-size: 1.05rem; opacity: .95; }
.choice { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); text-align: start; }
.choice + .choice { margin-top: 10px; }
.choice .tile { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--lapis); color: #fff; flex-shrink: 0; }
.choice .tile.gold { background: var(--gold); color: var(--ink); }
.choice b { font-family: var(--font-display); font-size: 1.25rem; display: block; line-height: 1.2; }
.choice .ico.chev { color: var(--ink-soft); }
[dir="ltr"] .chev { transform: scaleX(-1); }
[dir="rtl"] .back-ico { transform: scaleX(-1); }
.gbtn { display: flex; justify-content: center; min-height: 44px; margin: 4px 0 12px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--ink-soft); font-size: .85rem; margin: 2px 0 12px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 5px; font-weight: 500; font-size: .9rem; color: var(--ink-soft); }
.steps-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.progress { display: flex; gap: 6px; margin: 4px 0 18px; }
.progress i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.progress i.on { background: var(--lapis); }
.results { display: grid; gap: 6px; }
.result { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); text-align: start; }
.result.on { border-color: var(--lapis); box-shadow: 0 0 0 2px var(--lapis); }
.times-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; text-align: center; margin-top: 10px; }
.times-strip .pico { display: block; margin: 0 auto; }
.times-strip b { display: block; font-variant-numeric: tabular-nums; font-size: .95rem; }
.times-strip span { font-size: .75rem; color: var(--ink-soft); }
.kid-row { display: grid; grid-template-columns: auto 1fr 64px 96px auto; gap: 8px; align-items: end; }
.code { font-family: var(--font-display); font-size: 2.6rem; font-weight: 700; letter-spacing: .18em; text-align: center; color: var(--lapis); direction: ltr; padding: 14px; border: 2px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface); }
.code-input { font-size: 1.8rem; text-align: center; letter-spacing: .2em; text-transform: uppercase; direction: ltr; font-weight: 600; }
.pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.pick button { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 8px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }
.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 290px; margin: 0 auto; direction: ltr; }
.pinpad button { background: var(--surface); border: 1px solid var(--line); font-size: 1.6rem; font-weight: 600; border-radius: 16px; padding: 12px 0; }
.pinpad button:active { background: var(--surface-2); }
.pinpad .ok { background: var(--palm); color: #fff; border-color: var(--palm); }
.pindots { display: flex; justify-content: center; gap: 12px; margin: 18px 0; direction: ltr; }
.pindots i { width: 16px; height: 16px; display: block; }
.pindots svg { width: 16px; height: 16px; display: block; }
.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.avatar-pick { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.avatar-pick button { border-radius: 16px; padding: 2px; }
.avatar-pick button.on { box-shadow: 0 0 0 3px var(--gold); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches button { width: 32px; height: 32px; border-radius: 50%; }
.swatches button.on { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--ink); }

/* ---------- sheet (modal) ---------- */
.overlay { position: fixed; inset: 0; z-index: 30; background: rgba(8, 14, 36, .55); display: flex; align-items: flex-end; justify-content: center; animation: fade .18s ease-out; }
.sheet { background: var(--surface); width: 100%; max-width: 520px; max-height: 90vh; overflow: auto; border-radius: 26px 26px 0 0; padding: 22px 20px calc(20px + env(safe-area-inset-bottom)); animation: rise .24s cubic-bezier(.2, .9, .3, 1); }
.sheet.celebrate { text-align: center; }
.sheet .art { display: flex; justify-content: center; margin-bottom: 8px; }
.sheet h2 { margin: 4px 0 6px; }
.sheet .actions { display: flex; gap: 10px; margin-top: 18px; }
.sheet .actions .btn { flex: 1; }
@media (min-width: 640px) {
  .overlay { align-items: center; }
  .sheet { border-radius: 26px; }
}
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
.toast { position: fixed; top: calc(14px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 50; background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 14px; font-weight: 500; max-width: calc(100vw - 32px); animation: fade .2s; }
.gain { position: fixed; left: 50%; top: 38%; z-index: 40; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-size: 3rem; font-weight: 700; color: var(--gold-deep); pointer-events: none; animation: gain 1.5s ease-out forwards; }
@keyframes gain { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.7); } 18% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, -140%); } }
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 45; }

/* ---------- parent ---------- */
.tabs { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.tabs button { padding: 10px 10px; font-weight: 500; color: var(--ink-soft); border-bottom: 3px solid transparent; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.tabs button.on { color: var(--lapis); border-bottom-color: var(--gold); font-weight: 600; }
.tabs .badge-dot { background: var(--pome); color: #fff; border-radius: 999px; font-size: .7rem; padding: 0 6px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 12px; }
.grid2 > .panel + .panel { margin-top: 0; }
.table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.table th.ex { font-size: .7rem; line-height: 1.1; }
.table th, .table td { padding: 5px 2px; text-align: center; border-bottom: 1px solid var(--line); }
.table th { color: var(--ink-soft); font-weight: 500; }
.table td:first-child, .table th:first-child { text-align: start; white-space: nowrap; }
.cell { width: 30px; height: 30px; border-radius: 10px; display: inline-grid; place-items: center; background: var(--surface-2); color: #fff; }
.cell .ico { width: 16px; height: 16px; }
.cell.ontime { background: var(--palm); }
.cell.late { background: var(--amber); }
.cell.qada { background: var(--dusk); }
.cell.miss { background: var(--pome); }
tr.excused .cell { background: var(--excused); }
.today-times { display: grid; grid-template-columns: repeat(5, 1fr); text-align: center; }
.today-times b { display: block; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: .9rem; }
.list-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.plus { color: var(--palm); font-weight: 700; font-variant-numeric: tabular-nums; }
.minus { color: var(--pome); font-weight: 700; font-variant-numeric: tabular-nums; }
.danger-zone { border-color: color-mix(in srgb, var(--pome) 45%, var(--line)); }
details summary { cursor: pointer; color: var(--ink-soft); padding: 4px 0; }

@media (max-width: 380px) {
  .hero-text .pname { font-size: 2.4rem; }
  .kid-row { grid-template-columns: auto 1fr 56px auto; }
  .kid-row > :last-child { grid-column: 4; grid-row: 1; }
  .kid-row .pin-field { grid-column: 2 / 4; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before { animation: none !important; transition: none !important; }
}
