/* ==========================================================================
   Talawin prototype — design tokens + components
   Concept: «أطلس تلاوين» — a warm paper atlas for children (tactile, cut-paper depth,
   one big action per screen) and a quiet ledger for parents (white, hairlines, small type).
   Layout responds to the app container (container queries), so the same build renders as
   phone, tablet or desktop inside the prototype frame or the real browser window.
   ========================================================================== */
:root {
  /* paper world (v2: brighter, sunnier) */
  --paper: #FFF8EA; --paper-2: #FFEFD2; --paper-3: #F7E0B8; --card: #FFFFFF; --parchment: #FFFCF5;
  --ink: #1E2B4A; --ink-2: #44526F; --ink-3: #5F6B85; --line: #EEDCB9; --line-2: #F6EBD4;
  /* accents (BRD palette, saturated for children: sky / emerald / apricot / violet, + gold for verified mastery) */
  --sky: #5FB8F5; --sky-50: #E3F3FF; --sky-d: #1F6FB8;
  --em: #3FC98F; --em-50: #DDF8EA; --em-d: #178C5E;
  --ap: #FF9F43; --ap-50: #FFF0DE; --ap-d: #C25A12; --ap-edge: #E07A1F;
  --li: #A98BFF; --li-50: #EFE9FF; --li-d: #6A48D8;
  --gold: #FFC83D; --gold-50: #FFF5CF; --gold-d: #8A5E07;
  --rose: #FF7E8A; --rose-50: #FFE7EA; --rose-d: #C8303F;
  --sky-grad: linear-gradient(180deg, #DDF1FF 0%, #FFF8EA 420px);
  /* parent ledger */
  --stone: #F4F3EF; --surface: #FFFFFF; --hair: #E5E2DA; --hair-2: #EFEDE7;
  /* prototype chrome (not product UI) */
  --stage: #E9E4DA; --proto: #1D2333; --proto-2: #2C3448; --proto-fg: #E9ECF4;
  /* type */
  --f-ui: "Readex Pro", "IBM Plex Sans Arabic", "Noto Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --f-quran: "Amiri Quran", "Amiri", "Noto Naskh Arabic", "Traditional Arabic", serif;
  --f-display: "Baloo Bhaijaan 2", "Readex Pro", "Noto Sans Arabic", sans-serif;
  /* spacing (4px base) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s7: 32px; --s8: 40px; --s9: 56px;
  /* radius */
  --r-xl: 28px; --r-lg: 22px; --r-md: 16px; --r-sm: 12px; --r-xs: 8px; --r-pill: 999px;
  /* depth: paper lift + pressed edge */
  --sh-paper: 0 1px 0 rgba(34, 48, 74, .05), 0 10px 24px -14px rgba(34, 48, 74, .35);
  --sh-float: 0 18px 40px -18px rgba(34, 48, 74, .45);
  --sh-ledger: 0 1px 2px rgba(20, 24, 35, .05);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --t-fast: 160ms; --t-page: 240ms;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--stage); color: var(--ink); font-family: var(--f-ui); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--sky-d); outline-offset: 2px; border-radius: 10px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.35; text-wrap: balance; font-weight: 700; }
p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }
.quran { font-family: var(--f-quran); font-weight: 400; line-height: 2.3; direction: rtl; word-spacing: .08em; font-feature-settings: "calt", "liga"; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- stage + device frames (prototype chrome) ---------- */
#stage { position: fixed; inset: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px) 0; display: grid; place-items: center; overflow: hidden; background: var(--stage); }
.frame-box { position: relative; }
.frame { position: absolute; top: 0; left: 0; transform-origin: 0 0; background: var(--paper); overflow: hidden; }
.frame.is-auto { position: absolute; inset: 0; width: 100%; height: 100%; transform: none; }
.frame.dev-phone { border-radius: 46px; box-shadow: 0 0 0 10px #151B29, 0 0 0 11px #3A4256, 0 40px 80px -30px rgba(0, 0, 0, .55); }
.frame.dev-tablet { border-radius: 30px; box-shadow: 0 0 0 14px #151B29, 0 0 0 15px #3A4256, 0 40px 80px -30px rgba(0, 0, 0, .5); }
.frame.dev-desktop { border-radius: 12px; box-shadow: 0 0 0 1px #C9C2B4, 0 40px 80px -30px rgba(0, 0, 0, .45); }
.frame-label { position: absolute; top: -34px; inset-inline: 0; text-align: center; font-size: 12px; color: var(--ink-3); letter-spacing: .02em; }

.app { position: relative; width: 100%; height: 100%; overflow: hidden; container: app / inline-size; background: var(--paper); font-size: 17px; }
.app.mode-parent, .app.mode-admin { background: var(--stone); font-size: 15px; }
.scroll { overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: rgba(30, 43, 74, .22) transparent; }
.view-enter { animation: viewIn var(--t-page) var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- buttons ---------- */
.btn { --bh: 48px; position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: var(--bh); padding: 0 22px; border: 0; border-radius: var(--r-pill); font-weight: 600; font-size: 16px; line-height: 1.2; text-decoration: none; white-space: nowrap; transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background var(--t-fast); user-select: none; }
.btn:disabled { cursor: not-allowed; opacity: .45; }
.btn.full { width: 100%; }
.btn.xl { --bh: 64px; font-size: 20px; padding: 0 30px; border-radius: 24px; }
.btn.lg { --bh: 56px; font-size: 18px; padding: 0 26px; }
.btn.sm { --bh: 38px; font-size: 14px; padding: 0 14px; gap: 6px; }
.btn.xs { --bh: 32px; font-size: 13px; padding: 0 12px; gap: 6px; }
/* child primary: apricot paper button with a pressed edge */
.btn.primary { background: var(--ap); color: var(--ink); box-shadow: 0 4px 0 var(--ap-edge), 0 10px 18px -10px rgba(185, 88, 26, .6); }
.btn.primary:not(:disabled):active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ap-edge); }
.btn.secondary { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 2px var(--line), 0 3px 0 var(--line); }
.btn.secondary:not(:disabled):active { transform: translateY(2px); box-shadow: inset 0 0 0 2px var(--line), 0 1px 0 var(--line); }
.btn.calm { background: var(--ink); color: var(--paper); box-shadow: 0 4px 0 #111a2d; }
.btn.calm:not(:disabled):active { transform: translateY(3px); box-shadow: 0 1px 0 #111a2d; }
.btn.em { background: var(--em-d); color: #fff; box-shadow: 0 4px 0 #165540; }
.btn.ghost { background: transparent; color: var(--ink-2); padding: 0 12px; }
.btn.ghost:hover { background: rgba(34, 48, 74, .06); }
.btn.link { background: none; color: var(--sky-d); padding: 0 6px; min-height: 36px; text-decoration: underline; text-underline-offset: 4px; }
/* parent buttons: flat, quieter */
.mode-parent .btn, .mode-admin .btn, .ledger .btn { --bh: 40px; font-size: 14.5px; border-radius: 10px; padding: 0 16px; box-shadow: none; }
.mode-parent .btn.sm, .mode-admin .btn.sm { --bh: 34px; font-size: 13.5px; padding: 0 12px; }
.mode-parent .btn.primary, .mode-admin .btn.primary, .ledger .btn.primary { background: var(--ink); color: #fff; }
.mode-parent .btn.primary:hover { background: #2E3D5C; }
.mode-parent .btn.secondary, .mode-admin .btn.secondary, .ledger .btn.secondary { background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair); }
.mode-parent .btn.secondary:hover { background: var(--stone); }
.btn.danger { background: var(--rose-50); color: var(--rose-d); box-shadow: inset 0 0 0 1px #EDC9C2; }
.mode-parent .btn.em { background: var(--em-d); color: #fff; }
.icon-btn { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; border: 0; background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 2px var(--line-2); flex: none; }
.icon-btn.sm { width: 40px; height: 40px; border-radius: 12px; }
.icon-btn.plain { background: transparent; box-shadow: none; }
.icon-btn:hover { background: var(--paper-2); }
.mode-parent .icon-btn { width: 36px; height: 36px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--hair); background: var(--surface); }

/* ---------- chips, status, tags ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: var(--r-pill); font-size: 13.5px; font-weight: 500; background: var(--paper-2); color: var(--ink-2); white-space: nowrap; }
.chip.sm { height: 24px; padding: 0 9px; font-size: 12px; gap: 4px; }
.chip .ic { width: 15px; height: 15px; }
.chip.sky { background: var(--sky-50); color: var(--sky-d); }
.chip.em { background: var(--em-50); color: var(--em-d); }
.chip.ap { background: var(--ap-50); color: var(--ap-d); }
.chip.li { background: var(--li-50); color: var(--li-d); }
.chip.gold { background: var(--gold-50); color: var(--gold-d); }
.chip.rose { background: var(--rose-50); color: var(--rose-d); }
.chip.ink { background: var(--ink); color: var(--paper); }
.chip.outline { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
.sim-tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; background: repeating-linear-gradient(-45deg, #FFF4D6, #FFF4D6 6px, #FCEBC0 6px, #FCEBC0 12px); color: #6B4E0B; border: 1px dashed #D9B35A; letter-spacing: .01em; }
/* status glyphs: shape + colour (never colour alone) */
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.st i { width: 12px; height: 12px; flex: none; border-radius: 50%; display: inline-block; }
.st-new i { box-shadow: inset 0 0 0 1.5px var(--ink-3); border-radius: 50%; background: transparent; }
.st-learning i { background: linear-gradient(90deg, var(--sky-d) 50%, transparent 50%); box-shadow: inset 0 0 0 1.5px var(--sky-d); }
.st-memorized i { background: var(--li-d); border-radius: 3px; }
.st-verified i { background: var(--em-d); border-radius: 3px; position: relative; }
.st-verified i::after { content: ""; position: absolute; inset: 3px 4px 4px 3px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); width: 3px; height: 6px; }
.st-due i { background: transparent; box-shadow: inset 0 0 0 3px var(--ap-d); }
.st-needs i { background: var(--rose-d); clip-path: polygon(50% 0, 100% 100%, 0 100%); border-radius: 0; }

/* ---------- cards ---------- */
.card { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--sh-paper); }
.card.pad { padding: var(--s5); }
.card.flat { box-shadow: inset 0 0 0 2px var(--line-2); }
.ledger-card { background: var(--surface); border: 1px solid var(--hair); border-radius: 14px; box-shadow: var(--sh-ledger); }
.ledger-card.pad { padding: 18px 20px; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--ink-3); }
.muted { color: var(--ink-3); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; }
.row { display: flex; align-items: center; gap: var(--s3); }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: var(--s3); }
.grow { flex: 1; min-width: 0; }
.row.wrap > .grow { flex: 1 1 210px; }
.divider { height: 1px; background: var(--line-2); border: 0; margin: 0; }
.mode-parent .divider { background: var(--hair-2); }
.bar { height: 10px; border-radius: 99px; background: var(--paper-2); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: var(--em-d); transition: width .5s var(--ease); }
.bar.sm { height: 6px; }
.mode-parent .bar { background: var(--hair-2); }

/* ---------- page containers ---------- */
.page { width: 100%; max-width: 1180px; margin-inline: auto; padding: 16px 16px 40px; display: flex; flex-direction: column; gap: 20px; }
.page.narrow { max-width: 760px; }
@container app (min-width: 700px) { .page { padding: 28px 28px 48px; gap: 24px; } }
@container app (min-width: 1100px) { .page { padding: 36px 40px 56px; } }
.page-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-title h1 { font-size: 28px; }
.mode-child .page-title h1 { font-family: var(--f-display); font-weight: 600; font-size: 32px; letter-spacing: 0; }
.page-title p { color: var(--ink-3); font-size: 15px; margin-top: 2px; }
@container app (min-width: 1100px) { .mode-child .page-title h1 { font-size: 38px; } }

/* ==========================================================================
   CHILD SHELL
   ========================================================================== */
.cshell { display: grid; height: 100%; grid-template-rows: 1fr auto; grid-template-areas: "main" "nav"; background: var(--sky-grad); }
.cshell > .cmain { grid-area: main; min-height: 0; }
.cnav { grid-area: nav; display: flex; justify-content: space-around; gap: 4px; padding: 8px 10px calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--card); box-shadow: 0 -1px 0 var(--line-2), 0 -12px 24px -20px rgba(34, 48, 74, .4); z-index: 5; }
.cnav-brand, .cnav-foot, .cnav-child { display: none; }
.nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 58px; padding: 6px 4px; border: 0; background: none; border-radius: 18px; color: var(--ink-3); font-size: 13px; font-weight: 600; position: relative; }
.nav-item .nav-ic { display: grid; place-items: center; width: 52px; height: 32px; border-radius: 16px; transition: background var(--t-fast); }
.nav-item.on { color: var(--ink); }
.nav-item.on .nav-ic { background: var(--ap); color: var(--ink); }
.nav-item .dot { position: absolute; top: 4px; inset-inline-end: calc(50% - 30px); min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--em-d); color: #fff; font-size: 11.5px; display: grid; place-items: center; }
@container app (min-width: 700px) {
  .cshell { grid-template-columns: 96px 1fr; grid-template-rows: 1fr; grid-template-areas: "nav main"; }
  .cnav { flex-direction: column; justify-content: flex-start; align-items: stretch; gap: 6px; padding: 18px 10px; box-shadow: -1px 0 0 var(--line-2); background: rgba(255,255,255,.55); }
  .cnav-brand { display: grid; place-items: center; padding-bottom: 14px; }
  .cnav-brand .wm-text { display: none; }
  .nav-item { flex: none; min-height: 72px; }
  .cnav-foot { display: flex; flex-direction: column; gap: 6px; margin-top: auto; }
  .nav-item .dot { inset-inline-end: 8px; }
}
@container app (min-width: 1100px) {
  .cshell { grid-template-columns: 248px 1fr; }
  .cnav { padding: 24px 18px; gap: 4px; }
  .cnav-brand { place-items: start; padding: 0 8px 18px; }
  .cnav-brand .wm-text { display: flex; }
  .cnav-child { display: flex; align-items: center; gap: 12px; padding: 12px; margin-bottom: 14px; border-radius: 18px; background: var(--card); box-shadow: inset 0 0 0 2px var(--line-2); }
  .nav-item { flex-direction: row; gap: 12px; min-height: 52px; padding: 6px 10px; font-size: 16px; justify-content: flex-start; }
  .nav-item .nav-ic { width: 44px; height: 36px; border-radius: 12px; }
  .nav-item .dot { position: static; margin-inline-start: auto; }
  .nav-item:hover:not(.on) { background: var(--paper-2); }
  .nav-item .nav-label-sm { display: none; }
}
.nav-label-lg { display: none; }
@container app (min-width: 1100px) { .nav-label-lg { display: inline; } }

.wordmark { display: inline-flex; align-items: center; gap: 10px; }
.wm-text { display: flex; flex-direction: column; line-height: 1.1; }
.wm-text b { font-family: var(--f-display); font-size: 26px; font-weight: 800; color: var(--ink); line-height: 1.15; }
.wm-text small { font-size: 12px; color: var(--ink-3); font-weight: 500; margin-top: 2px; }

/* child top bar */
.ctop { position: sticky; top: 0; z-index: 4; display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); }
.ctop .hello { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.ctop .hello b { font-size: 18px; }
.ctop .hello span { font-size: 13.5px; color: var(--ink-3); }
.xp-pill { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 14px; background: var(--gold-50); color: var(--gold-d); font-weight: 700; font-size: 15px; border: 0; }
.xp-pill .ic { color: var(--gold); }
@container app (min-width: 700px) { .ctop { padding: 18px 28px 6px; background: transparent; backdrop-filter: none; position: static; } }
@container app (min-width: 1100px) { .ctop { padding: 28px 40px 0; } .ctop .hide-desk { display: none; } }

/* ---------- child home ---------- */
.home-grid { display: grid; gap: 16px; }
@container app (min-width: 700px) { .home-grid { grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; } }
@container app (min-width: 1100px) { .home-grid { grid-template-columns: 1.25fr 1fr; gap: 24px; } }
.hero { position: relative; overflow: hidden; border-radius: var(--r-xl); background: var(--card); box-shadow: var(--sh-paper); display: flex; flex-direction: column; }
.hero-art { position: relative; aspect-ratio: 16 / 9; max-width: 100%; }
.hero-art .scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-art .page-tag { position: absolute; top: 14px; inset-inline-start: 14px; }
.hero-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.hero-body h2 { font-family: var(--f-display); font-weight: 600; font-size: 34px; line-height: 1.2; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.loop-steps { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; color: var(--ink-2); font-size: 14px; }
.loop-steps span { display: inline-flex; align-items: center; gap: 4px; }
.loop-steps .sep { width: 14px; height: 2px; background: var(--line); border-radius: 2px; }
@container app (min-width: 1100px) { .hero-art { aspect-ratio: 16 / 8.2; } .hero-body { padding: 24px 28px 28px; } .hero-body h2 { font-size: 44px; } }
.sana-tip { position: absolute; inset-block-end: 14px; inset-inline-end: 14px; display: flex; align-items: flex-end; gap: 6px; }
.bubble { max-width: 210px; padding: 10px 14px; border-radius: 18px 18px 6px 18px; background: var(--card); box-shadow: var(--sh-float); font-size: 14px; line-height: 1.5; font-weight: 500; }
.sana { animation: sanaFloat 4.2s ease-in-out infinite; flex: none; }
@keyframes sanaFloat { 50% { transform: translateY(-4px); } }
.gate { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--r-lg); border: 0; text-align: start; background: var(--card); box-shadow: var(--sh-paper); width: 100%; min-height: 96px; transition: transform var(--t-fast) var(--ease); }
.gate:active { transform: scale(.985); }
.gate .gate-ic { width: 60px; height: 60px; border-radius: 20px; display: grid; place-items: center; flex: none; }
.gate h3 { font-size: 21px; }
.gate p { font-size: 14.5px; color: var(--ink-3); }
.gate.em { background: linear-gradient(160deg, #E6FBF0, #fff 70%); box-shadow: inset 0 0 0 2px #BDEFD6, var(--sh-paper); } .gate.em .gate-ic { background: var(--em); color: #fff; }
.gate.li { background: linear-gradient(160deg, #F1ECFF, #fff 70%); box-shadow: inset 0 0 0 2px #D9CCFF, var(--sh-paper); } .gate.li .gate-ic { background: var(--li); color: #fff; }
.gate.gold { background: linear-gradient(160deg, #FFF6D6, #fff 70%); box-shadow: inset 0 0 0 2px #FFE49A, var(--sh-paper); } .gate.gold .gate-ic { background: var(--gold); color: #5A3F06; }
.gate .count { margin-inline-start: auto; min-width: 40px; height: 40px; padding: 0 10px; border-radius: 14px; display: grid; place-items: center; font-weight: 700; font-size: 18px; }
.gate.em .count { background: var(--em-d); color: #fff; }
.gates-2 { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.gates-2 .gate { flex-direction: column; align-items: flex-start; min-height: 150px; position: relative; }
.gates-2 .gate .count { position: absolute; top: 14px; inset-inline-end: 14px; }

.goal-card { display: flex; align-items: center; gap: 16px; padding: 16px 18px; }
.ring { --p: 0; --c: var(--em-d); width: 64px; height: 64px; border-radius: 50%; flex: none; display: grid; place-items: center; background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--paper-2) 0); position: relative; }
.ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--card); }
.ring > * { position: relative; font-weight: 700; font-size: 15px; }
.week-dots { display: flex; gap: 6px; margin-top: 6px; }
.week-dots span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 9px; font-size: 11px; background: var(--paper-2); color: var(--ink-3); font-weight: 600; }
.week-dots span.on { background: var(--em-50); color: var(--em-d); box-shadow: inset 0 0 0 1.5px var(--em); }
.week-dots span.today { box-shadow: inset 0 0 0 2px var(--ink); }

/* ---------- atlas ---------- */
.atlas-cover { position: relative; border-radius: var(--r-xl); padding: 22px; color: var(--ink); overflow: hidden; background: var(--sky-50); }
.atlas-cover.cv-dusk { background: linear-gradient(160deg, #FBE2CB, #E8DDF8); }
.atlas-cover.cv-night { background: linear-gradient(160deg, #2B3B63, #465A8C); color: #FFF8EA; }
.atlas-cover.cv-night .muted { color: #CFD7EA; }
.atlas-cover h1 { font-family: var(--f-display); font-weight: 600; font-size: 32px; }
.legend { display: flex; flex-wrap: wrap; gap: 10px 16px; font-size: 13.5px; }
.legend > span { display: inline-flex; align-items: center; gap: 6px; }
.chapter { display: flex; flex-direction: column; gap: 12px; }
.chapter-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.chapter-head h2 { font-size: 21px; }
.chapter-head .count { font-size: 13.5px; color: var(--ink-3); }
.pages { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@container app (min-width: 700px) { .pages { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@container app (min-width: 1100px) { .pages { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; } }
.pagecard { position: relative; display: flex; flex-direction: column; border: 0; padding: 0; text-align: start; border-radius: 18px; overflow: hidden; background: var(--card); box-shadow: var(--sh-paper); transition: transform var(--t-fast) var(--ease); }
.pagecard:hover { transform: translateY(-2px) rotate(-.4deg); }
.pagecard .pc-art { position: relative; aspect-ratio: 3 / 2; max-width: 100%; background: var(--paper); }
.pagecard .pc-art .scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.pagecard .pc-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 2px; }
.pagecard b { font-size: 17px; }
.pagecard .pc-meta { font-size: 12.5px; color: var(--ink-3); }
.pagecard .ribbon { position: absolute; top: 8px; inset-inline-start: 8px; }
.pagecard .seal { position: absolute; top: 6px; inset-inline-end: 6px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: #5A3F06; box-shadow: 0 0 0 3px var(--card), 0 4px 10px -4px rgba(0, 0, 0, .4); }
.pagecard.is-next { box-shadow: 0 0 0 3px var(--ap), var(--sh-paper); }
.scene.is-sketch { background: var(--paper); }
.locked-chapter { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: var(--r-lg); border: 2px dashed var(--line); color: var(--ink-3); }

/* ---------- library ---------- */
.searchbox { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 16px; border-radius: 18px; background: var(--card); box-shadow: inset 0 0 0 2px var(--line-2); }
.searchbox input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 17px; }
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 16px; background: var(--paper-2); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg button { flex: none; height: 40px; padding: 0 14px; border: 0; border-radius: 12px; background: none; font-size: 14.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 2px 0 var(--line); }
.mode-parent .seg { background: var(--hair-2); border-radius: 10px; padding: 3px; }
.mode-parent .seg button { height: 32px; border-radius: 8px; font-size: 13.5px; padding: 0 12px; }
.mode-parent .seg button.on { box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.seg-wrap { overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.slist { display: grid; gap: 10px; }
@container app (min-width: 1100px) { .slist { grid-template-columns: 1fr 1fr; } }
.srow { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 18px; background: var(--card); box-shadow: inset 0 0 0 2px var(--line-2); border: 0; text-align: start; width: 100%; }
.srow:hover { box-shadow: inset 0 0 0 2px var(--line); }
.srow .sno { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--paper-2); font-weight: 700; font-size: 15px; flex: none; }
.srow .sname { font-size: 18px; font-weight: 600; }
.srow .smeta { font-size: 13px; color: var(--ink-3); }
.srow .mini-thumb { width: 64px; height: 44px; border-radius: 10px; overflow: hidden; flex: none; position: relative; }
.srow .mini-thumb .scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.juz-head { font-size: 15px; font-weight: 700; color: var(--ink-2); padding: 6px 4px 0; grid-column: 1 / -1; }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 36px 20px; color: var(--ink-2); }
.empty h3 { font-size: 21px; color: var(--ink); }

/* ---------- surah detail ---------- */
.surah-layout { display: grid; gap: 20px; }
@container app (min-width: 1000px) { .surah-layout { grid-template-columns: 380px minmax(0, 1fr); align-items: start; } .surah-layout .side { position: sticky; top: 20px; } }
.surah-banner { border-radius: var(--r-xl); overflow: hidden; position: relative; background: var(--card); box-shadow: var(--sh-paper); }
.surah-banner .art { position: relative; aspect-ratio: 2 / 1; max-width: 100%; }
.surah-banner .art .scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.surah-banner .body { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 12px; }
.surah-banner h1 { font-family: var(--f-display); font-weight: 600; font-size: 34px; }
.ayah-strip { display: flex; gap: 4px; }
.ayah-strip span { flex: 1; height: 12px; border-radius: 4px; background: var(--paper-2); }
.ayah-strip .s-learning { background: repeating-linear-gradient(-45deg, var(--sky) 0 4px, var(--sky-50) 4px 8px); }
.ayah-strip .s-memorized { background: var(--li); }
.ayah-strip .s-verified { background: var(--em-d); }
.ayah-strip .s-due { background: var(--li); box-shadow: inset 0 0 0 2px var(--ap-d); }
.ayah-strip .s-needs { background: var(--rose); }
.counts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.counts > div { padding: 10px; border-radius: 14px; background: var(--paper); text-align: center; }
.counts b { display: block; font-size: 22px; line-height: 1.2; }
.counts span { font-size: 12px; color: var(--ink-3); }
.alist { display: flex; flex-direction: column; gap: 10px; }
.arow { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: start; padding: 14px 16px; border-radius: 18px; background: var(--card); box-shadow: inset 0 0 0 2px var(--line-2); }
.arow.is-next { box-shadow: inset 0 0 0 2px var(--ap); }
.arow .anum { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--paper-2); font-weight: 700; font-size: 14px; grid-row: span 2; }
.arow .quran { font-size: 26px; line-height: 2.1; }
.arow .afoot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.range { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stepper { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: 14px; background: var(--paper-2); }
.stepper button { width: 40px; height: 40px; border-radius: 10px; border: 0; background: var(--card); display: grid; place-items: center; }
.stepper b { min-width: 34px; text-align: center; font-size: 17px; }
.mode-parent .stepper { background: var(--hair-2); border-radius: 10px; }
.mode-parent .stepper button { width: 32px; height: 32px; border-radius: 8px; }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--sky-50); color: var(--ink-2); font-size: 14px; line-height: 1.55; }
.note .ic { flex: none; color: var(--sky-d); margin-top: 2px; }
.note.warn { background: var(--ap-50); } .note.warn .ic { color: var(--ap-d); }
.note.err { background: var(--rose-50); } .note.err .ic { color: var(--rose-d); }
.note.ok { background: var(--em-50); } .note.ok .ic { color: var(--em-d); }

/* ==========================================================================
   SESSION — calm Quran mode: parchment, no decoration near the verse, one CTA
   ========================================================================== */
.session { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--parchment); }
.s-top { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.s-title { flex: 1; min-width: 0; text-align: center; line-height: 1.3; }
.s-title b { display: block; font-size: 17px; }
.s-title span { font-size: 13px; color: var(--ink-3); }
.s-progress { display: flex; gap: 4px; padding: 0 16px 8px; flex: none; }
.s-progress i { flex: 1; height: 6px; border-radius: 6px; background: var(--line-2); }
.s-progress i.done { background: var(--em-d); }
.s-progress i.cur { background: linear-gradient(90deg, var(--line-2) 50%, var(--ap) 50%); }
.s-body { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; }
.s-main { width: 100%; max-width: 860px; margin-inline: auto; padding: 8px 16px 0; display: flex; flex-direction: column; gap: 16px; }
.steps { display: flex; gap: 6px; justify-content: center; flex-wrap: nowrap; }
.step { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px 0 14px; border-radius: 99px; border: 0; background: transparent; color: var(--ink-3); font-weight: 600; font-size: 14.5px; box-shadow: inset 0 0 0 1.5px var(--line); }
.step .sn { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--paper-2); font-size: 13px; }
.step.on { background: var(--ink); color: var(--paper); box-shadow: none; }
.step.on .sn { background: var(--ap); color: var(--ink); }
.step.done { color: var(--em-d); box-shadow: inset 0 0 0 1.5px var(--em); }
.step.done .sn { background: var(--em-d); color: #fff; }
.step .lbl { white-space: nowrap; }
@container app (max-width: 420px) { .step:not(.on) .lbl { display: none; } .step { padding: 0 8px; } }
.verse-card { position: relative; border-radius: 26px; background: #FFFFFF; box-shadow: 0 0 0 1px #EFE6D3, 0 20px 40px -30px rgba(34, 48, 74, .5); padding: 22px 18px 18px; display: flex; flex-direction: column; gap: 10px; }
.verse-card .vhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--ink-3); font-size: 13.5px; }
.verse-text { text-align: center; font-size: calc(34px * var(--qs, 1) * var(--qs-ui, 1)); color: #1B2438; padding: 6px 0 4px; min-height: 2.4em; display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; column-gap: .28em; }
.verse-text .w { transition: background .25s, color .25s; border-radius: 10px; padding: 0 .06em; }
.verse-text .mark { color: var(--gold-d); }
.verse-text .ay { display: inline; }
.verse-text .ay.cur { background: linear-gradient(transparent 70%, var(--gold-50) 70%); }
.verse-text.basm { font-size: calc(24px * var(--qs, 1)); color: var(--ink-2); min-height: 0; padding: 0; }
@container app (min-width: 700px) { .verse-text { font-size: calc(42px * var(--qs, 1) * var(--qs-ui, 1)); } .verse-card { padding: 30px 32px 24px; } }
@container app (min-width: 1100px) { .verse-text { font-size: calc(50px * var(--qs, 1) * var(--qs-ui, 1)); } }
.ghost-w { display: inline-block; height: .62em; margin: .55em .1em 0; border-radius: 99px; background: var(--paper-2); box-shadow: inset 0 -3px 0 var(--line); vertical-align: middle; }
.ghost-w.peek { background: none; box-shadow: none; height: auto; margin: 0; }
.verse-foot { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; font-size: 13.5px; color: var(--ink-3); }
.rep-dots { display: inline-flex; gap: 5px; }
.rep-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.rep-dots i.on { background: var(--em-d); }
.rep-dots i.cur { background: var(--ap); box-shadow: 0 0 0 3px var(--ap-50); }
.panel { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.panel h3 { font-size: 22px; }
.panel p { color: var(--ink-2); font-size: 16px; max-width: 46ch; }
.play-big { position: relative; width: 104px; height: 104px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--ink); color: var(--paper); box-shadow: 0 6px 0 #111A2D, 0 20px 30px -16px rgba(34, 48, 74, .8); transition: transform var(--t-fast) var(--ease); }
.play-big:active { transform: translateY(4px); box-shadow: 0 2px 0 #111A2D; }
.play-big svg.prog { position: absolute; inset: -9px; width: calc(100% + 18px); height: calc(100% + 18px); transform: rotate(-90deg); pointer-events: none; }
.play-big svg.prog circle { fill: none; stroke-width: 5; }
.phase { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 99px; font-weight: 600; font-size: 15px; background: var(--paper-2); color: var(--ink-2); }
.phase.sheikh { background: var(--sky-50); color: var(--sky-d); }
.phase.you { background: var(--ap-50); color: var(--ap-d); animation: youPulse 1.6s ease-in-out infinite; }
.phase.ok { background: var(--em-50); color: var(--em-d); }
.phase.err { background: var(--rose-50); color: var(--rose-d); }
@keyframes youPulse { 50% { box-shadow: 0 0 0 6px rgba(245, 168, 102, .18); } }
.turn-ring { --p: 0; width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--ap) calc(var(--p) * 1%), var(--ap-50) 0); position: relative; }
.turn-ring::before { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: #fff; }
.turn-ring > * { position: relative; }
.mini-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.s-cta { position: sticky; bottom: 0; z-index: 3; margin-top: auto; margin-inline: -16px; padding: 18px 16px calc(14px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(to top, var(--parchment) 72%, rgba(255, 252, 245, 0)); display: flex; gap: 10px; justify-content: center; }
.s-cta .btn { flex: 1; max-width: 520px; }
.s-cta .btn.secondary { flex: 0 1 auto; }
.session-grid { flex: 1 0 auto; display: grid; gap: 18px; width: 100%; }
.s-aside { display: none; }
@container app (min-width: 1100px) {
  .session-grid { grid-template-columns: 300px minmax(0, 1fr); align-items: start; max-width: 1240px; margin-inline: auto; padding: 8px 32px 24px; }
  .session-grid .s-main { padding: 0; max-width: none; align-self: stretch; }
  .session-grid .s-cta { margin-inline: 0; padding-inline: 0; }
  .s-aside { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 8px; }
  .s-top { padding: 16px 28px; }
  .s-progress { max-width: 1240px; margin-inline: auto; width: 100%; padding: 0 32px; }
}
.aside-card { padding: 16px; border-radius: 20px; background: #fff; box-shadow: 0 0 0 1px #EFE6D3; display: flex; flex-direction: column; gap: 10px; }
.aside-list { display: flex; flex-direction: column; gap: 4px; }
.aside-list button { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; border: 0; background: none; text-align: start; font-size: 14.5px; }
.aside-list button.on { background: var(--ap-50); font-weight: 700; }
.aside-list button:hover:not(.on) { background: var(--paper); }
.hint-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.hint-btn { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px; border-radius: 14px; border: 0; background: var(--gold-50); color: var(--gold-d); font-weight: 600; font-size: 14.5px; }
.hint-btn:disabled { opacity: .45; }
.wave { display: flex; align-items: center; justify-content: center; gap: 4px; height: 64px; }
.wave i { width: 6px; border-radius: 6px; background: var(--ap); transition: height .12s; }
.wave.play i { background: var(--li-d); }
.wave.idle i { background: var(--line); }
.rec-btn { width: 96px; height: 96px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--rose-d); color: #fff; box-shadow: 0 6px 0 #7E2C23, 0 0 0 8px var(--rose-50); }
.rec-btn.on { background: var(--ink); box-shadow: 0 6px 0 #111A2D, 0 0 0 8px var(--rose-50); animation: recPulse 1.4s ease-in-out infinite; }
@keyframes recPulse { 50% { box-shadow: 0 6px 0 #111A2D, 0 0 0 16px rgba(240, 178, 166, .35); } }
.tracks { width: 100%; max-width: 460px; display: flex; flex-direction: column; gap: 8px; }
.track { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: var(--paper); text-align: start; }
.track .tbar { flex: 1; height: 8px; border-radius: 8px; background: var(--line-2); overflow: hidden; }
.track .tbar i { display: block; height: 100%; background: var(--li-d); }
.track.sheikh .tbar i { background: var(--sky-d); }
.feedback { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 22px 18px; border-radius: 24px; text-align: center; }
.feedback.ok { background: var(--em-50); }
.feedback.mid { background: var(--gold-50); }
.feedback.soft { background: var(--sky-50); }
.feedback h3 { font-size: 22px; font-weight: 700; }
.xp-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border-radius: 99px; background: var(--gold-50); color: var(--gold-d); font-weight: 700; font-size: 14px; }
.xp-chip .ic { color: var(--gold); }

/* ---------- overlays: sheet / modal / toast ---------- */
.scrim { position: absolute; inset: 0; background: rgba(23, 31, 49, .42); z-index: 40; animation: fadeIn .18s ease both; }
@keyframes fadeIn { from { opacity: 0; } }
.sheet { position: absolute; inset-inline: 0; bottom: 0; z-index: 41; max-height: 88%; display: flex; flex-direction: column; background: var(--card); border-radius: 28px 28px 0 0; box-shadow: var(--sh-float); animation: sheetUp .26s var(--ease) both; }
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } }
.sheet .grip { width: 44px; height: 5px; border-radius: 5px; background: var(--line); margin: 10px auto 2px; }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 8px 18px 12px; }
.sheet-head h3 { flex: 1; font-size: 20px; }
.sheet-body { padding: 4px 18px 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; }
@container app (min-width: 700px) {
  .sheet { inset: 0 auto 0 0; width: 440px; max-height: none; border-radius: 0 28px 28px 0; animation-name: sheetSide; }
  [dir="rtl"] .sheet { inset: 0 0 0 auto; border-radius: 28px 0 0 28px; }
  .sheet .grip { display: none; }
  .sheet-head { padding-top: 20px; }
}
@keyframes sheetSide { from { transform: translateX(-30px); opacity: 0; } }
.modal-wrap { position: absolute; inset: 0; z-index: 42; display: grid; place-items: center; padding: 16px; pointer-events: none; }
.modal { pointer-events: auto; width: min(460px, 100%); max-height: calc(100% - 24px); overflow-y: auto; background: var(--card); border-radius: 26px; box-shadow: var(--sh-float); padding: 22px; display: flex; flex-direction: column; gap: 14px; animation: pop .22s var(--ease) both; }
.modal.wide { width: min(640px, 100%); }
.mode-parent .modal, .mode-admin .modal { background: var(--surface); border-radius: 16px; }
@keyframes pop { from { transform: scale(.96); opacity: 0; } }
.modal h3 { font-size: 21px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.modal-actions .btn { flex: 1 1 140px; }
.toast { position: absolute; z-index: 50; bottom: 96px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 32px); display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 16px; background: var(--ink); color: var(--paper); font-size: 15px; font-weight: 500; box-shadow: var(--sh-float); animation: toastIn .25s var(--ease) both; }
@keyframes toastIn { from { transform: translate(-50%, 10px); opacity: 0; } }
@container app (min-width: 700px) { .toast { bottom: 28px; } }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > label, .field > .lbl { font-weight: 600; font-size: 15px; }
.field .help { font-size: 13px; color: var(--ink-3); }
.input { height: 52px; padding: 0 16px; border-radius: 14px; border: 0; background: var(--paper); box-shadow: inset 0 0 0 2px var(--line-2); font-size: 17px; width: 100%; }
.input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--sky-d); }
.mode-parent .input, .mode-admin .input { height: 42px; border-radius: 10px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair); font-size: 15px; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: 18px 50%, 13px 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-inline-start: 34px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { min-height: 48px; padding: 0 18px; border-radius: 14px; border: 0; background: var(--paper); box-shadow: inset 0 0 0 2px var(--line-2); font-weight: 600; font-size: 16px; display: inline-flex; align-items: center; gap: 8px; }
.choice.on { background: var(--ink); color: var(--paper); box-shadow: none; }
.choice.num { min-width: 52px; justify-content: center; padding: 0 12px; }
.mode-parent .choice, .mode-admin .choice { min-height: 38px; border-radius: 10px; font-size: 14px; padding: 0 14px; box-shadow: inset 0 0 0 1px var(--hair); background: var(--surface); }
.mode-parent .choice.on { background: var(--ink); box-shadow: none; }
.optcards { display: grid; gap: 10px; }
.optcard { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px; border: 0; text-align: start; background: var(--paper); box-shadow: inset 0 0 0 2px var(--line-2); width: 100%; }
.optcard.on { background: var(--card); box-shadow: inset 0 0 0 3px var(--ink); }
.optcard .oc-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--card); flex: none; }
.optcard b { display: block; font-size: 16.5px; }
.optcard span { font-size: 13.5px; color: var(--ink-3); }
.optcard .radio { margin-inline-start: auto; width: 24px; height: 24px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--line); flex: none; }
.optcard.on .radio { box-shadow: inset 0 0 0 7px var(--ink); }
.mode-parent .optcard { border-radius: 12px; box-shadow: inset 0 0 0 1px var(--hair); background: var(--surface); padding: 12px 14px; }
.mode-parent .optcard.on { box-shadow: inset 0 0 0 2px var(--ink); }
.toggle { position: relative; width: 52px; height: 30px; border-radius: 30px; border: 0; background: var(--line); flex: none; transition: background var(--t-fast); }
.toggle::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: inset-inline-start var(--t-fast) var(--ease); }
.toggle.on { background: var(--em-d); }
.toggle.on::after { inset-inline-start: 25px; }
.setrow { display: flex; align-items: center; gap: 14px; padding: 12px 0; }
.setrow + .setrow { border-top: 1px solid var(--line-2); }
.mode-parent .setrow + .setrow { border-top-color: var(--hair-2); }
.setrow .grow b { display: block; font-weight: 600; font-size: 15.5px; }
.setrow .grow span { font-size: 13px; color: var(--ink-3); }
details.adv { border-radius: 16px; background: var(--paper); padding: 4px 14px; }
details.adv summary { cursor: pointer; padding: 10px 0; font-weight: 600; list-style: none; display: flex; align-items: center; justify-content: space-between; }
details.adv summary::-webkit-details-marker { display: none; }
details.adv[open] summary .ic { transform: rotate(180deg); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.keypad button { height: 54px; border-radius: 14px; border: 0; background: var(--paper); font-size: 22px; font-weight: 600; box-shadow: inset 0 0 0 2px var(--line-2); }
.code-dots { display: flex; justify-content: center; gap: 10px; min-height: 48px; align-items: center; font-size: 28px; font-weight: 700; letter-spacing: .1em; }
.perm { border-radius: 18px; background: #F7F7F9; color: #1C1F27; padding: 18px; display: flex; flex-direction: column; gap: 12px; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; box-shadow: 0 0 0 1px #DDDEE3; }
.perm .perm-btns { display: flex; gap: 8px; justify-content: flex-end; }
.perm button { height: 38px; padding: 0 16px; border-radius: 8px; border: 1px solid #C9CBD2; background: #fff; font-weight: 600; }
.perm button.allow { background: #1A5FD0; color: #fff; border-color: #1A5FD0; }

/* ---------- review ---------- */
.rv-grid { display: grid; gap: 14px; }
@container app (min-width: 700px) { .rv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container app (min-width: 1100px) { .rv-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.rv-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 20px; background: var(--card); box-shadow: inset 0 0 0 2px var(--line-2); }
.rv-card .quran { font-size: 22px; line-height: 2; color: var(--ink-2); filter: blur(5px); user-select: none; }
.rate { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; max-width: 560px; }
.rate button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px; border-radius: 20px; border: 0; font-weight: 700; font-size: 16px; box-shadow: inset 0 0 0 2px var(--line-2); background: var(--card); }
.rate button .face { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; }
.rate .easy .face { background: var(--em-50); color: var(--em-d); }
.rate .help .face { background: var(--gold-50); color: var(--gold-d); }
.rate .again .face { background: var(--sky-50); color: var(--sky-d); }
.rate small { font-weight: 500; font-size: 12.5px; color: var(--ink-3); }

/* ---------- games ---------- */
.games-grid { display: grid; gap: 14px; }
@container app (min-width: 700px) { .games-grid { grid-template-columns: 1fr 1fr; } }
.game-card { display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: var(--r-xl); border: 0; text-align: start; background: var(--card); box-shadow: var(--sh-paper); position: relative; overflow: hidden; width: 100%; }
.game-card .gc-art { height: 120px; border-radius: 18px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; }
.game-card h3 { font-size: 22px; }
.game-card p { color: var(--ink-3); font-size: 14.5px; }
.game-card.locked { opacity: .7; box-shadow: inset 0 0 0 2px var(--line-2); background: var(--paper); }
.tile { display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 16px; border-radius: 16px; border: 0; background: #fff; box-shadow: inset 0 0 0 2px var(--line), 0 4px 0 var(--line); font-family: var(--f-quran); font-size: 28px; line-height: 1; color: var(--ink); transition: transform var(--t-fast) var(--ease); }
.tile:active { transform: translateY(3px); box-shadow: inset 0 0 0 2px var(--line), 0 1px 0 var(--line); }
.tile.ok { background: var(--em-50); box-shadow: inset 0 0 0 2px var(--em-d), 0 4px 0 var(--em); color: var(--em-d); }
.tile.bad { background: var(--rose-50); box-shadow: inset 0 0 0 2px var(--rose), 0 4px 0 var(--rose); opacity: .6; }
.tile.hint { box-shadow: inset 0 0 0 3px var(--gold), 0 4px 0 var(--gold); }
.tile.placed { visibility: hidden; }
.tile.mini { font-size: 20px; min-height: 40px; padding: 0 10px; border-radius: 12px; box-shadow: inset 0 0 0 1.5px var(--line), 0 2px 0 var(--line); }
.q-card { border-radius: 26px; background: #fff; box-shadow: 0 0 0 1px #EFE6D3, var(--sh-paper); padding: 20px 16px; display: flex; flex-direction: column; gap: 14px; align-items: center; text-align: center; }
.q-verse { font-family: var(--f-quran); font-size: 32px; line-height: 2.2; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; column-gap: .3em; row-gap: 4px; }
.blank { display: inline-block; min-width: 2.6em; height: 1.3em; border-radius: 12px; background: var(--ap-50); box-shadow: inset 0 0 0 2px dashed var(--ap); border: 2px dashed var(--ap); vertical-align: middle; }
.slots { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; min-height: 72px; padding: 10px; border-radius: 20px; background: var(--paper); width: 100%; }
.slot { min-width: 72px; min-height: 56px; border-radius: 16px; border: 2px dashed var(--line); display: grid; place-items: center; background: transparent; }
.slot.filled { border: 0; padding: 0; min-width: 0; }
.pool { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.qdots { display: flex; gap: 6px; }
.qdots i { width: 28px; height: 8px; border-radius: 8px; background: var(--line-2); }
.qdots i.ok { background: var(--em-d); } .qdots i.cur { background: var(--ap); }

/* ---------- celebration / end ---------- */
.end-wrap { display: grid; gap: 18px; }
@container app (min-width: 1000px) { .end-wrap { grid-template-columns: 1.1fr 1fr; align-items: start; } }
.end-art { position: relative; border-radius: var(--r-xl); overflow: hidden; aspect-ratio: 3 / 2; max-width: 100%; box-shadow: var(--sh-paper); background: var(--card); }
.end-art .scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.end-art .scene.next { animation: glue 1.1s .3s var(--ease) both; }
@keyframes glue { from { opacity: 0; transform: scale(1.03); } }
.xp-lines { display: flex; flex-direction: column; }
.xp-lines > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: 15px; border-bottom: 1px dashed var(--line); }
.xp-lines > div:last-child { border-bottom: 0; font-weight: 700; font-size: 17px; }
.badge-tile { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 14px 10px; border-radius: 20px; background: var(--card); box-shadow: inset 0 0 0 2px var(--line-2); }
.badge-tile .medal { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; position: relative; }
.badge-tile .medal::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px dashed currentColor; opacity: .35; }
.badge-tile.off { opacity: .5; }
.badge-tile.off .medal { background: var(--paper-2) !important; color: var(--ink-3) !important; }
.badge-tile b { font-size: 15px; }
.badge-tile span { font-size: 12.5px; color: var(--ink-3); line-height: 1.4; }
.tone-apricot { background: var(--ap-50); color: var(--ap-d); }
.tone-sky { background: var(--sky-50); color: var(--sky-d); }
.tone-lilac { background: var(--li-50); color: var(--li-d); }
.tone-emerald { background: var(--em-50); color: var(--em-d); }
.tone-gold { background: var(--gold-50); color: var(--gold-d); }
.badges { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@container app (min-width: 700px) { .badges { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.gift { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 22px; background: var(--card); box-shadow: inset 0 0 0 2px var(--line-2); }
.gift .g-ic { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; flex: none; background: var(--ap-50); color: var(--ap-d); }
.gift.eligible { box-shadow: inset 0 0 0 3px var(--ap); }
.gift.requested .g-ic { background: var(--li-50); color: var(--li-d); }
.gift.delivered .g-ic { background: var(--em-50); color: var(--em-d); }
.decor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@container app (min-width: 700px) { .decor-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.decor { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px; border-radius: 20px; border: 0; background: var(--card); box-shadow: inset 0 0 0 2px var(--line-2); text-align: center; font-size: 14px; }
.decor.on { box-shadow: inset 0 0 0 3px var(--ink); }
.decor.locked { opacity: .55; }
.decor .swatch { width: 100%; height: 56px; border-radius: 14px; display: grid; place-items: center; }

/* ==========================================================================
   PARENT — quiet ledger: white surfaces, hairlines, compact type, ink actions
   ========================================================================== */
.pshell { display: grid; height: 100%; grid-template-rows: auto 1fr auto; grid-template-areas: "top" "main" "nav"; background: var(--stone); }
.ptop { grid-area: top; display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--surface); border-bottom: 1px solid var(--hair); }
.pmain { grid-area: main; min-height: 0; }
.pnav { grid-area: nav; display: flex; justify-content: space-around; padding: 6px 6px calc(8px + env(safe-area-inset-bottom, 0px)); background: var(--surface); border-top: 1px solid var(--hair); }
.pnav-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border: 0; background: none; border-radius: 10px; color: var(--ink-3); font-size: 12px; font-weight: 600; min-height: 52px; position: relative; }
.pnav-item.on { color: var(--ink); }
.pnav-item.on .ic { color: var(--sky-d); }
.pnav-item .pdot { position: absolute; top: 4px; inset-inline-end: calc(50% - 22px); width: 8px; height: 8px; border-radius: 50%; background: var(--ap-d); }
.pnav-brand, .pnav-sec, .pnav-foot, .pnav-only-desk { display: none; }
@container app (min-width: 900px) {
  .pshell { grid-template-columns: 236px 1fr; grid-template-rows: auto 1fr; grid-template-areas: "nav top" "nav main"; }
  .pnav { flex-direction: column; justify-content: flex-start; align-items: stretch; gap: 2px; padding: 18px 12px; border-top: 0; border-inline-end: 0; box-shadow: -1px 0 0 var(--hair); }
  .pnav-brand { display: block; padding: 2px 8px 18px; }
  .pnav-sec { display: block; font-size: 11.5px; font-weight: 600; color: var(--ink-3); padding: 14px 10px 6px; letter-spacing: .03em; }
  .pnav-item { flex: none; flex-direction: row; gap: 10px; min-height: 40px; padding: 0 10px; font-size: 14.5px; font-weight: 500; justify-content: flex-start; }
  .pnav-item.on { background: var(--stone); font-weight: 600; }
  .pnav-item:hover:not(.on) { background: var(--hair-2); }
  .pnav-item .pdot { position: static; margin-inline-start: auto; }
  .pnav-only-desk { display: flex; }
  .pnav-foot { display: flex; flex-direction: column; gap: 8px; margin-top: auto; padding-top: 16px; }
  .ptop { padding: 14px 28px; }
  .ptop .ptop-brand { display: none; }
}
.ptitle { flex: 1; min-width: 0; }
.ptitle b { display: block; font-size: 16px; }
.ptitle span { font-size: 12.5px; color: var(--ink-3); }
.pgrid { display: grid; gap: 16px; }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@container app (min-width: 900px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi { padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.kpi .k-label { font-size: 12.5px; color: var(--ink-3); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.kpi .k-val { font-size: 28px; font-weight: 600; line-height: 1.25; font-variant-numeric: tabular-nums; }
.kpi .k-val small { font-size: 14px; color: var(--ink-3); font-weight: 500; }
.kpi .k-foot { font-size: 12.5px; color: var(--ink-3); }
.kids { display: grid; gap: 12px; }
@container app (min-width: 700px) { .kids { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kid { display: flex; flex-direction: column; gap: 14px; padding: 18px; }
.kid-head { display: flex; align-items: center; gap: 12px; }
.kid-head b { font-size: 17px; }
.kid-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kid-stats > div { padding: 10px 12px; border-radius: 10px; background: var(--stone); }
.kid-stats b { display: block; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.kid-stats span { font-size: 11.5px; color: var(--ink-3); display: block; line-height: 1.45; }
.kid-stats .st { vertical-align: -1px; margin-inline-end: 3px; }
.two-col { display: grid; gap: 16px; }
@container app (min-width: 1000px) { .two-col { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; } }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.sec-head h2 { font-size: 16px; font-weight: 600; }
.sec-head .tiny { color: var(--ink-3); }
.alerts { display: flex; flex-direction: column; }
.alert { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.alert + .alert { border-top: 1px solid var(--hair-2); }
.alert .a-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.alert b { font-size: 14.5px; font-weight: 600; display: block; }
.alert span { font-size: 12.5px; color: var(--ink-3); }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { font-family: var(--f-ui); fill: var(--ink-3); font-size: 11px; }
.chart .grid { stroke: var(--hair-2); stroke-width: 1; }
.chart-legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--ink-2); flex-wrap: wrap; }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 6px; vertical-align: -1px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: start; font-weight: 500; font-size: 12.5px; color: var(--ink-3); padding: 8px 10px; border-bottom: 1px solid var(--hair); white-space: nowrap; }
.table td { padding: 11px 10px; border-bottom: 1px solid var(--hair-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; max-width: 100%; }
.mastery { display: flex; flex-direction: column; }
.m-row { display: grid; grid-template-columns: 112px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; }
.m-row + .m-row { border-top: 1px solid var(--hair-2); }
.m-row .m-name b { display: block; font-size: 14.5px; }
.m-row .m-name span { font-size: 12px; color: var(--ink-3); }
.cells { display: flex; flex-wrap: wrap; gap: 4px; }
.cell { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-size: 10px; font-weight: 600; color: var(--ink-3); background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair); position: relative; }
.cell.c-learning { background: repeating-linear-gradient(-45deg, var(--sky-50) 0 3px, #fff 3px 6px); box-shadow: inset 0 0 0 1.5px var(--sky-d); color: var(--sky-d); }
.cell.c-memorized { background: var(--li-50); box-shadow: inset 0 0 0 1.5px var(--li-d); color: var(--li-d); }
.cell.c-verified { background: var(--em-d); color: #fff; box-shadow: none; }
.cell.c-needs { background: var(--rose-50); box-shadow: inset 0 0 0 1.5px var(--rose-d); color: var(--rose-d); }
.cell.due::after { content: ""; position: absolute; top: -3px; inset-inline-end: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--ap-d); box-shadow: 0 0 0 2px var(--surface); }
.m-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 12.5px; color: var(--ink-2); }
.m-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.m-legend .cell { width: 16px; height: 16px; border-radius: 4px; }
.split-bars { display: flex; flex-direction: column; gap: 10px; }
.split-bars .sb { display: grid; grid-template-columns: 1fr 44px; gap: 4px 10px; align-items: center; font-size: 13.5px; }
.split-bars .sb .st { grid-column: 1 / -1; white-space: normal; }
@container app (min-width: 700px) { .split-bars .sb { grid-template-columns: 210px 1fr 44px; } .split-bars .sb .st { grid-column: auto; } }
.split-bars .sb-track { height: 10px; border-radius: 10px; background: var(--hair-2); overflow: hidden; }
.split-bars .sb-track i { display: block; height: 100%; border-radius: 10px; }
.rec-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; flex-wrap: wrap; }
.rec-row + .rec-row { border-top: 1px solid var(--hair-2); }
.rec-row .r-wave { display: flex; align-items: center; gap: 2px; height: 26px; width: 120px; flex: none; }
.rec-row .r-wave i { flex: 1; border-radius: 2px; background: var(--hair); }
.rec-row .r-wave i.p { background: var(--li-d); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--hair); overflow-x: auto; scrollbar-width: none; }
.tabs button { flex: none; height: 42px; padding: 0 14px; border: 0; background: none; font-weight: 500; font-size: 14.5px; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }
.child-switch { display: inline-flex; gap: 4px; padding: 3px; border-radius: 12px; background: var(--hair-2); max-width: 100%; overflow-x: auto; }
.child-switch button { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px 0 6px; border-radius: 9px; border: 0; background: none; font-weight: 500; font-size: 14px; white-space: nowrap; }
.child-switch button.on { background: var(--surface); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.child-switch button.all { padding: 0 12px; }
.pill-state { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.pill-state.locked { background: var(--hair-2); color: var(--ink-2); }
.pill-state.eligible { background: var(--ap-50); color: var(--ap-d); }
.pill-state.requested { background: var(--li-50); color: var(--li-d); }
.pill-state.delivered { background: var(--em-50); color: var(--em-d); }
.pill-state.ok { background: var(--em-50); color: var(--em-d); }
.pill-state.review { background: var(--gold-50); color: var(--gold-d); }
.pill-state.draft { background: var(--hair-2); color: var(--ink-2); }
.pill-state.new { background: var(--sky-50); color: var(--sky-d); }
.pill-state.practice { background: var(--rose-50); color: var(--rose-d); }
.preview-kid { border-radius: 18px; padding: 14px; background: var(--paper); border: 1px dashed var(--line); }
.verify-list { display: flex; flex-direction: column; gap: 8px; }
.verify-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--hair); background: var(--surface); text-align: start; border: 0; width: 100%; }
.verify-item.on { box-shadow: inset 0 0 0 2px var(--em-d); background: var(--em-50); }
.verify-item .quran { font-size: 20px; line-height: 1.9; }
.cbox { width: 22px; height: 22px; border-radius: 6px; box-shadow: inset 0 0 0 2px var(--hair); display: grid; place-items: center; flex: none; background: var(--surface); color: #fff; }
.on > .cbox, .cbox.on { background: var(--em-d); box-shadow: none; }

/* ---------- admin ---------- */
.admin-badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; background: var(--ink); color: #fff; font-size: 11.5px; font-weight: 600; }

/* ---------- public: landing, auth, onboarding ---------- */
.pub { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; background: var(--paper); }
.pub-nav { display: flex; align-items: center; gap: 12px; padding: 14px 16px; max-width: 1200px; margin-inline: auto; }
.pub-nav .links { display: none; gap: 4px; margin-inline-start: auto; }
@container app (min-width: 900px) { .pub-nav { padding: 22px 40px; } .pub-nav .links { display: flex; } }
.landing-hero { display: grid; gap: 28px; padding: 12px 16px 36px; max-width: 1200px; margin-inline: auto; align-items: center; }
@container app (min-width: 900px) { .landing-hero { grid-template-columns: 1fr 1.05fr; padding: 24px 40px 64px; gap: 48px; } }
.landing-hero h1 { font-family: var(--f-display); font-weight: 700; font-size: 44px; line-height: 1.18; }
@container app (min-width: 900px) { .landing-hero h1 { font-size: 64px; } }
.landing-hero .lede { font-size: 18px; color: var(--ink-2); max-width: 36ch; }
.landing-hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.book { position: relative; aspect-ratio: 1.36; max-width: 100%; }
.book .spread { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-radius: 22px; background: var(--card); box-shadow: 0 30px 60px -30px rgba(34, 48, 74, .55), 0 0 0 1px var(--line-2); padding: 14px; transform: rotate(-1.6deg); }
.book .leaf { position: relative; border-radius: 12px; overflow: hidden; background: var(--paper); }
.book .leaf .scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.book .leaf.r { margin-inline-start: 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 14px; text-align: center; background: var(--parchment); }
.book .leaf.l { margin-inline-end: 6px; }
.book .spine { position: absolute; top: 14px; bottom: 14px; left: 50%; width: 2px; background: linear-gradient(var(--line), var(--paper-3), var(--line)); }
.book .float-chip { position: absolute; z-index: 2; box-shadow: var(--sh-float); }
.how { max-width: 1200px; margin-inline: auto; padding: 8px 16px 40px; display: grid; gap: 14px; }
@container app (min-width: 900px) { .how { grid-template-columns: repeat(3, 1fr); padding: 8px 40px 56px; gap: 20px; } }
.how-card { padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.how-card .hn { width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; font-weight: 700; }
.how-card h3 { font-size: 20px; }
.how-card p { color: var(--ink-2); font-size: 15px; }
.trust { max-width: 1200px; margin-inline: auto; padding: 0 16px 48px; }
@container app (min-width: 900px) { .trust { padding: 0 40px 72px; } }
.trust-inner { border-radius: var(--r-xl); background: var(--ink); color: var(--paper); padding: 26px 22px; display: grid; gap: 18px; }
@container app (min-width: 900px) { .trust-inner { grid-template-columns: 1fr 1.6fr; padding: 40px; gap: 40px; } }
.trust-inner h2 { font-family: var(--f-display); font-weight: 600; font-size: 30px; }
.trust-list { display: grid; gap: 12px; }
@container app (min-width: 700px) { .trust-list { grid-template-columns: 1fr 1fr; } }
.trust-list > div { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: #DCE2EE; }
.trust-list .ic { color: var(--gold); flex: none; margin-top: 2px; }
.pub-foot { max-width: 1200px; margin-inline: auto; padding: 0 16px 40px; display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; color: var(--ink-3); font-size: 14px; }
@container app (min-width: 900px) { .pub-foot { padding: 0 40px 48px; } }
.auth { min-height: 100%; display: grid; place-items: center; padding: 20px 16px 40px; }
.auth-card { width: min(480px, 100%); display: flex; flex-direction: column; gap: 16px; padding: 24px 20px; }
@container app (min-width: 700px) { .auth-card { padding: 32px; } }
.auth-split { display: grid; width: 100%; max-width: 1100px; gap: 28px; align-items: center; }
@container app (min-width: 1000px) { .auth-split { grid-template-columns: 1fr 480px; } .auth-aside { display: flex !important; } }
.auth-aside { display: none; flex-direction: column; gap: 18px; padding: 8px 20px; }
.google-btn { display: flex; align-items: center; justify-content: center; gap: 12px; height: 56px; border-radius: 16px; border: 0; background: #fff; box-shadow: inset 0 0 0 2px var(--line-2); font-weight: 600; font-size: 16.5px; width: 100%; }
.google-btn .g { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; font-family: system-ui, sans-serif; font-weight: 700; font-size: 15px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.consent { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 16px; background: var(--paper); border: 0; text-align: start; width: 100%; box-shadow: inset 0 0 0 2px var(--line-2); }
.consent.on { box-shadow: inset 0 0 0 2px var(--em-d); background: var(--em-50); }
.consent b { display: block; font-size: 15.5px; }
.consent span { font-size: 13.5px; color: var(--ink-2); line-height: 1.55; }
.onb { min-height: 100%; display: flex; flex-direction: column; }
.onb-top { display: flex; align-items: center; gap: 12px; padding: 12px 16px; max-width: 980px; width: 100%; margin-inline: auto; }
.onb-steps { flex: 1; display: flex; gap: 6px; }
.onb-steps i { flex: 1; height: 6px; border-radius: 6px; background: var(--line-2); }
.onb-steps i.on { background: var(--ink); }
.onb-body { flex: 1; width: 100%; max-width: 980px; margin-inline: auto; padding: 8px 16px 24px; display: flex; flex-direction: column; gap: 22px; }
.onb-body h1 { font-family: var(--f-display); font-weight: 600; font-size: 30px; }
@container app (min-width: 900px) { .onb-body { padding: 24px 40px 40px; } .onb-body h1 { font-size: 40px; } .onb-top { padding: 20px 40px; } }
.onb-foot { position: sticky; bottom: 0; padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(to top, var(--paper) 75%, rgba(251, 245, 234, 0)); display: flex; gap: 10px; justify-content: center; }
.onb-foot .btn { width: min(520px, 100%); }
.av-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@container app (min-width: 700px) { .av-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.av-pick { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: 20px; border: 0; background: var(--card); box-shadow: inset 0 0 0 2px var(--line-2); font-size: 13px; font-weight: 600; }
.av-pick.on { box-shadow: inset 0 0 0 3px var(--ink); }
.color-dots { display: flex; gap: 10px; flex-wrap: wrap; }
.color-dot { width: 44px; height: 44px; border-radius: 50%; border: 0; box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .7); }
.color-dot.on { box-shadow: 0 0 0 3px var(--paper), 0 0 0 6px var(--ink); }
.two-up { display: grid; gap: 18px; }
@container app (min-width: 900px) { .two-up { grid-template-columns: 1fr 1fr; gap: 28px; } }
.who { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; padding: 32px 16px; text-align: center; }
.who-grid { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.who-card { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 22px; border-radius: 26px; border: 0; background: var(--card); box-shadow: var(--sh-paper); font-size: 19px; font-weight: 700; min-width: 140px; }

/* ---------- meta pages: brand board, sitemap, notes ---------- */
.meta-shell { position: absolute; inset: 0; overflow-y: auto; background: var(--stone); }
.meta-top { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: rgba(244, 243, 239, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--hair); flex-wrap: wrap; }
.meta-tabs { display: flex; gap: 4px; overflow-x: auto; }
.meta-body { max-width: 1180px; margin-inline: auto; padding: 24px 16px 64px; display: flex; flex-direction: column; gap: 28px; }
@container app (min-width: 900px) { .meta-body { padding: 36px 40px 80px; } }
.meta-body h1 { font-size: 30px; }
.meta-body h2 { font-size: 20px; margin-bottom: 12px; }
.meta-body p, .meta-body li { font-size: 15px; color: var(--ink-2); line-height: 1.75; }
.meta-body ul { margin: 0; padding-inline-start: 20px; }
.swatches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@container app (min-width: 700px) { .swatches { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@container app (min-width: 1100px) { .swatches { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.swatch-card { border-radius: 14px; overflow: hidden; background: var(--surface); border: 1px solid var(--hair); font-size: 12.5px; }
.swatch-card .sw { height: 64px; }
.swatch-card div:last-child { padding: 8px 10px; line-height: 1.5; }
.swatch-card code { font-size: 11.5px; color: var(--ink-3); direction: ltr; display: inline-block; }
.type-row { display: grid; gap: 4px; padding: 14px 0; border-bottom: 1px solid var(--hair-2); }
.type-row code { font-size: 12px; color: var(--ink-3); direction: ltr; text-align: start; }
.tok-table td code { font-size: 12.5px; direction: ltr; display: inline-block; }
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.flow .node { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--hair); background: var(--surface); font-size: 13.5px; font-weight: 500; }
.flow button.node:hover { border-color: var(--ink); }
.flow .node.k { background: var(--ap-50); border-color: #F2CDAA; }
.flow .node.p { background: var(--sky-50); border-color: #C6DFF0; }
.flow .node.a { background: var(--hair-2); }
.flow .arr { color: var(--ink-3); }
.sitemap { display: grid; gap: 14px; }
@container app (min-width: 900px) { .sitemap { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.sm-col { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.sm-col h3 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.sm-col button { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--hair-2); background: var(--stone); font-size: 13.5px; text-align: start; }
.sm-col button:hover { border-color: var(--ink); background: var(--surface); }
.sm-col code { font-size: 11px; color: var(--ink-3); direction: ltr; }
.log { display: flex; flex-direction: column; }
.log > div { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--hair-2); }
.log b { display: block; font-size: 15px; color: var(--ink); }
.log .ln { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--hair-2); font-size: 12px; font-weight: 600; }

/* ---------- prototype toolbar (not part of the product UI) ---------- */
.proto-fab { position: fixed; z-index: 100; left: 0; top: 50%; transform: translateY(-50%); padding: 12px 7px; border-radius: 0 14px 14px 0; border: 0; background: var(--proto); color: var(--proto-fg); font-size: 12.5px; font-weight: 600; writing-mode: vertical-rl; display: flex; align-items: center; gap: 8px; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .6); opacity: .9; }
.proto-fab:hover { opacity: 1; }
.proto-fab .pdot { width: 8px; height: 8px; border-radius: 50%; background: #F5A866; }
.proto-panel { position: fixed; z-index: 101; left: 12px; bottom: 12px; top: 12px; width: min(380px, calc(100vw - 24px)); background: var(--proto); color: var(--proto-fg); border-radius: 20px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6); display: flex; flex-direction: column; overflow: hidden; font-size: 14px; animation: pop .2s var(--ease) both; }
.proto-panel header { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.proto-panel header b { flex: 1; font-size: 15px; }
.proto-panel .pp-body { overflow-y: auto; padding: 12px 16px 20px; display: flex; flex-direction: column; gap: 16px; }
.proto-panel h4 { font-size: 11.5px; letter-spacing: .06em; color: #9AA3B8; font-weight: 600; margin-bottom: 8px; }
.pp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pp-grid button, .pp-btn { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 10px; border-radius: 10px; border: 0; background: var(--proto-2); color: var(--proto-fg); font-size: 13px; text-align: start; line-height: 1.35; }
.pp-grid button:hover, .pp-btn:hover { background: #3A4460; }
.pp-grid button.on, .pp-btn.on { background: #F5A866; color: #1D2333; font-weight: 600; }
.pp-grid button small { margin-inline-start: auto; color: #8F99B0; font-size: 10.5px; direction: ltr; }
.pp-grid button.on small { color: #4A3A20; }
.pp-sw { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; }
.pp-sw .toggle { width: 44px; height: 26px; background: #3A4460; }
.pp-sw .toggle::after { width: 20px; height: 20px; }
.pp-sw .toggle.on { background: #F5A866; }
.pp-sw .toggle.on::after { inset-inline-start: 21px; }
.pp-note { font-size: 12.5px; color: #9AA3B8; line-height: 1.6; }
.icon-btn.proto { background: var(--proto-2); color: var(--proto-fg); box-shadow: none; width: 34px; height: 34px; border-radius: 10px; }

/* ---------- motion preferences ---------- */
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* ---------- small utilities ---------- */
#root { height: 100%; }
.scene.abs { position: absolute; inset: 0; width: 100%; height: 100%; }
.ic.flip { transform: rotate(180deg); }
.fav-on { color: var(--rose-d) !important; }
.fav-on svg path { fill: currentColor; }
.gold-ic { color: var(--gold); }
.s-body > .s-main { flex: 1 0 auto; }
.push { margin-inline-start: auto; }
@container app (min-width: 900px) { .pub-nav .push { margin-inline-start: 0; } }
@container app (max-width: 560px) {
  .ptop { flex-wrap: wrap; }
  .ptop .ptitle span { display: none; }
  .ptop .hide-narrow { display: none; }
  .ptop .ptop-exit { padding: 0 10px; }
}
@container app (max-width: 640px) {
  .gift-table thead { display: none; }
  .gift-table, .gift-table tbody, .gift-table tr, .gift-table td { display: block; width: 100%; }
  .gift-table tr { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 12px 0; border-bottom: 1px solid var(--hair-2); }
  .gift-table tr:last-child { border-bottom: 0; }
  .gift-table td { border: 0; padding: 0; width: auto; }
  .gift-table td:nth-child(2) { grid-column: 1; color: var(--ink-3); }
  .gift-table td:nth-child(3) { grid-column: 1 / -1; }
  .gift-table td:nth-child(4) { grid-row: 1; grid-column: 2; }
  .gift-table td:nth-child(5) { grid-row: 2; grid-column: 2; justify-self: end; }
}

/* ==========================================================================
   v2 additions: photo avatars, journey trail, daily chest, one-screen session, big UI
   ========================================================================== */
.avatar.photo { position: relative; display: inline-block; flex: none; border-radius: 50%; background: var(--av-fill); box-shadow: 0 0 0 3px var(--av-ring), 0 0 0 6px #fff; }
.avatar.photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.avatar.photo .av-badge { position: absolute; bottom: -6%; inset-inline-end: -8%; }
.photo-pick { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.speak-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 12px; border: 0; background: var(--sky-50); color: var(--sky-d); font-weight: 600; font-size: 14px; }
.hero .page-tag { background: rgba(255, 255, 255, .92); }
.hero-child { position: absolute; top: 54px; inset-inline-start: 14px; filter: drop-shadow(0 6px 10px rgba(30, 43, 74, .3)); animation: bob 3.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-5px); } }
.hero-body h2 { font-size: 28px; font-family: var(--f-ui); }
@container app (min-width: 1100px) { .hero-body h2 { font-size: 34px; } }
/* daily chest */
.chest-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r-lg); background: linear-gradient(135deg, #FFF3D1, #FFFFFF 60%); box-shadow: inset 0 0 0 2px #FFE49A, var(--sh-paper); }
.chest-tasks { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; min-width: 0; }
.task { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border-radius: 16px; border: 0; background: #fff; box-shadow: inset 0 0 0 2px var(--line-2); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.task .task-ic { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--paper-2); color: var(--ink-3); }
.task.done { color: var(--em-d); box-shadow: inset 0 0 0 2px var(--em); }
.task.done .task-ic { background: var(--em); color: #fff; }
.chest { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 84px; min-height: 84px; border-radius: 20px; border: 0; background: #fff; box-shadow: inset 0 0 0 2px #FFE49A; color: var(--gold-d); font-size: 12.5px; }
.chest b { font-size: 12.5px; }
.chest:disabled { cursor: default; opacity: .85; }
.chest.ready { background: var(--gold); color: #4A3306; box-shadow: 0 4px 0 #D9A21A, 0 0 0 4px #FFF1BF; animation: chestPulse 1.4s ease-in-out infinite; cursor: pointer; }
.chest.open { background: var(--em-50); color: var(--em-d); box-shadow: inset 0 0 0 2px var(--em); }
@keyframes chestPulse { 50% { transform: scale(1.04); } }
.chest-open { display: grid; place-items: center; padding: 10px 0; }
.chest-glow { width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, #FFF1BF, var(--gold) 70%); color: #4A3306; animation: pop .5s var(--ease) both; }
/* journey trail */
@keyframes curPulse { 50% { box-shadow: 0 0 0 4px var(--ap), 0 0 0 16px rgba(255, 159, 67, .16), 0 10px 20px -10px rgba(30, 43, 74, .6); } }
/* one-screen session */
.ayah-chips { display: flex; gap: 6px; padding: 6px 16px 10px; overflow-x: auto; scrollbar-width: none; flex: none; }
.achip { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; box-shadow: inset 0 0 0 2px var(--line-2); font-weight: 700; font-size: 14px; color: var(--ink-3); }
.achip.c-learning { box-shadow: inset 0 0 0 2px var(--sky); color: var(--sky-d); }
.achip.c-memorized, .achip.c-due { background: var(--li-50); box-shadow: inset 0 0 0 2px var(--li); color: var(--li-d); }
.achip.c-verified { background: var(--em); color: #fff; box-shadow: none; }
.achip.c-needs { box-shadow: inset 0 0 0 2px var(--rose); color: var(--rose-d); }
.achip.on { background: var(--ap); color: var(--ink); box-shadow: 0 3px 0 var(--ap-edge); transform: scale(1.08); }
.achip.playing { box-shadow: 0 0 0 3px var(--sky-50), 0 3px 0 var(--ap-edge); }
.achip.out { opacity: .5; }
@container app (min-width: 1100px) { .ayah-chips { max-width: 1240px; margin-inline: auto; width: 100%; padding-inline: 32px; justify-content: center; flex-wrap: wrap; } }
.turn-bar { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 18px; background: var(--ap-50); }
.turn-ring.sm { width: 56px; height: 56px; flex: none; } .turn-ring.sm::before { inset: 6px; }
.act-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.act { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 124px; padding: 14px 10px; border-radius: 24px; border: 0; text-align: center; transition: transform var(--t-fast) var(--ease); }
.act:active { transform: translateY(3px); }
.act b { font-size: 20px; line-height: 1.2; }
.act small { font-size: 12.5px; opacity: .8; }
.act .act-ic { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .55); margin-bottom: 4px; }
.act.primary { background: var(--ap); color: #3A2208; box-shadow: 0 5px 0 var(--ap-edge), 0 14px 24px -14px rgba(194, 90, 18, .7); }
.act.primary.active { background: var(--ink); color: #fff; box-shadow: 0 5px 0 #0F1729; } .act.primary.active .act-ic { background: rgba(255, 255, 255, .15); }
.act.sky { background: var(--sky-50); color: var(--sky-d); box-shadow: inset 0 0 0 2px #BDE2FF, 0 5px 0 #BDE2FF; }
.act.sky.active { background: var(--sky-d); color: #fff; box-shadow: 0 5px 0 #154F85; } .act.sky.active .act-ic { background: rgba(255, 255, 255, .2); }
.act-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.session.simple .act-row { grid-template-columns: repeat(2, 1fr); }
.act-sm { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px 10px; border-radius: 18px; border: 0; background: #fff; box-shadow: inset 0 0 0 2px var(--line-2); font-weight: 600; font-size: 14px; color: var(--ink-2); }
.act-sm .act-sm-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; }
.act-sm-ic.rose { background: var(--rose-50); color: var(--rose-d); } .act-sm-ic.gold { background: var(--gold-50); color: var(--gold-d); } .act-sm-ic.sky { background: var(--sky-50); color: var(--sky-d); }
.act-sm.done { box-shadow: inset 0 0 0 2px var(--em); color: var(--em-d); } .act-sm.done .act-sm-ic { background: var(--em); color: #fff; }
.nudge-dot { position: absolute; top: -8px; inset-inline-end: -4px; padding: 2px 8px; border-radius: 8px; background: var(--gold); color: #4A3306; font-size: 11px; font-style: normal; font-weight: 700; }
.nudge { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 18px; background: var(--em-50); color: var(--ink-2); font-size: 15px; line-height: 1.5; animation: viewIn .3s var(--ease) both; }
.session.simple .act { min-height: 140px; } .session.simple .act b { font-size: 24px; } .session.simple .act small { display: none; }
.session.simple .verse-foot .chip { display: none; }
/* big UI: bigger type and targets for the very young and for elders */
.big-ui { font-size: 19px; --qs-ui: 1.15; }
.big-ui .btn { --bh: 56px; font-size: 18px; } .big-ui .btn.sm { --bh: 44px; font-size: 16px; } .big-ui .btn.xs { --bh: 38px; font-size: 15px; }
.big-ui .btn.lg { --bh: 66px; font-size: 21px; } .big-ui .btn.xl { --bh: 78px; font-size: 25px; }
.big-ui .act { min-height: 148px; } .big-ui .act b { font-size: 24px; } .big-ui .act small { font-size: 14px; }
.big-ui .act-sm { font-size: 16px; } .big-ui .act-sm .act-sm-ic { width: 52px; height: 52px; }
.big-ui .achip { width: 48px; height: 48px; font-size: 17px; }
.big-ui .hint-btn { height: 54px; font-size: 17px; } .big-ui .chip { height: 34px; font-size: 15px; }
.big-ui .nav-item { font-size: 15px; } .big-ui .gate h3 { font-size: 24px; } .big-ui .gate p { font-size: 16px; }
.big-ui .task { font-size: 15px; } .big-ui .big-ui .mode-parent, .big-ui.mode-parent { font-size: 17px; }

/* ==========================================================================
   v3: the child's world — a side-scrolling railway journey, character, HUD, backpack, heroes
   ========================================================================== */
.avatar.kidhead { display: inline-grid; place-items: center; border-radius: 50%; overflow: hidden; flex: none; }
.avatar.kidhead svg { width: 100%; height: 100%; }
.kid .kid-arm { transform-origin: 49px 46px; animation: wave 1.8s ease-in-out infinite; }
@keyframes wave { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-14deg); } }
.home-world { position: relative; height: 100%; min-height: 0; --wbar-h: 92px; }
.home-world > .rail-wrap { position: absolute; inset: 0; }
.rail-wrap { position: relative; flex: 1; min-height: 300px; overflow: hidden; }
.rail { position: absolute; inset: 0; overflow-x: auto; overflow-y: hidden; direction: ltr; scrollbar-width: none; overscroll-behavior-x: contain; }
.rail::-webkit-scrollbar { display: none; }
.rail-strip { position: relative; }
.rail-svg { position: absolute; inset: 0; display: block; }
.rst { position: absolute; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; }
.rst .rpost { width: 6px; height: var(--plat); margin-top: -4px; background: #8A5A3A; border-radius: 3px; order: 2; }
.rst .wsign { order: 1; position: relative; z-index: 2; }
.rkid { position: absolute; top: calc(var(--plat) - 4px); right: calc(50% + 46px); transform: translateY(-100%); display: flex; flex-direction: column; align-items: center; z-index: 3; animation: bob 3.2s ease-in-out infinite; }
.rtrain { position: absolute; top: calc(var(--plat) + 52px); left: calc(50% - 20px); z-index: 2; }
.rtrain .train { display: block; }
.wsign { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; min-width: 170px; padding: 8px 12px 8px 10px; border: 0; border-radius: 22px; background: #fff; box-shadow: 0 0 0 3px #FFF4D6, 0 10px 20px -12px rgba(30, 43, 74, .6); text-align: start; transition: transform var(--t-fast) var(--ease); direction: rtl; }
.wsign:hover { transform: translateY(-2px); }
.wsign .wnum { grid-row: 1 / span 2; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); color: var(--ink-2); font-weight: 700; font-size: 15px; box-shadow: inset 0 0 0 2px var(--line); }
.wsign .wname { font-size: 20px; line-height: 1.4; color: var(--ink); white-space: nowrap; }
.wsign .wstars { display: inline-flex; gap: 2px; color: var(--line); }
.wsign .wstars .ic.on, .pick .wstars .ic.on { color: var(--gold); fill: var(--gold); }
.wsign .wmeta { grid-column: 2; font-size: 11.5px; color: var(--ink-3); margin-inline-start: 58px; margin-top: -16px; }
.rst.cur .wsign { box-shadow: 0 0 0 4px var(--ap), 0 0 0 10px rgba(255, 159, 67, .25), 0 14px 26px -12px rgba(30, 43, 74, .6); }
.rst.cur .wsign .wnum { background: var(--ap); color: #3A2208; box-shadow: none; }
.rst.gold .wsign { box-shadow: 0 0 0 3px var(--gold), 0 10px 20px -12px rgba(30, 43, 74, .6); }
.rst.gold .wsign .wnum { background: var(--gold); color: #4A3306; box-shadow: none; }
.wkid-tip { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 10px; background: #fff; color: var(--ap-d); box-shadow: 0 4px 10px -6px rgba(0, 0, 0, .4); margin-bottom: 2px; white-space: nowrap; }
.rmile { position: absolute; transform: translateX(-50%) translateY(-100%); display: flex; flex-direction: column; align-items: center; direction: rtl; }
.rmile .wpost { width: 6px; height: 40px; background: #8A5A3A; border-radius: 3px; }
.rmile .wflag { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 10px; background: #FFF4D6; color: var(--ink-2); font-size: 13px; font-weight: 700; box-shadow: 0 6px 12px -8px rgba(0, 0, 0, .5); white-space: nowrap; }
.rmile.done .wflag { background: var(--em); color: #fff; }
.rsign-start { position: absolute; transform: translate(-50%, -100%); display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 12px; background: #fff; color: var(--ink-2); font-size: 13px; font-weight: 700; box-shadow: var(--sh-paper); white-space: nowrap; direction: rtl; }
.rsign-end { position: absolute; transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center; gap: 3px; direction: rtl; }
.gate-sign { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 10px; background: #8A5A3A; color: #FFF1BF; font-weight: 700; font-size: 13px; white-space: nowrap; box-shadow: 0 4px 0 #5E3A22; }
.gate-sub { font-size: 11px; color: #fff; background: rgba(30, 43, 74, .45); padding: 2px 8px; border-radius: 8px; white-space: nowrap; }
.rail-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(255, 255, 255, .9); color: var(--ink); box-shadow: var(--sh-paper); z-index: 4; }
.rail-nav.prev { right: 10px; } .rail-nav.next { left: 10px; }
.rail-here { position: absolute; top: 10px; inset-inline-start: 12px; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .92); color: var(--ap-d); font-weight: 700; font-size: 13px; box-shadow: var(--sh-paper); z-index: 4; }
.rail-wrap.night .wsign { background: #FFFBF0; }
/* discoveries */
.poi { position: absolute; transform: translate(-50%, -50%); border: 0; background: none; padding: 0; cursor: pointer; z-index: 2; }
.poi .poi-glow { display: block; width: 64px; height: 64px; border-radius: 50%; background: rgba(255, 255, 255, .0); box-shadow: 0 0 0 0 rgba(255, 255, 255, .5); animation: poiPulse 2.6s ease-in-out infinite; }
.poi.poi-sky .poi-glow { width: 70px; height: 70px; }
@keyframes poiPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); } 50% { box-shadow: 0 0 0 10px rgba(255, 255, 255, .28); } }
.poi.found .poi-glow { animation: none; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .5); }
.poi .poi-tip { position: absolute; top: calc(100% + 2px); left: 50%; transform: translateX(-50%); font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 8px; background: rgba(255, 255, 255, .9); color: var(--ink-2); white-space: nowrap; opacity: 0; transition: opacity var(--t-fast); pointer-events: none; }
.poi:hover .poi-tip, .poi:focus-visible .poi-tip, .poi.found .poi-tip { opacity: 1; }
.poi-ic.big { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--sky-50); color: var(--sky-d); flex: none; }
.reflect-head { display: flex; align-items: center; gap: 14px; }
.reflect-head h3 { font-size: 20px; }
.reflect-verse { font-size: 26px; text-align: center; padding: 12px 14px; border-radius: 18px; background: var(--parchment); box-shadow: inset 0 0 0 1px var(--line-2); }
/* HUD */
.whud { position: absolute; top: 0; left: 0; right: 0; z-index: 6; padding: 8px 10px 8px; display: flex; flex-direction: column; gap: 6px; pointer-events: none; background: linear-gradient(to bottom, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0)); }
.whud > * { pointer-events: auto; }
.whud-card { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 20px; background: rgba(255, 255, 255, .94); box-shadow: var(--sh-paper); backdrop-filter: blur(6px); }
.whud-name { display: block; font-size: 17px; line-height: 1.2; }
.whud-prog { display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.wtools { display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 12px; border-radius: 16px; border: 0; background: var(--em-d); color: #fff; font-weight: 700; font-size: 14.5px; box-shadow: 0 4px 0 #0F5E40; }
.whud-row { display: flex; gap: 8px; align-items: center; pointer-events: none; }
.whud-row > * { pointer-events: auto; }
.wrank { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 14px; border: 0; background: rgba(255, 255, 255, .92); font-weight: 700; font-size: 13.5px; color: var(--em-d); box-shadow: var(--sh-paper); }
.wrank-bar { width: 56px; height: 6px; border-radius: 6px; background: var(--em-50); overflow: hidden; display: inline-block; }
.wrank-bar b { display: block; height: 100%; background: var(--em); border-radius: 6px; }
.wchest { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: 14px; border: 0; background: rgba(255, 255, 255, .92); color: var(--gold-d); font-weight: 700; font-size: 13.5px; box-shadow: var(--sh-paper); }
.wchest.ready { background: var(--gold); color: #4A3306; animation: chestPulse 1.4s ease-in-out infinite; }
.wchest.open { background: var(--em-50); color: var(--em-d); }
.hadith { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 36px; padding: 4px 12px; border: 0; border-radius: 12px; background: rgba(23, 140, 94, .92); color: #fff; font-size: 13px; font-weight: 600; line-height: 1.4; text-align: start; cursor: pointer; }
.hadith .hadith-t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hadith-card { padding: 12px 14px; border-radius: 14px; background: var(--paper); font-size: 16px; line-height: 1.8; }
.hadith-card.today { background: var(--em-50); box-shadow: inset 0 0 0 2px var(--em); }
.hadith-card small { display: block; color: var(--ink-3); font-size: 12.5px; }
.hadith .hadith-mark { font-size: 20px; flex: none; }
.hadith small { font-size: 11px; opacity: .8; white-space: nowrap; margin-inline-start: auto; }
.wbar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; display: flex; gap: 8px; padding: 14px 12px 12px; background: linear-gradient(to top, rgba(255, 248, 234, .96) 60%, rgba(255, 248, 234, 0)); }
.wcta { flex: 1; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 6px 8px 6px 6px; border: 0; border-radius: 34px; background: var(--em-d); color: #fff; text-align: start; box-shadow: 0 5px 0 #0F5E40, 0 14px 26px -14px rgba(15, 94, 64, .8); }
.wcta:active { transform: translateY(3px); box-shadow: 0 2px 0 #0F5E40; }
.wcta .wcta-num { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--em-d); font-weight: 700; font-size: 18px; flex: none; }
.wcta small { display: block; font-size: 12px; opacity: .85; }
.wcta b { display: block; font-size: 22px; line-height: 1.3; }
.wcta .wcta-go { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: #3A2208; flex: none; }
.wjump { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 84px; padding: 0 10px; border: 0; border-radius: 22px; background: #fff; color: var(--em-d); font-weight: 700; font-size: 13px; box-shadow: inset 0 0 0 2px var(--em-50), 0 4px 0 var(--em-50); }
@container app (min-width: 700px) {
  .whud { padding: 14px 20px 0; }
  .hadith { font-size: 15px; }
  .wbar { padding: 12px 20px 16px; justify-content: center; }
  .wcta { max-width: 560px; }
}
@container app (min-width: 900px) { .whud { inset-inline-start: 0; inset-inline-end: auto; width: min(100%, 640px); background: none; } .wsign .wname { font-size: 22px; } }
/* backpack */
.bp-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 18px; border: 0; background: var(--paper); box-shadow: inset 0 0 0 2px var(--line-2); text-align: start; width: 100%; }
.bp-item .bp-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.bp-item b { display: block; font-size: 16px; } .bp-item span span { font-size: 13px; color: var(--ink-3); }
/* me / character editor */
.me-grid { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; }
.me-preview { width: 120px; height: 160px; border-radius: 24px; background: var(--sky-grad); display: grid; place-items: end center; padding-bottom: 6px; }
.photo-pick.compact { gap: 10px; }
@container app (max-width: 420px) { .me-grid { grid-template-columns: 1fr; justify-items: center; } }
/* surah picker */
.pick-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; max-height: 52vh; overflow-y: auto; padding: 2px; }
@container app (min-width: 700px) { .pick-grid { grid-template-columns: repeat(3, 1fr); } }
.pick { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 64px; padding: 10px 8px; border: 0; border-radius: 18px; background: var(--em-50); color: var(--em-d); box-shadow: inset 0 0 0 2px #BDEFD6; }
.pick .quran { font-size: 19px; line-height: 1.5; } .pick .wstars { display: inline-flex; gap: 2px; color: #BDEFD6; }
.pick.cur { background: var(--ap-50); color: var(--ap-d); box-shadow: inset 0 0 0 2px var(--ap); }
.pick.gold { background: var(--gold-50); color: var(--gold-d); box-shadow: inset 0 0 0 2px var(--gold); }
/* heroes */
.hero-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 16px; }
.hero-row.me { background: var(--gold-50); box-shadow: inset 0 0 0 2px var(--gold); }
.hero-rank { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: var(--ink-3); background: var(--paper-2); flex: none; }
.hero-rank.gold { background: var(--gold); color: #4A3306; } .hero-rank.silver { background: #D9DDE6; color: #3C4457; } .hero-rank.bronze { background: #E3A878; color: #4A2A10; }
.hero-pts { font-weight: 700; color: var(--ap-d); font-size: 14px; white-space: nowrap; }

/* ---------- the 3D world (world3d.js): canvas + DOM labels projected over it ---------- */
.rail-wrap.w3 { background: linear-gradient(#6CC0F5, #D4ECFF); }
.w3-label.poi.visitor .poi-tip { opacity: 1; }
.rail-wrap.w3.night { background: linear-gradient(#0F1A36, #2E3F75); }
.w3-canvas { position: absolute; inset: 0; touch-action: pan-y; cursor: grab; }
.w3-canvas:active { cursor: grabbing; }
.w3-gl { display: block; width: 100% !important; height: 100% !important; }
.w3-overlay { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.w3-overlay > * { pointer-events: auto; }
.w3-label { position: absolute; left: 0; top: 0; will-change: transform; visibility: hidden; }
.w3-label.wkid-tip { font-size: 13px; padding: 4px 12px; }
.w3-label.rst { z-index: 2; }
.w3-label.rst.cur { z-index: 3; }
.w3-label.poi { z-index: 1; }
.rail-wrap .rail-nav { top: auto; bottom: calc(var(--wbar-h, 92px) + 10px); transform: none; }
.rail-wrap .rail-here { top: auto; bottom: calc(var(--wbar-h, 92px) + 15px); inset-inline-start: 62px; }
.rail-style { position: absolute; bottom: calc(var(--wbar-h, 92px) + 15px); inset-inline-end: 62px; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .92); color: var(--ink-2); font-weight: 700; font-size: 13px; box-shadow: var(--sh-paper); z-index: 5; }
.rail-wrap.night .rail-style { background: rgba(255, 251, 240, .92); }
.rail-wrap.w3 .wsign { min-width: 0; padding: 6px 10px 6px 8px; column-gap: 8px; }
.rail-wrap.w3 .wsign .wname { font-size: 17px; }
.rail-wrap.w3 .wsign .wnum { width: 32px; height: 32px; font-size: 13px; }
.rail-wrap.w3 .wsign .wmeta { margin-inline-start: 48px; margin-top: -14px; }
@container app (min-width: 900px) { .rail-wrap.w3 .wsign .wname { font-size: 19px; } }
.w3-loading { display: grid; place-items: center; background: linear-gradient(#6CC0F5, #D4ECFF); color: #fff; }
.w3-spin { display: flex; flex-direction: column; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; text-shadow: 0 1px 2px rgba(0, 0, 0, .25); animation: bob 1.6s ease-in-out infinite; }
.kid3d { margin-inline: auto; border-radius: 24px; background: radial-gradient(circle at 50% 80%, #FFE9C7, transparent 70%); }
.kid3d canvas { display: block; width: 100% !important; height: 100% !important; }
/* ---------- heroes in the world, the chest tip, the cartoon-from-photo option ---------- */
.hero-tag { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px 0 6px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .92); color: var(--ink); font-size: 12.5px; font-weight: 700; box-shadow: 0 4px 10px -6px rgba(0, 0, 0, .4); white-space: nowrap; z-index: 2; }
.hero-tag .num { font-size: 11px; color: var(--gold-d); background: var(--gold-50); padding: 1px 6px; border-radius: 8px; }
.chest-tip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 12px; background: var(--gold); color: #3A2208; font-weight: 800; font-size: 13px; box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .5); white-space: nowrap; animation: bob 1.4s ease-in-out infinite; z-index: 3; }
.toon-img { display: block; max-width: 100%; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(30, 43, 74, .25)); }
.toon-pick { border-radius: 18px; background: var(--paper); box-shadow: inset 0 0 0 2px var(--line-2); overflow: hidden; }
.toon-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; border: 0; background: none; text-align: start; color: var(--ink); }
.toon-head b { display: block; font-size: 15px; }
.toon-body { display: flex; flex-direction: column; gap: 12px; padding: 0 14px 14px; }
.toon-preview { display: flex; align-items: center; gap: 14px; padding: 10px; border-radius: 14px; background: var(--em-50); }
.toon-preview img { height: 120px; }
.toon-steps { margin: 0; padding-inline-start: 20px; display: flex; flex-direction: column; gap: 10px; font-size: 14.5px; }
.toon-steps li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.toon-steps li > span { flex: 1 1 220px; }
.toon-prompt summary { cursor: pointer; font-size: 13px; color: var(--ink-3); }
.toon-prompt p { margin-top: 6px; padding: 10px; border-radius: 10px; background: var(--surface); line-height: 1.8; }
.rkid .toon-img { height: 150px; }

/* ---- real sign-in: one-time code ---- */
.input.otp { font-size: 26px; letter-spacing: .35em; text-align: center; font-variant-numeric: tabular-nums; }

/* ---- games: motion and celebration ---- */
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-7px) rotate(-2deg); } 40% { transform: translateX(6px) rotate(2deg); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
@keyframes popIn { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-3deg); } 75% { transform: rotate(3deg); } }
@keyframes confettiFall { 0% { opacity: 1; transform: translateY(-20px) rotate(0); } 100% { opacity: .9; transform: translateY(105vh) rotate(var(--r2, 720deg)); } }
.tile.bad { animation: shake .45s var(--ease); }
.tile.ok, .feedback.pop, h3.pop { animation: popIn .45s cubic-bezier(.34, 1.56, .64, 1); }
h3.wiggle { animation: wiggle .4s var(--ease); }
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 40; }
.confetti i { position: absolute; top: 0; left: var(--x); width: 10px; height: 14px; background: var(--c); border-radius: 3px; transform: rotate(var(--r)); opacity: 0; animation: confettiFall var(--d) cubic-bezier(.3, .6, .6, 1) var(--delay) forwards; }
.confetti i:nth-child(odd) { border-radius: 50%; height: 10px; }
@media (prefers-reduced-motion: reduce) { .tile.bad, .tile.ok, h3.pop, h3.wiggle, .feedback.pop { animation: none; } .confetti { display: none; } }
/* ---- world: day / night switch ---- */
.rail-time { position: absolute; bottom: calc(var(--wbar-h, 92px) + 55px); inset-inline-end: 62px; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .92); color: var(--ink-2); font-weight: 700; font-size: 13px; box-shadow: var(--sh-paper); z-index: 5; }
.rail-wrap.night .rail-time { background: rgba(255, 251, 240, .92); }
/* ---- full character: two pictures ---- */
.toon-slots { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.toon-slot { border: 1.5px dashed var(--line); border-radius: 16px; padding: 12px 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; background: #fff; }
.toon-slot.has { border-style: solid; border-color: var(--em); }
.toon-slot img { height: 120px; max-width: 100%; object-fit: contain; }
.toon-empty { width: 64px; height: 120px; display: grid; place-items: center; color: var(--ink-3); background: var(--hair-2); border-radius: 12px; }

/* ---- modals: sections never shrink (the modal scrolls instead); the action bar stays reachable ---- */
.modal > * { flex-shrink: 0; }
.modal > .modal-actions:last-child { position: sticky; bottom: -22px; margin: 0 -22px -22px; padding: 12px 22px 18px; background: linear-gradient(rgba(255, 255, 255, 0), var(--card) 30%); z-index: 2; }
.mode-parent .modal > .modal-actions:last-child { background: linear-gradient(rgba(255, 255, 255, 0), var(--surface) 30%); }

/* ---- listening screen v5 ---- */
.session.v5 { background: radial-gradient(120% 60% at 50% 115%, #9fd68a 0 38%, transparent 38.5%), radial-gradient(90% 40% at 0% 100%, #b7e39b 0 50%, transparent 51%), linear-gradient(180deg, #5d84b5 0%, #8fb6dc 45%, #cfe6c4 100%); }
.session.v5 .s-top { color: #fff; }
.session.v5 .s-top .s-title b, .session.v5 .s-top .s-title span { color: #fff; text-shadow: 0 1px 2px rgba(20, 30, 60, .35); }
.session.v5 .s-top .icon-btn { background: rgba(255, 255, 255, .9); }
.ls-wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 4px 14px 0; display: flex; flex-direction: column; align-items: center; gap: 14px; flex: 1 0 auto; }
.ls-bubbles { display: flex; gap: 10px; overflow-x: auto; max-width: 100%; padding: 6px 6px 10px; scrollbar-width: none; scroll-behavior: smooth; }
.ls-bubbles::-webkit-scrollbar { display: none; }
.ls-bub { flex: 0 0 auto; width: 52px; height: 52px; border-radius: 50%; border: 0; background: #F4F6FA; color: var(--ink-2); font-family: var(--f-display); font-weight: 700; font-size: 22px; box-shadow: 0 6px 14px -8px rgba(20, 30, 60, .5); position: relative; transition: transform .15s; }
.ls-bub:active { transform: scale(.94); }
.ls-bub.heard::after { content: ""; position: absolute; bottom: 2px; inset-inline-end: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--em); box-shadow: 0 0 0 2px #fff; }
.ls-bub.on { width: 60px; height: 60px; background: #3FA36B; color: #fff; box-shadow: 0 0 0 4px #fff, 0 10px 20px -8px rgba(20, 60, 40, .6); font-size: 25px; }
.ls-bub.playing { animation: youPulse 1.2s ease-in-out infinite; }
.ls-bub.end { display: grid; place-items: center; background: rgba(255, 255, 255, .55); color: var(--gold-d); box-shadow: none; }
.ls-card { width: 100%; background: #F7F8FA; border-radius: 34px; box-shadow: 0 0 0 8px rgba(255, 255, 255, .92), 0 24px 40px -20px rgba(20, 30, 60, .55); padding: 22px 22px 18px; display: flex; flex-direction: column; align-items: stretch; gap: 14px; position: relative; overflow: hidden; }
.ls-label { text-align: center; color: var(--ink-3); font-weight: 600; font-size: 15px; }
.ls-card .verse-text { font-size: calc(40px * var(--qs, 1) * var(--qs-ui, 1)); line-height: 1.9; padding: 8px 0 12px; }
.ls-prog { position: absolute; top: 0; inset-inline: 0; height: 5px; background: rgba(30, 43, 74, .06); }
.ls-prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--em)); transition: width .08s linear; }
.ls-big { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ls-btn { min-height: 76px; border-radius: 999px; border: 3px solid var(--sky); background: #fff; color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 8px 14px; box-shadow: 0 8px 16px -12px rgba(20, 30, 60, .6); transition: transform .12s, background .15s; }
.ls-btn .t { display: inline-flex; align-items: center; gap: 8px; font-family: var(--f-display); font-weight: 700; font-size: 22px; color: var(--sky-d); }
.ls-btn small { color: var(--ink-3); font-weight: 600; font-size: 13px; }
.ls-btn.gold { border-color: #F2C14E; background: #FFF6DA; }
.ls-btn.gold .t { color: #7A4F00; }
.ls-btn.gold.active { background: #F2C14E; }
.ls-btn.sky.active { background: var(--sky); border-color: var(--sky); }
.ls-btn.sky.active .t, .ls-btn.sky.active small { color: #fff; }
.ls-btn.active .t { animation: wiggle 1.4s ease-in-out infinite; }
.ls-btn:active, .ls-sm:active, .ls-next:active { transform: translateY(2px) scale(.99); }
.ls-small { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ls-small.four { grid-template-columns: repeat(4, 1fr); }
.simple .ls-small { grid-template-columns: repeat(2, 1fr); }
.simple .ls-small.four { grid-template-columns: repeat(3, 1fr); }
.ls-sm { min-height: 70px; border-radius: 24px; border: 2.5px solid #C9E6FA; background: #fff; color: var(--sky-d); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-weight: 700; font-size: 15px; padding: 6px; }
.ls-sm.em { border-color: #BDEBD3; color: var(--em-d); }
.ls-sm.gold { border-color: #F2C14E; background: #FFF9E6; color: #7A4F00; }
.ls-sm.active { background: var(--em-50); }
.ls-sm.gold.active { background: #F2C14E; }
.ls-sm.rec { border-color: var(--rose); background: var(--rose-50); color: var(--rose-d); animation: lsRec 1.4s ease-in-out infinite; }
@keyframes lsRec { 50% { box-shadow: 0 0 0 8px rgba(255, 126, 138, .25); } }
.ls-next { min-height: 70px; border-radius: 999px; border: 0; background: #F2C14E; box-shadow: 0 0 0 5px #FBE7A6, 0 10px 18px -10px rgba(120, 80, 0, .6); color: #1E2B4A; font-family: var(--f-display); font-weight: 800; font-size: 26px; display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 4px; }
.ls-test { align-self: center; border: 0; background: none; color: var(--ink-3); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px; }
.ls-test:hover { background: rgba(30, 43, 74, .05); }
.ls-kid { margin-top: auto; height: 150px; display: flex; align-items: flex-end; justify-content: center; pointer-events: none; }
.ls-kid img { height: 150px; object-fit: contain; filter: drop-shadow(0 8px 10px rgba(20, 30, 60, .3)); }
.ls-kid.bob > * { animation: bob 1.1s ease-in-out infinite; }
.ls-pick { min-height: 64px; border-radius: 999px; border: 0; background: #3FA36B; color: #fff; font-family: var(--f-display); font-weight: 700; font-size: 22px; display: flex; align-items: center; justify-content: center; gap: 10px; box-shadow: 0 8px 16px -10px rgba(20, 80, 50, .7); }
.ls-pick:active { transform: translateY(2px); }
@media (max-width: 520px) {
  .ls-card { padding: 18px 14px 14px; border-radius: 28px; }
  .ls-btn { min-height: 68px; } .ls-btn .t { font-size: 18px; }
  .ls-sm { min-height: 64px; font-size: 13px; border-radius: 20px; }
  .ls-small.four { grid-template-columns: repeat(2, 1fr); }
  .ls-next { font-size: 22px; min-height: 62px; }
  .ls-bub { width: 46px; height: 46px; font-size: 19px; } .ls-bub.on { width: 54px; height: 54px; }
}

/* ---- end card ---- */
.end-stage { position: absolute; inset: 0; overflow-y: auto; display: grid; place-items: center; padding: 20px 14px; background: radial-gradient(120% 55% at 50% 112%, #9fd68a 0 40%, transparent 40.5%), linear-gradient(180deg, #4f75a8 0%, #8fb6dc 50%, #cfe6c4 100%); }
.end-card { width: min(560px, 100%); background: #F7F8FA; border-radius: 40px; box-shadow: 0 0 0 10px #FFD54F, 0 30px 50px -20px rgba(20, 30, 60, .6); padding: 30px 24px 24px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; animation: popIn .5s cubic-bezier(.34, 1.56, .64, 1); position: relative; z-index: 1; }
.end-ring { width: 128px; height: 128px; border-radius: 50%; border: 9px solid #4ED39B; background: #EFFBF4; display: grid; place-items: center; position: relative; }
.end-ring .num { font-family: var(--f-display); font-weight: 800; font-size: 54px; color: #1F6B45; }
.end-check { position: absolute; bottom: -6px; inset-inline-end: -4px; width: 42px; height: 42px; border-radius: 50%; background: #2BB673; color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 4px #F7F8FA; }
.end-times { color: #1F6B45; font-weight: 700; font-size: 16px; }
.end-chip { background: #FFF1C7; color: #7A4F00; font-weight: 700; font-size: 15px; padding: 6px 14px; border-radius: 999px; }
.end-title { font-family: var(--f-display); font-weight: 800; font-size: clamp(34px, 8vw, 52px); color: #1F6B45; line-height: 1.15; }
.end-sub { color: var(--sky-d); font-weight: 700; font-size: 20px; }
.end-sub .quran { font-size: 1.05em; }
.end-gift { width: 100%; min-height: 150px; border-radius: 30px; border: 4px solid #FFE07A; background: #FFF4C8; display: flex; align-items: center; justify-content: center; gap: 18px; color: #7A3E00; font-family: var(--f-display); font-weight: 800; font-size: 30px; box-shadow: 0 10px 20px -14px rgba(120, 80, 0, .6); }
.end-gift:not(.open) { animation: chestPulse 1.6s ease-in-out infinite; cursor: pointer; }
.end-gift-box { font-size: 64px; line-height: 1; }
.end-gift.open { flex-direction: column; gap: 6px; font-size: 20px; background: #FFFBEA; animation: popIn .5s cubic-bezier(.34, 1.56, .64, 1); padding: 14px; }
.end-gift-art { display: grid; place-items: center; min-height: 110px; color: var(--gold-d); }
.end-next { width: 100%; min-height: 78px; border-radius: 999px; border: 0; background: #2E9B64; color: #fff; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "s i" "t i"; align-items: center; padding: 8px 28px; box-shadow: 0 12px 20px -12px rgba(20, 80, 50, .8); }
.end-next small { grid-area: s; font-size: 13px; font-weight: 600; opacity: .9; }
.end-next span { grid-area: t; font-size: 26px; font-weight: 700; }
.end-next .icon, .end-next svg { grid-area: i; }
.end-sm { display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 18px; border-radius: 999px; border: 2px solid #E6E9F0; background: #fff; color: var(--ink); font-weight: 700; font-size: 16px; }
@media (prefers-reduced-motion: reduce) { .ls-btn.active .t, .ls-bub.playing, .ls-kid.bob > *, .end-gift:not(.open), .end-card { animation: none; } }

.toon-slot.busy { border-color: var(--sky); }
.spin { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--sky-50); border-top-color: var(--sky); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toon-prompt { display: flex; flex-direction: column; gap: 8px; }
.toon-prompt[open] { padding-bottom: 4px; }
.btn.disabled { opacity: .5; pointer-events: none; }
@media (max-width: 420px) { .ls-btn .t { font-size: 16px; white-space: nowrap; } .ls-btn small { font-size: 12px; } }
.end-next { row-gap: 0; }
.end-next span { line-height: 1.3; }

/* ---- photo review ---- */
.review-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.review-card { padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.review-pics { display: flex; gap: 8px; justify-content: center; background: repeating-conic-gradient(#eef1f5 0 25%, #fff 0 50%) 0 0 / 16px 16px; border-radius: 12px; padding: 8px; min-height: 160px; }
.review-pics figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.review-pics img { max-height: 170px; max-width: 120px; object-fit: contain; }
.review-pics figcaption { font-size: 11px; color: var(--ink-3); }
.review-line { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--ink-3); }
.review-line.ok { color: var(--em-d); } .review-line.bad { color: var(--rose-d); } .review-line.wait { color: var(--gold-d); }

/* ---- finished ayat: a check mark after pressing «الآية التالية» ---- */
.ls-bub.done { background: #E3F8EC; color: #1F8A57; box-shadow: inset 0 0 0 3px #3FC98F, 0 6px 14px -8px rgba(20, 60, 40, .5); display: grid; place-items: center; }
.ls-bub.done.on { background: #3FA36B; color: #fff; box-shadow: 0 0 0 4px #fff, 0 10px 20px -8px rgba(20, 60, 40, .6); }
.ls-bub.just { animation: popIn .5s cubic-bezier(.34, 1.56, .64, 1); }
.ls-tick { position: absolute; top: -4px; inset-inline-start: -4px; width: 22px; height: 22px; border-radius: 50%; background: #fff; color: #1F8A57; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(20, 60, 40, .35); }
.ls-donelbl { display: inline-flex; align-items: center; gap: 3px; color: #1F8A57; }
@media (prefers-reduced-motion: reduce) { .ls-bub.just { animation: none; } }

/* ---- approved picture: small green check ---- */
.av-wrap { position: relative; display: inline-block; flex: none; }
.av-wrap > .avatar { width: 100%; height: 100%; }
.av-verified { position: absolute; top: -3px; inset-inline-end: -3px; width: var(--vs, 16px); height: var(--vs, 16px); border-radius: 50%; background: #1DA1F2; background: #2BB673; box-shadow: 0 0 0 2px #fff, 0 2px 4px rgba(20, 60, 40, .35); display: grid; place-items: center; z-index: 1; }
.toon-imgwrap { position: relative; display: inline-block; }
.toon-imgwrap .av-verified { top: 4px; inset-inline-end: 4px; }

/* ---- sign-in invitation (landing + main page while the family has no account) ---- */
.signin-hero { padding: 18px; display: flex; flex-direction: column; gap: 14px; border: 2px solid var(--em); background: linear-gradient(180deg, #F2FBF6, #fff); }
.signin-ic { width: 44px; height: 44px; border-radius: 14px; background: var(--em-50); color: var(--em-d); display: grid; place-items: center; flex: none; }
.signin-nudge { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: #FFFFFF; box-shadow: 0 0 0 2px var(--em), var(--sh-paper); }
.signin-nudge b { display: block; font-size: 15px; color: var(--ink); }
.signin-nudge span { display: block; font-size: 12.5px; color: var(--ink-3); line-height: 1.5; }
.signin-nudge .sn-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--em-50); color: var(--em-d); display: grid; place-items: center; flex: none; }
.signin-nudge .sn-btn { flex: none; height: 42px; padding: 0 16px; border: 0; border-radius: 999px; background: #2E9B64; color: #fff; font-weight: 700; font-size: 14px; box-shadow: 0 6px 12px -8px rgba(20, 80, 50, .8); }
.signin-nudge.compact { padding: 8px 10px; border-radius: 16px; }
.signin-nudge.compact .sn-ic { width: 34px; height: 34px; }
.whud .signin-nudge { pointer-events: auto; }
@media (max-width: 420px) { .signin-nudge span { display: none; } .signin-nudge.compact b { font-size: 13.5px; } }
.landing-hero > * { min-width: 0; }
.signin-hero .ctas { display: flex; flex-wrap: wrap; gap: 10px; }
.signin-hero .ctas .btn { white-space: normal; text-align: center; line-height: 1.3; }
.signin-hero .ctas .btn.xl { flex: 1 1 240px; }
@media (max-width: 420px) { .signin-hero .ctas .btn.xl { --bh: 58px; font-size: 18px; padding: 0 18px; } }
/* ---- invitation v2: Google + e-mail ---- */
.signin-nudge .sn-txt { min-width: 0; }
.signin-nudge .sn-acts { display: flex; gap: 8px; flex: none; }
.signin-nudge .sn-g { height: 42px; padding: 0 14px; border-radius: 999px; border: 1.5px solid #DADCE0; background: #fff; color: #3C4043; font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; }
.signin-nudge .sn-g .g { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-family: Arial, sans-serif; color: #fff; background: conic-gradient(from -45deg, #EA4335 0 25%, #FBBC05 0 50%, #34A853 0 75%, #4285F4 0); font-size: 13px; }
.signin-nudge .sn-btn { display: inline-flex; align-items: center; gap: 6px; }
.signin-nudge.compact .sn-g, .signin-nudge.compact .sn-btn { height: 36px; padding: 0 12px; font-size: 13px; }
.signin-nudge.compact .sn-g { padding: 0 8px; }
.signin-nudge.end { width: 100%; text-align: start; flex-wrap: wrap; box-shadow: 0 0 0 3px #FFD54F, var(--sh-paper); background: #FFFBEA; }
.signin-nudge.end .sn-ic { background: #FFF1C7; color: #B7791F; }
.signin-nudge.end .sn-acts { width: 100%; }
.signin-nudge.end .sn-acts > * { flex: 1; justify-content: center; height: 48px; font-size: 15px; }
@media (max-width: 420px) { .signin-nudge.compact b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .signin-nudge:not(.compact):not(.end) { flex-wrap: wrap; } .signin-nudge:not(.compact):not(.end) .sn-acts { width: 100%; } .signin-nudge:not(.compact):not(.end) .sn-acts > * { flex: 1; justify-content: center; } }
.name-chip { margin-inline-start: 8px; vertical-align: middle; display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 999px; border: 0; background: var(--ap-50); color: var(--ap-d); font-size: 12px; font-weight: 700; font-family: var(--f-ui); }

/* ---- medals ---- */
.medals { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.medal-tile { background: #fff; border-radius: 20px; padding: 14px 10px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; box-shadow: var(--sh-paper); }
.medal-tile b { font-size: 15px; }
.medal-tile.lit { box-shadow: 0 0 0 2px #FFD54F, var(--sh-paper); }
.medal-tile.lit .medal-art { filter: drop-shadow(0 4px 8px rgba(255, 184, 0, .45)); animation: medalShine 3s ease-in-out infinite; }
.medal-tile.dim { background: #FFFBEF; }
.medal-tile.asleep, .medal-tile.locked { background: #F6F7FA; }
.medal-tile.locked b, .medal-tile.asleep b { color: var(--ink-3); }
@keyframes medalShine { 50% { transform: rotate(-4deg) scale(1.04); } }
.medal-hero .medal-art { flex: none; }
.chip.rose { background: var(--rose-50); color: var(--rose-d); }
.chip.gold { background: var(--gold-50); color: var(--gold-d); }
.sticker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.sticker-tile { background: #fff; border-radius: 18px; padding: 14px 8px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; box-shadow: var(--sh-paper); color: var(--gold-d); }
.sticker-tile.off { background: #F3F4F7; color: var(--ink-3); }
.sticker-q { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: #E6E9EF; font-size: 28px; font-weight: 800; color: #A3ADBD; }
/* main page: the worn medal */
.wmedal { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px 0 8px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .92); box-shadow: var(--sh-paper); font-weight: 700; font-size: 13px; color: var(--ink); }
.wmedal em { font-style: normal; font-size: 11px; color: var(--gold-d); background: var(--gold-50); padding: 1px 6px; border-radius: 999px; }
.wmedal.dim .medal-art { opacity: .55; }

/* ---- end card: the station ticket ---- */
.end-stage2 { position: absolute; inset: 0; overflow-y: auto; display: flex; flex-direction: column; align-items: center; gap: 0; padding: 18px 14px 28px; background: radial-gradient(130% 50% at 50% 108%, #A8DB8F 0 38%, transparent 38.5%), linear-gradient(180deg, #FFE7C2 0%, #FFD7A8 30%, #BFE3F5 70%, #DDF1E6 100%); }
.end-train { width: 100%; max-width: 520px; height: 44px; position: relative; overflow: hidden; }
.end-train svg { position: absolute; bottom: 0; animation: trainIn 1.6s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes trainIn { from { transform: translateX(-140%); } to { transform: translateX(0); } }
[dir="rtl"] .end-train svg { right: 6%; }
.ticket { width: min(520px, 100%); background: #FFFDF7; border-radius: 22px; box-shadow: 0 24px 40px -22px rgba(60, 40, 10, .55), 0 0 0 1px #F1E2C4; position: relative; z-index: 1; overflow: hidden; animation: popIn .5s cubic-bezier(.34, 1.56, .64, 1) both; }
.ticket-top { background: linear-gradient(135deg, #1E2B4A, #33497C); color: #fff; padding: 16px 20px 18px; display: flex; flex-direction: column; gap: 2px; position: relative; }
.ticket-tag { font-size: 13px; opacity: .85; font-weight: 600; }
.ticket-top b { font-size: 34px; line-height: 1.4; color: #FFE7A3; }
.ticket-stamp { position: absolute; inset-inline-end: 14px; top: 16px; transform: rotate(-10deg); border: 3px solid #FFC83D; color: #FFC83D; border-radius: 12px; padding: 4px 10px; font-weight: 800; font-size: 15px; font-family: var(--f-display); }
.ticket-body { padding: 16px 20px 6px; display: flex; flex-direction: column; gap: 10px; }
.ticket-title { font-family: var(--f-display); font-weight: 800; font-size: clamp(30px, 7vw, 42px); color: #1F6B45; line-height: 1.15; }
.ticket-sub { color: var(--ink-2); font-size: 16px; margin: 0; }
.ticket-stats { display: grid; grid-template-columns: auto 1fr; gap: 12px; }
.ticket-stats > div { background: #FFF6E2; border-radius: 16px; padding: 10px 14px; display: flex; flex-direction: column; gap: 4px; }
.ts-big { font-family: var(--f-display); font-weight: 800; font-size: 28px; color: #B7791F; line-height: 1; }
.ts-lbl { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.ts-cars { display: flex; gap: 5px; align-items: center; height: 28px; }
.ts-cars i { flex: 1; height: 18px; max-width: 34px; border-radius: 5px; background: #E9DCC0; position: relative; }
.ts-cars i::after { content: ""; position: absolute; bottom: -5px; inset-inline: 4px; height: 6px; background: radial-gradient(circle at 25% 50%, #8A7A5C 0 2.5px, transparent 3px), radial-gradient(circle at 75% 50%, #8A7A5C 0 2.5px, transparent 3px); }
.ts-cars i.on { background: linear-gradient(180deg, #FFD54F, #FF9F43); }
.ticket-medal { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--ink-2); background: #F3F6FB; border-radius: 14px; padding: 6px 12px; }
.ticket-cut { height: 22px; position: relative; margin: 6px 0; background: radial-gradient(circle at 0 50%, transparent 11px, #FFFDF7 12px) left / 51% 100% no-repeat, radial-gradient(circle at 100% 50%, transparent 11px, #FFFDF7 12px) right / 51% 100% no-repeat; }
.ticket-cut::before { content: ""; position: absolute; inset-inline: 20px; top: 50%; border-top: 2px dashed #E7D6B3; }
.ticket-foot { padding: 4px 20px 20px; display: flex; flex-direction: column; gap: 12px; }
.station-box { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px; border: 2px dashed #F2C14E; background: #FFF8E1; color: #7A4F00; text-align: start; font-family: var(--f-ui); }
.station-box:not(.open) { cursor: pointer; animation: chestPulse 1.8s ease-in-out infinite; }
.station-box b { display: block; font-size: 18px; } .station-box small { display: block; font-size: 13px; color: var(--ink-3); }
.station-box.open { border-style: solid; background: #FFFDF2; animation: popIn .5s cubic-bezier(.34, 1.56, .64, 1); }
.station-box .sb-art { display: grid; place-items: center; color: var(--gold-d); }
.go-next { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 70px; padding: 8px 20px; border: 0; border-radius: 20px; background: #FF9F43; box-shadow: 0 6px 0 #E07A1F; color: #1E2B4A; text-align: start; }
.go-next > span:first-child { font-size: 28px; }
.go-next small { display: block; font-size: 13px; font-weight: 700; opacity: .8; }
.go-next b { display: block; font-size: 24px; }
.go-next:active { transform: translateY(3px); box-shadow: 0 3px 0 #E07A1F; }
@media (prefers-reduced-motion: reduce) { .end-train svg, .ticket, .station-box, .medal-tile.lit .medal-art { animation: none; } }

/* ---- review run (v7) ---- */
.session.review .ls-bub { cursor: default; display: grid; place-items: center; }
.end-stage2.rv-end > .ticket { margin-block: auto; }
.rv-answers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.rv-a { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 92px; padding: 10px 6px; border-radius: 22px; border: 3px solid transparent; background: #fff; font-family: var(--f-ui); box-shadow: 0 8px 16px -12px rgba(20, 30, 60, .6); }
.rv-a span { font-size: 26px; line-height: 1.1; }
.rv-a b { font-size: 16px; color: var(--ink); }
.rv-a small { font-size: 12px; color: var(--ink-3); }
.rv-a.easy { border-color: #8FE0B6; background: #F0FBF5; }
.rv-a.help { border-color: #F2C14E; background: #FFF9E6; }
.rv-a.again { border-color: #C9E6FA; background: #F3F9FF; }
.rv-a:active { transform: translateY(2px) scale(.99); }
.rv-done { border-radius: 20px; padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.rv-done b { font-size: 20px; } .rv-done span { font-size: 13.5px; color: var(--ink-3); }
.rv-done.easy { background: #E3F8EC; color: #1F8A57; } .rv-done.help { background: #FFF5D6; color: #8A5E07; } .rv-done.again { background: #E8F3FF; color: var(--sky-d); }
@media (max-width: 420px) { .rv-a { min-height: 84px; } .rv-a b { font-size: 14px; } }

/* ---- v7.1: honest answers, three stars per surah ---- */
.recite-wait { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 2px 0 4px; }
.rw-bar { width: min(260px, 80%); height: 8px; border-radius: 99px; background: rgba(20, 30, 60, .08); overflow: hidden; }
.rw-bar i { display: block; height: 100%; width: 100%; background: linear-gradient(270deg, #3FC98F, #2BB673); transform-origin: right center; animation: rwFill linear forwards; }
@keyframes rwFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.recite-wait.ready .rw-bar i { animation: none; transform: none; }
.rw-txt { font-size: 14px; color: var(--ink-3); font-weight: 600; }
.recite-wait.ready .rw-txt { color: var(--em-d); }
.rv-a:disabled { opacity: .45; filter: grayscale(.4); box-shadow: none; }
.rv-a:disabled:active { transform: none; }
.hint-btn.on { background: var(--sky-50, #E8F3FF); color: var(--sky-d); }
.sstars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sstar { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 10px 6px 8px; border-radius: 16px; background: #F3F6FB; }
.sstar svg path { fill: #D9DEE8; stroke: #B9C0CE; stroke-width: .8; }
.sstar b { font-size: 15px; color: var(--ink-3); }
.sstar small { font-size: 11.5px; line-height: 1.35; color: var(--ink-3); }
.sstar.on { background: #FFF6E2; }
.sstar.on svg path { fill: #FFC83D; stroke: #B7791F; }
.sstar.on b { color: #8A5E07; }
.sstar.new svg { animation: starPop .7s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes starPop { 0% { transform: scale(.2) rotate(-40deg); } 70% { transform: scale(1.25) rotate(8deg); } 100% { transform: none; } }
.star-next { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; font-size: 14px; font-weight: 600; color: var(--ink-2); background: #F3F6FB; border-radius: 14px; padding: 10px 12px; }
.star-next.done { background: #EAF8F0; color: #1F8A57; }
.end-sm.strong { border-color: #FFC83D; background: #FFF6E2; }
.memo-go { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 66px; padding: 8px 16px; border: 0; border-radius: 20px; background: #3FC98F; box-shadow: 0 5px 0 #23935F; color: #fff; text-align: start; }
.memo-go b { display: block; font-size: 19px; } .memo-go small { font-size: 13.5px; opacity: .95; }
.memo-go .mg-ic { font-size: 28px; }
.memo-go:active { transform: translateY(3px); box-shadow: 0 2px 0 #23935F; }
.ticket-stats.three, .ticket-body .ticket-stats { grid-template-columns: auto auto 1fr; }
.ticket-medal span { display: flex; flex-direction: column; gap: 2px; }
.ticket-medal small { font-size: 12px; font-weight: 500; color: var(--ink-3); }
.ticket-medal.won { background: linear-gradient(135deg, #FFF3D0, #FFE4A3); color: #6B4A06; padding: 10px 14px; }
.ticket-medal.won b { font-size: 18px; }
.star-won { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14.5px; background: #FFF6E2; border-radius: 14px; padding: 8px 12px; }
.sw-stars i { font-style: normal; color: #D9DEE8; font-size: 18px; } .sw-stars i.on { color: #F2B21B; }
@media (prefers-reduced-motion: reduce) { .rw-bar i { animation: none; transform: none; opacity: .4; } .sstar.new svg { animation: none; } }
@media (max-width: 380px) { .sstar small { font-size: 10.5px; } .ticket-body .ticket-stats { grid-template-columns: 1fr 1fr; } .ticket-body .ticket-stats .ts-week { grid-column: 1 / -1; } }
.pstar-row { flex-wrap: wrap; gap: 6px; padding: 6px 0; border-bottom: 1px solid var(--line, #EEF1F6); } .pstar-row:last-child { border-bottom: 0; }
.ios-steps { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ios-steps li { display: flex; align-items: center; gap: 12px; font-size: 15.5px; line-height: 1.5; }
.ios-ic { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #EAF3FF; color: #1D63B0; font-size: 22px; font-weight: 700; }
.rmile.juz .wflag { background: #FFC83D; color: #5A3B00; border-color: #E0A81C; }
.wsound { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 16px; border: 0; background: #FFF6E2; color: #8A5E07; box-shadow: 0 4px 0 #E8C98A; flex: 0 0 auto; }
.wsound.off { background: #EEF1F6; color: #7A8294; box-shadow: 0 4px 0 #CDD3DE; }
.wsound:active { transform: translateY(3px); box-shadow: 0 1px 0 #E8C98A; }
/* ---- admin dashboard ---- */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.kpi { background: var(--card, #fff); border: 1px solid var(--line, #E6E9F0); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 2px; }
.kpi b { font-size: 30px; line-height: 1.1; color: var(--ink); }
.kpi span { font-weight: 600; font-size: 14px; } .kpi small { font-size: 12px; color: var(--ink-3); }
.signup-bars { display: flex; align-items: flex-end; gap: 3px; height: 110px; padding: 6px 0; }
.signup-bars span { flex: 1; background: #E3E8F0; border-radius: 4px 4px 0 0; min-height: 3px; }
.signup-bars span.on { background: var(--em, #2BB673); }
.fam-row { border-top: 1px solid var(--line, #E6E9F0); padding-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.fam-row b[dir=ltr] { word-break: break-all; }
.fam-kids { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.fam-kid { background: #F6F8FB; border-radius: 12px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.wicons { margin-inline-start: auto; display: inline-flex; gap: 6px; align-items: center; }
.wicon { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 38px; height: 38px; padding: 0 8px; border-radius: 14px; border: 0; background: rgba(255, 255, 255, .92); color: var(--ink-2); box-shadow: 0 3px 0 rgba(20, 30, 60, .18); font-weight: 700; font-size: 13px; }
.wicon.wide { color: var(--em-d); }
.wicon-txt { font-size: 12.5px; letter-spacing: .3px; }
.wicon:active, .wsound:active { transform: translateY(2px); }
.whadith { pointer-events: auto; display: flex; align-items: center; gap: 8px; width: 100%; text-align: start; border: 0; border-radius: 14px; padding: 7px 12px; background: rgba(255, 252, 244, .93); box-shadow: 0 3px 0 rgba(20, 30, 60, .12); color: var(--ink-2); font-size: 13.5px; }
.whadith .wh-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.whadith b { color: var(--gold-d); margin-inline-end: 4px; }
.wordmark, .ptop-brand { cursor: pointer; } .wordmark:focus-visible, .ptop-brand:focus-visible { outline: 3px solid var(--sky, #4FB2F2); outline-offset: 3px; border-radius: 10px; }
.ctop-logo { border: 0; background: none; padding: 0; display: inline-grid; place-items: center; cursor: pointer; }
/* ---- rides ---- */
.ride-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.ride-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 10px; border-radius: 20px; border: 3px solid transparent; background: var(--card, #fff); box-shadow: 0 6px 14px -10px rgba(20, 30, 60, .5); text-align: center; font-family: var(--f-ui); }
.ride-tile .ride-ic { font-size: 46px; line-height: 1.1; }
.ride-tile b { font-size: 17px; }
.ride-tile.on { border-color: var(--em, #2BB673); background: #EAF8F0; }
.ride-tile.off { opacity: .75; } .ride-tile.off .ride-ic { filter: grayscale(1); opacity: .5; }
.ride-tile small { color: var(--ink-3); }
.ride-new { margin-top: 6px; border: 0; border-radius: 12px; padding: 6px 10px; background: #2BB673; color: #fff; font-weight: 700; font-size: 14px; }
.wicon-emo { font-size: 19px; line-height: 1; }
.rtrain.rride { font-size: 64px; line-height: 1; }
/* ---- offline ---- */
.off-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line, #EEF1F6); }
.off-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 12px; border: 2px solid #CFE3F7; background: #F3F9FF; color: var(--sky-d, #1D63B0); font-weight: 700; font-size: 13.5px; white-space: nowrap; }
.off-btn.ok { border-color: #A9E3C4; background: #EAF8F0; color: #1F8A57; }
.off-btn.busy { border-color: #F2C14E; background: #FFF9E6; color: #8A5E07; }
.off-bar { width: 54px; height: 6px; border-radius: 9px; background: rgba(0, 0, 0, .08); overflow: hidden; } .off-bar i { display: block; height: 100%; background: #F2B21B; }
.wicon.sync.off { background: #FFF1F1; } .wicon.sync.wait { background: #FFF9E6; }
/* ---- choice games ---- */
.choice-list { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.choice-btn { min-height: 56px; padding: 10px 14px; border-radius: 16px; border: 3px solid #E6E9F0; background: #fff; font-weight: 700; font-size: 18px; color: var(--ink); box-shadow: 0 4px 0 #E6E9F0; }
.choice-btn.quran { font-family: var(--f-quran, 'Amiri Quran', serif); font-weight: 400; font-size: 24px; line-height: 1.8; }
.choice-btn.ok { border-color: #2BB673; background: #EAF8F0; box-shadow: 0 4px 0 #A9E3C4; }
.choice-btn.bad { border-color: #F2A1A1; background: #FFF1F1; opacity: .7; }
.choice-btn.hint { border-color: #F2B21B; box-shadow: 0 0 0 4px rgba(242, 178, 27, .3); }
.choice-btn:active { transform: translateY(2px); }
.q-listen { font-size: 56px; text-align: center; padding: 6px 0; }
/* ---- heroes podium ---- */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 8px; }
.pod { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px 0; text-align: center; }
.pod b { font-size: 14px; line-height: 1.3; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod .num { font-size: 12.5px; color: var(--ink-3); }
.pod-crown { font-size: 24px; line-height: 1; }
.pod-step { display: grid; place-items: center; width: 100%; border-radius: 14px 14px 0 0; font-style: normal; font-weight: 800; font-size: 22px; color: #fff; margin-top: 4px; }
.pod.p1 .pod-step { height: 70px; background: linear-gradient(#FFD166, #E0A81C); }
.pod.p2 .pod-step { height: 50px; background: linear-gradient(#DDE3EC, #A9B4C5); }
.pod.p3 .pod-step { height: 38px; background: linear-gradient(#E9B48A, #C07A45); }
.pod.me b { color: var(--em-d); }
/* ---- v7.2: a lighter top on phones — one card, one small row of icons, one slim strip ---- */
.whadith { padding: 0; gap: 0; }
.whadith .wh-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 6px 4px 6px 12px; text-align: start; color: inherit; font: inherit; }
.whadith .wh-x, .signin-nudge .sn-x { flex: none; width: 32px; height: 32px; border: 0; background: none; color: var(--ink-3); font-size: 20px; line-height: 1; border-radius: 10px; }
.signin-nudge.compact { gap: 8px; padding: 5px 6px 5px 8px; box-shadow: 0 0 0 1.5px var(--em), var(--sh-paper); }
.signin-nudge.compact b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.signin-nudge.compact .sn-ic { width: 28px; height: 28px; border-radius: 9px; }
.signin-nudge.compact .sn-ic svg { width: 17px; height: 17px; }
.signin-nudge.compact .sn-acts { gap: 6px; align-items: center; }
.signin-nudge.compact .sn-g, .signin-nudge.compact .sn-btn { height: 32px; padding: 0 10px; font-size: 13px; }
.signin-nudge.compact .sn-g { padding: 0 6px; }
.signin-nudge.compact .sn-g .g { width: 20px; height: 20px; font-size: 12px; }
@media (max-width: 520px) {
  .whud { padding: 6px 8px; gap: 5px; }
  .whud-card { padding: 5px 7px; gap: 7px; border-radius: 18px; }
  .wmedal { padding: 0 6px; } .wmedal > span, .wmedal em { display: none; }
  .whud-row { flex-wrap: nowrap; }
  .whud-name { font-size: 16px; }
  .whud-prog { margin-top: 1px; }
  .xp-pill { height: 34px; padding: 0 10px; font-size: 14px; border-radius: 12px; }
  .wtools { height: 36px; padding: 0 10px; font-size: 13.5px; border-radius: 13px; box-shadow: 0 3px 0 #0F5E40; }
  .wicons { gap: 5px; }
  .wicon, .wsound { min-width: 32px; width: auto; height: 32px; padding: 0 7px; border-radius: 11px; font-size: 12px; box-shadow: 0 2px 0 rgba(20, 30, 60, .16); }
  .wsound { width: 32px; padding: 0; }
  .wicon svg, .wsound svg { width: 16px; height: 16px; }
  .wicon-emo { font-size: 16px; }
  .wmedal { height: 32px; font-size: 12.5px; }
  .whadith { font-size: 12.5px; border-radius: 12px; }
  .whadith .wh-open { padding: 5px 4px 5px 10px; }
}
/* the ticket keeps its full height and the stage scrolls (it used to shrink and cut the bottom off) */
.end-stage2 > * { flex-shrink: 0; }
.end-close { position: fixed; top: max(10px, env(safe-area-inset-top)); inset-inline-end: 12px; z-index: 30; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); color: var(--ink); box-shadow: 0 4px 12px -6px rgba(20, 30, 60, .5); display: grid; place-items: center; }
.rtrain { transform: scale(var(--big, 1)); transform-origin: left bottom; }
/* ---- gift box (station reward) ---- */
.gift-box { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 16px; border-radius: 20px; border: 0; background: linear-gradient(135deg, #FFF1F3, #FFF8E1); box-shadow: 0 0 0 2px #FFB3BD, 0 10px 20px -14px rgba(160, 40, 60, .6); color: #8A1F35; text-align: start; font-family: var(--f-ui); cursor: pointer; }
.gift-box b { display: block; font-size: 19px; } .gift-box small { display: block; font-size: 13.5px; color: #A0566A; }
.gift-art { flex: none; overflow: visible; animation: giftWiggle 2.2s ease-in-out infinite; transform-origin: 50% 90%; }
.gift-art .gift-lid { transform-origin: 40px 34px; animation: giftLid 2.2s ease-in-out infinite; }
.gift-art .gift-spark { animation: giftSpark 1.6s ease-in-out infinite; } .gift-art .gift-spark.s2 { animation-delay: .8s; }
@keyframes giftWiggle { 0%, 70%, 100% { transform: rotate(0); } 76% { transform: rotate(-7deg); } 82% { transform: rotate(6deg); } 88% { transform: rotate(-4deg); } 94% { transform: rotate(2deg); } }
@keyframes giftLid { 0%, 72%, 100% { transform: translateY(0); } 80% { transform: translateY(-5px) rotate(-4deg); } 88% { transform: translateY(-2px) rotate(3deg); } }
@keyframes giftSpark { 0%, 100% { opacity: .2; transform: scale(.6); } 50% { opacity: 1; transform: scale(1.3); } }
.gift-box:active { transform: scale(.98); }
.station-box.gift-opened { border: 2px solid #FFB3BD; background: radial-gradient(circle at 18% 50%, #FFF4C2 0 34%, #FFFDF7 35%); position: relative; }
.station-box.gift-opened .sb-art { animation: giftReveal .7s cubic-bezier(.34, 1.56, .64, 1) both; }
@keyframes giftReveal { 0% { transform: scale(.2) translateY(18px) rotate(-20deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .gift-art, .gift-art .gift-lid, .gift-art .gift-spark, .station-box.gift-opened .sb-art { animation: none; } }
/* small, quiet download link for the child's own recordings (end ticket + its sheet) */
.end-dl { align-self: center; display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border: 0; border-radius: 999px; background: transparent; color: var(--muted, #7A8399); font-size: 13px; font-weight: 600; }
.end-dl:hover, .end-dl:focus-visible { background: #F1F3F8; color: var(--ink); }
.dl-row { padding: 6px 4px; border-bottom: 1px solid #EEF0F5; gap: 8px; }
.dl-row .end-dl { background: #F1F3F8; color: var(--ink); }
/* ayah bubbles: room for the white ring, the ✓ badge and the pop, so nothing is cut by the scroller */
.ls-bubbles { padding: 12px 12px 14px; }
.ls-tick { top: -2px; inset-inline-start: -2px; }
/* previous ayah: small, beside «الآية التالية» */
.ls-nav { display: flex; align-items: stretch; gap: 10px; width: 100%; margin-top: 4px; }
.ls-nav .ls-next { flex: 1; margin-top: 0; }
.ls-prev { flex: none; width: 70px; border-radius: 999px; border: 2.5px solid #F2C14E; background: #FFF9E6; color: #7A4F00; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; font-weight: 700; font-size: 12px; }
.ls-prev:active { transform: translateY(2px) scale(.98); }
@media (max-width: 520px) { .ls-prev { width: 58px; } }
/* the child's recordings on the end ticket: the recording look (rose mic), small */
.end-rec { align-self: center; display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px 0 8px; border-radius: 999px; border: 2px solid #F7C6CF; background: #FFF4F6; color: #A2324A; font-weight: 700; font-size: 14px; }
.end-rec:active { transform: scale(.97); }
.er-mic { width: 26px; height: 26px; border-radius: 50%; background: #F0566F; color: #fff; display: grid; place-items: center; flex: none; }
.dl-row .end-dl { background: #FFF4F6; color: #A2324A; border: 1.5px solid #F7C6CF; }
/* hadith strip: when the line is longer than the strip it slides slowly to its end and back */
.whadith .wh-t { display: block; flex: 1; }
.whadith .wh-t > span { display: inline-block; white-space: nowrap; }
.whadith .wh-t.runs { text-overflow: clip; }
.whadith .wh-run { animation: whRun var(--dur, 12s) ease-in-out infinite alternate; }
@keyframes whRun { 0%, 12% { transform: translateX(0); } 88%, 100% { transform: translateX(var(--run)); } }
@media (prefers-reduced-motion: reduce) { .whadith .wh-run { animation: none; } .whadith .wh-t.runs { text-overflow: ellipsis; } }
.whadith .wh-lbl { flex: none; white-space: nowrap; }
/* «بدون نت» in the home icon row */
.wicon.off { color: var(--sky-d, #1F6FB2); position: relative; }
.wicon.off.ok { color: var(--em-d); }
.wicon.off .off-tick { position: absolute; top: -4px; inset-inline-end: -4px; width: 16px; height: 16px; border-radius: 50%; background: var(--em, #3FC98F); color: #fff; font-style: normal; font-size: 10px; display: grid; place-items: center; }
.wicon.off.busy { background: #EAF5FF; }
.wicon-pct { font-size: 12px; font-weight: 800; }
.hero-live { width: 8px; height: 8px; border-radius: 50%; background: #2BB673; box-shadow: 0 0 0 2px #fff; flex: none; }
/* scrollbars everywhere: thin, a soft thumb, no track (the wide white/beige gutter on desktop browsers that always show
   scrollbars); strips that already hide theirs (scrollbar-width: none) keep hiding them */
* { scrollbar-width: thin; scrollbar-color: rgba(30, 43, 74, .22) transparent; }
::-webkit-scrollbar { width: 6px; height: 6px; background: transparent; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(30, 43, 74, .22); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(30, 43, 74, .38); }
html[data-theme="night"] *, .night * { scrollbar-color: rgba(255, 255, 255, .25) transparent; }
@media (hover: none) { * { scrollbar-width: none; } ::-webkit-scrollbar { display: none; } }
/* Google's own sign-in button */
.gis-wrap { display: block; width: 100%; }
.gis-wrap.compact { display: inline-flex; width: auto; }
.gis-box { display: flex; justify-content: center; min-height: 40px; }
.gis-wrap.compact .gis-box { min-height: 0; }
/* the listening screen on a computer: the character stands beside the card (not under it), and on a short window the
   card is compact, so the ayah bubbles, the card and the character fit without scrolling */
.ls-stage { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 14px; flex: 1 0 auto; position: relative; }
/* on a computer the character stands just outside the card's side, its feet level with the card's bottom (as close to the
   card as the window allows), instead of in a corner of the window or under the card */
@media (min-width: 900px) {
  .ls-stage { flex: none; }
  .session.v5 .ls-kid { position: absolute; bottom: 0; right: calc(100% + 14px); margin: 0; height: auto; z-index: 1; }
  /* as tall as fits beside the card (a standing child is about half as wide as tall), at most 170px */
  .session.v5 .ls-kid img { width: auto; max-width: none; height: clamp(90px, calc(100vw - 780px), 170px); }
}
@media (max-width: 899.98px) and (min-width: 600px) and (max-height: 860px) { .session.v5 .ls-kid { display: none; } }
/* phone: the ride button beside the stars stays small so the name keeps its line */
@container app (max-width: 520px) { .wride { width: 36px; height: 36px; border-radius: 12px; } .wride .wicon-emo { font-size: 18px; } .whud-name .name-chip { white-space: nowrap; } }
@media (min-width: 600px) and (max-height: 860px) {
  .session.v5 .ls-wrap { gap: 8px; }
  .session.v5 .ls-bubbles { padding: 8px 12px 8px; }
  .session.v5 .ls-bub { width: 44px; height: 44px; font-size: 19px; } .session.v5 .ls-bub.on { width: 52px; height: 52px; font-size: 22px; }
  .session.v5 .ls-card { padding: 14px 18px 12px; gap: 10px; }
  .session.v5 .ls-card .verse-text { line-height: 1.7; padding: 2px 0 4px; font-size: calc(34px * var(--qs, 1) * var(--qs-ui, 1)); }
  .session.v5 .ls-btn { min-height: 60px; } .session.v5 .ls-sm { min-height: 54px; font-size: 14px; }
  .session.v5 .ls-next { min-height: 54px; font-size: 21px; } .session.v5 .ls-prev { width: 62px; }
}
@media (min-width: 600px) and (max-height: 660px) {
  .session.v5 .s-top { padding-top: 6px; padding-bottom: 4px; }
  .session.v5 .ls-card .verse-text { font-size: calc(30px * var(--qs, 1) * var(--qs-ui, 1)); line-height: 1.6; }
  .session.v5 .ls-btn { min-height: 54px; } .session.v5 .ls-btn small { display: none; }
  .session.v5 .ls-sm { min-height: 48px; flex-direction: row; gap: 6px; } .session.v5 .ls-next { min-height: 50px; }
}
/* «من الآية [–1+] إلى [–3+]» on one line: compact steppers inside a range */
.range { flex-wrap: nowrap; gap: 6px; }
.range .stepper { padding: 3px; gap: 3px; flex: none; }
.range .stepper button { width: 32px; height: 32px; border-radius: 9px; }
.range .stepper b { min-width: 26px; font-size: 16px; }
@media (max-width: 330px) { .range { flex-wrap: wrap; } }
/* the full-body picture on the 2D track keeps its own width (the box around it has none to give, so max-width shrank it) */
.rkid .toon-img { max-width: none; width: auto; }
/* home: the ride beside the stars, «السور» beside «كمّل من مكانك», and on a computer the view choices side by side */
.wride { flex: none; width: 44px; height: 44px; border-radius: 14px; border: 0; background: #FFF6E2; display: grid; place-items: center; box-shadow: inset 0 0 0 2px #FDE7B0; }
.wride .wicon-emo { font-size: 22px; }
.wbar .wjump { flex: none; min-height: 64px; gap: 0; }
.w-segs { display: none; gap: 6px; }
.wseg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 14px; background: rgba(255, 255, 255, .92); box-shadow: 0 3px 0 rgba(20, 30, 60, .18); }
.wseg-b { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 9px; border: 0; border-radius: 11px; background: none; color: var(--ink-2); font-weight: 700; font-size: 12.5px; }
.wseg-b .wicon-emo { font-size: 15px; }
.wseg-b.on { background: var(--ink); color: #fff; }
@container app (min-width: 1100px) {
  .whud { width: min(100%, 900px); }
  .w-segs { display: inline-flex; }
  .w-cycle { display: none; }
}
.pub-foot a { color: var(--ink-2); }
