/* The app frame of the camp (from prototype/proto.css): a top bar with the account and the bell, the screen, a tab bar
   (at the bottom on phones, under the top bar on computers), bottom sheets and a toast. Each account has its colour:
   the camp team navy, the parents orange, the child blue. Blocks are prefixed ax- so they never clash with app.css. */
.ax{--role:#0a9fca;--role-soft:#e1f6fb;--muted:#5f7f86;--line:#e5eef1;font-family:var(--font,"Baloo Bhaijaan 2",system-ui,sans-serif);color:var(--ink)}
.ax.ax-staff{--role:#173f4d;--role-soft:#e3eef1}.ax.ax-parent{--role:#e0702a;--role-soft:#fdeee2}.ax.ax-kid{--role:#0a9fca;--role-soft:#e1f6fb}
body.ax-on{background:#edf4f6}
body.ax-on main{max-width:none;padding:0}
body.ax-on .topbar,body.ax-on .staff-nav{display:none}

.ax-bar{position:sticky;top:0;z-index:20;display:flex;align-items:center;gap:10px;padding:calc(env(safe-area-inset-top) + 10px) 16px 10px;background:var(--role-soft);box-shadow:0 1px 0 #0000000d}
.ax-bar .who{flex:1;min-width:0}.ax-bar .who b{display:block;font-size:18px;line-height:1.25;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ax-bar .who small{color:var(--muted);font-weight:700;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ax-face{width:44px;height:44px;border-radius:50%;display:grid;place-items:center;font-size:22px;font-weight:800;background:#fff;flex-shrink:0;box-shadow:0 3px 0 #0001;overflow:hidden;color:var(--role);text-decoration:none}
.ax-face svg{width:100%;height:100%}
.ax-icon{position:relative;border:0;background:#fff;border-radius:50%;width:44px;height:44px;font-size:20px;box-shadow:0 3px 0 #0001;display:grid;place-items:center;text-decoration:none;flex-shrink:0;cursor:pointer}
.ax-icon i{position:absolute;top:-3px;inset-inline-end:-3px;background:var(--bad,#ff4b4b);color:#fff;font-style:normal;font-size:11px;font-weight:800;border-radius:999px;min-width:19px;height:19px;display:grid;place-items:center;padding:0 4px}
.ax-back{border:0;background:#fff;border-radius:12px;padding:8px 12px;font:inherit;font-weight:800;box-shadow:0 3px 0 #0001;color:var(--ink);text-decoration:none;flex-shrink:0}

.ax-screen{max-width:760px;margin:0 auto;padding:14px 14px calc(96px + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:12px}
.ax-screen>.panel{width:100%;box-shadow:0 4px 0 #dfeef2;border-radius:20px;padding:16px}
.ax-tabs{position:fixed;inset-inline:0;bottom:0;z-index:20;display:grid;grid-auto-flow:column;grid-auto-columns:1fr;background:#fff;border-top:1px solid var(--line);padding:6px 4px calc(8px + env(safe-area-inset-bottom))}
.ax-tabs a{display:flex;flex-direction:column;align-items:center;gap:1px;font-size:12.5px;font-weight:800;color:#7f99a0;position:relative;padding:4px 0;text-decoration:none;min-height:48px;justify-content:center}
.ax-tabs a span{font-size:23px;line-height:1.1;filter:grayscale(1);opacity:.7}
.ax-tabs a[aria-current=page]{color:var(--role)}.ax-tabs a[aria-current=page] span{filter:none;opacity:1}
.ax-tabs a[aria-current=page]::before{content:"";position:absolute;top:-7px;width:34px;height:4px;border-radius:0 0 4px 4px;background:var(--role)}
.ax-tabs a i{position:absolute;top:0;inset-inline-start:calc(50% + 6px);background:var(--bad,#ff4b4b);color:#fff;font-style:normal;font-size:10px;border-radius:999px;min-width:17px;height:17px;display:grid;place-items:center}
/* computers: the tabs sit under the top bar, labels beside the icons; the screen stays one readable column */
@media (min-width:900px){
 .ax-bar{padding:12px max(24px,calc(50% - 380px))}
 .ax-tabs{position:sticky;top:68px;bottom:auto;border-top:0;border-bottom:1px solid var(--line);padding:0 max(16px,calc(50% - 380px));grid-auto-columns:max-content;gap:6px}
 .ax-tabs a{flex-direction:row;gap:8px;font-size:15px;padding:12px 16px;min-height:0}
 .ax-tabs a span{font-size:20px}
 .ax-tabs a[aria-current=page]::before{top:auto;bottom:0;width:100%;border-radius:4px 4px 0 0}
 .ax-screen{padding:20px 16px 48px}
}

/* ---------- blocks ---------- */
.ax-card{background:#fff;border-radius:20px;padding:14px;box-shadow:0 4px 0 #dfeef2}
.ax-card h3{margin:0 0 6px;font-size:17px;display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.ax-card p{margin:0;line-height:1.6}
.ax-card.sun{background:#fff8e1}.ax-card.ring{box-shadow:0 0 0 2px #ffc800 inset,0 4px 0 #dfeef2}
.ax-sec{display:flex;justify-content:space-between;align-items:baseline;margin:6px 2px -4px;gap:8px}
.ax-sec h2{margin:0;font-size:18px}.ax-sec small{color:var(--muted);font-weight:700}
.ax-hero{border-radius:22px;padding:16px;color:#fff;background:var(--role);box-shadow:0 5px 0 #0002}
.ax-hero.sky{background:linear-gradient(135deg,#0eb1de,#0a8db3)}.ax-hero.night{background:#173f4d}.ax-hero.sun{background:linear-gradient(135deg,#ffb300,#f08c00)}
.ax-hero small{opacity:.9;font-weight:700}.ax-hero h3{margin:2px 0 4px;font-size:21px;line-height:1.35}.ax-hero p{margin:0 0 12px;opacity:.95;line-height:1.55}
.ax-hero .btn-soft{border-color:#fff}
.ax-tiles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.ax-tile{background:#fff;border-radius:16px;padding:10px 6px;text-align:center;box-shadow:0 4px 0 #dfeef2;text-decoration:none;color:inherit}
.ax-tile b{display:block;font-size:23px;line-height:1.25;font-variant-numeric:tabular-nums}.ax-tile span{font-size:12.5px;color:var(--muted);font-weight:800}
.ax-list{display:flex;flex-direction:column;margin:0;padding:0;list-style:none}.ax-list>*{border-top:1px solid var(--line);padding:10px 0}.ax-list>*:first-child{border-top:0;padding-top:2px}.ax-list>*:last-child{padding-bottom:2px}
.ax-item{display:flex;gap:10px;align-items:center;color:inherit;text-decoration:none;min-width:0}
a.ax-item,button.ax-item{border:0;background:none;width:100%;text-align:start;font:inherit;cursor:pointer}
.ax-item .ico{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;font-size:21px;background:#f1f7f9;flex-shrink:0}
.ax-item .grow{flex:1;min-width:0}.ax-item b{display:block;overflow-wrap:anywhere}.ax-item small{color:var(--muted);font-weight:700;display:block}
.ax-item .chev{color:var(--muted);font-weight:800}
.ax-quick{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.ax-quick a,.ax-quick button{border:0;background:#fff;border-radius:18px;padding:14px 8px;font:inherit;font-weight:800;box-shadow:0 4px 0 #dfeef2;display:flex;flex-direction:column;align-items:center;gap:4px;color:var(--ink);text-decoration:none;cursor:pointer;text-align:center}
.ax-quick span{font-size:28px}
.ax-pill{display:inline-block;border-radius:999px;padding:1px 10px;font-size:12.5px;font-weight:800;background:#f1f7f9;color:var(--muted);white-space:nowrap}
.ax-pill.live{background:#ffe1e1;color:#c0392b}.ax-pill.ok{background:#e4f8d4;color:#2f7a00}.ax-pill.wait{background:#fff1cc;color:#8a5a00}
.ax-bar-p{height:10px;border-radius:99px;background:#eaf2f4;overflow:hidden;margin:6px 0 4px}.ax-bar-p i{display:block;height:100%;width:0;border-radius:99px;background:var(--c,var(--go,#58cc02))}
.ax-note{background:#fff8e1;border-radius:14px;padding:10px 12px;color:#6a5200;font-weight:700;font-size:14px;line-height:1.55;margin:0}
.ax-empty{text-align:center;color:var(--muted);padding:18px 8px;font-weight:700;margin:0}
.ax-me{text-align:center}.ax-me .ax-face{width:84px;height:84px;margin:0 auto 6px;font-size:40px}.ax-me h3{justify-content:center;font-size:21px}
.ax .btn.wide{width:100%}
.ax .seg{margin:0}

/* ---------- sheet and toast ---------- */
.ax-sheet-wrap{position:fixed;inset:0;background:#10252e66;display:flex;align-items:flex-end;justify-content:center;z-index:60}
.ax-sheet{background:#f6fafb;width:100%;max-width:640px;max-height:88dvh;overflow-y:auto;border-radius:26px 26px 0 0;padding:10px 16px calc(26px + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:12px;animation:ax-up .22s ease-out}
.ax-sheet::before{content:"";align-self:center;width:44px;height:5px;border-radius:9px;background:#cbd9dd;flex-shrink:0}
.ax-sheet h2{margin:0;font-size:20px}
.ax-sheet .ax-x{position:sticky;top:0;align-self:flex-end;margin-bottom:-44px}
@media (min-width:900px){.ax-sheet-wrap{align-items:center}.ax-sheet{border-radius:24px}}
@keyframes ax-up{from{transform:translateY(40px);opacity:0}to{transform:none;opacity:1}}
.ax-toast{position:fixed;bottom:calc(92px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);background:#173f4d;color:#fff;border-radius:999px;padding:9px 18px;font-weight:800;font-size:14px;z-index:70;max-width:92%;text-align:center}
@media (min-width:900px){.ax-toast{bottom:28px}}
@media (prefers-reduced-motion:reduce){.ax-sheet{animation:none}}

/* ---------- small helpers used by the apps ---------- */
.ax .grow{flex:1;min-width:0}.ax .row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.ax-gap{margin-top:10px}
.ax .seg a{flex:1;text-align:center;font-weight:800;border-radius:10px;padding:8px 4px;color:#3b5c64;text-decoration:none;min-height:40px;display:grid;place-items:center;font-size:14.5px}
.ax .seg a[aria-pressed=true]{background:#fff;color:var(--ink);box-shadow:0 3px 0 #d3e4ea}
.ax-kids{display:flex;gap:8px;overflow-x:auto;padding-bottom:2px}
.ax-kids button{flex:1 0 140px;border:3px solid transparent;background:#fff;border-radius:18px;padding:8px;font:inherit;font-weight:800;display:flex;align-items:center;gap:8px;box-shadow:0 4px 0 #dfeef2;cursor:pointer;text-align:start;color:var(--ink)}
.ax-kids button[aria-pressed=true]{border-color:var(--role)}
.ax-kids small{display:block;color:var(--muted);font-weight:700;font-size:12.5px}
.ax-kids .ax-face,.ax-item>.ax-face{width:40px;height:40px;font-size:19px;background:var(--role-soft)}
.ax .fam-goals{display:grid;gap:10px}
.ax .fam-goal{background:#fff;border-radius:20px;box-shadow:0 4px 0 #dfeef2}
.ax .ax-card>.panel,.ax .ax-card>section.panel{box-shadow:none;padding:0;width:100%}
/* the existing sections (panels) inside the app frame: full width cards */
.ax-screen .panel{width:100%;max-width:none;border-radius:20px;padding:16px;box-shadow:0 4px 0 #dfeef2;margin:0 0 12px}
.ax-screen #body{display:flex;flex-direction:column}
.ax-screen .sticky-actions{bottom:calc(76px + env(safe-area-inset-bottom))}
@media (min-width:900px){.ax-screen .sticky-actions{bottom:12px}}
.ax.ax-wide .ax-screen{max-width:1120px}
/* the 4-step «مسابقة جديدة» */
.ax .wizard h3{margin:14px 0 6px;font-size:16px}
.ax .steps{display:flex;gap:6px;margin:6px 0 2px}.ax .steps i{flex:1;height:6px;border-radius:9px;background:#e1ebee}.ax .steps i.on{background:var(--role)}
.ax .opts{display:grid;gap:10px;margin-top:8px}
.ax .opt{display:flex;gap:12px;align-items:center;border:3px solid var(--line);background:#fff;border-radius:18px;padding:12px;text-align:start;width:100%;font:inherit;color:var(--ink);cursor:pointer;box-shadow:none;min-height:0}
.ax .opt>span:first-child{font-size:30px}.ax .opt b{display:block;font-size:16px}.ax .opt small{color:var(--muted);font-weight:700;line-height:1.45;display:block}
.ax .opt[aria-pressed=true]{border-color:var(--role);background:var(--role-soft)}
.ax .chips{display:flex;gap:6px;flex-wrap:wrap}
.ax .chip{border:2px solid var(--line);background:#fff;border-radius:999px;padding:6px 14px;font:inherit;font-weight:800;font-size:14.5px;color:var(--ink);cursor:pointer;box-shadow:none;min-height:40px}
.ax .chip[aria-pressed=true]{border-color:var(--role);background:var(--role);color:#fff}.ax .chip:disabled{opacity:.4;cursor:default}
.ax .wiz-qs{margin:8px 0;padding-inline-start:22px;line-height:1.7}.ax details.ax-card summary{cursor:pointer}
.ax .wiz-nav{margin-top:14px}
/* the bell's list */
.ax-item.ax-new{position:relative}.ax-item.ax-new::after{content:"";position:absolute;top:8px;inset-inline-end:0;width:9px;height:9px;border-radius:50%;background:var(--bad,#ff4b4b)}
.ax-item .ax-body{color:var(--ink);font-weight:600;line-height:1.5}
.ax-icon i[hidden]{display:none}
.ax-news{background:#fff;border-radius:20px;padding:14px;box-shadow:0 0 0 2px #ffc800 inset,0 4px 0 #dfeef2}
.ax-news h3{margin:0 0 4px;font-size:16px}.ax-news p{margin:0 0 4px;line-height:1.6;white-space:pre-line}.ax-news small{color:var(--muted);font-weight:700}
.ax textarea{font:inherit;font-weight:700;border:3px solid #dbe8ec;border-radius:13px;padding:10px;width:100%;box-sizing:border-box;min-height:110px;color:var(--ink)}
.ax-icon{color:var(--ink);font:inherit;font-size:20px}
/* 📚 مراجعة الأسبوع: flashcards then quiz */
.rv-card{box-shadow:0 0 0 2px #0eb1de inset,0 4px 0 #dfeef2}
.rv-top{display:flex;justify-content:space-between;align-items:baseline;gap:8px;font-weight:800}.rv-top span{color:var(--muted);font-size:14px}
.rv-flash{min-height:260px;display:flex;flex-direction:column;gap:12px;justify-content:space-between}
.rv-q{font-size:22px!important;line-height:1.6;margin:8px 0!important;display:block!important;text-align:center}
.rv-a{background:#e9f9ee;border-radius:16px;padding:12px;text-align:center}.rv-a small{color:var(--muted);font-weight:800;display:block}
.rv-a b{font-size:21px;color:#1d6b3a;display:block}.rv-a p{margin:6px 0 0;color:#3b5c64}
.rv-opts{display:grid;gap:8px;margin-top:6px}
.rv-opt{font:inherit;font-weight:800;font-size:17px;border:3px solid var(--line);background:#fff;border-radius:16px;padding:12px;cursor:pointer;color:var(--ink);text-align:center;min-height:52px}
.rv-opt.ok{border-color:#58cc02;background:#e9f9de}.rv-opt.no{border-color:#ff4b4b;background:#ffe6e6}.rv-opt:disabled{cursor:default}
.rv-fb{font-weight:800;font-size:18px;margin:10px 0 4px;text-align:center}.rv-fb.ok{color:#2f7a00}.rv-fb.no{color:#c0392b}
/* the home page (play.js landing) and the sign-in pages in the app frame */
.ax-tabs:empty{display:none}
.lp2 .ax-screen{padding-bottom:40px}
.lp2-brand .brand-lockup img{height:10px}.lp2-brand{font-size:20px}
.lp2 .landing-acct a{color:var(--ink)!important;background:#fff!important;border:0!important;box-shadow:0 3px 0 #0001;border-radius:999px;padding:6px 12px}
.lp2-hero{position:relative;overflow:hidden;padding-bottom:18px}
.lp2-hero h3{font-size:24px;max-width:70%}.lp2-hero>p{max-width:66%}
.lp2-lion{position:absolute;top:6px;inset-inline-end:4px;opacity:.95;pointer-events:none}
.lp2-ticket{background:#ffffff26;border:2px dashed #ffffffaa;border-radius:18px;padding:12px;margin-top:6px}
.lp2-ticket label{display:block;font-weight:800;margin-bottom:6px}
.lp2-row{display:flex;gap:8px}.lp2-row input{flex:1;min-width:0;font:inherit;font-size:22px;font-weight:800;letter-spacing:.18em;text-align:center;border:0;border-radius:14px;padding:8px;color:var(--ink);text-transform:uppercase}
.lp2-ticket .error{color:#fff;font-weight:800;margin:6px 0 0;min-height:0}
.ax a.opt{text-decoration:none}.ax .opt .chev{color:var(--muted);font-weight:800}
.lp2-foot{text-align:center}
.lp2-me{box-shadow:0 0 0 2px var(--go,#58cc02) inset,0 4px 0 #dfeef2}
.lp2-review{box-shadow:0 0 0 2px var(--sky,#0eb1de) inset,0 4px 0 #dfeef2;margin-top:12px;text-decoration:none;color:inherit}
.ax .reveal{opacity:1;transform:none}
.ax-entry .panel{width:100%;max-width:520px;margin:0 auto}

/* the families' board and the bank challenges (deck.js, camp.js) */
.fam-board{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.fam-board li{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:14px;background:#f5fbfd}
.fam-board li.me{box-shadow:0 0 0 2px #0eb1de inset;background:#e8f8fd}
.fb-rank{min-width:30px;text-align:center;font-weight:800;font-size:18px}.fb-name{flex:1;display:flex;flex-direction:column}.fb-name small{color:var(--muted)}
.fb-pts{font-size:20px}
.ch-when{display:inline-block;background:#fff4d6;color:#7a5a00;border-radius:10px;padding:2px 8px;font-weight:800;font-size:13px;margin-top:4px}
.ch-tag{display:inline-block;background:#eef3ff;color:#2d4fa3;border-radius:10px;padding:1px 8px;font-weight:800;font-size:12px;margin-inline-start:6px}
.bank-list{list-style:none;margin:8px 0;padding:0;display:grid;gap:6px;max-height:46vh;overflow:auto}
.bank-list li{display:flex;gap:10px;align-items:flex-start;padding:8px 10px;border:2px solid var(--line);border-radius:12px;background:#fff}
.bank-list li.star{border-color:#f5b400;background:#fffaeb}
.bank-list .bq{flex:1;display:flex;flex-direction:column}.bank-list .bq small{color:#1d6b3a}
.bank-list label{display:flex;flex-direction:column;align-items:center;font-size:11px;font-weight:800;color:var(--muted);gap:2px;cursor:pointer}
.bank-count{display:flex;gap:12px;flex-wrap:wrap;font-weight:800;margin:6px 0}
.bank-count b{color:#0e7fa0}
/* 📦 the review library (camp.js) and the flashcards' thinking time (kid.js, deck.js) */
.lib-list{list-style:none;padding:0;margin:8px 0 12px;display:grid;gap:8px}
.lib-list li{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap;padding:10px 12px;border:1px solid #e3e8ef;border-radius:12px}
.lib-list li>span:first-child{display:flex;flex-direction:column}
.lib-list small{color:#667}
.rv-new{display:inline-block;background:#fff3c4;color:#8a5a00;border-radius:999px;padding:1px 8px;font-size:.8em;font-weight:800;margin-inline-start:6px}
.rv-think{display:block;text-align:center;font-weight:800;color:#0e7fa0;margin:4px 0 8px}
/* the family's colour (deck.js FamColor) */
.fam-dot{display:inline-block;width:.8em;height:.8em;border-radius:50%;margin-inline-end:6px;vertical-align:middle;background:#ccc}
.fam-colors{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0}
.fam-swatch{width:34px;height:34px;border-radius:50%;border:3px solid #fff;box-shadow:0 0 0 1px #cfd6de;cursor:pointer;padding:0}
.fam-swatch.on{box-shadow:0 0 0 3px #222}
.fam-custom{display:flex;align-items:center;justify-content:center;overflow:hidden;background:conic-gradient(red,yellow,lime,cyan,blue,magenta,red)}
.fam-custom input{opacity:0;width:100%;height:100%;cursor:pointer}
/* Home: four tiles, each with an «i» that shows its line of explanation; «كيف نلعب؟» opens the steps. */
.lp3-tiles{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:14px}
.lp3-tile{position:relative}
.lp3-tile a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:104px;padding:14px 10px;border:3px solid var(--line);border-radius:20px;background:#fff;color:inherit;text-decoration:none;box-shadow:0 4px 0 #dfeef2;text-align:center}
.lp3-tile a:active{transform:translateY(2px);box-shadow:0 2px 0 #dfeef2}
.lp3-tile .ic{font-size:34px;line-height:1}.lp3-tile b{font-size:16px}
.lp3-tile.review a{border-color:var(--sky,#0eb1de);background:#eefaff}
.lp3-i{position:absolute;top:8px;inset-inline-start:8px;width:24px;height:24px;border-radius:50%;border:2px solid var(--line);background:#fff;color:var(--muted);font:italic 800 13px/20px Georgia,serif;cursor:pointer;padding:0}
.lp3-i[aria-expanded=true]{background:var(--sky,#0eb1de);border-color:var(--sky,#0eb1de);color:#fff}
.lp3-info{margin:10px 0 0;padding:10px 14px;border-radius:14px;background:#eefaff;color:var(--ink,#1d3a4a);font-weight:700;line-height:1.6}
.lp3-how{margin-top:14px}
.lp3-howbtn{display:flex;align-items:center;gap:8px;border:0;background:none;font:inherit;font-weight:800;color:var(--muted);cursor:pointer;padding:4px 0}
.lp3-howbtn .lp3-i{position:static;display:inline-block}
.lp3-howbtn[aria-expanded=true] .lp3-i{background:var(--sky,#0eb1de);border-color:var(--sky,#0eb1de);color:#fff}
.lp3-tile.review{grid-column:1/-1}.lp3-tile.review a{flex-direction:row;min-height:64px;gap:12px}
