/* 吃了吗 · 玻璃拟态设计系统
   底色是暖的，玻璃是冷的；两者叠在一起才不会像一块塑料板。 */

:root{
  --ink:#2A1A12;
  --ink-2:#5F4C3E;
  --ink-3:#8A7768;
  --tomato:#D2371F;
  --tomato-deep:#A82A16;
  --tomato-soft:rgba(210,55,31,.10);

  --glass:rgba(255,255,255,.56);
  --glass-2:rgba(255,255,255,.72);
  --glass-deep:rgba(255,255,255,.40);
  --glass-line:rgba(255,255,255,.78);
  --glass-edge:rgba(120,70,40,.10);
  --blur:blur(24px) saturate(150%);

  --r-lg:26px;
  --r-md:20px;
  --r-sm:14px;
  --shadow:0 10px 34px -12px rgba(120,60,30,.28);
  --shadow-sm:0 4px 16px -6px rgba(120,60,30,.22);

  --tabbar-h:64px;
  --safe:18px;

  /* 底色三层光斑，主题只动这组，不动内容层 */
  --glow-1:#FFD9B8;
  --glow-2:#FFC0A6;
  --glow-3:#F3B491;
  --bg-1:#FFF3E6;
  --bg-2:#FBE6D2;
  --bg-3:#F5D9C4;
}

*{margin:0;padding:0;box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{height:100%}
body{
  font-family:"PingFang SC","Microsoft YaHei","Noto Sans SC",system-ui,sans-serif;
  font-size:15px;line-height:1.5;color:var(--ink);
  background:var(--bg-2);
  display:flex;justify-content:center;
  -webkit-font-smoothing:antialiased;
}

/* 背景：三层暖色光斑，固定不动，页面滚动时玻璃后面的颜色会变 */
.app{
  position:relative;width:390px;height:100%;max-height:844px;overflow:hidden;
  display:flex;flex-direction:column;
  background:
    radial-gradient(120% 70% at 12% 4%, var(--glow-1) 0%, transparent 62%),
    radial-gradient(100% 60% at 92% 22%, var(--glow-2) 0%, transparent 58%),
    radial-gradient(120% 80% at 50% 108%, var(--glow-3) 0%, transparent 60%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 48%, var(--bg-3) 100%);
}
.app::after{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:radial-gradient(60% 40% at 78% 8%, rgba(255,255,255,.65), rgba(255,255,255,0) 70%);
}

/* ---------- 通用玻璃 ---------- */
.glass{
  background:var(--glass);
  backdrop-filter:var(--blur);-webkit-backdrop-filter:var(--blur);
  border:1px solid var(--glass-line);
  border-radius:var(--r-md);
  box-shadow:var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,.6);
}

.page{position:relative;z-index:1;flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;
  padding:0 18px calc(var(--tabbar-h) + 34px);-webkit-overflow-scrolling:touch}
.page::-webkit-scrollbar{width:0}
.page.wide{padding-bottom:calc(var(--tabbar-h) + var(--safe) + 96px)}

/* ---------- 顶部 ---------- */
.topbar{display:flex;align-items:center;justify-content:space-between;
  padding:16px 2px 10px;position:sticky;top:0;z-index:5;
  background:linear-gradient(180deg, rgba(255,243,230,.92), rgba(255,243,230,0));
  margin:0 -18px;padding-left:20px;padding-right:20px}
.brand{display:flex;align-items:center;gap:9px}
.brand img{width:28px;height:28px;border-radius:9px}
.brand .nm{font-size:16px;font-weight:800;letter-spacing:-.01em}
.topacts{display:flex;gap:8px}
.iconbtn{
  width:36px;height:36px;border-radius:50%;border:1px solid var(--glass-line);
  background:var(--glass);backdrop-filter:var(--blur);
  display:flex;align-items:center;justify-content:center;cursor:pointer;
  box-shadow:var(--shadow-sm);
}
.iconbtn svg{width:17px;height:17px;stroke:var(--ink);stroke-width:1.9;fill:none;
  stroke-linecap:round;stroke-linejoin:round}
.iconbtn:active{transform:scale(.94)}

/* ---------- 文字 ---------- */
.h1{font-size:25px;font-weight:800;letter-spacing:-.02em;line-height:1.25}
.h2{font-size:17px;font-weight:800;letter-spacing:-.01em}
.sub{font-size:12.5px;color:var(--ink-2);line-height:1.6}
.muted{color:var(--ink-3)}
.sec-title{display:flex;align-items:baseline;justify-content:space-between;
  margin:22px 2px 10px}
.sec-title h3{font-size:13px;font-weight:700;color:var(--ink-2);letter-spacing:.02em}
.sec-title a{font-size:12px;color:var(--ink-3);text-decoration:none}

/* ---------- 底部导航 ---------- */
.tabbar{
  position:absolute;left:16px;right:16px;bottom:var(--safe);
  height:var(--tabbar-h);z-index:20;
  display:flex;align-items:center;justify-content:space-around;
  background:rgba(255,255,255,.40);
  backdrop-filter:blur(22px) saturate(190%);-webkit-backdrop-filter:blur(22px) saturate(190%);
  border:1px solid rgba(255,255,255,.62);
  border-radius:26px;
  box-shadow:0 14px 40px -16px rgba(120,60,30,.46),
             inset 0 1px 0 rgba(255,255,255,.7),
             inset 0 -1px 0 rgba(255,255,255,.28);
}
.tab{
  flex:1 1 0;display:flex;flex-direction:column;align-items:center;gap:3px;
  text-decoration:none;color:var(--ink-3);font-size:10.5px;font-weight:600;
  padding:8px 0;position:relative;transition:color .18s ease;
}
.tab svg{width:21px;height:21px;stroke:currentColor;stroke-width:1.9;fill:none;
  stroke-linecap:round;stroke-linejoin:round;transition:transform .2s cubic-bezier(.2,.7,.2,1)}
.tab[aria-current="page"]{color:var(--tomato-deep)}
.tab[aria-current="page"] svg{transform:translateY(-1px) scale(1.06)}
.tab[aria-current="page"]::before{
  content:"";position:absolute;top:0;left:50%;transform:translateX(-50%);
  width:22px;height:3px;border-radius:2px;background:var(--tomato);
}

/* ---------- 按钮 ---------- */
.cta{
  height:52px;border:0;border-radius:16px;background:var(--tomato);color:#FFF8F0;
  font-family:inherit;font-size:16px;font-weight:800;letter-spacing:.03em;cursor:pointer;
  box-shadow:0 6px 18px -8px rgba(168,42,22,.85), inset 0 1px 0 rgba(255,255,255,.24);
  transition:transform .12s ease, box-shadow .12s ease;
}
.cta:active{transform:translateY(2px);box-shadow:0 2px 8px -6px rgba(168,42,22,.8)}
.cta:disabled{background:rgba(255,255,255,.55);color:var(--ink-3);
  box-shadow:inset 0 0 0 1px var(--glass-edge);cursor:default}
.ghost{
  height:52px;border:1px solid var(--glass-line);border-radius:16px;background:var(--glass);
  backdrop-filter:var(--blur);color:var(--ink);font-family:inherit;font-size:15px;
  font-weight:600;cursor:pointer;
}

/* ---------- 列表行 ---------- */
.rows{border-radius:var(--r-md);overflow:hidden}
.row{
  display:flex;align-items:center;gap:12px;padding:14px 16px;cursor:pointer;
  background:var(--glass);backdrop-filter:var(--blur);
  border-bottom:1px solid rgba(255,255,255,.55);
  transition:background .15s ease;
}
.row:last-child{border-bottom:0}
.row:active{background:var(--glass-2)}
.row .ttl{flex:1 1 auto;font-size:14.5px;font-weight:600}
.row .val{font-size:13px;color:var(--ink-3)}
.row .arw{width:16px;height:16px;stroke:var(--ink-3);stroke-width:2;fill:none;
  stroke-linecap:round;stroke-linejoin:round;flex:0 0 auto}
.row .ico{width:30px;height:30px;border-radius:10px;display:flex;align-items:center;
  justify-content:center;background:rgba(255,255,255,.6);flex:0 0 auto}
.row .ico svg{width:16px;height:16px;stroke:var(--tomato-deep);stroke-width:1.9;fill:none;
  stroke-linecap:round;stroke-linejoin:round}

/* ---------- 动效 ---------- */
@keyframes rise{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}
.anim{animation:rise .42s cubic-bezier(.2,.8,.25,1) both;animation-delay:calc(var(--i,0) * 60ms)}
@media (prefers-reduced-motion: reduce){*{animation:none!important;transition:none!important}}


/* ---------- 深色模式 ---------- */
html[data-theme="dark"]{
  --ink:#F3E9DE;
  --ink-2:#C8B6A5;
  --ink-3:#9A8878;
  --tomato:#F0573A;
  --tomato-deep:#FF7A5C;
  --tomato-soft:rgba(240,87,58,.18);

  --glass:rgba(58,38,28,.52);
  --glass-2:rgba(58,38,28,.72);
  --glass-deep:rgba(40,26,18,.40);
  --glass-line:rgba(255,255,255,.16);
  --glass-edge:rgba(0,0,0,.3);

  --r-lg:26px;
  --shadow:0 10px 34px -12px rgba(0,0,0,.55);
  --shadow-sm:0 4px 16px -6px rgba(0,0,0,.45);
}
html[data-theme="dark"] body{background:#1A120D}
html[data-theme="dark"]{
  --glow-1:#4A2A1C; --glow-2:#5A2E1E; --glow-3:#3A1F14;
  --bg-1:#241710; --bg-2:#1C130E; --bg-3:#150E0A;
}
html[data-theme="dark"] .app::after{opacity:.22}
html[data-theme="dark"] .topbar{
  background:linear-gradient(180deg, rgba(30,20,14,.94), rgba(30,20,14,0));}
html[data-theme="dark"] .tabbar{
  background:rgba(70,46,34,.46);border-color:rgba(255,255,255,.14);
  box-shadow:0 14px 40px -16px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.14);}
html[data-theme="dark"] .thumb{background:rgba(255,255,255,.08)}
html[data-theme="dark"] .noimg{color:rgba(255,255,255,.16)}

/* 深色下的浮层与列表：把硬编码的白色底统一压暗 */
html[data-theme="dark"] .sheet{background:rgba(36,24,17,.97);border-color:rgba(255,255,255,.10)}
html[data-theme="dark"] .sheet-foot{background:rgba(36,24,17,.92);border-top-color:rgba(255,255,255,.08)}
html[data-theme="dark"] .grab{background:rgba(255,255,255,.22)}
html[data-theme="dark"] .setrow,
html[data-theme="dark"] .mlrow,
html[data-theme="dark"] .way,
html[data-theme="dark"] .item,
html[data-theme="dark"] .n-row,
html[data-theme="dark"] .share-url,
html[data-theme="dark"] .video,
html[data-theme="dark"] .m-invite,
html[data-theme="dark"] .mat span,
html[data-theme="dark"] .seg,
html[data-theme="dark"] .blk{background:rgba(255,255,255,.07);border-color:rgba(255,255,255,.10)}
html[data-theme="dark"] .setlist{border-color:rgba(255,255,255,.10)}
html[data-theme="dark"] .setrow{border-bottom-color:rgba(255,255,255,.07)}
html[data-theme="dark"] .kv,
html[data-theme="dark"] .m-row,
html[data-theme="dark"] .dev{border-bottom-color:rgba(255,255,255,.08)}
html[data-theme="dark"] .fld input,
html[data-theme="dark"] .fld textarea,
html[data-theme="dark"] .add input{background:rgba(255,255,255,.08);
  border-color:rgba(255,255,255,.12);color:var(--ink)}
html[data-theme="dark"] .add input::placeholder{color:var(--ink-3)}
html[data-theme="dark"] .sw{background:rgba(255,255,255,.22)}
html[data-theme="dark"] .setrow .sw[aria-pressed="true"]{background:var(--tomato)}
html[data-theme="dark"] .cta,
html[data-theme="dark"] .ctabar button,
html[data-theme="dark"] .sh-acts .p,
html[data-theme="dark"] .bar .cta{color:#25120A}
html[data-theme="dark"] .cta{box-shadow:0 6px 18px -8px rgba(240,87,58,.9)}
html[data-theme="dark"] .m-invite .plus{border-color:rgba(255,255,255,.24)}
html[data-theme="dark"] .qr{background:#fff}
html[data-theme="dark"] .ctabar{background:rgba(56,36,24,.55)}
html[data-theme="dark"] .seg button[aria-pressed="true"]{background:rgba(255,255,255,.16);color:var(--ink)}
html[data-theme="dark"] .chip{background:rgba(255,255,255,.10);border-color:rgba(255,255,255,.12)}
html[data-theme="dark"] .hero-card{background:linear-gradient(150deg, rgba(255,255,255,.10), rgba(255,255,255,.04))}
html[data-theme="dark"] .part{border-left-color:rgba(255,255,255,.12)}
html[data-theme="dark"] .today{background:var(--glass)}


/* app.css 深色补漏：统计页与菜库页专用的几个类 */
html[data-theme="dark"] .hero-card,
html[data-theme="dark"] .day,
html[data-theme="dark"] .rows2,
html[data-theme="dark"] .row,
html[data-theme="dark"] .it,
html[data-theme="dark"] .th,
html[data-theme="dark"] .prev,
html[data-theme="dark"] .tool,
html[data-theme="dark"] .member-card,
html[data-theme="dark"] .m-empty{
  border-color:rgba(255,255,255,.12);
}
html[data-theme="dark"] .rows2{border-color:rgba(255,255,255,.12)}
html[data-theme="dark"] .row,
html[data-theme="dark"] .it{border-bottom-color:rgba(255,255,255,.08)}
html[data-theme="dark"] .th{background:rgba(255,255,255,.08)}
html[data-theme="dark"] .box{background:rgba(255,255,255,.10);border-color:rgba(255,255,255,.22)}
html[data-theme="dark"] .box[aria-pressed="true"]{background:transparent;border-color:var(--ink)}
html[data-theme="dark"] .box svg{stroke:var(--ink)}
html[data-theme="dark"] .add input{background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.14);color:var(--ink)}
html[data-theme="dark"] .add input::placeholder{color:var(--ink-3)}
html[data-theme="dark"] .add button:disabled{background:rgba(255,255,255,.10);color:var(--ink-3)}
html[data-theme="dark"] .m-empty{border-bottom-color:rgba(255,255,255,.08)}
html[data-theme="dark"] .m-row{border-bottom-color:rgba(255,255,255,.08)}
html[data-theme="dark"] .m-invite{background:rgba(255,255,255,.05)}
html[data-theme="dark"] .split{border-top-color:rgba(255,255,255,.10)}
html[data-theme="dark"] .part{border-left-color:rgba(255,255,255,.10)}

/* ============================================================
   主题（mood）：只管色相和底色光斑，和亮暗（data-theme）正交
   默认暖阳；切主题只换变量，不动任何布局
   ============================================================ */

/* 清雾 · 冷灰蓝，安静、克制 */
html[data-mood="cool"]{
  --tomato:#2F6BA8;
  --tomato-deep:#24578B;
  --tomato-soft:rgba(47,107,168,.10);
  --glow-1:#CFE0F5; --glow-2:#BFD3EE; --glow-3:#A9C3E4;
  --bg-1:#EFF5FC; --bg-2:#E2EBF6; --bg-3:#D3E0EF;
}
html[data-theme="dark"][data-mood="cool"]{
  --tomato:#5B9BE0; --tomato-deep:#7FB4EC; --tomato-soft:rgba(91,155,224,.18);
  --glow-1:#1C2A3C; --glow-2:#223346; --glow-3:#16202E;
  --bg-1:#141C26; --bg-2:#101720; --bg-3:#0C121A;
}

/* 青瓷 · 青绿，像刚洗完的菜叶 */
html[data-mood="celadon"]{
  --tomato:#2E7D63;
  --tomato-deep:#256651;
  --tomato-soft:rgba(46,125,99,.10);
  --glow-1:#D3E8DC; --glow-2:#C2DECE; --glow-3:#A9CFBB;
  --bg-1:#F0F7F2; --bg-2:#E1EFE6; --bg-3:#CFE3D7;
}
html[data-theme="dark"][data-mood="celadon"]{
  --tomato:#4FAE8E; --tomato-deep:#6FC4A6; --tomato-soft:rgba(79,174,142,.18);
  --glow-1:#16302A; --glow-2:#1B3A31; --glow-3:#12241F;
  --bg-1:#111E1A; --bg-2:#0D1815; --bg-3:#0A1310;
}

/* 暮山 · 紫褐，傍晚收工那阵子 */
html[data-mood="dusk"]{
  --tomato:#8A4B72;
  --tomato-deep:#6F3C5C;
  --tomato-soft:rgba(138,75,114,.10);
  --glow-1:#EBD3E0; --glow-2:#E0C3D4; --glow-3:#CFAAC2;
  --bg-1:#F8F0F5; --bg-2:#F0E1EA; --bg-3:#E5CEDC;
}
html[data-theme="dark"][data-mood="dusk"]{
  --tomato:#C77CA6; --tomato-deep:#DB9CC0; --tomato-soft:rgba(199,124,166,.18);
  --glow-1:#2E1F2A; --glow-2:#3A2536; --glow-3:#241722;
  --bg-1:#1C1419; --bg-2:#161015; --bg-3:#110C10;
}

/* 主题卡片（我的 - 主题） */
.moods{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:14px}
.mood{padding:0;border:0;background:none;font-family:inherit;cursor:pointer;text-align:left}
.mood .sw2{height:62px;border-radius:16px;border:1px solid var(--glass-line);
  box-shadow:var(--shadow-sm);position:relative;overflow:hidden}
.mood .sw2::after{content:"";position:absolute;right:10px;bottom:10px;width:22px;height:22px;
  border-radius:50%;border:2px solid rgba(255,255,255,.85)}
.mood .nm2{margin-top:7px;font-size:12.5px;font-weight:700;color:var(--ink)}
.mood .ds2{font-size:11px;color:var(--ink-3);margin-top:1px}
.mood[aria-pressed="true"] .sw2{box-shadow:0 0 0 2px var(--tomato), 0 0 0 5px var(--tomato-soft)}
.mood[aria-pressed="true"] .nm2{color:var(--tomato-deep)}


/* 工具仓库里的三个小工具 */
.fridge{margin-top:12px;display:flex;flex-direction:column;gap:8px}
.frow{display:flex;align-items:center;justify-content:space-between;
  padding:11px 14px;border-radius:14px;background:var(--glass);
  border:1px solid var(--glass-line);font-size:13.5px;color:var(--ink)}
.frow button{width:26px;height:26px;border-radius:50%;border:0;cursor:pointer;
  background:var(--glass-2);color:var(--ink-2);font-size:15px;line-height:1}
.tg-title{margin:18px 0 9px;font-size:11.5px;color:var(--ink-3);letter-spacing:.06em}
.tags{display:flex;flex-wrap:wrap;gap:8px}
.tg{padding:7px 14px;border-radius:14px;border:1px solid var(--glass-line);
  background:var(--glass);color:var(--ink-2);font-family:inherit;font-size:12.5px;
  font-weight:600;cursor:pointer}
.tg[aria-pressed="true"]{background:var(--tomato);border-color:transparent;color:#FFF8F0}
.alarm-row{display:flex;align-items:center;justify-content:space-between;
  margin-top:16px;padding:14px 2px;
  border-top:1px solid var(--glass-line);border-bottom:1px solid var(--glass-line)}
.al-t{font-size:14px;font-weight:700;color:var(--ink)}
.al-s{font-size:11.5px;color:var(--ink-3);margin-top:2px}


/* 输入行：菜库、剩菜提醒、闹钟共用 */
.add{display:flex;gap:8px;margin-top:14px}
.add input{
  flex:1 1 auto;height:46px;border-radius:15px;padding:0 14px;font-family:inherit;
  font-size:14.5px;color:var(--ink);outline:none;
  background:var(--glass);border:1px solid var(--glass-line);
  backdrop-filter:var(--blur);-webkit-backdrop-filter:var(--blur);
  box-shadow:inset 0 1px 2px rgba(120,60,30,.06);
}
.add button{
  flex:0 0 auto;height:46px;padding:0 18px;border:0;border-radius:15px;
  background:var(--tomato);color:#FFF8F0;font-family:inherit;font-size:14px;
  font-weight:700;cursor:pointer;
  box-shadow:0 8px 20px -10px rgba(168,42,22,.9);
}
.add button:disabled{background:var(--glass-2);color:var(--ink-3);box-shadow:none;cursor:default}


/* 换头像的两个入口 */
.photo-row{display:flex;gap:8px;margin-top:10px;flex-wrap:wrap}
.photo-btn{height:42px;border-radius:14px;cursor:pointer;padding:0 14px;
  border:1px dashed rgba(42,26,18,.22);background:var(--glass);
  font-family:inherit;font-size:13px;font-weight:600;color:var(--ink-2);
  display:inline-flex;align-items:center;justify-content:center;gap:6px}
.photo-btn:active{background:var(--glass-2)}
.photo-btn svg{width:15px;height:15px;stroke:currentColor;stroke-width:1.9;fill:none;
  stroke-linecap:round;stroke-linejoin:round}
html[data-theme="dark"] .photo-btn{border-color:rgba(255,255,255,.2);color:var(--ink-2)}
