/* ─── Reset & Base ─── */
*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
html,body{height:100%;background:#DDD9D2;font-family:-apple-system,'Helvetica Neue','PingFang TC',sans-serif;overscroll-behavior:none}
button{border:none;background:none;cursor:pointer;font-family:inherit}

/* ─── Setup Overlay ─── */
#setup-overlay{
  position:fixed;inset:0;z-index:999;
  background:linear-gradient(145deg,#EBF3EE,#F7F5F2);
  display:flex;align-items:center;justify-content:center;
}
.setup-card{
  width:min(380px,90vw);
  background:#fff;
  border-radius:24px;
  padding:36px 28px;
  box-shadow:0 8px 40px rgba(0,0,0,.12);
  display:flex;flex-direction:column;align-items:center;gap:12px;
}
.setup-logo{font-size:48px;margin-bottom:4px}
.setup-title{font-size:22px;font-weight:800;color:#1C1C1E;text-align:center}
.setup-sub{font-size:14px;color:#8A8680;text-align:center;margin-bottom:4px}
.setup-divider{width:100%;display:flex;align-items:center;gap:10px;color:#B0ACA6;font-size:13px}
.setup-divider::before,.setup-divider::after{content:'';flex:1;height:1px;background:#E8E4DF}
.setup-code-box{
  width:100%;background:#F8F7F4;border-radius:16px;padding:20px;text-align:center;cursor:pointer;
  transition:background .15s;
}
.setup-code-box:hover{background:#EEF0EB}
.setup-code-label{font-size:11px;color:#8A8680;font-weight:600;text-transform:uppercase;letter-spacing:1px;margin-bottom:8px}
.setup-code{font-size:36px;font-weight:900;letter-spacing:8px;color:#1C1C1E}
.setup-code-hint{font-size:11px;color:#B0ACA6;margin-top:6px}
.setup-card .modal-input{width:100%;margin-bottom:0}
.setup-card .modal-btn{width:100%;margin-top:4px}
.cat-radio{font-size:13px;color:#4A4A4A;display:flex;align-items:center;gap:5px;cursor:pointer}

/* ─── Loading Overlay ─── */
#loading-overlay{
  position:fixed;inset:0;z-index:998;
  background:rgba(247,245,242,.85);
  display:flex;align-items:center;justify-content:center;
}
.spinner{
  width:36px;height:36px;
  border:3px solid #E8E4DF;
  border-top-color:#4A7A5C;
  border-radius:50%;
  animation:spin .7s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg)}}

/* ─── Meal delete btn ─── */
.meal-del-btn{
  display:flex;align-items:center;justify-content:center;
  width:22px;height:22px;border-radius:11px;
  background:#F4F2EF;color:#8A8680;flex-shrink:0;
  stroke:#8A8680;
}
.meal-del-btn svg{stroke:#8A8680;fill:none;stroke-width:2}

/* ─── App Shell ─── */
#app{
  max-width:430px;
  margin:0 auto;
  height:100dvh;
  height:100vh;
  background:#F7F5F2;
  display:flex;
  flex-direction:column;
  position:relative;
  overflow:hidden;
}

/* ─── Status Bar ─── */
.sb{
  height:44px;
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  padding:0 24px 8px;
  flex-shrink:0;
  background:#F7F5F2;
}
.sb-t{font-size:15px;font-weight:700;color:#1C1C1E}
.sb-r{display:flex;gap:5px;align-items:center}
.sb-r svg{width:15px;height:15px;fill:#1C1C1E}

/* ─── Screen container ─── */
.screen{
  flex:1;
  overflow-y:auto;
  overflow-x:hidden;
  -webkit-overflow-scrolling:touch;
  scroll-behavior:smooth;
  padding-bottom:16px;
}
.screen::-webkit-scrollbar{display:none}
.screen{display:none}
.screen.active{display:block}

/* ─── Bottom Nav ─── */
.bn{
  height:82px;
  background:rgba(255,255,255,.96);
  backdrop-filter:blur(20px);
  -webkit-backdrop-filter:blur(20px);
  border-top:1px solid #E8E5E0;
  display:flex;
  align-items:flex-start;
  padding-top:10px;
  flex-shrink:0;
}
.ni{
  flex:1;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:3px;
  padding:4px 0;
  cursor:pointer;
  transition:opacity .15s;
}
.ni:active{opacity:.6}
.ni svg{width:22px;height:22px;fill:none;stroke-width:1.8;transition:stroke .2s}
.ni span{font-size:10px;font-weight:600;transition:color .2s}
.ni.on svg{stroke:#5B8A6B}
.ni.on span{color:#5B8A6B}
.ni.off svg{stroke:#BCBAB6}
.ni.off span{color:#BCBAB6}

/* ─── FAB ─── */
.fab{
  position:absolute;
  right:20px;
  bottom:94px;
  width:52px;height:52px;
  background:#5B8A6B;
  border-radius:26px;
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 4px 16px rgba(91,138,107,.45);
  cursor:pointer;
  transition:transform .15s,box-shadow .15s;
  z-index:10;
}
.fab:active{transform:scale(.92);box-shadow:0 2px 8px rgba(91,138,107,.4)}
.fab svg{width:22px;height:22px;stroke:white;fill:none;stroke-width:2.5}
.fab{display:none}

/* ─── Typography ─── */
.ph{padding:16px 20px 0}
.ptitle{font-size:26px;font-weight:700;color:#1C1C1E;letter-spacing:-.4px}
.psub{font-size:13px;color:#8A8680;margin-top:3px}
.sh{display:flex;justify-content:space-between;align-items:center;padding:0 20px;margin:20px 0 10px}
.st{font-size:16px;font-weight:700;color:#1C1C1E}
.sl{font-size:13px;color:#5B8A6B;font-weight:600;cursor:pointer}

/* ─── Tags ─── */
.tag{display:inline-flex;align-items:center;padding:3px 9px;border-radius:20px;font-size:11px;font-weight:700;white-space:nowrap}
.tg{background:#EBF3EE;color:#4A7A5C}
.to{background:#FEF0E8;color:#D96A3A}
.tb{background:#E8F0FA;color:#3A68B0}
.tp{background:#EEE8F8;color:#6A48AD}
.tr{background:#FEF0F0;color:#C93030}
.tgr{background:#F0F0EE;color:#6A6866}

/* ─── Roommate Bar ─── */
.rmbar{
  display:flex;align-items:center;
  background:#fff;border-radius:16px;
  margin:14px 20px 0;padding:14px 16px;
  box-shadow:0 1px 6px rgba(0,0,0,.07);
}
.rmperson{flex:1;display:flex;align-items:center;gap:10px}
.rmav{
  width:42px;height:42px;border-radius:21px;
  display:flex;align-items:center;justify-content:center;
  font-size:16px;font-weight:800;
  flex-shrink:0;position:relative;
}
.rmav.me{background:#EBF3EE;color:#4A7A5C}
.rmav.mate{background:#E8F0FA;color:#3A68B0}
.rmdot{
  position:absolute;bottom:1px;right:1px;
  width:11px;height:11px;border-radius:6px;border:2px solid #fff;
}
.rmdot.home{background:#4CAF72}
.rmdot.away{background:#F4845F}
.rmdot.work{background:#4A7FC1}
.rmtag{font-size:10px;font-weight:700;color:#B0ACA6;letter-spacing:.3px;margin-bottom:2px}
.rmname{font-size:14px;font-weight:700;color:#1C1C1E}
.rmst{font-size:12px;font-weight:600;margin-top:1px}
.rmst.home{color:#4CAF72}
.rmst.away{color:#F4845F}
.rmst.work{color:#4A7FC1}
.rmdiv{width:1px;height:40px;background:#F0EDE8;margin:0 4px;flex-shrink:0}

/* ─── Week calendar ─── */
.week{display:flex;gap:4px;padding:14px 16px 0}
.dc{
  flex:1;display:flex;flex-direction:column;align-items:center;
  gap:3px;padding:8px 2px;border-radius:12px;cursor:pointer;
  transition:background .15s;
}
.dc:active{opacity:.75}
.dc.on{background:#5B8A6B}
.dl{font-size:10px;font-weight:700;color:#B0ACA6}
.dn{font-size:14px;font-weight:700;color:#1C1C1E}
.dd{width:5px;height:5px;border-radius:3px;background:#5B8A6B}
.dc.on .dl,.dc.on .dn{color:#fff}
.dc.on .dd{background:rgba(255,255,255,.5)}
.dc.no-dot .dd{opacity:0}

/* ─── Mini cards ─── */
.mini-row{display:flex;gap:8px;padding:0 20px}
.mini{flex:1;background:#fff;border-radius:14px;padding:13px 12px;box-shadow:0 1px 6px rgba(0,0,0,.07)}
.ml{font-size:11px;font-weight:700;color:#8A8680;margin-bottom:5px}
.mv{font-size:13px;font-weight:700;color:#1C1C1E}
.ms{font-size:11px;color:#8A8680;margin-top:2px}
.ms.warn{color:#C93030}

/* ─── Reminder cards ─── */
.rc{
  background:#fff;border-radius:14px;padding:13px 15px;
  margin:0 20px;display:flex;align-items:center;gap:11px;
  box-shadow:0 1px 6px rgba(0,0,0,.07);cursor:pointer;
  transition:transform .1s;
}
.rc:active{transform:scale(.98)}
.rc+.rc{margin-top:8px}
.ri{width:38px;height:38px;border-radius:11px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.ri svg{width:18px;height:18px;fill:none;stroke-width:2}
.ri.g{background:#EBF3EE}.ri.g svg{stroke:#4A7A5C}
.ri.o{background:#FEF0E8}.ri.o svg{stroke:#D96A3A}
.ri.b{background:#E8F0FA}.ri.b svg{stroke:#3A68B0}
.rb{flex:1}
.rtitle{font-size:14px;font-weight:600;color:#1C1C1E}
.rtime{font-size:12px;color:#B0ACA6;margin-top:2px}
.rdot{width:7px;height:7px;border-radius:4px;background:#D96A3A;flex-shrink:0}

/* ─── Meals ─── */
.dayscroll{display:flex;gap:7px;padding:14px 20px 0;overflow-x:auto}
.dayscroll::-webkit-scrollbar{display:none}
.db{
  flex-shrink:0;padding:7px 15px;border-radius:20px;
  font-size:13px;font-weight:700;cursor:pointer;transition:all .15s;
}
.db:active{opacity:.7}
.db.on{background:#5B8A6B;color:#fff}
.db.off{background:#EDEAE6;color:#8A8680}

.mc{background:#fff;border-radius:16px;margin:0 20px;box-shadow:0 1px 6px rgba(0,0,0,.07)}
.mc+.mc{margin-top:10px}
.mch{display:flex;align-items:center;gap:10px;padding:13px 15px 10px;border-bottom:1px solid #F4F2EF}
.mib{width:34px;height:34px;border-radius:10px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.mib svg{width:16px;height:16px;fill:none;stroke-width:2}
.mib.am{background:#FFF6E0}.mib.am svg{stroke:#D4960A}
.mib.pm{background:#E8F0FA}.mib.pm svg{stroke:#3A68B0}
.mib.ev{background:#EEE8F8}.mib.ev svg{stroke:#6A48AD}
.mhl{font-size:12px;font-weight:700;color:#8A8680}
.mht{font-size:11px;color:#B0ACA6;margin-top:1px}
.mcb{padding:10px 15px}
.mir{display:flex;justify-content:space-between;align-items:center;padding:6px 0}
.mir+.mir{border-top:1px solid #F9F8F6}
.min{font-size:14px;font-weight:500;color:#1C1C1E}
.miw{font-size:12px;color:#B0ACA6}
.me{display:flex;justify-content:space-between;align-items:center}
.met{font-size:14px;color:#C8C4BE}
.madd{
  width:26px;height:26px;border-radius:13px;
  background:#EBF3EE;display:flex;align-items:center;justify-content:center;
  cursor:pointer;transition:background .15s;
}
.madd:active{background:#C8DFD0}
.madd svg{width:14px;height:14px;stroke:#5B8A6B;fill:none;stroke-width:2.5}

/* ─── Chores Alert ─── */
.alert-card{
  background:linear-gradient(135deg,#E8724A,#F4955A);
  border-radius:16px;padding:15px;margin:0 20px;
  display:flex;align-items:center;gap:12px;
}
.ai{width:38px;height:38px;border-radius:11px;background:rgba(255,255,255,.22);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.ai svg{width:20px;height:20px;stroke:#fff;fill:none;stroke-width:2.5}
.at{color:#fff}
.at-t{font-size:15px;font-weight:700}
.at-s{font-size:12px;opacity:.88;margin-top:2px}

.ac{
  background:#fff;border-radius:14px;padding:13px 15px;
  margin:0 20px;display:flex;align-items:center;justify-content:space-between;
  box-shadow:0 1px 6px rgba(0,0,0,.07);cursor:pointer;transition:transform .1s;
}
.ac:active{transform:scale(.98)}
.ac+.ac{margin-top:8px}
.acl{display:flex;align-items:center;gap:11px}
.aicon{width:36px;height:36px;border-radius:10px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.aicon svg{width:17px;height:17px;fill:none;stroke-width:2}
.aicon.o{background:#FEF0E8}.aicon.o svg{stroke:#D96A3A}
.aicon.b{background:#E8F0FA}.aicon.b svg{stroke:#3A68B0}
.aicon.g{background:#EBF3EE}.aicon.g svg{stroke:#4A7A5C}
.aicon.p{background:#EEE8F8}.aicon.p svg{stroke:#6A48AD}
.an{font-size:14px;font-weight:700;color:#1C1C1E}
.as{font-size:11px;color:#B0ACA6;margin-top:2px}
.acr{text-align:right}
.ast{font-size:12px;font-weight:700}
.ast.r{color:#C93030}
.ast.g{color:#4A7A5C}
.ad{font-size:11px;color:#B0ACA6;margin-top:2px}

.lc{
  background:#fff;border-radius:14px;padding:13px 15px;
  margin:0 20px;display:flex;align-items:center;gap:11px;
  box-shadow:0 1px 6px rgba(0,0,0,.07);
}
.lc+.lc{margin-top:8px}
.av{width:30px;height:30px;border-radius:15px;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:800;flex-shrink:0}
.av.a{background:#EBF3EE;color:#4A7A5C}
.av.b{background:#E8F0FA;color:#3A68B0}
.lb{flex:1}
.lt{font-size:13px;font-weight:600;color:#1C1C1E}
.ls{font-size:11px;color:#B0ACA6;margin-top:2px}
.ld{font-size:11px;color:#C8C4BE}

/* ─── Outings ─── */
.frow{display:flex;gap:8px;padding:14px 20px 0}
.fb{
  padding:8px 18px;border-radius:20px;
  font-size:13px;font-weight:700;cursor:pointer;transition:all .15s;
}
.fb:active{opacity:.7}
.fb.on{background:#5B8A6B;color:#fff}
.fb.off{background:#EDEAE6;color:#8A8680}

.catrow{display:flex;gap:7px;padding:10px 20px 0;overflow-x:auto}
.catrow::-webkit-scrollbar{display:none}
.catrow .tag{padding:5px 12px;font-size:12px;cursor:pointer;transition:all .15s}
.catrow .tag:active{opacity:.7}

.spc{
  background:#fff;border-radius:16px;padding:15px;margin:0 20px;
  box-shadow:0 1px 6px rgba(0,0,0,.07);transition:transform .1s;
}
.spc:active{transform:scale(.98)}
.spc+.spc{margin-top:10px}
.spc.planned{border:1.5px solid #C8DFD0}
.spt{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:9px}
.spn{font-size:15px;font-weight:700;color:#1C1C1E}
.spby{font-size:11px;color:#B0ACA6;margin-top:2px}
.sph{width:22px;height:22px;cursor:pointer}
.sph svg{width:20px;height:20px;stroke:#E88080;fill:none;stroke-width:2}
.sptags{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:10px}
.spb{display:flex;align-items:center;gap:8px}
.sploc{font-size:12px;color:#8A8680;flex:1;display:flex;align-items:center;gap:3px}
.sploc svg{width:12px;height:12px;stroke:#B0ACA6;fill:none;stroke-width:2;flex-shrink:0}
.sppln{
  padding:6px 13px;background:#EBF3EE;border-radius:20px;
  font-size:12px;font-weight:700;color:#4A7A5C;
  cursor:pointer;white-space:nowrap;transition:background .15s;
}
.sppln:active{background:#C8DFD0}

/* ─── Supplies ─── */
.sa-row{display:flex;gap:8px;padding:0 20px}
.sam{flex:1;background:#FEF0E8;border-radius:12px;padding:12px}
.samn{font-size:13px;font-weight:700;color:#1C1C1E}
.samq{font-size:11px;font-weight:700;color:#D96A3A;margin-top:4px}

.si{
  background:#fff;border-radius:14px;padding:13px 15px;
  margin:0 20px;display:flex;align-items:center;gap:11px;
  box-shadow:0 1px 6px rgba(0,0,0,.07);
}
.si+.si{margin-top:8px}
.sii{width:38px;height:38px;border-radius:11px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.sii svg{width:19px;height:19px;fill:none;stroke-width:2}
.sii.g{background:#EBF3EE}.sii.g svg{stroke:#4A7A5C}
.sii.b{background:#E8F0FA}.sii.b svg{stroke:#3A68B0}
.sii.o{background:#FEF0E8}.sii.o svg{stroke:#D96A3A}
.sib{flex:1}
.sin{font-size:14px;font-weight:700;color:#1C1C1E}
.sis{font-size:11px;color:#B0ACA6;margin-top:2px}
.sir{display:flex;flex-direction:column;align-items:flex-end;gap:5px}
.sqr{display:flex;align-items:center;gap:7px}
.sqb{
  width:28px;height:28px;border-radius:14px;
  background:#EDEAE6;display:flex;align-items:center;justify-content:center;
  cursor:pointer;transition:background .1s;flex-shrink:0;
}
.sqb:active{background:#D4D1CC}
.sqb svg{width:13px;height:13px;stroke:#6A6866;fill:none;stroke-width:2.5}
.sqn{font-size:15px;font-weight:800;color:#1C1C1E;min-width:20px;text-align:center}
.sqn.red{color:#C93030}
.slow{font-size:11px;font-weight:700;color:#D96A3A}

.st-red{font-size:15px;font-weight:700;color:#C93030;display:flex;align-items:center;gap:5px}
.st-red svg{width:15px;height:15px;stroke:#C93030;fill:none;stroke-width:2.5}

/* ─── Modal ─── */
.modal-overlay{
  position:absolute;inset:0;
  background:rgba(0,0,0,.4);
  display:flex;align-items:flex-end;
  z-index:100;
  opacity:0;pointer-events:none;
  transition:opacity .25s;
}
.modal-overlay.open{opacity:1;pointer-events:all}
.modal{
  width:100%;background:#fff;
  border-radius:24px 24px 0 0;
  padding:20px 24px 40px;
  transform:translateY(100%);
  transition:transform .3s cubic-bezier(.32,.72,0,1);
}
.modal-overlay.open .modal{transform:translateY(0)}
.modal-handle{width:36px;height:4px;background:#E0DDD9;border-radius:2px;margin:0 auto 20px}
.modal-title{font-size:18px;font-weight:700;color:#1C1C1E;margin-bottom:16px}
.modal-input{
  width:100%;border:1.5px solid #E8E5E0;border-radius:12px;
  padding:12px 14px;font-size:15px;font-family:inherit;
  color:#1C1C1E;background:#F7F5F2;margin-bottom:12px;
  outline:none;transition:border-color .15s;
}
.modal-input:focus{border-color:#5B8A6B}
.modal-btn{
  width:100%;padding:14px;background:#5B8A6B;
  border-radius:14px;font-size:16px;font-weight:700;
  color:#fff;cursor:pointer;transition:background .15s;margin-top:4px;
}
.modal-btn:active{background:#4A7A5C}
.modal-row{display:flex;gap:10px}
.modal-row .modal-input{flex:1}

/* ─── Library ─── */
.modal-sub-title{font-size:13px;color:#8A8680;margin-bottom:12px}
.lib-cat-row{display:flex;gap:7px;padding:0 0 12px;overflow-x:auto;flex-shrink:0}
.lib-cat-row::-webkit-scrollbar{display:none}
.lib-cat-row .tag{padding:5px 12px;font-size:12px;cursor:pointer;flex-shrink:0;transition:all .15s}
.lib-cat-row .tag:active{opacity:.7}
.lib-scroll{overflow-y:auto}
.lib-scroll::-webkit-scrollbar{display:none}
.lib-item{display:flex;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid #F4F2EF}
.lib-item:last-child{border-bottom:none}
.lib-item-info{flex:1;min-width:0}
.lib-item-name{font-size:14px;font-weight:600;color:#1C1C1E}
.lib-item-tags{display:flex;gap:5px;margin-top:4px;flex-wrap:wrap;align-items:center}
.lib-sel-btn{padding:6px 14px;background:#EBF3EE;border-radius:20px;font-size:12px;font-weight:700;color:#4A7A5C;flex-shrink:0;cursor:pointer;transition:background .15s;border:none}
.lib-sel-btn:active{background:#C8DFD0}
.lib-del-btn{width:28px;height:28px;border-radius:14px;background:#FEF0F0;display:flex;align-items:center;justify-content:center;flex-shrink:0;cursor:pointer;transition:background .15s;border:none}
.lib-del-btn:active{background:#F4CCCC}
.lib-del-btn svg{width:13px;height:13px;stroke:#C93030;fill:none;stroke-width:2.5}
.random-btn{width:100%;padding:11px;background:linear-gradient(135deg,#5B8A6B,#7BAE8B);border-radius:12px;font-size:14px;font-weight:700;color:#fff;cursor:pointer;margin-bottom:12px;transition:opacity .15s;display:flex;align-items:center;justify-content:center;gap:6px;border:none;flex-shrink:0}
.random-btn:active{opacity:.8}
.lib-empty{text-align:center;color:#B0ACA6;font-size:13px;padding:32px 20px}
.manage-add-btn{width:100%;padding:12px;background:#F7F5F2;border-radius:12px;font-size:14px;font-weight:700;color:#5B8A6B;border:1.5px dashed #C8DFD0;cursor:pointer;transition:background .15s;margin-top:8px;flex-shrink:0}
.manage-add-btn:active{background:#EBF3EE}

/* ─── Toast ─── */
.toast{
  position:absolute;top:60px;left:50%;transform:translateX(-50%) translateY(-20px);
  background:#1C1C1E;color:#fff;padding:10px 18px;border-radius:20px;
  font-size:13px;font-weight:600;white-space:nowrap;
  opacity:0;pointer-events:none;
  transition:opacity .2s,transform .2s;
  z-index:200;
}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}

/* ─── Chore mark-done btn ─── */
.done-btn{
  padding:5px 12px;background:#EBF3EE;border-radius:20px;
  font-size:11px;font-weight:700;color:#4A7A5C;cursor:pointer;
  transition:background .15s;
}
.done-btn:active{background:#C8DFD0}

/* ─── Header action btn ─── */
.hbtn{
  padding:8px 14px;background:#EBF3EE;border-radius:20px;
  font-size:13px;font-weight:700;color:#4A7A5C;
  cursor:pointer;margin-top:4px;transition:background .15s;flex-shrink:0;
}
.hbtn:active{background:#C8DFD0}

/* ─── Home Filter Buttons ─── */
.filter-row{display:flex;gap:10px;padding:14px 20px 0}
.filter-btn{
  display:flex;align-items:center;gap:6px;
  padding:9px 22px;border-radius:22px;
  font-size:14px;font-weight:700;
  transition:all .2s;flex-shrink:0;line-height:1;
}
.filter-btn:active{opacity:.7}
.filter-btn.activity.on{background:#5B8A6B;color:#fff}
.filter-btn.activity.off{background:#EBF3EE;color:#5B8A6B}
.filter-btn.meal.on{background:#D4960A;color:#fff}
.filter-btn.meal.off{background:#FFF6E0;color:#D4960A}

/* ─── Week Grid with Events ─── */
.week-grid-wrap{padding:10px 16px 0}
.week-grid{display:flex;gap:3px}
.wg-day{flex:1;display:flex;flex-direction:column;align-items:center}
.wg-hdr{
  width:100%;display:flex;flex-direction:column;align-items:center;
  padding:7px 2px 6px;border-radius:10px;cursor:pointer;
  transition:background .15s;margin-bottom:5px;
}
.wg-hdr:active{opacity:.7}
.wg-hdr.today{background:#5B8A6B}
.wg-hdr.sel{background:#3D6B52}
.wg-dname{font-size:10px;font-weight:700;color:#B0ACA6}
.wg-dnum{font-size:14px;font-weight:800;color:#1C1C1E;margin-top:1px}
.wg-hdr.today .wg-dname,.wg-hdr.today .wg-dnum,
.wg-hdr.sel .wg-dname,.wg-hdr.sel .wg-dnum{color:#fff}
.wg-evts{width:100%;display:flex;flex-direction:column;gap:3px;min-height:60px}
.wg-evt{
  width:100%;padding:4px 3px;border-radius:5px;
  font-size:9px;font-weight:700;text-align:center;
  line-height:1.3;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;
}
.wg-evt.meal{background:#FFF6E0;color:#B87B08}
.wg-evt.chore{background:#FEF0E8;color:#C05A2A}
.wg-evt.outing{background:#EBF3EE;color:#3A6B50}

/* ─── CHORES CALENDAR ─── */
.cal-nav-btn{width:28px;height:28px;border-radius:14px;background:#EDEAE6;display:flex;align-items:center;justify-content:center;flex-shrink:0;border:none;cursor:pointer}
.cal-nav-btn svg{width:14px;height:14px;stroke:#6A6866;fill:none;stroke-width:2.5}
.cal-month-label{font-size:13px;font-weight:700;color:#1C1C1E;min-width:76px;text-align:center}
.cal-wrap{margin:6px 0 0}
.cal-days-header{display:grid;grid-template-columns:repeat(7,1fr);border-bottom:1px solid #EDEAE6;padding:0 8px}
.cal-days-header div{text-align:center;font-size:10px;font-weight:700;color:#B0ACA6;padding:5px 0}
.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);padding:0 8px}
.cal-cell{display:flex;flex-direction:column;align-items:center;padding:5px 1px;border-bottom:1px solid #F4F2EF;min-height:52px;transition:background .1s}
.cal-cell:active{background:#F4F2EF}
.cal-dn{font-size:12px;font-weight:600;color:#1C1C1E;width:24px;height:24px;display:flex;align-items:center;justify-content:center;border-radius:12px}
.cal-cell.today .cal-dn{background:#5B8A6B;color:#fff;font-weight:800}
.cal-cell.other-month .cal-dn{color:#D4D1CB}
.cal-dots{display:flex;gap:2px;margin-top:3px;flex-wrap:wrap;justify-content:center;min-height:8px}
.cdot{width:6px;height:6px;border-radius:3px;display:inline-block;flex-shrink:0}
.cdot.cdot-lg{width:10px;height:10px;border-radius:5px}
.dot-o{background:#D96A3A}
.dot-b{background:#3A68B0}
.dot-g{background:#4A7A5C}
.dot-p{background:#6A48AD}
.dot-c{background:#E8704A}
.dot-y{background:#D4960A}
.dot-warn{background:#C93030}
.chore-filters{display:flex;gap:6px;padding:10px 20px;overflow-x:auto}
.chore-filters::-webkit-scrollbar{display:none}
.chore-chip{padding:4px 11px;border-radius:20px;font-size:11px;font-weight:700;flex-shrink:0;border:1.5px solid transparent;cursor:pointer;transition:opacity .15s}
.chip-o{background:#FEF0E8;color:#D96A3A;border-color:#FDDBC8}
.chip-b{background:#E8F0FA;color:#3A68B0;border-color:#C8D8F0}
.chip-g{background:#EBF3EE;color:#4A7A5C;border-color:#C6DDD0}
.chip-p{background:#EEE8F8;color:#6A48AD;border-color:#D4C8F0}
.chip-c{background:#FDEEE8;color:#C94030;border-color:#F8CEC0}
.chip-y{background:#FFF6E0;color:#B87B08;border-color:#F0E0A0}
.chore-legend{margin:0 20px;background:#fff;border-radius:14px;box-shadow:0 1px 6px rgba(0,0,0,.07);overflow:hidden}
.chore-legend-item{display:flex;align-items:center;gap:9px;padding:11px 15px;cursor:pointer;transition:background .1s}
.chore-legend-item:active{background:#F7F5F2}
.chore-legend-item+.chore-legend-item{border-top:1px solid #F4F2EF}
.legend-name{flex:1;font-size:13px;font-weight:600;color:#1C1C1E}
.legend-freq{font-size:11px;color:#B0ACA6;margin-right:2px}
.aicon.c{background:#FDEEE8}.aicon.c svg{stroke:#C94030}
.log-chore-btn{display:flex;align-items:center;gap:7px;padding:8px 14px;border-radius:20px;background:#F4F2EF;font-size:13px;font-weight:700;color:#6A6866;cursor:pointer;transition:all .15s;border:none}
.log-chore-btn.done{background:#EBF3EE;color:#4A7A5C}
.log-chores-wrap{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:16px}
.chore-color-dot{width:26px;height:26px;border-radius:13px;cursor:pointer;transition:box-shadow .15s;flex-shrink:0}
