:root{
  --bg-1:#fff8f5; --bg-2:#fff0ec; --bg-3:#fffaf7;
  --surface:#ffffff; --surface-2:#fff7fa;
  --pri:#ff6b8a; --pri-2:#ff8fa8; --pri-3:#ffb3c6; --pri-4:#ffd6e2;
  --deep:#ff4d6d;
  --txt:#3d2330; --sub:#8a6470; --line:#fce4eb; --line-2:#f8d4dc;
  --shadow:0 6px 24px rgba(255,107,138,.10),0 1px 3px rgba(255,107,138,.05);
  --shadow-soft:0 2px 12px rgba(255,107,138,.08);
  --per:#ff5e7e; --per-w:#ffd0e0; --due:#b366ff; --vac:#5b8def; --lit:#ffa64d;
  --ok:#2eb872; --warn:#ffa64d; --bad:#ff4d6d;
  --r:20px; --r-sm:12px;
}
*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
html,body{height:100%}
body{
  font:15px/1.6 -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;
  color:var(--txt);
  background:
    radial-gradient(circle at 12% 8%, rgba(255,179,198,.30) 0%, transparent 24%),
    radial-gradient(circle at 88% 4%, rgba(255,200,180,.22) 0%, transparent 22%),
    radial-gradient(circle at 50% 100%, rgba(255,179,198,.18) 0%, transparent 28%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 50%, var(--bg-3) 100%);
  background-attachment: fixed;
  padding-bottom:calc(92px + env(safe-area-inset-bottom));
  -webkit-font-smoothing:antialiased;
  min-height:100%;
  overflow-x:hidden;
}
/* 散落爪印+心 */
.bg-deco{position:fixed;pointer-events:none;z-index:0;opacity:.7}
.bg-deco.paw1{top:18%;right:-18px;width:110px;transform:rotate(-15deg)}
.bg-deco.paw2{bottom:30%;left:-14px;width:90px;transform:rotate(20deg);opacity:.5}
.bg-deco.heart1{top:42%;right:24px;width:18px;opacity:.55;transform:rotate(-12deg)}
.bg-deco.heart2{top:55%;left:30px;width:14px;opacity:.45;transform:rotate(18deg)}
.bg-deco.heart3{bottom:22%;right:60px;width:12px;opacity:.4}

/* ---------- 顶栏（极简） ---------- */
header{
  position:sticky;top:0;z-index:20;
  padding:12px 16px;
  display:flex;align-items:center;justify-content:space-between;
  background:rgba(255,248,245,.85);backdrop-filter:blur(12px);
}
.brand-mini{
  display:inline-flex;align-items:center;gap:6px;
  font-size:13px;font-weight:800;color:var(--txt);
  letter-spacing:.3px;
}
.brand-mini .logo{
  width:26px;height:26px;border-radius:50%;
  background:linear-gradient(135deg,var(--pri),var(--pri-2));
  display:grid;place-items:center;color:#fff;font-size:14px;
  box-shadow:0 3px 8px rgba(255,107,138,.30);
}
.sync{display:flex;align-items:center;gap:5px;font-size:11px;color:var(--sub);font-weight:500}
.sync .dot{width:7px;height:7px;border-radius:50%;background:#a8e6c1;transition:.3s}
.sync.saving .dot{background:#ffd27a}
.sync.err .dot{background:#ff9a9a}
.icon-btn{background:#fff;border:0;color:var(--pri);width:36px;height:36px;display:grid;place-items:center;border-radius:50%;cursor:pointer;box-shadow:0 2px 8px rgba(255,107,138,.18)}
.icon-btn:active{transform:scale(.95)}

main{max-width:520px;margin:0 auto;padding:8px 14px 24px;position:relative;z-index:1}

/* ---------- Hero（干净版：白卡+标题+粉色副标+波浪线+pills，无图片） ---------- */
.hero{
  position:relative;
  background:var(--surface);
  border-radius:var(--r);
  padding:22px 22px 20px;
  margin-bottom:14px;
  box-shadow:var(--shadow);
  overflow:hidden;
}
.hero::after{  /* 右上角柔粉光晕，代替原来那只猫 */
  content:"";position:absolute;top:-40px;right:-40px;
  width:140px;height:140px;border-radius:50%;
  background:radial-gradient(circle,rgba(255,179,198,.35) 0%,transparent 70%);
  pointer-events:none;
}
.hero h1{
  font-size:23px;font-weight:800;line-height:1.25;
  color:var(--txt);letter-spacing:.3px;
}
.hero h1 em{font-style:normal;color:var(--pri);display:block;font-size:18px;font-weight:800;margin-top:2px}
.hero .wave{height:8px;margin:9px 0 14px}
.hero .wave svg{width:80px;height:8px;display:block}
.pills{display:flex;flex-wrap:wrap;gap:6px}
.pill{
  font-size:11px;font-weight:600;color:var(--deep);
  background:linear-gradient(135deg,#fff0f4,#ffe0e8);
  padding:5px 11px;border-radius:20px;
  border:1px solid rgba(255,143,168,.35);
  box-shadow:0 2px 4px rgba(255,107,138,.08);
}
.pill.heart::after{content:"❤";margin-left:4px;font-size:10px;color:var(--pri)}

/* ---------- 通用卡片 ---------- */
.card{background:var(--surface);border-radius:var(--r);padding:16px;margin-bottom:13px;box-shadow:var(--shadow-soft)}
.card h3{font-size:15px;font-weight:700;margin-bottom:12px;display:flex;justify-content:space-between;align-items:center;gap:8px;color:var(--txt)}
.card h3 .muted{font-weight:400;font-size:12px;color:var(--sub)}
.sec-title{font-size:13px;font-weight:700;color:var(--pri);margin:8px 2px 8px;letter-spacing:.3px;display:flex;align-items:center;gap:6px}
.sec-title::before{content:"🐾";font-size:13px}

/* ---------- 输入/按钮 ---------- */
input,select,textarea{font:inherit;width:100%;padding:11px 12px;border:1.5px solid var(--line-2);border-radius:var(--r-sm);background:#fff;color:var(--txt);outline:none;transition:.15s}
input:focus,select:focus,textarea:focus{border-color:var(--pri);box-shadow:0 0 0 3px rgba(255,107,138,.15)}
textarea{min-height:90px;resize:vertical;line-height:1.7}
button{font:inherit;background:linear-gradient(135deg,var(--pri),var(--pri-2));color:#fff;border:0;border-radius:var(--r-sm);padding:11px 14px;font-weight:600;cursor:pointer;transition:.15s;box-shadow:0 2px 8px rgba(255,107,138,.25)}
button:active{transform:translateY(1px);box-shadow:0 1px 3px rgba(255,107,138,.20)}
button.ghost{background:#fff;color:var(--pri);border:1.5px solid var(--pri);box-shadow:none;font-weight:600}
button.ghost:active{background:var(--surface-2)}
button.block{width:100%}
.row{display:flex;gap:9px;margin-bottom:9px}
.row>*{flex:1;min-width:0}
.row .narrow{flex:0 0 38%}

/* ---------- 列表项 ---------- */
.list{margin-top:4px}
.item{padding:11px 2px;border-bottom:1px dashed var(--line);display:flex;justify-content:space-between;gap:10px;align-items:flex-start}
.item:last-child{border:0}
.item .t{flex:1;min-width:0;font-size:14px}
.item .t b{font-weight:700;color:var(--txt)}
.item .d{color:var(--sub);font-size:12px;margin-top:2px;line-height:1.5}
.del{color:var(--bad);font-size:20px;line-height:1;padding:0 4px;background:none;border:0;width:auto;flex:none;cursor:pointer;opacity:.7}
.del:hover{opacity:1}

/* ---------- 提示 ---------- */
.tip{background:linear-gradient(135deg,#fff0f4,#ffe8ef);border-radius:var(--r-sm);padding:10px 12px;margin-top:10px;color:#a3415d;font-size:13px;line-height:1.6;border:1px solid var(--pri-4)}
.tip.ok{background:linear-gradient(135deg,#e9f7ef,#d8f0e0);color:var(--ok);border-color:#b8e6c8}
.muted{color:var(--sub);font-size:12px}
.badge{display:inline-block;font-size:11px;font-weight:600;padding:3px 9px;border-radius:20px;background:linear-gradient(135deg,var(--pri-4),var(--pri-3));color:var(--deep)}

/* ---------- 页/导航 ---------- */
.page{display:none}
.page.on{display:block;animation:fade .3s ease}
@keyframes fade{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
nav{
  position:fixed;bottom:12px;left:50%;transform:translateX(-50%);
  width:calc(100% - 24px);max-width:496px;
  background:rgba(255,255,255,.92);backdrop-filter:blur(14px);
  border-radius:24px;display:flex;z-index:30;padding:6px;
  box-shadow:0 8px 28px rgba(255,107,138,.20),0 0 0 1px rgba(255,179,198,.4);
}
nav button{
  background:none;border:0;color:var(--sub);
  padding:8px 0 6px;flex:1;font-size:11px;font-weight:600;cursor:pointer;
  display:flex;flex-direction:column;align-items:center;gap:3px;position:relative;
  border-radius:18px;transition:.2s;box-shadow:none;
}
nav button span{font-size:19px;line-height:1}
nav button.on{
  background:linear-gradient(135deg,var(--pri),var(--pri-2));
  color:#fff;
  box-shadow:0 4px 12px rgba(255,107,138,.30);
}

/* ---------- 日历 ---------- */
.cal-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.cal-head button{flex:none;width:40px;height:36px;font-size:20px;font-weight:700;background:var(--surface-2);color:var(--pri);border-radius:12px;box-shadow:none}
.cal-head b{flex:1;text-align:center;font-size:16px;font-weight:700;color:var(--txt)}
.cal-dow{display:flex;font-size:11px;color:var(--sub);text-align:center;margin-bottom:6px;font-weight:700}
.cal-dow span{flex:1}
.cal-grid{display:flex;flex-wrap:wrap;gap:3px}
.cal-cell{flex:0 0 calc((100% - 18px)/7);min-height:50px;border:0;font-size:12.5px;padding:5px 4px;overflow:hidden;cursor:pointer;transition:.1s;background:var(--surface-2);border-radius:10px}
.cal-cell.empty{background:transparent;cursor:default}
.cal-cell span{display:block;text-align:left;font-weight:700;line-height:1.3;color:var(--txt)}
.cal-cell.today{background:linear-gradient(135deg,var(--pri),var(--pri-2));color:#fff}
.cal-cell.today span{color:#fff}
.cal-cell.sel{outline:2px solid var(--pri);outline-offset:-2px;background:var(--pri-4)}
.cal-cell .dots{display:flex;flex-wrap:wrap;gap:2px;margin-top:3px}
.cal-cell .dots i{width:5px;height:5px;border-radius:50%;display:inline-block}
.cal-cell .dots b{font-size:9px;color:var(--sub);font-style:normal;margin-left:1px}
.cal-leg{display:flex;flex-wrap:wrap;gap:10px;margin-top:12px;font-size:11px;color:var(--sub)}
.cal-leg span{display:flex;align-items:center;gap:5px;background:var(--surface-2);padding:3px 8px;border-radius:20px}
.cal-leg i{width:8px;height:8px;border-radius:50%;display:inline-block}

/* ---------- 统计条 ---------- */
.sum{display:flex;gap:9px;text-align:center;margin-bottom:12px}
.sum div{flex:1;background:linear-gradient(135deg,var(--surface-2),var(--pri-4));border-radius:14px;padding:10px 4px}
.sum b{display:block;font-size:18px;font-weight:800;color:var(--deep)}
.sum .muted{display:block;font-size:11px;margin-top:2px;color:var(--sub)}

/* ---------- 设置面板 ---------- */
.sheet-mask{position:fixed;inset:0;background:rgba(61,35,48,.4);z-index:40;display:none;backdrop-filter:blur(4px)}
.sheet-mask.on{display:block}
.sheet{position:fixed;left:0;right:0;bottom:0;z-index:50;background:#fff;border-radius:24px 24px 0 0;padding:18px 16px calc(20px + env(safe-area-inset-bottom));transform:translateY(100%);transition:.28s;max-height:86vh;overflow:auto;box-shadow:0 -8px 30px rgba(255,107,138,.20)}
.sheet.on{transform:none}
.sheet h3{font-size:16px;font-weight:800;margin-bottom:14px;display:flex;justify-content:space-between;align-items:center;color:var(--pri)}
.sheet h3::before{content:"⚙️";margin-right:6px}
.sub-link{font-size:12px;color:var(--pri);word-break:break-all;background:var(--surface-2);padding:10px 12px;border-radius:10px;margin-top:6px;line-height:1.5;border:1px dashed var(--pri-3)}
.kv{display:flex;justify-content:space-between;font-size:13px;color:var(--sub);margin:6px 0}
#r{white-space:pre-wrap;font-size:14px;line-height:1.75}
#rbox{display:none}
#rbox.on{display:block}
#rbox{border:1.5px solid var(--pri-4)!important;box-shadow:0 2px 10px rgba(255,107,138,.08)!important}
