/* =========================================================
   V944 - 全部任务底部抽屉优化
   ========================================================= */

#modalContent .v944-sheet{
  width:100%;
  max-height:calc(100dvh - 82px);
  min-height:320px;
  display:flex;
  flex-direction:column;
  box-sizing:border-box;
  padding:8px 10px calc(16px + env(safe-area-inset-bottom));
  overflow:hidden;
}

#modalContent .v944-grabber{
  width:64px;
  height:7px;
  border-radius:999px;
  background:#d2cbc3;
  margin:2px auto 12px;
  flex:0 0 auto;
}

#modalContent .v944-head{
  padding:0 6px 4px;
  flex:0 0 auto;
}

#modalContent .v944-head h3{
  margin:0;
  font-size:26px;
  line-height:1.15;
  font-weight:900;
  color:#201815;
}

#modalContent .v944-head p{
  margin:8px 0 0;
  font-size:14px;
  line-height:1.65;
  color:#8f857b;
}

#modalContent .v944-summary{
  margin:10px 6px 10px;
  padding:12px 14px;
  border-radius:20px;
  background:linear-gradient(135deg,#f6f2ea,#eef6eb);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  flex:0 0 auto;
}

#modalContent .v944-summary .left{
  display:flex;
  flex-direction:column;
  gap:4px;
}

#modalContent .v944-summary .left b{
  font-size:15px;
  color:#2f261f;
}

#modalContent .v944-summary .left small{
  font-size:12px;
  color:#8f857b;
}

#modalContent .v944-summary .right{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

#modalContent .v944-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:34px;
  padding:0 14px;
  border-radius:999px;
  font-size:13px;
  font-weight:800;
  white-space:nowrap;
}

#modalContent .v944-pill.todo{
  background:#f4f8ef;
  color:#5f8d4d;
}

#modalContent .v944-pill.pending{
  background:#fff2d9;
  color:#b17a15;
}

#modalContent .v944-pill.done{
  background:#e7f4ef;
  color:#4f8a75;
}

#modalContent .v944-list{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
  display:flex;
  flex-direction:column;
  gap:12px;
  padding:2px 6px 4px;
  margin-right:-2px;
}

#modalContent .v944-row{
  width:100%;
  border:none;
  background:#fff;
  border-radius:28px;
  padding:16px;
  display:flex;
  align-items:center;
  gap:14px;
  box-sizing:border-box;
  box-shadow:0 1px 0 rgba(0,0,0,.03), 0 10px 24px rgba(109,86,54,.05);
}

#modalContent button.v944-row{
  cursor:pointer;
}

#modalContent .v944-icon{
  width:76px;
  height:76px;
  border-radius:24px;
  flex:0 0 76px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:36px;
  font-weight:900;
}

#modalContent .v944-icon.todo{
  background:#fbf1db;
  color:#b98525;
  border:4px solid #e2b96a;
}

#modalContent .v944-icon.pending{
  background:#fbf1db;
  color:#8e6533;
  border:4px solid #e2b96a;
}

#modalContent .v944-icon.done{
  background:#4d9779;
  color:#fff;
}

#modalContent .v944-main{
  flex:1 1 auto;
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:6px;
}

#modalContent .v944-title{
  font-size:24px;
  line-height:1.2;
  font-weight:900;
  color:#1d1714;
  word-break:break-word;
}

#modalContent .v944-meta{
  font-size:14px;
  line-height:1.55;
  color:#8c8278;
  word-break:break-word;
}

#modalContent .v944-status{
  margin-left:auto;
  flex:0 0 auto;
  min-width:102px;
  height:52px;
  padding:0 18px;
  border-radius:999px;
  border:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:18px;
  font-weight:900;
  white-space:nowrap;
}

#modalContent .v944-status.todo{
  background:#eef8ea;
  color:#4e8b6d;
}

#modalContent .v944-status.pending{
  background:#fae8c4;
  color:#b37b19;
}

#modalContent .v944-status.done{
  background:#deefe8;
  color:#5f9680;
}

#modalContent .v944-manage-wrap{
  display:flex;
  flex-direction:column;
  gap:10px;
}

#modalContent .v944-manage-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  padding:0 4px;
}

#modalContent .v944-mini-btn{
  height:38px;
  padding:0 16px;
  border:none;
  border-radius:999px;
  background:#f5f0e8;
  color:#6b5b4f;
  font-size:14px;
  font-weight:800;
}

#modalContent .v944-footer{
  padding:12px 6px 0;
  flex:0 0 auto;
}

#modalContent .v944-add-btn{
  width:100%;
  height:56px;
  border:none;
  border-radius:999px;
  background:linear-gradient(180deg,#7fdb61,#76c95f);
  color:#fff;
  font-size:20px;
  font-weight:900;
  box-shadow:0 10px 22px rgba(133,206,106,.24);
}

@media (max-width: 640px){
  #modalContent .v944-row{
    padding:14px;
    gap:12px;
    border-radius:24px;
  }

  #modalContent .v944-icon{
    width:64px;
    height:64px;
    flex-basis:64px;
    border-radius:20px;
    font-size:28px;
  }

  #modalContent .v944-title{
    font-size:20px;
  }

  #modalContent .v944-status{
    min-width:92px;
    height:46px;
    font-size:16px;
    padding:0 14px;
  }
}


/* =========================================================
   V944.2 iPhone 滚动最终修复
   整个“全部任务”抽屉滚动，不再让内部列表单独滚动
========================================================= */

/* modalContent 本身不要拦截手势 */
#modalContent:has(.v944-sheet){
  overflow:visible !important;
  max-height:none !important;
  touch-action:pan-y !important;
}


/* 整个白色抽屉作为唯一滚动容器 */
#modalContent .v944-sheet{
  display:block !important;

  width:100% !important;

  height:auto !important;
  min-height:0 !important;

  max-height:calc(100dvh - 72px) !important;

  overflow-x:hidden !important;
  overflow-y:auto !important;

  -webkit-overflow-scrolling:touch !important;

  touch-action:pan-y !important;

  overscroll-behavior-y:contain;

  box-sizing:border-box;

  padding-bottom:
    calc(
      36px +
      env(safe-area-inset-bottom)
    ) !important;

  scrollbar-width:none;
}


#modalContent .v944-sheet::-webkit-scrollbar{
  display:none;
}


/* 之前列表自身的滚动全部取消 */
#modalContent .v944-list{
  display:flex !important;
  flex-direction:column !important;

  height:auto !important;
  max-height:none !important;
  min-height:0 !important;

  overflow:visible !important;

  touch-action:pan-y !important;

  -webkit-overflow-scrolling:auto !important;

  padding-bottom:18px !important;
}


/* 卡片不要阻止纵向滑动 */
#modalContent .v944-row,
#modalContent button.v944-row,
#modalContent .v944-manage-wrap,
#modalContent .v944-summary,
#modalContent .v944-head{
  touch-action:pan-y !important;
}


/* 最后一张任务下面留足空间 */
#modalContent .v944-list > *:last-child{
  margin-bottom:
    calc(
      28px +
      env(safe-area-inset-bottom)
    ) !important;
}


/* 小屏 iPhone */
@media (max-height:760px){

  #modalContent .v944-sheet{
    max-height:
      calc(
        100dvh -
        48px
      ) !important;
  }

}

