/* 饱饱食堂 — 复古卡通 · 粗描边 · 硬投影 */
:root {
  --ink: #000;
  --sky: #C9E6FB;
  --sun: #FDD36A;
  --bubble: #FF78B9;
  --lime: #D2FA8A;
  --denim: #9DC6EA;
  --apricot: #FFC970;
  --mint: #74F7C6;
  --tomato: #F2552C;
  --paper: #FFFFFF;
  --cream: #FFF8E6;
  --ok: #3FBF5F;
  --soon: #FFB938;
  --warn: #FF8A2B;
  --bad: #F2552C;

  --disp: 'Krona One', 'ZCOOL QingKe HuangYou', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --cn: 'ZCOOL QingKe HuangYou', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --num: 'Krona One', 'Arial Black', sans-serif;
  --body: -apple-system, 'PingFang SC', 'HarmonyOS Sans SC', 'MiSans', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;

  --bw: 3px;
  --sh: 4px 5px 0 var(--ink);
  --sh-sm: 3px 3px 0 var(--ink);
  --r-card: 22px;
  --r-btn: 7px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--sky);
  color: var(--ink);
  font: 15px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--tomato); outline-offset: 2px; border-radius: 6px; }

.disp { font-family: var(--disp); font-weight: 900; font-synthesis: none; letter-spacing: 0.01em; line-height: 1.12; }
.num { font-family: var(--num); font-weight: 900; font-synthesis: none; letter-spacing: -0.02em; }

/* ——— App 外壳 ——— */
.app {
  position: relative;
  max-width: 440px;
  margin: 0 auto;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--sky);
  overflow: hidden;
}
@media (min-width: 620px) {
  body {
    display: grid;
    place-items: center;
    background:
      radial-gradient(circle at 1px 1px, rgba(0,0,0,.12) 1.2px, transparent 1.6px) 0 0 / 22px 22px,
      var(--mint);
  }
  .app {
    width: 420px;
    height: min(880px, calc(100dvh - 48px));
    border: 4px solid var(--ink);
    border-radius: 40px;
    box-shadow: 8px 10px 0 var(--ink);
  }
}

/* ——— 顶栏 ——— */
.top {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: max(12px, env(safe-area-inset-top)) 16px 12px;
  background: var(--sun);
  border-bottom: var(--bw) solid var(--ink);
  z-index: 5;
}
.brand { display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 0; }
.brand-logo { width: 42px; height: 42px; display: block; }
.brand-logo img { width: 42px; height: 42px; }
.brand-name { font: 900 15px/1.05 var(--body); text-align: left; letter-spacing: 0.04em; }
.top-right { display: flex; align-items: center; gap: 8px; }
.call-pill {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 14px 4px 4px;
  background: var(--paper);
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  box-shadow: var(--sh-sm);
  font-size: 13px; font-weight: 600;
}
.call-pill:active, .btn:active, .avatar:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.call-ico {
  width: 40px; height: 28px; border-radius: 999px;
  background: var(--denim); border: 2.5px solid var(--ink);
  display: grid; place-items: center;
}
.call-ico svg { width: 18px; height: 18px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  border: 2.5px solid var(--ink); background: var(--bubble);
  box-shadow: var(--sh-sm);
  font: 900 15px var(--cn); font-synthesis: none;
}
.avatar.on { background: var(--lime); }

/* ——— 主视图 ——— */
.view {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 16px 128px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  outline: none;
}
.view > * + * { margin-top: 16px; }

/* ——— 底部导航 ——— */
.tabbar {
  position: absolute; left: 12px; right: 12px;
  bottom: max(12px, env(safe-area-inset-bottom));
  display: grid; grid-template-columns: 1fr 1fr 84px 1fr 1fr;
  align-items: end;
  padding: 6px 4px 6px;
  background: var(--paper);
  border: var(--bw) solid var(--ink);
  border-radius: 24px;
  box-shadow: var(--sh);
  z-index: 10;
}
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  background: none; border: 0; padding: 6px 0 2px;
  font-size: 11.5px; font-weight: 600; color: #333;
  border-radius: 14px;
}
.tab svg { width: 24px; height: 24px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.tab.on { color: var(--ink); }
.tab.on svg { fill: var(--sun); }
.tab.on span { background: var(--ink); color: #fff; border-radius: 999px; padding: 0 8px; }
.mic-wrap { display: flex; flex-direction: column; align-items: center; position: relative; }
.mic {
  width: 66px; height: 66px; margin-top: -34px;
  border-radius: 50%;
  background: var(--sun);
  border: var(--bw) solid var(--ink);
  box-shadow: var(--sh-sm);
  display: grid; place-items: center;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.mic svg { width: 30px; height: 30px; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; }
.mic.hold { background: var(--bubble); transform: scale(1.06); }
.mic-label { font-size: 11px; font-weight: 700; margin-top: 2px; }

/* ——— 通用卡片 / 按钮 ——— */
.card {
  position: relative;
  border: var(--bw) solid var(--ink);
  border-radius: var(--r-card);
  box-shadow: var(--sh);
  padding: 18px;
  background: var(--paper);
  overflow: hidden;
}
.pink { background: var(--bubble); }
.lime { background: var(--lime); }
.denim { background: var(--denim); }
.apricot { background: var(--apricot); }
.mint { background: var(--mint); }
.sunbg { background: var(--sun); }
.cream { background: var(--cream); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px;
  background: var(--paper);
  border: 2.5px solid var(--ink);
  border-radius: var(--r-btn);
  box-shadow: var(--sh-sm);
  font-weight: 600; font-size: 14px;
  white-space: nowrap;
  text-decoration: none;
}
.btn .arr { width: 13px; height: 13px; }
.btn.sm { padding: 6px 11px; font-size: 13px; }
.btn.block { width: 100%; }
.btn.black { background: var(--ink); color: #fff; box-shadow: none; }
.btn.black:active { transform: translateY(2px); }
.btn.sun { background: var(--sun); }
.btn.tomato { background: var(--tomato); color: #fff; }
.btn.ghost { background: transparent; box-shadow: none; }
.btn:disabled { opacity: .45; pointer-events: none; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--sun);
  font-size: 13px; font-weight: 600;
  white-space: nowrap;
}
.pill.white { background: var(--paper); }
.pill.lime { background: var(--lime); }
.pill.pink { background: var(--bubble); }
.pill.tomato { background: var(--tomato); color: #fff; }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 4px; }
.page-head h1 { margin: 0; font-size: 31px; }
.sub { margin: 4px 0 0; font-size: 13px; color: #333; }
.muted { color: #444; }
.section-title { font: 900 20px/1.2 var(--cn); font-synthesis: none; margin: 4px 0 0; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 4px 6px 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  padding: 6px 14px;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  font-size: 13.5px; font-weight: 600;
}
.chip.on { background: var(--ink); color: #fff; }
.chip .cnt { font-family: var(--num); font-size: 11px; margin-left: 4px; }

.seg {
  display: grid; grid-template-columns: 1fr 1fr;
  border: 2.5px solid var(--ink); border-radius: 14px;
  background: var(--paper); overflow: hidden;
  box-shadow: var(--sh-sm);
}
.seg button { border: 0; background: none; padding: 10px 0; font-weight: 700; }
.seg button + button { border-left: 2.5px solid var(--ink); }
.seg button.on { background: var(--sun); }

.empty { text-align: center; padding: 24px 12px 8px; }
.empty .mascot { width: 110px; margin: 0 auto 6px; }
.empty p { margin: 6px 0 14px; }

/* ——— 首页 ——— */
.greet { display: flex; align-items: baseline; justify-content: space-between; }
.greet h2 { margin: 0; font: 900 22px/1.2 var(--cn); font-synthesis: none; }
.greet .date { font-size: 13px; font-weight: 600; }

.hero { padding: 20px 18px 18px; min-height: 270px; }
.hero h1 { margin: 0; font-size: 27px; max-width: 70%; }
.hero .bignum { display: flex; align-items: baseline; gap: 6px; margin-top: 6px; }
.hero .bignum .num { font-size: 50px; line-height: 1; }
.hero .bignum .u { font: 900 16px var(--num); }
.hero.over { background: var(--tomato); color: #fff; }
.hero.over .ledger span { color: var(--ink); }
.ledger { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 16px; max-width: 72%; }
.ledger span {
  background: var(--paper); border: 2px solid var(--ink); border-radius: 999px;
  padding: 1px 10px; font-size: 12.5px; font-weight: 600;
}
.ledger b { font-family: var(--num); font-weight: 400; font-size: 12px; }
.hero-art { position: absolute; right: -8px; bottom: -6px; width: 136px; pointer-events: none; }
.hero-art .mascot { width: 100%; height: auto; }
.speedlines { position: absolute; right: 120px; bottom: 34px; width: 40px; }
.goal-sticker {
  position: absolute; right: 14px; top: 14px; width: 84px; height: 84px;
  display: grid; place-items: center;
  transform: rotate(-14deg);
}
.goal-sticker .sticker-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.goal-sticker span {
  position: relative; text-align: center; color: #fff;
  font: 900 13px/1.1 var(--cn); font-synthesis: none;
  -webkit-text-stroke: 0.6px var(--ink);
  text-shadow: 1.5px 1.5px 0 var(--ink);
}
.goal-sticker span b { display: block; font: 900 15px var(--num); }

.bento2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tile { min-height: 196px; padding: 14px; display: flex; flex-direction: column; text-align: left; width: 100%; font: inherit; }
button.tile { cursor: pointer; }
.tile .dots { position: absolute; right: 12px; top: 12px; display: flex; gap: 4px; }
.tile .dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.tile .vert {
  position: absolute; left: 6px; bottom: 14px;
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-size: 12px; font-weight: 800; letter-spacing: 0.1em;
}
.tile .tile-art { width: 92px; margin: 2px 0 0 14px; }
.tile .tile-art .mascot { width: 100%; height: auto; }
.tile .tile-main { margin-top: auto; padding-left: 18px; }
.tile h3 { margin: 0; font-size: 17px; font-weight: 800; }
.tile .count { font: 900 30px/1 var(--num); font-synthesis: none; }
.tile .count small { font: 800 14px var(--body); margin-left: 3px; }
.tile .note { font-size: 12px; font-weight: 600; margin: 3px 0 0; }
.tile.move .count { font-size: 40px; }
.tile.move .tile-main { padding-left: 0; }
.tile.move h3 { font: 900 19px/1.15 var(--cn); font-synthesis: none; margin-bottom: 4px; }
.tile.move .btn { margin-top: 10px; align-self: flex-start; }
.tile.move .tile-art { position: absolute; right: -4px; top: 6px; width: 64px; margin: 0; }
.live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--tomato); border: 2px solid var(--ink); margin-right: 6px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }

.next-card { padding: 16px 16px 18px; }
.next-art { display: flex; justify-content: center; gap: 0; margin: -4px 0 6px; }
.next-art .mascot { width: 128px; height: auto; }
.next-art .mascot + .mascot { margin-left: -14px; }
.next-card h3 { margin: 8px 0 4px; font-size: 21px; }
.next-card .meta { font-size: 13px; font-weight: 600; margin: 0; }
.macro-lines { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.macro-line small { display: flex; justify-content: space-between; font-size: 11.5px; font-weight: 700; }
.macro-line .bar { height: 5px; background: var(--ink); border-radius: 3px; margin-top: 4px; overflow: hidden; }
.macro-line .bar i { display: block; height: 100%; background: var(--sun); }

.diary-strip { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 6px; scrollbar-width: none; }
.diary-strip::-webkit-scrollbar { display: none; }
.dcard { flex: none; width: 104px; text-align: left; background: none; border: 0; padding: 0; }
.dcard .ph {
  width: 104px; height: 104px; border-radius: 16px; border: 2.5px solid var(--ink);
  overflow: hidden; background: var(--cream); display: grid; place-items: center;
}
.dcard .ph img { width: 100%; height: 100%; object-fit: cover; }
.dcard .ph .mascot { width: 82px; }
.dcard b { display: block; font-size: 13px; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dcard small { font-size: 11.5px; font-weight: 600; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.card-head h2 { margin: 0; font: 900 20px/1.2 var(--cn); font-synthesis: none; }

.shop-teaser { display: flex; align-items: center; gap: 12px; padding: 14px 16px; width: 100%; text-align: left; font: inherit; }
.shop-teaser .mascot { width: 62px; flex: none; }
.shop-teaser h3 { margin: 0; font-size: 16px; }
.shop-teaser p { margin: 2px 0 0; font-size: 12.5px; font-weight: 600; }

/* ——— 冰箱 ——— */
.fresh-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.fresh-sum button {
  border: 2.5px solid var(--ink); border-radius: 16px; padding: 10px 10px 8px;
  text-align: left; box-shadow: var(--sh-sm);
}
.fresh-sum b { display: block; font: 900 24px/1 var(--num); font-synthesis: none; }
.fresh-sum span { font-size: 12px; font-weight: 700; }
.items { display: grid; gap: 12px; }
.item {
  display: grid; grid-template-columns: 62px 1fr auto; gap: 4px 12px;
  align-items: center;
  padding: 12px; border: var(--bw) solid var(--ink); border-radius: 18px;
  background: var(--paper); box-shadow: var(--sh-sm);
  cursor: pointer;
}
.item-art {
  grid-row: span 2;
  width: 62px; height: 62px; border-radius: 14px; border: 2.5px solid var(--ink);
  display: grid; place-items: center; overflow: hidden; position: relative;
}
.item-art .mascot { width: 60px; height: 60px; margin-top: 4px; }
.item-art img { width: 100%; height: 100%; object-fit: cover; }
.item-main { min-width: 0; }
.item-top { display: flex; align-items: center; gap: 6px; }
.item-top h3 { margin: 0; font-size: 16.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.loc-tag { font-size: 11px; font-weight: 700; border: 1.5px solid var(--ink); border-radius: 6px; padding: 0 5px; flex: none; }
.fresh { height: 9px; border: 2px solid var(--ink); border-radius: 999px; margin: 6px 0 4px; overflow: hidden; background: #fff; }
.fresh i { display: block; height: 100%; border-right: 2px solid var(--ink); }
.fresh i.ok { background: var(--ok); }
.fresh i.soon { background: var(--soon); }
.fresh i.warn { background: var(--warn); }
.fresh i.bad { background: var(--bad); width: 100% !important; border-right: 0; background-image: repeating-linear-gradient(45deg, transparent 0 5px, rgba(0,0,0,.25) 5px 7px); }
.item-meta { margin: 0; font-size: 12px; font-weight: 600; color: #333; }
.countdown {
  grid-row: span 2; text-align: center; min-width: 58px;
  border: 2.5px solid var(--ink); border-radius: 14px; padding: 6px 4px;
}
.countdown b { display: block; font: 900 22px/1 var(--num); font-synthesis: none; }
.countdown small { font-size: 11px; font-weight: 800; }
.countdown.ok { background: var(--lime); }
.countdown.soon { background: var(--apricot); }
.countdown.warn { background: var(--warn); }
.countdown.bad { background: var(--bad); color: #fff; }
.countdown.txt b { font: 900 17px/1.1 var(--cn); font-synthesis: none; }
.qty { grid-column: 2 / 4; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }
.stepper { display: inline-flex; align-items: center; border: 2.5px solid var(--ink); border-radius: 10px; overflow: hidden; background: var(--cream); }
.stepper button { width: 36px; height: 32px; border: 0; background: var(--paper); font-size: 20px; font-weight: 800; line-height: 1; }
.stepper button:active { background: var(--sun); }
.stepper span { min-width: 76px; text-align: center; font-weight: 800; font-size: 14px; border-left: 2.5px solid var(--ink); border-right: 2.5px solid var(--ink); padding: 4px 6px; }
.qty .tip { font-size: 12px; font-weight: 700; }

.sugg { display: grid; grid-template-columns: 50px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 2px dashed var(--ink); }
.sugg:last-child { border-bottom: 0; }
.sugg .ico { width: 50px; height: 50px; border-radius: 12px; border: 2.5px solid var(--ink); display: grid; place-items: center; overflow: hidden; }
.sugg .ico .mascot { width: 50px; margin-top: 4px; }
.sugg b { display: block; font-size: 15px; }
.sugg small { display: block; font-size: 12px; font-weight: 600; color: #333; }
.shop-row { display: grid; grid-template-columns: 30px 1fr auto auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 2px dashed var(--ink); }
.shop-row:last-child { border-bottom: 0; }
.check { width: 28px; height: 28px; border: 2.5px solid var(--ink); border-radius: 8px; background: #fff; display: grid; place-items: center; padding: 0; }
.check.on { background: var(--ok); }
.check svg { width: 16px; height: 16px; fill: none; stroke: #000; stroke-width: 3; }
.shop-row.done b { text-decoration: line-through; opacity: .55; }
.x-btn { width: 30px; height: 30px; border: 2px solid var(--ink); border-radius: 8px; background: #fff; font-weight: 800; padding: 0; }
.add-line { display: flex; gap: 8px; margin-top: 12px; }
.add-line input { flex: 1; min-width: 0; }

/* ——— 三餐 ——— */
.goal-switch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.goal-switch button {
  border: var(--bw) solid var(--ink); border-radius: 16px; background: var(--paper);
  padding: 10px 6px 8px; text-align: center; box-shadow: var(--sh-sm);
}
.goal-switch b { display: block; font: 900 19px/1.1 var(--cn); font-synthesis: none; }
.goal-switch small { font-size: 11px; font-weight: 700; }
.goal-switch button.on { transform: translate(3px, 3px); box-shadow: none; }
.goal-switch button.on.cut { background: var(--bubble); }
.goal-switch button.on.bulk { background: var(--apricot); }
.goal-switch button.on.keep { background: var(--lime); }

.budget { padding: 16px; }
.budget-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.budget-top .num { font-size: 36px; line-height: 1; }
.budget-top small { font-size: 12px; font-weight: 700; }
.formula { margin: 8px 0 0; font-size: 12.5px; font-weight: 600; }
.formula b { font-family: var(--num); font-weight: 400; font-size: 12px; }
.mac-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.mac { background: var(--paper); border: 2.5px solid var(--ink); border-radius: 12px; padding: 8px; }
.mac small { display: block; font-size: 11.5px; font-weight: 800; }
.mac b { font: 900 15px var(--num); font-synthesis: none; }
.mac b em { font: 600 11px var(--body); font-style: normal; }
.mac .bar { height: 6px; border: 1.5px solid var(--ink); border-radius: 4px; margin-top: 5px; overflow: hidden; }
.mac .bar i { display: block; height: 100%; background: var(--tomato); }

.adjust {
  display: flex; gap: 12px; align-items: center;
  border: 2.5px dashed var(--ink); border-radius: 16px; padding: 10px 12px;
  background: var(--cream); font-size: 13px; font-weight: 600;
}
.adjust .mascot { width: 52px; flex: none; }
.adjust b { font-family: var(--num); font-weight: 400; }

.menu-card { padding: 18px 16px 16px; }
.menu-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.menu-head h2 { margin: 0; font-size: 28px; }
.menu-head .pill { font-size: 12px; }
.menu-body { display: grid; grid-template-columns: 1fr 112px; gap: 4px; margin-top: 10px; }
.menu-art { align-self: start; margin-right: -22px; margin-top: -6px; }
.menu-art .mascot { width: 128px; height: auto; }
.dish-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.dish-row h3 { margin: 0; font-size: 16.5px; font-weight: 800; }
.dish-row .num { font-size: 15px; white-space: nowrap; }
.dish-row .num small { font: 700 11px var(--body); }
.desc { margin: 4px 0 8px; font-size: 12px; line-height: 1.45; color: #222; padding-bottom: 8px; border-bottom: 2px solid var(--ink); }
.mini-mac { display: flex; gap: 6px; flex-wrap: wrap; font-size: 11.5px; font-weight: 700; }
.mini-mac span { background: var(--cream); border: 1.5px solid var(--ink); border-radius: 6px; padding: 0 6px; }
.stock-line { font-size: 12px; font-weight: 600; margin: 8px 0 0; }
.stock-line .ok-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--ok); margin-right: 4px; vertical-align: -1px; }
.stock-line .no-dot { background: #fff; }
.menu-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.menu-card .btn.black { margin-top: 14px; padding: 12px; }
.done-stamp {
  display: flex; align-items: center; gap: 12px; margin-top: 10px;
  border: 2.5px solid var(--ink); border-radius: 14px; padding: 10px 12px; background: var(--lime);
}
.done-stamp .mascot { width: 56px; flex: none; }
.done-stamp b { display: block; }
.done-stamp small { font-size: 12px; font-weight: 600; }

/* ——— 菜谱详情 ——— */
.recipe-hero { margin: -6px -18px 0; padding: 4px 18px 14px; display: flex; align-items: flex-end; gap: 10px; border-bottom: var(--bw) solid var(--ink); }
.recipe-hero .mascot { width: 120px; flex: none; }
.recipe-hero h2 { margin: 0 0 6px; font-size: 24px; }
.nut-row { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 8px; margin-top: 16px; }
.nut { border: 2.5px solid var(--ink); border-radius: 12px; padding: 8px 6px; text-align: center; }
.nut b { display: block; font: 900 17px/1.1 var(--num); font-synthesis: none; }
.nut small { font-size: 11px; font-weight: 700; }
.split { display: flex; height: 14px; border: 2.5px solid var(--ink); border-radius: 999px; overflow: hidden; margin-top: 10px; }
.split i { display: block; height: 100%; }
.split i + i { border-left: 2px solid var(--ink); }
.split-legend { display: flex; gap: 12px; font-size: 11.5px; font-weight: 700; margin-top: 4px; }
.split-legend span::before { content: ''; display: inline-block; width: 9px; height: 9px; border: 1.5px solid var(--ink); border-radius: 3px; margin-right: 4px; background: var(--c); vertical-align: -1px; }
.ing-list { list-style: none; padding: 0; margin: 8px 0 0; }
.ing-list li { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 2px dashed var(--ink); font-size: 14px; }
.ing-list li:last-child { border-bottom: 0; }
.have { font-size: 11.5px; font-weight: 800; border: 1.5px solid var(--ink); border-radius: 6px; padding: 0 6px; }
.have.yes { background: var(--lime); }
.have.no { background: var(--apricot); }
.have.pantry { background: #eee; }
.steps { padding: 0; margin: 8px 0 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 4px 0 12px 40px; font-size: 14px; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0;
  width: 28px; height: 28px; border-radius: 50%; border: 2.5px solid var(--ink); background: var(--sun);
  display: grid; place-items: center; font: 900 12px var(--num);
}
.sheet h4 { font: 900 18px var(--cn); font-synthesis: none; margin: 20px 0 0; }

/* ——— 运动 ——— */
.live { padding: 18px; }
.live h2 { margin: 0; font-size: 22px; }
.live .clock { font-size: 46px; line-height: 1; margin: 12px 0 4px; }
.live .live-kcal { font-size: 14px; font-weight: 700; }
.live .live-kcal b { font-family: var(--num); font-weight: 400; font-size: 20px; }
.live .row { display: flex; gap: 10px; margin-top: 16px; }
.live-art { position: absolute; right: -4px; top: 8px; width: 104px; }
.ex-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ex {
  border: 2.5px solid var(--ink); border-radius: 16px; padding: 12px 8px 10px;
  text-align: left; box-shadow: var(--sh-sm); min-height: 84px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.ex b { font: 900 17px/1.1 var(--cn); font-synthesis: none; }
.ex small { font-size: 11px; font-weight: 700; }
.ex small em { font: 400 13px var(--num); font-style: normal; }
.ex:active { transform: translate(3px, 3px); box-shadow: none; }
.log-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 2px dashed var(--ink); }
.log-row:last-child { border-bottom: 0; }
.log-row b { font-size: 15px; }
.log-row small { display: block; font-size: 12px; font-weight: 600; color: #333; }
.log-row .num { font-size: 15px; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-top: 22px; }
.week .col { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.week .plot { position: relative; width: 100%; height: 104px; }
.week .b { position: absolute; left: 0; right: 0; bottom: 0; border: 2px solid var(--ink); border-radius: 8px 8px 3px 3px; background: var(--denim); min-height: 4px; }
.week .b.today { background: var(--bubble); }
.week .b.over { background: var(--tomato); }
.week small { font-size: 11px; font-weight: 700; white-space: nowrap; }
.week .v { position: absolute; left: 50%; top: -17px; transform: translateX(-50%); font: 400 9px var(--num); white-space: nowrap; }
.week .tl { position: absolute; left: -5px; right: -5px; border-top: 2.5px dashed var(--ink); pointer-events: none; }

/* ——— 我的 ——— */
.profile { display: flex; gap: 14px; align-items: center; }
.profile .mascot { width: 96px; flex: none; }
.profile h2 { margin: 0; font-size: 22px; word-break: break-all; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.stats div { background: var(--paper); border: 2.5px solid var(--ink); border-radius: 12px; padding: 8px; }
.stats b { display: block; font: 900 16px var(--num); font-synthesis: none; }
.stats small { font-size: 11px; font-weight: 700; }
.day-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.day-nav b { font-weight: 800; }
.icon-btn { width: 36px; height: 36px; border: 2.5px solid var(--ink); border-radius: 10px; background: #fff; box-shadow: var(--sh-sm); font-weight: 900; padding: 0; }
.icon-btn:disabled { opacity: .35; }
.meal-group h5 { margin: 14px 0 4px; font: 900 16px var(--cn); font-synthesis: none; display: flex; justify-content: space-between; }
.meal-group h5 span { font: 400 13px var(--num); }
.food-row { display: grid; grid-template-columns: 52px 1fr auto auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 2px dashed var(--ink); }
.food-row:last-child { border-bottom: 0; }
.food-row .th { width: 52px; height: 52px; border-radius: 12px; border: 2.5px solid var(--ink); overflow: hidden; display: grid; place-items: center; background: var(--cream); }
.food-row .th img { width: 100%; height: 100%; object-fit: cover; }
.food-row .th .mascot { width: 50px; margin-top: 4px; }
.food-row b { font-size: 14.5px; }
.food-row small { display: block; font-size: 11.5px; font-weight: 600; color: #333; }
.food-row .num { font-size: 14px; }
.danger-zone { text-align: center; }

/* ——— 表单 ——— */
.field { display: block; margin-top: 14px; }
.field > span { display: block; font-size: 13px; font-weight: 800; margin-bottom: 6px; }
.input, .field input, .field select, .field textarea, .add-line input {
  width: 100%;
  padding: 10px 12px;
  border: 2.5px solid var(--ink);
  border-radius: 12px;
  background: var(--paper);
  font-size: 15px;
  outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus, .add-line input:focus { background: var(--cream); box-shadow: var(--sh-sm); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.opt { display: flex; gap: 8px; flex-wrap: wrap; }
.opt button { padding: 7px 13px; border: 2.5px solid var(--ink); border-radius: 10px; background: var(--paper); font-weight: 700; font-size: 13.5px; }
.opt button.on { background: var(--sun); box-shadow: var(--sh-sm); }
.opt.tags button.on { background: var(--tomato); color: #fff; }
.sugg-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.sugg-chips button { padding: 3px 10px; border: 2px solid var(--ink); border-radius: 999px; background: var(--cream); font-size: 12.5px; font-weight: 600; }
.calc-note { font-size: 12.5px; font-weight: 600; margin: 8px 0 0; background: var(--cream); border: 2px solid var(--ink); border-radius: 10px; padding: 6px 10px; }
.sheet-actions { display: flex; gap: 10px; margin-top: 20px; }
.sheet-actions .btn { flex: 1; padding: 12px; }

/* ——— 底部抽屉 ——— */
.sheet-root { position: absolute; inset: 0; z-index: 30; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); animation: fade .2s ease; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-height: 90%; overflow-y: auto;
  background: var(--paper);
  border-top: var(--bw) solid var(--ink);
  border-radius: 28px 28px 0 0;
  padding: 10px 18px calc(24px + env(safe-area-inset-bottom));
  animation: up .28s cubic-bezier(.2,.9,.3,1.15);
}
.sheet-grip { width: 48px; height: 6px; border-radius: 3px; background: var(--ink); margin: 0 auto 12px; }
.sheet-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sheet-title h3 { margin: 0; font-size: 22px; }
.photo-prev { margin-top: 12px; border: var(--bw) solid var(--ink); border-radius: 18px; overflow: hidden; box-shadow: var(--sh-sm); }
.photo-prev img { width: 100%; max-height: 240px; object-fit: cover; }
@keyframes up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ——— 语音层 ——— */
.voice {
  position: absolute; inset: 0; z-index: 40;
  background: rgba(0,0,0,.6);
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
  padding: 0 20px calc(140px + env(safe-area-inset-bottom));
  user-select: none; -webkit-user-select: none;
  animation: fade .15s ease;
}
.v-bubble {
  width: 100%; max-width: 320px;
  background: var(--sun); border: var(--bw) solid var(--ink); border-radius: 24px;
  box-shadow: var(--sh); padding: 18px 18px 16px; position: relative;
  transition: background .15s, transform .15s;
}
.v-bubble::after {
  content: ''; position: absolute; left: 50%; bottom: -14px; width: 24px; height: 24px;
  background: inherit; border-right: var(--bw) solid var(--ink); border-bottom: var(--bw) solid var(--ink);
  transform: translateX(-50%) rotate(45deg);
}
.v-wave { display: flex; justify-content: center; align-items: center; gap: 5px; height: 44px; }
.v-wave i { width: 6px; height: 12px; background: var(--ink); border-radius: 3px; animation: wave .9s ease-in-out infinite; }
.v-wave i:nth-child(2n) { animation-delay: -.3s; }
.v-wave i:nth-child(3n) { animation-delay: -.6s; }
.v-wave i:nth-child(5n) { animation-delay: -.15s; }
@keyframes wave { 0%,100% { height: 10px; } 50% { height: 40px; } }
.v-text { margin: 10px 0 0; min-height: 44px; font-size: 16px; font-weight: 700; text-align: center; word-break: break-all; }
.v-text.placeholder { color: rgba(0,0,0,.5); font-weight: 600; font-size: 14px; }
.v-hint {
  margin-top: 40px; color: #fff; font-weight: 800; font-size: 15px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.v-cancel {
  width: 74px; height: 74px; border-radius: 50%;
  border: var(--bw) solid #fff; display: grid; place-items: center;
  font-size: 30px; font-weight: 900; color: #fff;
  transition: all .15s;
}
.v-hint .arrow { width: 22px; height: 22px; animation: nudge 1s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(-6px); } }
.voice.cancel .v-bubble { background: var(--tomato); color: #fff; transform: scale(.96); }
.voice.cancel .v-wave i { background: #fff; animation-play-state: paused; }
.voice.cancel .v-cancel { background: var(--tomato); border-color: var(--ink); color: #fff; transform: scale(1.18); box-shadow: var(--sh-sm); }

.parsed { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.parsed li {
  display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center;
  border: 2.5px solid var(--ink); border-radius: 14px; padding: 8px 10px; background: var(--cream);
}
.parsed .tag { font-size: 11px; font-weight: 800; border: 1.5px solid var(--ink); border-radius: 6px; padding: 0 6px; background: var(--sun); }
.parsed .tag.eat { background: var(--bubble); }
.parsed .tag.tex { background: var(--denim); }
.parsed .tag.use { background: var(--apricot); }
.parsed .ico { width: 44px; height: 44px; border-radius: 10px; border: 2px solid var(--ink); background: #fff; display: grid; place-items: center; overflow: hidden; }
.parsed .ico .mascot { width: 44px; margin-top: 4px; }
.parsed b { font-size: 14.5px; }
.parsed .q { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12.5px; font-weight: 700; }
.parsed .q input { width: 70px; padding: 3px 6px; border: 2px solid var(--ink); border-radius: 8px; font-size: 14px; }
.heard { font-size: 13px; background: var(--cream); border: 2px dashed var(--ink); border-radius: 12px; padding: 8px 10px; margin-top: 12px; }

/* ——— Toast ——— */
.toast-root { position: absolute; left: 0; right: 0; top: 78px; z-index: 50; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast {
  pointer-events: auto;
  display: flex; align-items: center; gap: 12px;
  background: var(--ink); color: #fff;
  border-radius: 14px; padding: 10px 14px;
  font-size: 14px; font-weight: 600;
  box-shadow: 3px 3px 0 var(--sun);
  animation: drop .25s cubic-bezier(.2,.9,.3,1.2);
  max-width: 100%;
}
.toast button { background: var(--sun); border: 0; border-radius: 8px; padding: 3px 10px; font-weight: 800; color: #000; }
@keyframes drop { from { transform: translateY(-20px); opacity: 0; } to { transform: none; opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

@media (max-width: 360px) {
  .page-head h1 { font-size: 26px; }
  .hero .bignum .num { font-size: 42px; }
  .call-pill span:last-child { display: none; }
  .call-pill { padding-right: 4px; }
  .ex-grid { grid-template-columns: repeat(2, 1fr); }
}
