/* Kids Tasks — refined youth theme, mobile-first.
   Premium but playful: calm neutral surfaces, confident accents,
   consistent radii and soft layered shadows. */
:root{
  --ink:#26223A; --muted:#8B84A0;
  --bg:#F5F4F9; --card:#FFFFFF; --surface:#FAF9FD;
  --line:#E8E3F1;
  --pink:#F43F6F; --rose:#FF6B8B;
  --plum:#2E2847; --indigo:#5B54D6;
  --amber:#FFC53D; --amber-deep:#A86F00;
  --teal:#27BFA9; --green:#33C46E;
  --orange:#FF9E4A; --blue:#4C8DFF; --red:#E5486F;
  --radius:20px; --radius-sm:16px;
  --shadow:0 1px 2px rgba(38,34,58,.05), 0 10px 28px rgba(38,34,58,.08);
  --tabbar-h:76px;
}
*{box-sizing:border-box; -webkit-tap-highlight-color:transparent;}
html,body{height:100%;}
body{
  margin:0; font-family:-apple-system,BlinkMacSystemFont,"SF Pro","Segoe UI",system-ui,sans-serif;
  background:var(--bg); color:var(--ink); overscroll-behavior:none;
  padding-bottom:env(safe-area-inset-bottom);
}
h1,h2,h3{margin:0;}
button{font-family:inherit; touch-action:manipulation;}
.hidden{display:none !important;}
.muted{color:var(--muted); font-size:.85rem;}

.view{min-height:100dvh; display:flex; flex-direction:column; animation:fadein .25s ease;}
@keyframes fadein{from{opacity:0; transform:translateY(6px);} to{opacity:1; transform:none;}}

/* ---------- offline badge ---------- */
.offline-badge{
  position:fixed; top:calc(8px + env(safe-area-inset-top)); left:12px; right:12px; z-index:200;
  background:var(--ink); color:#fff; border-radius:14px; padding:10px 14px; text-align:center;
  font-size:.85rem; box-shadow:var(--shadow);
}

/* ---------- confetti ---------- */
#confetti-canvas{position:fixed; inset:0; pointer-events:none; z-index:300;}

/* ---------- setup ---------- */
#view-setup{align-items:center; justify-content:center; padding:24px;}
.setup-card{background:var(--card); border:1px solid var(--line); border-radius:24px; padding:28px 24px; max-width:420px; box-shadow:var(--shadow); text-align:center;}
.setup-emoji{font-size:3rem;}
.setup-steps{text-align:left; line-height:1.7; padding-left:22px;}
.setup-steps b{color:var(--pink);}

/* ---------- home ---------- */
.home-wrap{flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:32px 20px; gap:8px;}
.family-photo{width:100%; max-width:420px; border-radius:var(--radius); box-shadow:var(--shadow); margin-bottom:10px;}
.app-logo{font-size:3.6rem; animation:float 3.2s ease-in-out infinite;}
@keyframes float{0%,100%{transform:translateY(0);}50%{transform:translateY(-6px);}}
.app-title{font-size:2.3rem; font-weight:800; letter-spacing:-.5px; color:var(--ink);}
.app-sub{color:var(--muted); font-size:1.05rem; margin-bottom:18px;}
.kid-cards{display:flex; flex-direction:column; gap:12px; width:100%; max-width:380px;}
.kid-card{
  display:flex; align-items:center; gap:16px; background:var(--card); border:1px solid var(--line); border-radius:var(--radius);
  padding:16px 18px; box-shadow:var(--shadow); cursor:pointer; text-align:left; width:100%;
  transition:transform .12s ease;
}
.kid-card:active{transform:scale(.96);}
.kid-card .kid-ava{width:72px; height:72px; border-radius:50%; overflow:hidden; flex:none; box-shadow:0 3px 10px rgba(0,0,0,.12);}
.kid-card .kid-ava svg{width:100%; height:100%; display:block;}
.kid-card .kid-name{font-size:1.35rem; font-weight:800;}
.kid-card .kid-meta{color:var(--muted); font-size:.9rem;}
.kid-card .kid-go{margin-left:auto; font-size:1.6rem; color:var(--pink);}
.btn-ghost{background:none; border:2px dashed var(--line); color:var(--muted); border-radius:var(--radius-sm); padding:10px 20px; margin-top:22px; font-size:.95rem; cursor:pointer;}

/* ---------- topbar / tabbar ---------- */
.topbar{
  display:flex; align-items:center; gap:10px; padding:calc(10px + env(safe-area-inset-top)) 14px 10px;
  background:var(--plum); color:#fff;
  position:sticky; top:0; z-index:50;
}
.topbar-title{flex:1; text-align:center; font-size:1.2rem; font-weight:800;}
.icon-btn{
  width:44px; height:44px; border-radius:50%; border:none; background:rgba(255,255,255,.16);
  color:#fff; font-size:1.6rem; line-height:1; cursor:pointer; flex:none;
}
.icon-btn:active{transform:scale(.92);}
.kid-chip{display:flex; align-items:center; gap:8px; font-weight:800; font-size:1.05rem; flex:1;}
#board-avatar-mini{display:inline-flex; flex:none;}
.points-pill{background:rgba(255,255,255,.16); border-radius:999px; padding:8px 14px; font-weight:800; white-space:nowrap;}
.board-scroll{flex:1; overflow-y:auto; padding:16px 16px calc(var(--tabbar-h) + 20px); -webkit-overflow-scrolling:touch;}
.tabbar{
  position:fixed; bottom:0; left:0; right:0; height:calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom:env(safe-area-inset-bottom); display:flex; background:var(--card);
  border-top:1px solid var(--line); z-index:50;
}
.tab{flex:1; border:none; background:none; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px;
  font-size:1.4rem; color:var(--muted); cursor:pointer;}
.tab span{font-size:.68rem; font-weight:700;}
.tab.active{color:var(--pink);}

/* ---------- board stats ---------- */
/* points hero: the first thing below the avatar — big and unmissable */
.points-hero{text-align:center; padding:20px 16px 14px;}
.points-hero-num{font-size:3.2rem; font-weight:900; color:#2B2140; line-height:1; background:none; border:0; cursor:pointer; font-family:inherit;}
.points-hero-num .pa-lock{font-size:1.05rem; vertical-align:super; opacity:.35; margin-left:4px;}
.pa-val{text-align:center; font-size:2.6rem; font-weight:900; color:#2B2140; margin:10px 0 4px;}
.pa-steps{display:flex; gap:8px; justify-content:center; flex-wrap:wrap; margin:8px 0 4px;}
.pa-step{border:1px solid var(--line); background:var(--card); border-radius:12px; padding:10px 16px; font-weight:800; font-size:1.05rem; cursor:pointer; color:#2B2140;}
.pa-step:active{transform:scale(.94);}
.points-hero-label{margin-top:4px; font-size:.8rem; font-weight:800; color:#8A7FA3;
  text-transform:uppercase; letter-spacing:.1em;}
/* goal strip: stars left to reach the weekly goal */
.stats-row{display:flex; gap:10px; margin-bottom:14px;}
.stat-card{flex:1; background:var(--card); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); padding:14px 8px; text-align:center;}
.stat-label{font-size:.72rem; color:var(--muted); font-weight:700; text-transform:uppercase; letter-spacing:.5px; margin-bottom:6px;}
.daily-ring{width:64px; height:64px; margin:0 auto;}
.streak-num{font-size:1.5rem; font-weight:800;}
.level-badge{display:inline-block; background:linear-gradient(135deg,var(--amber),var(--orange)); color:#6B4A00;
  font-weight:800; border-radius:999px; padding:8px 16px; font-size:1.05rem;}

/* ---------- mystery card ---------- */
.mystery-card{
  background:linear-gradient(135deg,#4A3FBF,#27BFA9); border-radius:var(--radius); color:#fff;
  padding:18px; margin-top:28px; margin-bottom:26px; box-shadow:var(--shadow); text-align:center;
}
.mystery-card .m-title{font-weight:800; font-size:1.15rem; margin-bottom:4px;}
.mystery-card .m-sub{opacity:.9; font-size:.9rem; margin-bottom:12px;}
.mystery-slot{font-size:1.25rem; font-weight:800; background:rgba(255,255,255,.18); border-radius:14px; padding:12px; min-height:58px;
  display:flex; align-items:center; justify-content:center; text-align:center; flex-wrap:wrap; gap:4px;
  overflow-wrap:anywhere; max-width:100%; line-height:1.35; margin-bottom:12px;}
.mystery-slot.result{font-size:1.05rem;}
.mystery-slot.spinning{animation:slot .12s infinite;}
@keyframes slot{0%{transform:translateY(-3px);}100%{transform:translateY(3px);}}
/* gift-box pre-spin state: no more ❓❓❓ */
.mystery-slot.pre{position:relative; min-height:84px;}
.m-gift{font-size:2.8rem; line-height:1; display:inline-block; animation:gift-pulse 1.8s ease-in-out infinite; filter:drop-shadow(0 4px 8px rgba(0,0,0,.25));}
@keyframes gift-pulse{0%,100%{transform:scale(1) rotate(-5deg);}50%{transform:scale(1.14) rotate(5deg);}}
.m-x2{position:absolute; top:6px; right:10px; background:#FFD93B; color:#5B4A00; font-size:.8rem; font-weight:900;
  border-radius:999px; padding:3px 10px; box-shadow:0 2px 6px rgba(0,0,0,.2);}
.btn-spin{background:#fff; color:#4A3FBF; border:none; border-radius:999px; padding:12px 30px; font-size:1.05rem; font-weight:800; cursor:pointer;}
.btn-spin:active{transform:scale(.95);}
.btn-spin:disabled{opacity:.6;}

/* ---------- tasks ---------- */
.section-title{font-size:1.15rem; font-weight:800; margin:6px 4px 14px; letter-spacing:-.2px;}
.task-grid{display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-bottom:20px;}
.task-card{
  background:var(--card); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow);
  padding:20px 12px 14px; cursor:pointer; display:flex; flex-direction:column; align-items:center; gap:8px;
  transition:transform .12s ease; position:relative; min-height:150px; justify-content:flex-start;
}
.task-card:active{transform:scale(.94);}
.task-card.done-today{box-shadow:var(--shadow), 0 0 0 3px rgba(51,196,110,.45);}
.task-card .t-emoji{font-size:3rem; line-height:1; min-height:3.4rem; display:flex; align-items:center; justify-content:center;}
.task-card .t-img{width:3.4rem;height:3.4rem;border-radius:16px;object-fit:cover;flex:none;}
.prow .t-img{width:2.2rem;height:2.2rem;border-radius:10px;object-fit:cover;flex:none;}
.task-card .t-avatar{width:3.4rem;height:3.4rem;border-radius:50%;object-fit:cover;flex:none;}
.prow .t-avatar{width:2.2rem;height:2.2rem;border-radius:50%;object-fit:cover;flex:none;}
.task-card .t-title{font-weight:700; font-size:.95rem; text-align:center; line-height:1.3;}
.task-card .t-points{background:#FFF1C9; color:var(--amber-deep); font-weight:800; border-radius:999px; padding:4px 12px; font-size:.85rem; margin-top:auto;}
.task-card .by-line{display:block; font-size:.68rem; font-weight:700; color:var(--muted); min-height:1rem; line-height:1rem;}
/* v68: custom-task cards get a delete ✕ on the kid board (creator only) */
.task-card-wrap{position:relative;}
.task-card-wrap .task-card{width:100%; height:100%;}
.card-del{position:absolute; top:8px; right:8px; width:30px; height:30px; border-radius:50%;
  border:1.5px solid var(--line); background:var(--surface); color:#A79FC0;
  font-size:.8rem; font-weight:800; cursor:pointer; font-family:inherit; z-index:2;
  display:inline-flex; align-items:center; justify-content:center; line-height:1;}
.card-del:active{transform:scale(.9);}
.task-card .t-done-badge{position:absolute; top:8px; right:8px; background:var(--green); color:#fff; border-radius:50%; width:26px; height:26px; display:flex; align-items:center; justify-content:center; font-size:.9rem; font-weight:800;}
.task-card.special{background:#FFF9E8; border:1px solid #F0D48A;}
.task-card.mystery-done{box-shadow:var(--shadow), 0 0 0 3px rgba(91,84,214,.4);}
.pop{animation:pop .35s ease;}
@keyframes pop{0%{transform:scale(1);}40%{transform:scale(1.12) rotate(-2deg);}100%{transform:scale(1);}}

/* ---------- avatar builder ---------- */
.avatar-stage{display:flex; justify-content:center; margin:8px 0 4px;}
.avatar-stage #avatar-preview svg{width:100%; height:100%; display:block;}
.opt-group{margin:14px 0;}
.opt-group h3{margin-bottom:8px; color:var(--muted); text-transform:uppercase; letter-spacing:.5px; font-size:.8rem; font-weight:800;}
.bonus-banner{background:#FFF4D8; border:1px solid #F0C96A; border-radius:var(--radius-sm);
  padding:12px 14px; text-align:center; font-weight:700; color:#7A5C00; margin:6px 0 2px; box-shadow:var(--shadow);}
.bonus-banner b{color:var(--pink);}
.opt-row{display:flex; gap:10px; flex-wrap:wrap;}
.opt{
  width:60px; height:60px; border-radius:var(--radius-sm); border:2px solid transparent; background:var(--card);
  box-shadow:var(--shadow); cursor:pointer; display:flex; align-items:center; justify-content:center; overflow:hidden; position:relative;
}
.opt svg{width:100%; height:100%;}
.opt.sel{border-color:var(--pink);}
.opt .lock{position:absolute; inset:0; background:rgba(38,34,58,.45); color:#fff; display:flex; align-items:center; justify-content:center; font-size:1.1rem;}
.opt.swatch{border-radius:50%;}
.btn-primary{background:linear-gradient(135deg,#FF5C7A,var(--pink)); color:#fff; border:none; border-radius:999px;
  padding:14px 28px; font-size:1.05rem; font-weight:800; cursor:pointer; box-shadow:var(--shadow);}
.btn-primary.big{width:100%; margin:10px 0 20px;}
.btn-primary:active{transform:scale(.97);}

/* ---------- shop ---------- */
.shop-tabs{display:flex; gap:8px; margin-bottom:14px; overflow-x:auto; scrollbar-width:none; -webkit-overflow-scrolling:touch; padding-bottom:2px;}
.shop-tabs::-webkit-scrollbar{display:none;}
.shop-tab{flex:1 0 auto; border:none; background:#ECE8F3; border-radius:999px; padding:12px 16px; font-weight:700; font-size:.95rem; color:var(--muted); cursor:pointer; white-space:nowrap; min-height:44px;}
.shop-tab.active{background:var(--ink); color:#fff;}
.shop-list{display:flex; flex-direction:column; gap:12px;}
.shop-item{display:flex; align-items:center; gap:14px; background:var(--card); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); padding:14px;}
.shop-item .s-emoji{font-size:2.2rem; flex:none; width:52px; height:52px; display:flex; align-items:center; justify-content:center; background:var(--surface); border-radius:var(--radius-sm);}
.shop-item .s-info{flex:1;}
.shop-item .s-title{font-weight:800;}
.shop-item .s-desc{color:var(--muted); font-size:.85rem;}
.shop-item .s-cost{font-weight:800; color:var(--amber-deep); white-space:nowrap;}
.btn-buy{background:var(--green); color:#fff; border:none; border-radius:999px; padding:10px 20px; font-weight:800; cursor:pointer; flex:none;}
.btn-buy:disabled{background:#D5CCE6;}
/* 💡 reward suggestions (kid shop + parent approval) */
.suggest-box{margin-top:18px; background:var(--card); border:1px dashed var(--line); border-radius:var(--radius); padding:16px; box-shadow:var(--shadow);}
.suggest-box .sug-title{font-weight:800; margin:0 0 8px; color:var(--plum);}
.sug-row{display:flex; justify-content:space-between; align-items:center; gap:10px; padding:8px 0; border-top:1px solid var(--line); font-size:.9rem;}
.sug-row .sug-name{font-weight:700;}
.sug-row .sug-status{color:var(--muted); font-size:.8rem; white-space:nowrap;}
.btn-suggest{width:100%; margin-top:6px; background:var(--surface); border:2px dashed var(--line); border-radius:var(--radius); padding:14px; font-weight:800; font-size:1rem; color:var(--plum); cursor:pointer;}
.sug-form{display:flex; flex-direction:column; gap:10px;}
.sug-form input{border:2px solid var(--line); border-radius:var(--radius-sm); padding:12px 14px; font-size:1rem; font-family:inherit;}
.sug-form input:focus{outline:none; border-color:var(--pink);}
.btn-buy:active{transform:scale(.94);}
.owned-tag{background:var(--teal); color:#fff; font-weight:700; border-radius:999px; padding:8px 14px; font-size:.85rem; flex:none;}

/* ---------- leaderboard ---------- */
.leader-list{display:flex; flex-direction:column; gap:10px; margin-bottom:20px;}
.leader-row{display:flex; align-items:center; gap:12px; background:var(--card); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); padding:12px 16px;}
.leader-row.first{background:#FFF9E6; border:1px solid #F0D48A;}
.leader-row .rank{font-size:1.4rem; width:40px; text-align:center; flex:none;}
.leader-row .l-ava{width:52px; height:52px; border-radius:50%; overflow:hidden; flex:none;}
.leader-row .l-ava svg{width:100%; height:100%; display:block;}
.leader-row .l-name{font-weight:800; flex:1;}
.leader-row .l-pts{font-weight:800; color:var(--pink); font-size:1.15rem;}
/* v67: leaderboard parity — weekly + total + latest per kid */
.leader-row .l-scores{margin-left:auto; flex:none; display:flex; flex-direction:column; align-items:flex-end; gap:2px;}
.leader-row .l-total{font-size:.75rem; color:var(--muted); font-weight:700;}
.leader-row .l-latest{display:block; font-size:.72rem; color:var(--muted); font-weight:700; margin-top:4px;}
.leader-row .l-latest b{color:#1E7A38;}
.champion{background:linear-gradient(135deg,var(--amber),var(--orange)); border-radius:var(--radius); padding:18px; text-align:center; margin-bottom:16px; box-shadow:var(--shadow);}
.champion .c-emoji{font-size:2.6rem;}
.champion .c-text{font-weight:800; font-size:1.2rem; color:#6B4A00;}

/* ---------- parent ---------- */
.pin-gate{text-align:center; padding:20px 0;}
.pin-dots{display:flex; gap:12px; justify-content:center; margin:16px 0;}
.pin-dots span{width:20px; height:20px; border-radius:50%; background:#E7DEF5; border:2px solid var(--line);}
.pin-dots span.on{background:var(--pink); border-color:var(--pink);}
.pin-pad{display:grid; grid-template-columns:repeat(3,80px); gap:10px; justify-content:center; margin-bottom:12px;}
.pin-key{width:80px; height:64px; border-radius:var(--radius-sm); border:1px solid var(--line); background:var(--card); box-shadow:var(--shadow); font-size:1.5rem; font-weight:800; cursor:pointer;}
.pin-key:active{transform:scale(.94);}
.prow{display:flex; align-items:center; gap:10px; background:var(--card); border:1px solid var(--line); border-radius:var(--radius-sm); box-shadow:var(--shadow); padding:10px 12px; margin-bottom:10px;}
.prow .p-info{flex:1;}
.prow .p-title{font-weight:800;}
.prow .p-sub{color:var(--muted); font-size:.82rem;}
.pbtn{border:none; border-radius:12px; padding:9px 12px; font-weight:700; cursor:pointer; font-size:.85rem;}
.pbtn.edit{background:var(--blue); color:#fff;}
.pbtn.del{background:#FFE1E7; color:var(--red);}
.pbtn.toggle{background:#E7DEF5; color:var(--ink);}
.btn-add{width:100%; border:2px dashed var(--line); background:var(--surface); color:var(--pink); border-radius:var(--radius-sm); padding:14px; font-weight:800; font-size:1rem; cursor:pointer; margin:6px 0 16px;}
.form-card{background:var(--card); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); padding:16px; margin-bottom:14px;}
.form-card label{display:block; font-size:.8rem; font-weight:800; color:var(--muted); text-transform:uppercase; margin:10px 0 4px;}
.form-card input,.form-card select{width:100%; border:2px solid var(--line); border-radius:12px; padding:12px; font-size:1rem; font-family:inherit;}
.form-row{display:flex; gap:10px;}
.form-row .btn-primary{flex:1;}
.btn-secondary{background:#ECE8F3; color:var(--ink); border:none; border-radius:999px; padding:14px 20px; font-weight:800; cursor:pointer;}
.danger{border:1px solid #F5B8C4; background:#FFF5F7; border-radius:var(--radius); padding:16px; margin-top:16px;}
.danger h3{color:var(--red); margin-bottom:8px;}
.hist-row{display:flex; gap:10px; align-items:center; background:var(--card); border:1px solid var(--line); border-radius:14px; padding:10px 12px; margin-bottom:8px; box-shadow:var(--shadow); font-size:.9rem;}
.hist-row .h-pts{margin-left:auto; font-weight:800; color:var(--pink); white-space:nowrap;}
.hist-undo{margin-left:8px; border:1px solid var(--line); background:#FFF4F6; color:#C2436B;
  border-radius:10px; padding:6px 10px; font-size:.78rem; font-weight:800; cursor:pointer; white-space:nowrap;}
.hist-undo:disabled{opacity:.5;}

/* ---------- toast ---------- */
#toast-wrap{position:fixed; bottom:calc(var(--tabbar-h) + 16px); left:16px; right:16px; z-index:250; display:flex; flex-direction:column; gap:8px; align-items:center; pointer-events:none;}
.toast{background:var(--ink); color:#fff; border-radius:999px; padding:13px 22px; font-weight:700; box-shadow:var(--shadow);
  display:flex; gap:12px; align-items:center; pointer-events:auto; animation:toastin .25s ease; max-width:100%;}
@keyframes toastin{from{opacity:0; transform:translateY(12px);} to{opacity:1; transform:none;}}
.toast button{background:var(--amber); border:none; border-radius:999px; padding:8px 16px; font-weight:800; cursor:pointer; color:#6B4A00;}

@media (min-width:700px){
  .board-scroll,.home-wrap{max-width:560px; margin:0 auto; width:100%;}
  .task-grid{grid-template-columns:repeat(3,1fr);}
}

/* ---------- illustrated avatars ----------
   .ava is the ring: customizable background + frame border.
   Portrait img and accessory overlay share the EXACT same box
   (absolute, 9% inset) so accessories always align with the face
   at every size. Every usage context must give .ava an explicit size. */
.ava{position:relative; display:block; border-radius:50%; overflow:hidden; box-sizing:border-box;
  border:3px solid var(--amber); background:#fff; box-shadow:0 2px 8px rgba(38,34,58,.14); flex:none;}
.ava img{position:absolute; left:9%; top:9%; width:82%; height:82%; object-fit:cover; border-radius:50%; display:block;}
.ava .ava-acc{position:absolute; left:9%; top:9%; width:82%; height:82%; pointer-events:none;}
.kid-card .kid-ava{box-shadow:none; border:none; overflow:visible;}
.kid-card .kid-ava .ava{width:72px; height:72px;}
/* Homepage: portraits are full-bleed — the image fills the entire circle
   edge to edge, no background ring visible. */
.kid-card .ava img, .kid-card .ava .ava-acc{left:0; top:0; width:100%; height:100%;}
#board-avatar-mini .ava{width:38px; height:38px; border-width:2px;}
.ev-ava .ava{width:40px; height:40px; border-width:2px;}
.leader-row .l-ava{overflow:visible;}
.leader-row .l-ava .ava{width:52px; height:52px;}
.kid-floor{display:block; color:var(--teal); font-size:.85rem; font-weight:700; margin-top:2px;}

/* ---------- board hero: full-bleed portrait moment on top of the kid board ---------- */
.board-hero{position:relative; margin:-16px -16px 18px; height:340px; border-radius:0 0 30px 30px; overflow:hidden; background:#EFE7F7;}
.board-hero .hero-photo{position:absolute; inset:0; width:100%; height:100%; object-fit:cover; display:block;}
.board-hero .hero-shade{position:absolute; inset:0;}
.board-hero .hero-name{position:absolute; left:20px; right:20px; bottom:54px; text-align:center;
  font-size:2rem; font-weight:800; color:#fff; letter-spacing:-.01em; text-shadow:0 2px 14px rgba(38,34,58,.35);}
.board-hero .hero-sub{position:absolute; left:20px; right:20px; bottom:24px; text-align:center;
  color:#fff; font-weight:700; font-size:1rem; text-shadow:0 1px 10px rgba(38,34,58,.35);}
.board-hero .hero-sub b{color:#fff;}

/* ---------- LIVING avatars (.liv): the ORIGINAL portrait, with a real blink ----------
   Two pixel-identical copies of the portrait are stacked; the top copy is
   clipped to a tight band around the eyes and only that band squishes on
   blink — the head never moves, so features can't drift out of place. */
.ava .liv{position:absolute; left:9%; top:9%; width:82%; height:82%; border-radius:50%;}
/* v59: the accessory lives INSIDE .liv (see liveAvatarSVG) so it rides the
   portrait's mood animations. .liv already occupies the 9%/82% box, so the
   overlay fills it edge to edge and sits above the blink frame. */
.ava .liv .ava-acc{left:0; top:0; width:100%; height:100%; z-index:3;}
/* v66: the board hero's .liv is not inside .ava, so it needs its own rule —
   the accessory fills the hero portrait edge to edge, above the blink frame */
.hero-svg .liv .ava-acc{position:absolute; left:0; top:0; width:100%; height:100%; z-index:3; pointer-events:none;}
/* hero stage: the portrait sits square and centered on the gradient — no crop,
   so the blink band stays pixel-aligned with the eyes */
.hero-svg{position:absolute; inset:0; display:flex; align-items:center; justify-content:center; overflow:hidden; z-index:1;}
.hero-svg .liv{position:relative; height:100%; aspect-ratio:1;}
.liv{position:relative; overflow:hidden;}
.liv img{position:absolute; inset:0; width:100%; height:100%; object-fit:cover; display:block;}
.liv-base{z-index:1;}
/* real blink: crossfade to the genuine closed-eye portrait frame.
   Each kid gets their own rhythm so the home screen doesn't blink in sync. */
.liv-blinkframe{position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:2;
  opacity:0; animation:liv-real-blink 5.2s ease-in-out infinite;}
@keyframes liv-real-blink{
  0%,90.5%{opacity:0;}
  92.8%{opacity:1;}
  95.2%,100%{opacity:0;}
}
/* idle drift retired Sep 19 (Maayan: keep the image still, only blink).*/
.hero-svg .hero-bg{position:absolute; inset:-24px; background-size:cover; background-position:center;
  filter:blur(26px) saturate(1.15);}
.hero-svg .liv{z-index:1;}
/* v61: clean peach hero — no blurred photo copy, no dark fade. A soft warm
   silhouette glows behind the portrait instead of a second square. */
.hero-svg.hero-sil::before{content:""; position:absolute; top:50%; left:50%; width:82%; aspect-ratio:1;
  transform:translate(-50%,-52%); border-radius:50%; pointer-events:none;
  background:radial-gradient(circle, rgba(186,116,62,.30) 0%, rgba(186,116,62,0) 68%);}
.board-hero.hero-peach .hero-name{color:#2B2140; text-shadow:0 1px 0 rgba(255,255,255,.55);}
.board-hero.hero-peach .hero-sub{color:#7A6C96; text-shadow:none;}
.board-hero.hero-peach .hero-sub b{color:#2B2140;}
/* thinking: gentle side rock + the 💭 bubble that lives inside .liv */
.liv .think-bubble{display:none; position:absolute; top:5%; right:3%; font-size:2rem; z-index:5;
  filter:drop-shadow(0 3px 6px rgba(0,0,0,.25)); animation:bubble-pop .35s ease-out;}
.liv.thinking .think-bubble{display:block;}
.liv.thinking{animation:liv-ponder 1.8s ease-in-out infinite;}
@keyframes liv-ponder{0%,100%{transform:rotate(0);}25%{transform:rotate(2.4deg);}75%{transform:rotate(-2.4deg);}}
/* celebrating: happy little bounces */
.liv.celebrating{animation:liv-joy .55s ease-in-out 4;}
@keyframes liv-joy{0%,100%{transform:translateY(0) scale(1);}30%{transform:translateY(-8%) scale(1.03);}60%{transform:translateY(1%) scale(.995);}}
@media (prefers-reduced-motion: reduce){
  .liv,.liv img{animation:none !important;}
}

/* retired: the hero-face layer trick (it could drift and show hair at the cheeks).
   Gallery portraits now render as one plain photo; the kids get the .liv above. */

/* shared helpers for avatar moods */
@keyframes bubble-pop{0%{transform:scale(0);}70%{transform:scale(1.25);}100%{transform:scale(1);}}
.burst-emoji{position:absolute; font-size:1.8rem; pointer-events:none; z-index:6;
  animation:burst-float 1.4s ease-out forwards;}
@keyframes burst-float{
  0%{transform:translateY(0) scale(.4); opacity:0;}
  20%{opacity:1;}
  100%{transform:translateY(-130px) translateX(var(--bx,0px)) scale(1.15) rotate(20deg); opacity:0;}
}

.avatar-stage #avatar-preview{width:auto; height:auto; border:none; border-radius:0; overflow:visible; box-shadow:none; background:none;}
.avatar-stage #avatar-preview .ava{width:190px; height:190px; border-width:5px;}
.char-grid{display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin:4px 0 6px;}
.char-btn{border:2px solid transparent; background:var(--card); border-radius:var(--radius); padding:10px; cursor:pointer;
  box-shadow:var(--shadow); display:flex; flex-direction:column; align-items:center; gap:6px;}
.char-btn .ava{width:76px; height:76px;}
.char-btn.sel{border-color:var(--pink);}
.char-btn .char-name{font-size:.75rem; font-weight:700; color:var(--muted);}
.char-btn.sel .char-name{color:var(--pink);}
.opt.char-opt{width:100%; height:auto;}

/* ---------- missions ---------- */
.mission-card{border:1px solid var(--teal); background:#F2FFFE;}
.mission-card .t-day{font-size:.72rem; font-weight:800; color:#189A88; text-transform:uppercase; letter-spacing:.5px;}
.bonus-tag{background:#FFF3D6; color:var(--amber-deep); font-weight:700; border-radius:999px; padding:3px 10px; font-size:.75rem;}

.goal-nudge{
  background:#FFF8E4; border:1px solid #F0D48A;
  border-radius:var(--radius); padding:12px 16px; margin-bottom:14px; box-shadow:var(--shadow);
  font-size:.95rem; line-height:1.5; text-align:center;
}

/* ---------- parent messages: acting-as ---------- */
.acting-as{display:flex; align-items:center; gap:10px; background:var(--card); border:1px solid var(--line); border-radius:18px;
  box-shadow:var(--shadow); padding:10px 14px; margin-bottom:14px;}
.acting-label{font-weight:800; color:var(--muted); font-size:.78rem; text-transform:uppercase; letter-spacing:.5px;}
.acting-btn{display:flex; align-items:center; gap:8px; border:2px solid transparent; background:var(--surface);
  border-radius:999px; padding:6px 16px 6px 7px; font-weight:700; cursor:pointer; font-size:.95rem; color:var(--ink);}
.acting-btn img{width:34px; height:34px; border-radius:50%; object-fit:cover;}
.acting-btn.sel{border-color:var(--pink); background:#FFF0F5;}
.acting-btn:active{transform:scale(.95);}
.form-card textarea{width:100%; border:2px solid var(--line); border-radius:12px; padding:12px;
  font-size:1rem; font-family:inherit; resize:vertical; min-height:80px;}
.char-count{text-align:right; color:var(--muted); font-size:.8rem; margin:4px 0 4px;}
.sent-row{display:flex; gap:10px; align-items:flex-start; background:var(--card); border:1px solid var(--line); border-radius:14px;
  padding:10px 12px; margin-bottom:8px; box-shadow:var(--shadow); font-size:.9rem;}
.sent-row img{width:36px; height:36px; border-radius:50%; object-fit:cover; flex:none;}
.sent-to{color:var(--muted); font-size:.8rem;}

/* ---------- kid inbox ---------- */
.inbox-card{display:flex; gap:12px; align-items:flex-start;
  background:#FFF6F8; border:1px solid #F3B8C6;
  border-radius:var(--radius); padding:14px; margin-bottom:12px; box-shadow:var(--shadow);}
.inbox-ava{width:52px; height:52px; border-radius:50%; object-fit:cover; flex:none;
  border:3px solid #fff; box-shadow:0 2px 8px rgba(38,34,58,.14);}
.inbox-body{flex:1; min-width:0;}
.inbox-head{font-size:.9rem; margin-bottom:4px;}
.inbox-text{font-size:1rem; line-height:1.45; overflow-wrap:anywhere;}
.inbox-love{border:none; background:#fff; border-radius:50%; width:52px; height:52px; font-size:1.5rem;
  cursor:pointer; box-shadow:var(--shadow); flex:none;}
.inbox-love:active{transform:scale(.88);}
.inbox-badge{background:var(--pink); color:#fff; font-weight:800; border-radius:999px;
  padding:4px 10px; font-size:.8rem; margin-left:auto; white-space:nowrap; flex:none;}

/* ---------- rota ---------- */
.rota-kid{background:var(--card); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); padding:14px; margin-bottom:14px;}
.rota-kid h3{margin-bottom:2px;}
.rota-floor{color:var(--teal); font-weight:700; font-size:.9rem; margin-bottom:10px;}
.rota-row{display:flex; align-items:center; gap:8px; margin-bottom:8px; flex-wrap:wrap;}
.rota-row select{flex:1; min-width:140px; border:2px solid var(--line); border-radius:12px; padding:10px; font-size:.95rem; font-family:inherit;}
.day-row{display:flex; gap:4px;}
.day-btn{width:34px; height:34px; border-radius:50%; border:2px solid var(--line); background:#fff; font-weight:800;
  font-size:.75rem; color:var(--muted); cursor:pointer;}
.day-btn.on{background:var(--teal); border-color:var(--teal); color:#fff;}
.day-btn:active{transform:scale(.92);}
.rota-add{border:2px dashed var(--teal); background:#F2FFFE; color:#0E9E94; border-radius:14px; padding:10px;
  font-weight:700; width:100%; cursor:pointer; margin:4px 0 8px;}
.tasklist-box{margin-top:8px; border-top:1px dashed var(--line); padding-top:10px;}
.tasklist-box .tl-title{font-weight:800; font-size:.9rem; margin-bottom:6px;}
.tl-check{display:flex; align-items:center; gap:8px; font-size:.9rem; padding:5px 0;}
.tl-check input{width:20px; height:20px; accent-color:var(--pink);}
.toggle-row{display:flex; align-items:center; justify-content:space-between; gap:10px;}
.toggle-btn{min-width:90px; border:none; border-radius:999px; padding:10px 18px; font-weight:800; cursor:pointer; color:#fff;}
.toggle-btn.on{background:var(--green);}
.toggle-btn.off{background:#C9BFD9;}

/* ---- bottom sheets (walk logging, notes) ---- */
.sheet-wrap{position:fixed; inset:0; z-index:200; display:flex; align-items:flex-end; justify-content:center;}
.sheet-back{position:absolute; inset:0; background:rgba(38,34,58,.45); animation:fadeIn .18s ease;}
.sheet{position:relative; width:100%; max-width:520px; background:var(--card); border-radius:24px 24px 0 0; padding:22px 22px calc(22px + env(safe-area-inset-bottom)); box-shadow:0 -8px 40px rgba(38,34,58,.25); animation:slideUp .22s ease;
  max-height:86svh; max-height:86dvh; overflow-y:auto; -webkit-overflow-scrolling:touch; overscroll-behavior:contain;}
.sheet h3{margin:0 0 6px; font-size:1.25rem;}
.sheet .muted{margin:0 0 14px;}
@keyframes slideUp{from{transform:translateY(40px); opacity:.6;} to{transform:none; opacity:1;}}
@keyframes fadeIn{from{opacity:0;} to{opacity:1;}}
.walk-row{display:flex; gap:10px; margin-bottom:14px;}
.walk-btn{flex:1; display:flex; flex-direction:column; align-items:center; gap:2px; padding:14px 6px; border-radius:18px; border:2px solid var(--line); background:#fff; font-size:1.6rem; cursor:pointer;}
.walk-btn b{font-size:.95rem;}
.walk-btn span{font-size:.75rem; color:var(--muted);}
.walk-btn.sel{border-color:var(--pink); background:#FFF0F6; box-shadow:0 0 0 3px rgba(244,63,111,.15);}
.note-input{width:100%; box-sizing:border-box; padding:12px 14px; border-radius:14px; border:2px solid var(--line); font-size:1rem; margin-bottom:6px;}
.note-input:focus{outline:none; border-color:var(--pink);}
.sheet-actions{display:flex; gap:10px; margin-top:10px;}
.sheet-actions .btn-ghost{margin-top:0; flex:1;}
.sheet-actions .btn-primary{flex:2; margin:0;}
.btn-primary:disabled{opacity:.45;}

/* ---- history chips ---- */
.walk-chip{display:inline-block; background:#E8F7EE; color:#2F9E44; font-weight:700; font-size:.78rem; border-radius:999px; padding:2px 10px; margin-left:6px;}
.hist-note{font-size:.85rem; color:var(--muted); margin-top:2px;}

/* ---- leaderboard progress ---- */
.l-prog{display:block; height:8px; background:#ECE8F3; border-radius:999px; margin-top:6px; overflow:hidden; max-width:220px;}
.l-prog-fill{display:block; height:100%; background:linear-gradient(90deg,var(--pink),var(--indigo)); border-radius:999px;}

/* ---- parent weekly goals ---- */
.goal-row{display:flex; align-items:center; justify-content:space-between; padding:8px 0; border-top:1px dashed var(--line);}
.goal-row span{font-weight:700;}
.goal-input{width:84px; padding:8px 10px; border-radius:12px; border:2px solid var(--line); font-size:1rem; text-align:center;}
.goal-input:focus{outline:none; border-color:var(--pink);}

/* ---- family schedule ---- */
.sched-nav{display:flex; align-items:center; justify-content:center; gap:10px; margin:6px 0 4px;}
.sched-nav b{font-size:1.05rem;}
/* icon-btn is styled for the dark topbar; on light schedule backgrounds it needs ink */
.sched-nav .icon-btn{background:var(--card); color:var(--ink); border:1px solid var(--line); box-shadow:var(--shadow); width:40px; height:40px; font-size:1.4rem;}
.sched-tools{display:flex; gap:10px; margin:6px 0 14px;}
.sched-tools .btn-ghost, .sched-tools .btn-primary{margin-top:0; flex:1;}
.btn-ghost.sm, .btn-primary.sm{padding:8px 14px; font-size:.85rem;}
.sched-day{background:var(--card); border:1px solid var(--line); border-radius:18px; box-shadow:var(--shadow); padding:12px 14px; margin-bottom:10px;}
.sched-day.today{border:2px solid var(--pink);}
.sched-day-head{display:flex; justify-content:space-between; align-items:center; margin-bottom:6px;}
.sched-day-head b{font-size:1.02rem;}
.sched-day-head span{color:var(--muted); font-size:.85rem;}
.event-row{display:flex; align-items:center; gap:10px; width:100%; text-align:left; background:#fff; border:1px solid var(--line); border-radius:14px; padding:10px 12px; margin:6px 0; cursor:pointer;}
.event-row:active{transform:scale(.98);}
.ev-ava{width:40px; height:40px; border-radius:50%; overflow:hidden; flex:none; display:flex; align-items:center; justify-content:center; font-size:1.4rem;}
.ev-ava svg{width:100%; height:100%; display:block;}
.ev-main{flex:1; min-width:0; display:flex; flex-direction:column; gap:1px;}
.ev-main b{font-size:.95rem;}
.ev-sub{font-size:.8rem; color:var(--muted);}
.ev-note{font-size:.8rem; color:var(--muted); font-style:italic;}
.ev-side{display:flex; flex-direction:column; align-items:flex-end; gap:4px; flex:none;}
.ev-time{font-weight:800; font-size:.85rem;}
.ev-drivers{display:flex; gap:4px; flex-wrap:wrap; justify-content:flex-end;}
.driver-chip{background:#E9F2FF; color:#2B5CB8; font-weight:700; font-size:.72rem; border-radius:999px; padding:2px 8px; white-space:nowrap;}
.ev-detail{display:flex; flex-direction:column; gap:8px; margin:4px 0 12px; font-size:.95rem;}
.btn-del{background:none; border:1px solid #F3A8B8; color:var(--red); border-radius:999px; padding:10px 18px; font-size:.95rem; cursor:pointer; flex:1;}

/* ---- schedule/event form ---- */
.f-label{display:block; font-weight:800; font-size:.82rem; color:var(--muted); margin:12px 0 6px;}
.f-input{width:100%; box-sizing:border-box; padding:11px 13px; border-radius:14px; border:2px solid var(--line); font-size:1rem; font-family:inherit; background:#fff;}
.f-input:focus{outline:none; border-color:var(--pink);}
.f-2col{display:flex; gap:10px;}
.f-2col > div{flex:1; min-width:0;}
.chip-row{display:flex; flex-wrap:wrap; gap:8px;}
.chip{border:2px solid var(--line); background:#fff; border-radius:999px; padding:8px 14px; font-size:.88rem; font-weight:700; cursor:pointer;}
.chip.sel{border-color:var(--pink); background:#FFF0F6; box-shadow:0 0 0 3px rgba(244,63,111,.15);}

/* ---- custom task icon picker ---- */
.icon-grid{display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin-bottom:6px;}
.icon-pick{display:flex; flex-direction:column; align-items:center; gap:2px; border:2px solid var(--line); background:#fff; border-radius:14px; padding:8px 4px; cursor:pointer;}
.icon-pick img{width:44px; height:44px; border-radius:10px; object-fit:cover;}
.icon-pick span{font-size:.62rem; font-weight:700; color:var(--muted);}
.icon-pick.sel{border-color:var(--pink); background:#FFF0F6; box-shadow:0 0 0 3px rgba(244,63,111,.15);}
.icon-pick .icon-emoji{font-size:2.4rem; line-height:44px;}
.star-stepper{display:flex; align-items:center; gap:14px; margin-bottom:6px;}
.star-stepper button{width:44px; height:44px; border-radius:50%; border:2px solid var(--line); background:#fff; font-size:1.3rem; font-weight:800; cursor:pointer; color:var(--plum); line-height:1;}
.star-stepper b{font-size:1.15rem; min-width:70px; text-align:center;}
.new-task-card{border-style:dashed !important; background:none !important; box-shadow:none !important;}

/* ---- parent calendar ---- */
.pcal-toggle{margin-bottom:12px;}
.pcal-toggle .shop-tab{font-size:.9rem; padding:10px;}
.pcal-kid{display:inline-block; align-self:flex-start; font-size:.72rem; font-weight:800; color:var(--plum); background:#EFEAFF; border-radius:999px; padding:2px 10px; margin-bottom:3px;}
.ev-ride{display:block; font-size:.82rem; font-weight:600; color:var(--plum); margin-top:4px;}
.ev-ride b{font-weight:800;}
.ev-ride-sep{color:var(--muted); margin:0 3px;}

/* ---- Today section: weekly anchor + chosen daily task ----
   v67: calm white cards (no more yellow vs green). Green is reserved for done
   states + the Done CTA. ✕ and 🔄 live top-right as icon buttons; Done is a
   full-width CTA below. */
.today-rows{display:flex; flex-direction:column; gap:12px; margin-bottom:6px;}
.today-row-wrap{display:flex; gap:8px; align-items:stretch;}
.today-row{position:relative; flex:1; min-width:0; background:var(--card);
  border:1.5px solid var(--line); border-radius:18px; padding:16px;
  box-shadow:var(--shadow); font-family:inherit; text-align:left;}
.today-row:active{transform:scale(.98);}
.today-row .today-tag{display:block; font-size:.68rem; font-weight:800; color:var(--muted);
  letter-spacing:.4px; text-transform:uppercase; margin-bottom:10px; padding-right:80px;}
.today-row .card-body{display:flex; align-items:center; gap:10px;}
.today-row .t-title{flex:1; min-width:0; font-weight:800; color:#2B2140; font-size:1rem; line-height:1.25;}
.today-row .t-byline{display:block; font-size:.7rem; font-weight:700; color:var(--muted); margin-top:2px;}
.today-row .t-img, .choice-item .t-img{width:2.6rem; height:2.6rem; border-radius:14px; object-fit:cover; flex:none;}
.today-row .t-avatar, .choice-item .t-avatar{width:2.6rem; height:2.6rem; border-radius:50%; object-fit:cover; flex:none;}
.today-row .t-emoji, .choice-item .t-emoji{font-size:1.7rem; line-height:1; flex:none;}
.today-row .t-points{flex:none; font-weight:800; font-size:.85rem; color:var(--amber-deep);
  background:#FFF3D6; border-radius:999px; padding:5px 12px; white-space:nowrap;}
.card-icons{position:absolute; top:10px; right:10px; display:flex; gap:8px;}
.card-icon-btn{width:32px; height:32px; border-radius:50%; border:1.5px solid var(--line);
  background:var(--surface); color:#A79FC0; font-size:.85rem; font-weight:800; cursor:pointer;
  font-family:inherit; display:inline-flex; align-items:center; justify-content:center; line-height:1;}
.card-icon-btn.change{color:#7C8CF8;}
.card-icon-btn:active{transform:scale(.92);}
.today-done-btn{width:100%; margin-top:12px; border:none; border-radius:14px; padding:13px;
  font-family:inherit; font-size:1rem; font-weight:900; color:#fff; cursor:pointer;
  background:linear-gradient(135deg,#3BD873,#28AE55); box-shadow:0 4px 12px rgba(51,196,110,.35);}
.today-done-btn:active{transform:scale(.97);}
.today-undo-btn{width:100%; margin-top:6px; border:2px solid var(--line); border-radius:14px; padding:10px;
  font-family:inherit; font-size:.95rem; font-weight:800; color:#8A7FA3; cursor:pointer; background:#fff;}
.today-undo-btn:active{transform:scale(.97);}
/* v67: done-today — today's finished tasks stay visible right under ⭐ Today.
   Soft green, ✓ ring, no buttons: unmistakable vs pending cards. */
.done-today-label{font-size:.85rem; font-weight:800; color:#1E7A38; margin:2px 4px 8px;}
.done-today-list{display:flex; flex-direction:column; gap:8px; margin-bottom:4px;}
.done-today-row{display:flex; align-items:center; gap:10px; background:#EAF9F0;
  border:1.5px solid #35B75F; border-radius:16px; padding:11px 14px;}
.done-today-row .t-emoji{font-size:1.5rem; line-height:1; flex:none;}
.done-today-row .t-img{width:2.2rem; height:2.2rem; border-radius:10px; object-fit:cover; flex:none;}
.done-today-row .t-title{flex:1; font-weight:700; color:#2B2140; font-size:.92rem;}
.done-today-row .t-points{font-weight:800; font-size:.85rem; color:#1E7A38;
  background:#DDF8E3; border-radius:999px; padding:5px 12px; white-space:nowrap;}
.t-done-ring{width:28px; height:28px; border-radius:50%; background:#2FA84F; color:#fff; flex:none;
  display:inline-flex; align-items:center; justify-content:center; font-size:.95rem; font-weight:900;}
.today-add-btn{flex:none; width:54px; border-radius:16px; border:2.5px dashed #7C5CD6; background:#FBF9FF;
  color:#7C5CD6; font-size:1.7rem; font-weight:900; cursor:pointer; font-family:inherit; align-self:stretch;}
.today-add-btn:active{transform:scale(.94);}
.today-change{border:2px solid var(--line); background:var(--card); border-radius:14px; width:46px;
  font-size:1.3rem; cursor:pointer; color:#8A7FA3;}
.choose-task-btn{display:flex; align-items:center; gap:12px; width:100%; border:2.5px dashed #B9A8E0;
  background:#FBF9FF; border-radius:18px; padding:16px; cursor:pointer; font-family:inherit; text-align:left;}
.choose-task-btn:active{transform:scale(.98);}
.ct-plus{font-size:1.8rem; color:#7C5CD6; font-weight:900;}
.ct-text{flex:1; color:#2B2140;}
.ct-text small{color:#8A7FA3; font-weight:600;}
.choice-list{display:flex; flex-direction:column; gap:8px; margin:6px 0;}
.choice-item{display:flex; align-items:center; gap:10px; border:1px solid var(--line); background:#fff;
  border-radius:14px; padding:12px 14px; cursor:pointer; font-family:inherit; text-align:left; width:100%;}
.choice-item .t-title{flex:1; font-weight:700; color:#2B2140;}
.choice-item .t-points{font-weight:800; color:#2B2140;}

.points-hero-week{margin-top:6px; font-size:.95rem; font-weight:700; color:#6B5F8A;}
.points-hero-week b{color:#2B2140;}
/* v67: latest earning — parity line under the weekly counter */
.points-hero-latest{margin-top:6px; font-size:.82rem; font-weight:700; color:var(--muted);}
.points-hero-latest b{color:#1E7A38;}
/* v67: breathing room — generous gaps around the Today block and Mystery card */
#today-sec{margin-bottom:10px;}
#donetoday-sec{margin-top:2px;}
/* v56: done-this-week list */
.doneweek-list{display:flex; flex-direction:column; gap:8px;}
.doneweek-row{display:flex; align-items:center; gap:10px; background:var(--card); border:1px solid var(--line);
  border-radius:14px; padding:9px 12px;}
.doneweek-row .t-img{width:2.2rem; height:2.2rem; border-radius:10px; object-fit:cover; flex:none;}
.doneweek-row .t-emoji{font-size:1.5rem; line-height:1; flex:none;}
.doneweek-row .t-title{flex:1; font-weight:700; color:#2B2140; font-size:.92rem;}
.doneweek-day{font-size:.72rem; color:var(--muted); font-weight:700; flex:none;}
.doneweek-row .t-points{font-weight:800; color:#2F9E44; flex:none;}
/* v61: a freshly finished task lands in Done this week with a pulse; today's
   rows carry an undo button */
.doneweek-row.landed{animation:landPulse 1.6s ease; border-color:#2F9E44;}
@keyframes landPulse{0%{background:#DFF5E2;}100%{background:var(--card);}}
.doneweek-undo{flex:none; border:none; background:#FDECEC; color:#C0392B; border-radius:8px;
  padding:6px 10px; font-family:inherit; font-size:.75rem; font-weight:800; cursor:pointer;}
.doneweek-undo:active{transform:scale(.94);}
/* v56: mystery result icon boundary (image rendered full-size on mobile) */
.mystery-slot .t-img{width:2.6rem; height:2.6rem; border-radius:12px; object-fit:cover; flex:none;}
.mystery-slot .t-emoji{font-size:1.8rem; line-height:1;}
/* v58: choosing is blue, never green (green is reserved for completed) */
.choice-item.sel{border:2px solid #4C8DFF; background:#EAF1FF;}
.choice-confirm{position:sticky; bottom:0; display:flex; gap:10px; padding:12px 2px calc(8px + env(safe-area-inset-bottom)); background:var(--card);}
.choice-confirm.hidden{display:none;}
.choice-confirm .btn-ghost{margin-top:0; flex:1;}
.btn-select{flex:2; background:linear-gradient(135deg,#5B9BFF,#2F6FE4); color:#fff; border:none;
  border-radius:14px; padding:14px; font-weight:800; font-size:1.05rem; cursor:pointer;}
.btn-select:active{transform:scale(.97);}
