/* 接一下 · 样式表
   单一规则源：每个选择器只定义一次，不再有覆盖块。
   分区：01 令牌 / 02 重置 / 03 画框 / 04 首页 / 05 清单 / 06 卡片
        07 分组 / 08 浮层 / 09 抽屉 / 10 表单 / 11 响应式 / 12 可访问性
   改动依据：iOS Human Interface Guidelines + 界面评审（2026-11-22）
   设计原则：原生优于定制、克制优于表现、层级靠字号与间距而非颜色。   */

/* ── 01 设计令牌 ─────────────────────────────────────────── */
:root{
  /* 8pt 间距体系 */
  --sp-1:4px; --sp-2:8px; --sp-3:12px; --sp-4:16px;
  --sp-5:20px; --sp-6:24px; --sp-8:32px;
  --gutter:20px;
  --radius-card:14px; --radius-sheet:20px;

  /* 中性色 */
  --ink:#101828; --sub:#676E79; --muted:#8A8F98; --faint:#A6ACB5;
  --line:#E7EAEE; --fill:#F1F3F6;
  --page:#F2F2F7;              /* iOS systemGroupedBackground：白卡浮在灰底上 */
  --home-bg:#FBFCFA;           /* 首页独立底色 */
  --card:#FFFFFF;

  /* 品牌绿 */
  --deep:#1D4A36; --green:#2F7D5C; --green-soft:#E9F3EC;

  /* 危险色：全站统一一套，不再混用 #B23A3A 与 #FF3B30 */
  --danger:#C2392F; --danger-soft:#FBECEC; --danger-ink:#A8564A;

  --shadow:0 1px 3px rgba(16,24,40,.07),0 1px 2px rgba(16,24,40,.04);
  --sheet-shadow:0 -8px 40px rgba(16,24,40,.18);
  --ease-ios:cubic-bezier(.32,.72,0,1);
}

/* ── 02 重置 ─────────────────────────────────────────────── */
*,*::before,*::after{box-sizing:border-box}
/* manipulation：禁用双击缩放但保留捏合缩放，兼顾手感与可访问性 */
html{width:100%;touch-action:manipulation;-webkit-text-size-adjust:100%;text-size-adjust:100%}
html,body{margin:0;padding:0}
body{
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  color:var(--ink);background:#EDEFF2;min-height:100vh;padding:var(--sp-5) 0 var(--sp-8);
  display:flex;flex-direction:column;align-items:center;
  -webkit-font-smoothing:antialiased;
  -webkit-user-select:none;user-select:none;-webkit-touch-callout:none;
}
a,button{-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}
input,textarea,[contenteditable]{-webkit-user-select:text;user-select:text;-webkit-touch-callout:default}
button{font-family:inherit;cursor:pointer}
[hidden]{display:none!important}
h1,h2,p{margin:0}

/* ── 03 画框 ─────────────────────────────────────────────── */
.phone{
  width:390px;height:790px;position:relative;overflow:hidden;
  border-radius:40px;background:var(--page);
  box-shadow:0 24px 64px rgba(16,24,40,.14);transform:translateZ(0);
}
.screen{
  height:100%;overflow-y:auto;padding:0 0 var(--sp-8);
  background:var(--page);scrollbar-width:none;
}
.screen::-webkit-scrollbar{display:none}

.storagewarn{
  display:none;position:fixed;left:0;right:0;top:0;z-index:80;
  background:#FDF3E7;color:#8A5A16;font-size:12px;line-height:1.5;
  padding:calc(var(--sp-2) + env(safe-area-inset-top)) 14px var(--sp-2);text-align:center;
}
.storagewarn.on{display:block}

/* ── 04 首页（首次态） ───────────────────────────────────── */
.home{
  position:absolute;inset:0;z-index:30;overflow:hidden;background:var(--home-bg);
  transform:translateX(-100%);visibility:hidden;pointer-events:none;
  transition:transform .32s var(--ease-ios),visibility 0s linear .32s;
}
.home.on{
  transform:translateX(0);visibility:visible;pointer-events:auto;
  transition:transform .32s var(--ease-ios),visibility 0s;
}
.home.no-anim{transition:none!important}
.landing{
  position:relative;height:100%;min-height:0;overflow:hidden;
  display:flex;flex-direction:column;
  padding:calc(var(--sp-6) + env(safe-area-inset-top)) var(--sp-6) calc(var(--sp-4) + env(safe-area-inset-bottom));
  background:linear-gradient(180deg,#F4F9F4 0%,var(--home-bg) 34%,var(--home-bg) 100%);
}
.homeglow{
  position:absolute;top:-120px;right:-90px;width:330px;height:330px;pointer-events:none;
  background:radial-gradient(circle at 50% 50%,rgba(47,125,92,.16),rgba(47,125,92,.05) 45%,transparent 70%);
}
.landing:before{
  content:'';position:absolute;inset:0;pointer-events:none;
  background-image:radial-gradient(rgba(29,74,54,.055) 1px,transparent 1px);
  background-size:19px 19px;
  -webkit-mask-image:linear-gradient(180deg,#000,transparent 46%);
  mask-image:linear-gradient(180deg,#000,transparent 46%);
}
.landing>*:not(.homeglow){position:relative;z-index:1}

.brandrow{display:flex;align-items:center;gap:var(--sp-2);margin-bottom:clamp(28px,7vh,58px)}
.logo{
  width:38px;height:38px;flex:0 0 auto;border-radius:12px;background:var(--deep);
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 6px 16px rgba(29,74,54,.22);
}
.logo.sm{width:26px;height:26px;border-radius:var(--sp-2)}
.brandname{font-size:19px;font-weight:700;letter-spacing:-.02em}

.hero{
  font-size:clamp(38px,10.5vw,46px);line-height:1.12;font-weight:700;
  letter-spacing:-.035em;margin:0 0 14px;
}
.hero em{
  font-style:normal;
  background-image:linear-gradient(rgba(127,184,148,.72),rgba(127,184,148,.72));
  background-repeat:no-repeat;background-position:0 100%;background-size:100% 8px;
}
.herosub{font-size:15px;line-height:1.5;color:#7A838E;margin:0 0 clamp(22px,4.5vh,34px)}
.herobtns{display:flex;gap:var(--sp-3);margin-bottom:0}
.btn-primary{
  flex:1.6;height:54px;border:0;border-radius:15px;color:#fff;
  background:linear-gradient(135deg,#236047,#1D4A36);
  font-size:16px;font-weight:500;box-shadow:0 8px 20px rgba(29,74,54,.24);
}
.btn-primary:active{background:#173d2c}
.btn-ghost{
  flex:0 0 auto;height:54px;padding:0 17px;border:1px solid var(--line);
  border-radius:15px;background:#fff;color:#3F4652;font-size:14px;
}

/* 主视觉插画：正在被大家一起接的清单 */
.heroart{height:clamp(150px,21vh,184px);margin:clamp(20px,4vh,34px) 0 0;position:relative;flex:0 0 auto}
.artglow{
  position:absolute;left:50%;top:54%;transform:translate(-50%,-50%);
  width:78%;height:112px;border-radius:50%;
  background:radial-gradient(ellipse,rgba(47,125,92,.16),transparent 68%);
}
.artstack{
  position:absolute;left:8%;right:8%;top:16px;height:112px;
  border-radius:17px;background:#fff;
}
.artstack--back{background:#DCEBE1;transform:rotate(-5.5deg) translate(-7px,3px)}
.artstack--mid{background:#EAF3ED;transform:rotate(3.5deg) translate(6px,-1px)}
.artcard{
  position:absolute;left:5%;right:5%;top:12px;padding:16px 18px;
  background:#fff;border:1px solid #E8EEEA;border-radius:20px;
  box-shadow:0 20px 44px rgba(29,74,54,.15),0 2px 8px rgba(16,24,40,.05);
}
.arthead{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.artttl{font-size:14px;font-weight:700;color:var(--ink)}
.artppl{font-size:11.5px;font-weight:600;color:var(--green);background:var(--green-soft);padding:2px 8px;border-radius:20px}
.artrow{display:flex;align-items:center;gap:9px;height:27px}
.artick{
  flex:0 0 auto;width:17px;height:17px;border-radius:6px;
  border:1.5px solid #D2DAE0;background:#fff;color:transparent;
  display:flex;align-items:center;justify-content:center;font-size:10px;font-weight:700;
}
.artick.done{background:var(--green);border-color:var(--green);color:#fff}
.artbar{height:6px;border-radius:4px;background:#EDF0F2}
.artbar.b1{width:58%}.artbar.b2{width:44%}.artbar.b3{width:64%}
.artava{
  flex:0 0 auto;width:22px;height:22px;border-radius:50%;margin-left:auto;
  display:flex;align-items:center;justify-content:center;font-size:10px;font-weight:700;color:#fff;
}
.av1{background:#7C9C8A}.av2{background:#B79A72}.av3{background:#6E8FA8}
.artbadge{
  position:absolute;right:0;bottom:4px;display:flex;align-items:center;gap:5px;
  background:#fff;border:1px solid var(--line);border-radius:22px;padding:7px 13px 7px 7px;
  font-size:11.5px;color:var(--sub);font-weight:500;box-shadow:0 6px 16px rgba(16,24,40,.10);
}
.artbadge-ic{
  width:15px;height:15px;border-radius:50%;background:var(--green);color:#fff;
  font-size:9px;font-weight:700;display:flex;align-items:center;justify-content:center;
}
.artbadge b{color:var(--deep);font-size:11.5px}

.features{
  flex:1 1 auto;min-height:0;display:flex;align-items:center;justify-content:space-around;
  gap:var(--sp-2);padding:clamp(14px,3vh,26px) 0 0;margin-top:auto;
}
.feature{display:flex;flex-direction:column;align-items:center;gap:9px;flex:1}
.featureic{
  width:50px;height:50px;border-radius:16px;background:#fff;color:var(--deep);
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 6px 18px rgba(29,74,54,.09),0 0 0 1px rgba(29,74,54,.05);
}
.featurelab{font-size:12.5px;font-weight:600;color:#4A5560;letter-spacing:.01em}
.trustline{
  margin:14px 0 0;display:flex;align-items:center;justify-content:center;gap:6px;
  font-size:12px;color:var(--faint);
}

/* 首页（返回态）：老用户以「你的清单」为主，营销插画让位给清单记录 */
.recent{display:none;margin-top:auto;padding-top:var(--sp-4)}
.rhead{display:flex;align-items:baseline;justify-content:space-between;margin:0 2px 10px}
.rhead .rsec{font-size:15px;font-weight:600;color:var(--ink);letter-spacing:.01em}
.rcount{font-size:12px;color:#9AA2AC}
.rrow{
  display:flex;align-items:stretch;gap:0;width:100%;margin-bottom:10px;
  background:#fff;border:1px solid var(--line);border-radius:15px;
  box-shadow:0 2px 10px rgba(16,24,40,.05);overflow:hidden;
}
.rrow:active{transform:scale(.994)}
.ropen{
  flex:1;min-width:0;display:flex;align-items:center;gap:12px;
  border:0;background:transparent;font-family:inherit;text-align:left;padding:15px 14px;
}
.rbullet{flex:0 0 auto;width:9px;height:9px;border-radius:50%;background:var(--green);box-shadow:0 0 0 4px var(--green-soft)}
.rmain{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}
.rmain b{font-size:15px;font-weight:600;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rmain>span{font-size:12px;color:var(--sub);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rgo{flex:0 0 auto;color:#C4C9D0;font-size:20px;line-height:1;margin-left:2px}
.rdel{
  flex:0 0 auto;width:52px;border:0;border-left:.5px solid var(--line);
  background:#FBFBFC;color:#B0B7C0;font-family:inherit;
  display:flex;align-items:center;justify-content:center;
}
.rdel:active{background:var(--danger-soft);color:var(--danger)}

.home.returning .landing{position:relative}
.home.returning .brandrow{margin-bottom:var(--sp-6)}
.home.returning .hero{font-size:38px}
.home.returning .herosub{margin-bottom:var(--sp-5)}
/* 返回态隐藏营销型插画与特性行，清单记录占满剩余空间；
   信任行保留作页脚，避免清单少时下半屏空洞 */
.home.returning .heroart,
.home.returning .features{display:none}
.home.returning .recent{
  display:block;flex:1 1 auto;min-height:0;margin-top:var(--sp-4);
  padding-top:0;overflow-y:auto;overscroll-behavior:contain;order:0;
}
/* 信任行排到页脚：清单少时收住下半屏，不与清单标题争位置 */
.home.returning .trustline{order:1;margin:var(--sp-4) 0 0;padding-top:0}

/* ── 05 清单页 ───────────────────────────────────────────── */
.hd{padding:52px var(--gutter) 0}
.hdrow{display:flex;align-items:flex-end;justify-content:space-between;gap:12px}
h1{font-size:22px;line-height:1.25;font-weight:700;letter-spacing:-.02em}
.menubtn{
  width:26px;height:18px;border:0;background:transparent;padding:0;
  margin:0 0 var(--sp-2) -2px;display:flex;align-items:center;position:relative;
}
.menubtn::after{content:'';position:absolute;inset:-13px -9px}
.menubtn:active{opacity:.5}
.ava{
  width:30px;height:30px;border-radius:50%;background:#DCEAE1;color:var(--deep);
  font-size:12px;font-weight:600;display:flex;align-items:center;justify-content:center;
  box-shadow:inset 0 0 0 1.5px rgba(47,125,92,.25);
}
.mepill{
  display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 13px 0 6px;
  border-radius:16px;border:1px solid var(--line);background:#fff;
  font-size:12.5px;color:#3F4652;flex:0 0 auto;position:relative;
}
.mepill::after{content:'';position:absolute;inset:-6px 0}
.mepill:active{background:var(--fill)}
.mepill .ava{width:22px;height:22px;font-size:10px;box-shadow:none;background:#DCEAE1}
.meta{font-size:12.5px;color:var(--sub);margin:var(--sp-2) 0 6px}
.bar{height:4px;border-radius:2px;background:#E1E5EA;overflow:hidden}
.bar i{display:block;width:100%;height:100%;border-radius:2px;background:var(--green);transform:scaleX(0);transform-origin:left center;transition:transform .24s ease-out;will-change:transform}

.composer{margin:18px var(--gutter) 0}
.field{display:flex;align-items:center;gap:var(--sp-2);background:var(--deep);border-radius:16px;padding:9px 9px 9px 15px}
.field input{flex:1;min-width:0;border:0;outline:0;background:transparent;color:#fff;font-size:16px;font-family:inherit;padding:0;height:26px}
.field:focus-within{outline:2px solid var(--green);outline-offset:2px}
.field input::placeholder{color:rgba(255,255,255,.52)}
.send{
  flex:0 0 auto;height:34px;padding:0 14px;border:0;border-radius:10px;
  background:#3C8C69;color:#fff;font-size:13px;font-weight:500;position:relative;
}
.send::after{content:'';position:absolute;inset:-5px 0}
.send:active{background:#337a5c}

/* 分区标题（待办）与组头（我在做）拉开层级 */
.sec{display:flex;align-items:baseline;gap:var(--sp-2);margin:var(--sp-6) var(--gutter) 10px}
.sec b{font-size:17px;font-weight:700;color:var(--ink);letter-spacing:-.01em}
.sec span{font-size:12px;color:var(--sub)}
.list{padding:0 var(--gutter);display:flex;flex-direction:column;gap:10px}

/* ── 06 卡片 ─────────────────────────────────────────────── */
.card{
  position:relative;z-index:1;display:flex;align-items:flex-start;gap:12px;
  background:var(--card);border-radius:var(--radius-card);padding:14px 16px;
  box-shadow:0 0 0 .5px rgba(60,60,67,.06);touch-action:pan-y;
  transition:box-shadow .18s,background .18s,transform .26s var(--ease-ios);
}
.card--alert{box-shadow:0 0 0 .5px rgba(60,60,67,.06),inset 0 0 0 1px #F2C8C8}
.card--pending{opacity:.68;pointer-events:none}
.card:focus,.card:focus-visible{outline:none}
.card:focus-visible{box-shadow:var(--shadow),0 0 0 2px rgba(47,125,92,.45)}
.card[data-owner]:not([data-owner="me"]) .tick{cursor:default;border-color:#DFE3E8}
.card[data-owner]:not([data-owner="me"]) .tick:active{background:#fff}
.card.swiping{transition:none;will-change:transform}

.tick{
  flex:0 0 auto;position:relative;width:24px;height:24px;margin-top:1px;
  border:1.7px solid #CBD2D9;background:#fff;border-radius:50%;cursor:pointer;
  display:flex;align-items:center;justify-content:center;padding:0;
  transition:background .16s,border-color .16s;
}
.tick:after{content:'';position:absolute;inset:-10px}  /* 24pt 视觉 / 44pt 触达 */
.tick svg{opacity:0;transition:opacity .15s}
.card--done .tick{background:var(--green);border-color:var(--green)}
.card--done .tick svg{opacity:1}

.body{flex:1;min-width:0}
.title{font-size:17px;font-weight:600;line-height:1.35;letter-spacing:-.01em;transition:color .2s}
.card--done .title,.list--done .title{color:var(--faint);text-decoration:line-through;text-decoration-color:#D2D7DD}
.sub{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;font-size:13px;color:var(--sub);margin-top:4px;line-height:1.5}
/* 备注入口从纯文字链改为可辨识的浅色胶囊 + 绿点，提升可发现性 */
.sub .note{
  display:inline-flex;align-items:center;gap:4px;position:relative;
  padding:2px 8px;border-radius:8px;background:var(--fill);
  color:#4A5160;font-weight:500;cursor:pointer;
}
.sub .note::before{content:'';width:5px;height:5px;border-radius:50%;background:var(--green)}
.sub .note::after{content:'';position:absolute;inset:-9px 0}
.sub .note:active{background:#E4E8ED}
.stuckreason{margin:7px 0 0;font-size:13px;line-height:1.45;color:var(--danger-ink);overflow-wrap:anywhere}

.side{flex:0 0 auto;display:flex;flex-direction:column;align-items:flex-end;gap:6px;margin-top:1px}
/* 主操作「接一下」：实心深绿 + 白字，与只读状态明确区分 */
.pill{
  height:30px;padding:0 13px;border:0;border-radius:15px;
  background:var(--deep);color:#fff;font-size:13px;font-weight:600;
  font-family:inherit;display:flex;align-items:center;position:relative;
}
.pill::after{content:'';position:absolute;inset:-7px 0}
.pill:active{background:#173d2c}
/* 状态胶囊：弱化，读作「标签」而非「按钮」 */
.chip{
  display:inline-flex;align-items:center;gap:5px;height:26px;padding:0 9px;
  border-radius:8px;background:var(--fill);color:#5A6270;font-size:12px;
  white-space:nowrap;position:relative;
}
.chip::after{content:'';position:absolute;inset:-9px 0}
.chip .dot{width:6px;height:6px;border-radius:50%;background:#7FB894}
.chip--mine{background:var(--green-soft);color:var(--deep)}
.chip--mine .dot{background:var(--green)}
.chip--alert{background:var(--danger-soft);color:var(--danger);cursor:pointer}
.chip--alert .dot{background:var(--danger)}
.chip--done{background:var(--fill);color:var(--sub)}
button.chip{border:0;font-family:inherit}

.donewrap{margin:18px var(--gutter) 0}
.donehead{
  display:flex;align-items:center;justify-content:space-between;width:100%;
  min-height:44px;background:transparent;border:0;padding:0 2px;
  font-size:13px;color:#6E6E73;font-family:inherit;
}
.donehead b{font-weight:500;color:#5A6270}
.donehead .act{font-size:13px;color:var(--muted)}
.list--done{padding:0}

/* ── 07 分组 ─────────────────────────────────────────────── */
.taskgroup{margin-bottom:var(--sp-4)}
/* 组头与卡片左边缘严格对齐（原来右移 4px） */
.listdiv{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  margin:var(--sp-4) 0 var(--sp-2);font-size:13px;font-weight:600;color:var(--sub);
}
.gcount{font-size:12.5px;font-weight:400;color:var(--muted)}
.grp{display:flex;flex-direction:column;gap:10px}
.grp:empty{display:none}

/* 空状态 */
.emptystate{background:var(--card);border-radius:var(--radius-card);text-align:center;padding:22px 14px 16px}
.emptystate .es1{font-size:16px;font-weight:600;color:var(--ink)}
.emptystate .es2{font-size:12.5px;color:var(--sub);margin-top:6px;line-height:1.6}
.emptyactions{display:flex;flex-wrap:wrap;gap:var(--sp-2);justify-content:center;margin-top:var(--sp-4)}
.emptyactions button{
  flex:1 0 auto;min-height:44px;padding:0 10px;border:1px solid var(--deep);border-radius:10px;
  background:var(--deep);color:#fff;font-family:inherit;font-size:13px;font-weight:500;
}
.emptyactions button+button{background:var(--green-soft);color:var(--deep);border-color:#D8E8DD}

/* 左滑删除 */
#todo{position:relative}
.swipeback{
  position:absolute;left:0;display:flex;align-items:center;justify-content:flex-end;
  background:var(--danger);color:#fff;border-radius:var(--radius-card);
  font-size:15px;font-weight:600;z-index:0;pointer-events:none;
  opacity:0;transition:opacity .12s;
}
.swipeback.on{opacity:1}
.swipedel{
  width:88px;height:100%;border:0;background:transparent;color:#fff;
  font-size:15px;font-weight:600;font-family:inherit;pointer-events:auto;
  display:flex;align-items:center;justify-content:center;gap:6px;
}
.swipedel:active{opacity:.7}
.swipedel svg{width:15px;height:15px;flex:0 0 auto}

/* ── 08 浮层 ─────────────────────────────────────────────── */
.mask,.dmask,.tdmask,.delmask{
  position:fixed;inset:0;background:rgba(0,0,0,.32);opacity:0;
  pointer-events:none;transition:opacity .2s;
}
.mask{z-index:15}
.dmask{z-index:31;background:rgba(16,24,40,.32)}
.tdmask{z-index:70;background:rgba(16,24,40,.34)}
.delmask{z-index:72;background:rgba(16,24,40,.42)}
#amask{z-index:33}
.mask.on,.dmask.on,.tdmask.on,.delmask.on,#amask.on{opacity:1;pointer-events:auto}

.sheet{
  position:fixed;left:0;right:0;bottom:0;z-index:34;
  transform:translateY(110%);transition:transform .38s var(--ease-ios);
  padding:0 10px calc(10px + env(safe-area-inset-bottom));
}
.sheet.on{transform:translateY(0)}
.sheet:not(.on){pointer-events:none}
#nsheet.on ~ #actSheet:not(.on){visibility:hidden}
.sheet.inputsheet,.nsheet{
  top:0;bottom:auto;height:100%;padding:10px;
  display:grid;grid-template-rows:minmax(0,1fr);place-items:center;
  transform:none;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .16s ease;
}
.sheet.inputsheet.on,.nsheet.on{opacity:1;visibility:visible}
.sheet.inputsheet .invbox,.nsheet .nbox{width:100%;max-height:100%;margin:0}
.sheet.inputsheet.on .invbox,.nsheet.on .nbox{pointer-events:auto}
.sheet .box{
  max-width:390px;margin:0 auto;background:#fff;border-radius:18px;overflow:hidden;
  max-height:calc(100vh - 22px);overflow-y:auto;overscroll-behavior:contain;
}
.sheet.on .box{box-shadow:var(--sheet-shadow)}
.sheet .box button{
  display:block;width:100%;border:0;background:#fff;font-family:inherit;
  font-size:16px;color:var(--ink);padding:16px;text-align:center;
  border-bottom:.5px solid #EDEFF2;
}
.sheet .box>button.danger,.sheet .box button.actitem.danger{color:var(--danger)}
.sheet .box button.actitem{border-bottom:0}
.sheet .cancel{
  max-width:390px;margin:8px auto 0;background:#fff;border-radius:18px;
  display:block;width:100%;border:0;font-family:inherit;font-size:16px;
  padding:16px;color:var(--ink);
}
.sheet.on .cancel{box-shadow:var(--sheet-shadow)}
.sheet.othersonly .onlymine{display:none}

.acthd{padding:16px 18px 12px;font-size:13px;color:var(--sub);text-align:center}
.actitem{
  display:block;width:100%;border:0;background:#fff;font-family:inherit;
  font-size:16px;color:var(--ink);padding:16px;text-align:center;
  border-top:.5px solid #EDEFF2;
}

/* 备注面板：页签 / 列表 / 时间轴 / 输入 */
.nsheet{position:fixed;left:0;right:0;z-index:36}
.nbox{
  position:relative;max-width:390px;background:#fff;
  border-radius:var(--radius-sheet);overflow-y:auto;overscroll-behavior:contain;
  display:flex;flex-direction:column;
}
.nsheet.on .nbox{box-shadow:var(--sheet-shadow)}
.nhead{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 18px 8px}
.nhead b{font-size:15px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.nhead button{
  border:0;background:transparent;color:var(--muted);font-size:13px;
  font-family:inherit;padding:0;position:relative;
}
.nhead button::after{content:'';position:absolute;inset:-12px -8px}
.ntabs{display:flex;gap:7px;padding:0 18px 12px}
.ntab{
  height:30px;padding:0 13px;border:0;border-radius:15px;background:var(--fill);
  color:#5A6270;font-size:12px;font-family:inherit;position:relative;
  transition:background .16s,color .16s;
}
.ntab::after{content:'';position:absolute;inset:-7px 0}
.ntab.on{background:var(--green-soft);color:var(--deep);font-weight:600}
.ntab.alert.on{background:var(--danger-soft);color:var(--danger);font-weight:600}
.nlist{flex:1 1 auto;min-height:56px;max-height:200px;overflow-y:auto;padding:0 18px 4px}
.nitem{padding:9px 0;border-top:.5px solid #F0F2F5;font-size:13px;line-height:1.5}
.nitem:first-child{border-top:0}
.nitem .who{display:block;font-size:12px;color:var(--muted);margin-bottom:2px}
.nitem.urgent .who{color:var(--danger)}
.nempty{font-size:13px;color:var(--faint);padding:12px 0}
.nguide{
  display:none;margin:2px 2px 8px;padding:9px 11px;border-radius:11px;
  background:#FFF6F5;color:var(--danger-ink);font-size:12.5px;line-height:1.5;
}
.nguide.on{display:block}
.ninput{display:flex;gap:var(--sp-2);padding:9px 14px 12px;border-top:.5px solid #EDEFF2;align-items:center}
.ninput input{
  flex:1;min-width:0;height:40px;border:0;outline:0;background:var(--fill);
  border-radius:12px;padding:0 12px;font-size:16px;font-family:inherit;color:var(--ink);
}
.ninput input::placeholder{color:var(--faint)}
.ninput button{
  height:40px;padding:0 16px;border:0;border-radius:12px;background:var(--deep);
  color:#fff;font-size:13px;font-weight:500;font-family:inherit;
  position:relative;transition:background .16s;
}
.ninput button::after{content:'';position:absolute;inset:-2px 0}
/* 卡住模式：主按钮转为危险色，与页签/引导条语义一致 */
.nsheet.alertmode .ninput button{background:var(--danger)}

.tline{padding:2px 0 4px}
.titem{display:flex;gap:10px;position:relative;padding-bottom:15px}
.titem:before{content:'';position:absolute;left:55px;top:14px;bottom:-1px;width:1px;background:#EDEFF2}
.titem:last-child:before{display:none}
.ttime{flex:0 0 42px;font-size:12px;color:var(--faint);line-height:17px;text-align:right}
.tdot{flex:0 0 7px;width:7px;height:7px;border-radius:50%;background:#D2D7DD;margin-top:6px;position:relative;z-index:1}
.titem.hot .tdot{background:var(--danger)}
.titem.done .tdot{background:var(--green)}
.titem.undone .tdot{background:#B7BEC8}
.titem.undone .ttext{color:var(--muted)}
.ttext{font-size:13px;line-height:1.55;color:#1F2328}
.ttext b{font-weight:500}
.titem.hot .ttext,.titem.hot .ttext b{color:var(--danger)}

/* 顶部弹窗：卡住填原因 / 帮别人完成确认
   它里面有 textarea，必须和输入弹层用同一条让开状态栏的规则，
   位置也保持一致 —— 用户在不同弹层之间不该看到两个不一样的落点 */
.topdlg{
  position:fixed;z-index:71;top:max(calc(env(safe-area-inset-top) + 16px),178px);left:50%;
  transform:translate(-50%,-150%);width:min(340px,calc(100vw - 28px));
  max-height:max(180px,calc(52vh - 194px));overflow-y:auto;overscroll-behavior:contain;
  background:#fff;border-radius:18px;padding:16px 16px 12px;
  box-shadow:0 18px 50px rgba(16,24,40,.26);text-align:left;
  /* 关闭态靠 -150% 移出屏幕，但落点下移之后移不干净会露一条边，
     所以再叠一层 opacity 兜底：几何上留没留住都不会被看见 */
  opacity:0;pointer-events:none;
  transition:transform .34s var(--ease-ios),opacity .16s;
}
.topdlg.on{transform:translate(-50%,0);opacity:1;pointer-events:auto}
.tdhead{display:flex;align-items:flex-start;gap:10px}
.tdhead b{flex:1;font-size:17px;font-weight:600;line-height:1.4}
.tdclose{flex:0 0 auto;border:0;background:transparent;padding:2px;line-height:0;position:relative}
.tdclose::after{content:'';position:absolute;inset:-12px}
.tddesc{margin:8px 0 0;font-size:13px;line-height:1.55;color:var(--sub)}
.tdbtns{margin-top:14px;display:flex;flex-direction:column;gap:var(--sp-2)}
.tdbtn{width:100%;height:44px;border:0;border-radius:12px;font-size:15px;font-weight:500;font-family:inherit}
.tdbtn.primary{background:var(--deep);color:#fff}
.tdbtn.primary:disabled{background:#C9D2CB;color:#fff}
.tdbtn.primary.danger{background:var(--danger-soft);color:var(--danger)}
.tdbtn.primary.danger:disabled{background:#F1E2E2;color:#C99A9A}
.tdbtn.ghost{background:transparent;color:var(--sub)}

/* 删除确认 */
.deldlg{
  position:fixed;z-index:73;top:50%;left:50%;
  transform:translate(-50%,-46%) scale(.96);width:min(320px,calc(100vw - 44px));
  background:#fff;border-radius:20px;padding:22px 20px 16px;text-align:center;
  box-shadow:0 20px 60px rgba(16,24,40,.28);opacity:0;pointer-events:none;
  transition:opacity .2s,transform .3s var(--ease-ios);
}
.deldlg.on{opacity:1;pointer-events:auto;transform:translate(-50%,-50%) scale(1)}
.delic{
  width:48px;height:48px;margin:0 auto 12px;border-radius:14px;
  background:var(--danger-soft);color:var(--danger);
  display:flex;align-items:center;justify-content:center;
}
.deldlg .delhd{display:block;font-size:17px;font-weight:600;margin-bottom:5px}
.deldsc{margin:0;font-size:12.5px;line-height:1.5;color:var(--sub)}
.deltarget{
  margin:14px 0 4px;padding:10px 12px;border-radius:11px;background:#F6F7F9;
  font-size:13px;color:#3F4652;text-align:left;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.delbtns{margin-top:14px;display:flex;gap:9px}
.delbtns button{flex:1;height:44px;border:0;border-radius:12px;font-family:inherit;font-size:14.5px;font-weight:500}
.delcancel{background:var(--fill);color:#3F4652}
.delok{background:var(--danger);color:#fff}
.delok:active{background:#A32D24}

/* ── 09 抽屉 ─────────────────────────────────────────────── */
.drawer{
  position:fixed;top:0;left:0;bottom:0;width:292px;background:#fff;z-index:32;
  transform:translateX(-100%);transition:transform .28s var(--ease-ios);
  display:flex;flex-direction:column;
  padding:calc(50px + env(safe-area-inset-top)) 14px 18px;
  box-shadow:8px 0 32px rgba(16,24,40,.12);
}
.drawer.on{transform:none}
.dwbrand{display:flex;align-items:center;gap:var(--sp-2);padding:0 6px;margin-bottom:var(--sp-6)}
.dwname{font-size:15px;font-weight:700}
.dwsec{font-size:12px;color:var(--faint);padding:0 8px;margin-bottom:4px}
.dwitem{
  display:flex;align-items:center;gap:9px;width:100%;min-height:44px;
  border:0;background:transparent;padding:11px 8px;border-radius:11px;
  font-size:14px;color:var(--ink);font-family:inherit;text-align:left;
}
.dwitem:active{background:var(--fill)}
.dwitem.on{background:#EFF4F1;font-weight:500}
.dwdot{width:6px;height:6px;border-radius:50%;background:#D2D7DD;flex:0 0 auto}
.dwitem.on .dwdot{background:var(--green)}
.dwico{width:15px;display:flex;flex:0 0 auto}
.dwcode{margin-left:auto;font-size:12px;color:var(--faint);letter-spacing:1px}
.dwcount{margin-left:auto;font-size:12px;color:#C4C9D0}
.dwnew{
  display:flex;align-items:center;width:100%;min-height:44px;
  border:0;background:transparent;padding:11px 8px;border-radius:11px;
  font-size:13.5px;color:var(--deep);font-family:inherit;
}
.dwnew:active{background:var(--fill)}
.dwsep{height:.5px;background:#EDEFF2;margin:12px 8px}
.dwfoot{margin-top:auto;display:flex;align-items:center;gap:10px;padding:14px 8px 0;border-top:.5px solid #EDEFF2}
.dwfoot b{display:block;font-size:13.5px;font-weight:600;margin-bottom:2px}
.dwfoot span{font-size:12px;color:var(--faint)}
.dwreset{
  display:block;width:100%;min-height:44px;border:0;background:transparent;
  padding:10px 8px;margin-top:2px;border-radius:10px;text-align:left;
  font-size:12px;color:var(--faint);font-family:inherit;
}
.dwreset:active{background:var(--fill)}
.dwver{padding:0 8px 2px;font-size:10px;line-height:1.6;color:var(--faint);opacity:.7;letter-spacing:.02em}

/* ── 10 表单 / 面板 ──────────────────────────────────────── */
.invbox{
  position:relative;max-width:390px;margin:0 auto;background:#fff;border-radius:var(--radius-sheet);
  padding:20px var(--sp-5) 16px;text-align:center;
  max-height:calc(100vh - 22px);overflow-y:auto;overscroll-behavior:contain;
}
.sheetclose{
  position:absolute;top:16px;right:16px;border:0;background:transparent;
  padding:4px;line-height:0;border-radius:8px;
}
.sheetclose::after{content:'';position:absolute;inset:-10px}
.sheetclose:active{background:var(--fill)}
.sheet.on .invbox{box-shadow:var(--sheet-shadow)}
.invhd{font-size:17px;font-weight:600;margin-bottom:7px}
.invtip{font-size:12.5px;color:var(--sub);line-height:1.65;margin-bottom:18px}
.code{font-size:30px;font-weight:700;letter-spacing:8px;color:var(--deep);margin-bottom:var(--sp-2);padding-left:8px}
.codesub{font-size:12px;color:var(--faint);margin-bottom:var(--sp-5)}
.sharebtn{
  width:100%;height:46px;border:0;border-radius:14px;background:var(--deep);
  color:#fff;font-size:14.5px;font-weight:500;font-family:inherit;
}
.sharebtn:disabled{opacity:.36;box-shadow:none}
.ghostbtn{
  width:100%;height:44px;border:0;border-radius:14px;background:transparent;
  color:var(--sub);font-size:13.5px;font-family:inherit;margin-top:4px;
}
.formerror{margin:var(--sp-2) 0 12px;text-align:left;font-size:13px;color:var(--danger);line-height:1.45}
.invbox.form{text-align:left}
.invbox.form .invhd{text-align:center;margin-bottom:var(--sp-5)}
.cfield{margin-bottom:12px}
.cfield label{display:block;font-size:13px;color:var(--sub);margin-bottom:7px;padding-left:2px}
.cfield input{
  width:100%;height:48px;border:0;border-radius:12px;background:var(--fill);
  padding:0 14px;font-size:16px;font-family:inherit;color:var(--ink);outline:0;
  transition:background .16s,box-shadow .16s;
}
.cfield input:focus{background:#fff;box-shadow:inset 0 0 0 1.5px var(--green)}
.cfield input::placeholder{color:#B8BEC7}
.fieldhint{margin:6px 0 0;padding-left:2px;font-size:12px;color:var(--muted);line-height:1.4}

/* 成员：可点行补上箭头与 hover，避免「整行可点却无从察觉」 */
.memlist{padding:0 18px 4px}
.mrow{display:flex;align-items:center;gap:10px;padding:11px 0;border-top:.5px solid #F2F4F7}
.mrow:first-child{border-top:0}
.mrow[onclick]{cursor:pointer;position:relative;padding-right:20px}
.mrow[onclick]:after{content:'›';position:absolute;right:2px;top:50%;transform:translateY(-50%);font-size:18px;color:var(--faint)}
.mrow[onclick]:hover{background:var(--fill)}
.mbody{flex:1;min-width:0}
.mbody b{display:block;font-size:14px;font-weight:600;margin-bottom:2px}
.mbody span{font-size:12px;color:var(--faint)}
.mstate{font-size:12px;color:var(--muted);flex:0 0 auto}
.mstate.busy{color:var(--deep)}
.mstate.free{color:#B8BEC7}

/* 最近删除 */
.trashbox{text-align:left;padding:22px 18px 14px}
.trashbox .invhd,.trashbox .invtip{text-align:center}
.trashlist{max-height:286px;overflow-y:auto;margin:2px 0 14px}
.trashrow{display:flex;align-items:center;gap:10px;padding:12px 2px;border-top:.5px solid #EFF1F4}
.trashrow:first-child{border-top:0}
.trashmain{flex:1;min-width:0}
.trashmain b{display:block;font-size:15px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.trashmain span{font-size:12px;color:var(--sub)}
.trashrow button{flex:0 0 auto;min-height:44px;border:0;background:transparent;color:var(--deep);font-size:14px;font-weight:500;font-family:inherit;padding:6px 2px}
.trashrow button:active{opacity:.5}
.trashnone{padding:20px 0 24px;text-align:center;font-size:13px;color:var(--sub)}

/* 邀请 */
.invitebox .invtip{margin-bottom:var(--sp-4)}
.inviteurl{
  display:block;width:100%;height:44px;border:1px solid #D8E8DD;border-radius:12px;
  background:var(--green-soft);color:var(--deep);padding:0 12px;margin-bottom:10px;
  font-family:inherit;font-size:16px;
}
.linkstatus{margin:8px 0 0;font-size:13px;color:var(--deep)}
.invitebox .ghostbtn{margin-top:8px}
.altcode{margin:12px 0 4px;border-top:1px solid var(--line);color:var(--sub)}
.altcode summary{padding:13px 4px;font-size:13px;min-height:44px}
.altcode .code{font-size:28px;margin-bottom:2px}
.altcode .codesub{margin-bottom:0}

/* 链接加入 */
.joinnamebox{padding-top:28px;padding-bottom:var(--sp-5)}
.jnmark{
  width:52px;height:52px;margin:0 auto 14px;border-radius:16px;
  background:var(--green-soft);color:var(--green);
  display:flex;align-items:center;justify-content:center;
}
.jnfrom{font-size:12.5px;color:var(--sub);margin-bottom:4px}
.jnname{font-size:20px;font-weight:700;letter-spacing:-.02em;line-height:1.35;margin-bottom:6px}
.jnmeta{display:flex;align-items:center;justify-content:center;gap:var(--sp-2);font-size:12px;color:#9AA1AC;margin-bottom:22px}
.jnmeta i{width:3px;height:3px;border-radius:50%;background:#D2D7DD}
.jnfield{text-align:left;margin-bottom:18px}
.jnfield label{display:block;font-size:13px;color:var(--sub);margin-bottom:7px;padding-left:2px}
.jnfield input{
  width:100%;height:50px;border:0;border-radius:13px;background:var(--fill);
  padding:0 15px;font-size:16px;font-family:inherit;color:var(--ink);outline:0;
  transition:background .16s,box-shadow .16s;
}
.jnfield input:focus{background:#fff;box-shadow:inset 0 0 0 1.5px var(--green)}
.jnfield input::placeholder{color:#B8BEC7}
.joinnamebox .sharebtn{height:48px}
.joinnamebox .sharebtn:disabled{opacity:.5}
.jnclose{margin-top:6px}

.toast{
  position:absolute;left:50%;top:calc(16px + env(safe-area-inset-top));transform:translateX(-50%);
  background:rgba(16,24,40,.9);color:#fff;font-size:13px;padding:9px 16px;
  border-radius:12px;z-index:90;opacity:1;transition:opacity .3s;
  pointer-events:none;white-space:nowrap;box-shadow:0 8px 24px rgba(16,24,40,.18);
}
.toast.out{opacity:0}

/* ── 11 响应式（合并为 4 个清晰区间） ────────────────────── */
@media (min-width:601px){
  .phone{height:min(790px,calc(100vh - 56px))}
  .screen{height:100%}
}
@media (max-width:600px){
  /* 页面由固定容器承载，输入弹层单独按可见视口布局。 */
  html,body{
    position:fixed;inset:0;width:100%;height:100%;max-height:100%;
    overflow:hidden;overscroll-behavior:none;background:var(--page);
  }
  body{padding:0;min-height:0}
  .phone{
    position:fixed;inset:0;width:100%;height:100%;min-height:0;
    border-radius:0;box-shadow:none;
  }
  .screen{height:100%;padding-bottom:calc(28px + env(safe-area-inset-bottom));overscroll-behavior-y:contain}
  .hd{padding:calc(18px + env(safe-area-inset-top)) 18px 0}
  .home,.home.on{height:100%;min-height:0}
  .landing{height:100%;min-height:0}

  /* 输入弹层只决定位置、不跟键盘走：永远摆在屏幕顶部，键盘升起时这里一个像素都不动。
     键盘只影响卡片的 max-height（太高就压矮），不参与定位。 */
  .sheet.inputsheet,.nsheet{
    top:0;
    height:100%;
    padding:10px;
    padding-block:max(10px,env(safe-area-inset-top),env(safe-area-inset-bottom));
  }
  /* 备注面板和表单都钉在可见区顶部：候选条让可见高度抖 40–50px 时，
     居中的卡片会被放大成上下跳动；钉住顶边，高度怎么变位置都不动。
     表单同样钉住，否则容器铺满全屏、卡片居中，下半截会被键盘盖住。 */
  .sheet.inputsheet,.nsheet{align-items:start}
  /* 卡片的底边就是输入行，必须永远落在键盘上沿之上。
     否则 iOS 会滚动整个页面去「露出输入框」：页面被顶上去，卡片标题和页签
     被状态栏盖住，收起键盘时又整块弹回来。
     46vh 是留给键盘的安全线（各代 iPhone 键盘约占屏高 38%–48%），
     卡片按它封顶，输入行就永远不会掉到键盘底下，页面也就没有可滚的理由。 */
  .sheet.inputsheet .invbox,.nsheet .nbox{
    max-height:min(calc(var(--input-viewport-height,100vh) - 20px),46vh);
  }
  /* 备注 / 卡住了 / 经过三个页签共用 #nsheet，保持完全一致的顶部位置。
     iOS Safari 只要输入框中心低于键盘上方可视区中线（约 185px），呼出键盘就会把整页往上顶。
     收紧头部与输入模式下的列表高度，既给顶部留出呼吸感，又把输入框严格锁在零位移安全线以内。 */
  .nsheet{
    padding-top:max(20px,calc(env(safe-area-inset-top) + 12px));
  }
  .nsheet .nhead{padding:12px 18px 6px}
  .nsheet .ntabs{padding:0 18px 8px}
  .nsheet:not(.logmode) .nlist{min-height:44px;max-height:56px}
  .nsheet.logmode .nbox{max-height:70vh}
  .nsheet.logmode .nlist{max-height:55vh}
}
@media (max-width:360px){
  .hero{font-size:34px}
  .herobtns{flex-direction:column}
  .btn-ghost{width:100%}
  .landing{padding-left:18px;padding-right:18px}
}
@media (max-height:720px){
  .brandrow{margin-bottom:20px}
  .hero{font-size:34px}
  .herosub{margin-bottom:16px}
  .heroart{height:140px;margin-top:16px}
  .featureic{width:44px;height:44px;border-radius:14px}
  .features{padding-top:12px}
  .hd{padding-top:calc(14px + env(safe-area-inset-top))}
}

/* ── 12 可访问性 ─────────────────────────────────────────── */
:where(button,input,textarea,summary,[tabindex]):focus-visible{
  outline:2px solid var(--green);outline-offset:2px;
}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{
    animation-duration:.01ms!important;animation-iteration-count:1!important;
    transition-duration:.01ms!important;scroll-behavior:auto!important;
  }
}
