/* 跳跳育儿工作台 · 老人友好样式
 * 铁律：正文≥18px 按钮≥20px 点击目标≥56px 对比度≥4.5:1
 */
:root {
  --bg: #F4F6F8;
  --card: #FFFFFF;
  --ink: #1B1F23;
  --ink2: #5A636B;
  --line: #DDE3E8;
  --brand: #0E8A7D;
  --brand-d: #07695F;
  --brand-l: #E6F4F2;
  --ok: #2E9E4F;
  --ok-l: #E8F5EC;
  --warn: #E8A33D;
  --warn-l: #FDF3E3;
  --alert: #D93B3B;
  --alert-l: #FCECEC;
  --r: 14px;
  --sh: 0 2px 8px rgba(20, 30, 40, .06);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  font-size: 18px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

/* 禁用下拉刷新/长按选中，避免老人误触 */
body { overscroll-behavior-y: contain; -webkit-user-select: none; user-select: none; }
input, textarea { -webkit-user-select: text; user-select: text; }

.wrap { max-width: 560px; margin: 0 auto; padding: 12px 14px 100px; }

/* ---------- 顶部 ---------- */
.topbar {
  background: var(--brand); color: #fff;
  padding: 14px 16px; border-radius: 0 0 18px 18px;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: var(--sh);
}
.topbar .who { display: flex; align-items: center; gap: 10px; }
.topbar .avatar {
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255, 255, 255, .22);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
}
.topbar .name { font-size: 21px; font-weight: 700; line-height: 1.2; }
.topbar .sub { font-size: 14px; opacity: .9; }
.topbar .date { font-size: 15px; text-align: right; opacity: .95; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card); border-radius: var(--r);
  padding: 14px; margin-top: 12px; box-shadow: var(--sh);
}
.card h3 { margin: 0 0 10px; font-size: 19px; }

/* ---------- 待办红条 ---------- */
.todo {
  background: var(--alert-l); border: 2px solid var(--alert);
  border-radius: var(--r); padding: 14px; margin-top: 12px;
}
.todo .th {
  font-size: 19px; font-weight: 800; color: var(--alert);
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.todo-item {
  background: #fff; border-radius: 12px; padding: 12px; margin-bottom: 10px;
  border-left: 6px solid var(--alert);
}
.todo-item.done { border-left-color: var(--ok); opacity: .65; }
.todo-item .t1 { font-size: 19px; font-weight: 700; margin-bottom: 6px; }
.todo-item.done .t1 { text-decoration: line-through; color: var(--ink2); }
.todo-item .script {
  background: #FFF8E1; border-radius: 8px; padding: 8px 10px;
  font-size: 17px; margin-bottom: 10px; color: #7A5B00;
}
.todo-item .script b { color: #5C4400; }
.todo-item .detail { font-size: 15px; color: var(--ink2); margin-bottom: 10px; }
.todo-item .why {
  font-size: 14px; color: var(--brand-d); background: var(--brand-l);
  padding: 6px 10px; border-radius: 8px; margin-bottom: 10px;
}
.todo-item .acts { display: flex; gap: 10px; }

/* ---------- 按钮 ---------- */
button { font-family: inherit; font-size: 18px; cursor: pointer; border: none; }

.btn {
  min-height: 56px; padding: 0 18px; border-radius: 12px;
  font-size: 19px; font-weight: 700;
  background: var(--brand); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn:active { background: var(--brand-d); transform: scale(.98); }
.btn.ghost { background: #fff; color: var(--brand); border: 2px solid var(--brand); }
.btn.gray { background: #EEF1F4; color: var(--ink2); }
.btn.ok { background: var(--ok); }
.btn.alert { background: var(--alert); }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; }

/* 巨型主按钮 */
.btn-huge {
  width: 100%; min-height: 86px; border-radius: 16px;
  font-size: 24px; font-weight: 800;
  background: #fff; color: var(--ink);
  display: flex; align-items: center; gap: 14px;
  padding: 0 18px; margin-bottom: 12px;
  box-shadow: var(--sh); border: 2px solid transparent;
}
.btn-huge:active { transform: scale(.98); background: var(--brand-l); border-color: var(--brand); }
.btn-huge .ic {
  width: 58px; height: 58px; border-radius: 14px; flex: 0 0 58px;
  display: flex; align-items: center; justify-content: center; font-size: 32px;
}
.btn-huge .tx { flex: 1; text-align: left; }
.btn-huge .tx small { display: block; font-size: 14px; font-weight: 400; color: var(--ink2); }
.btn-huge .arw { font-size: 26px; color: #B6BEC5; }

/* 选项芯片 */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  min-height: 56px; padding: 0 16px; border-radius: 12px;
  background: #fff; border: 2px solid var(--line);
  font-size: 19px; font-weight: 600; color: var(--ink);
  display: inline-flex; align-items: center; gap: 8px;
}
.chip.on { background: var(--brand-l); border-color: var(--brand); color: var(--brand-d); font-weight: 800; }
.chip:active { transform: scale(.97); }

/* 食物图标墙 */
.food-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.food {
  min-height: 96px; border-radius: 12px; background: #fff;
  border: 2px solid var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-size: 17px; font-weight: 600; padding: 6px 4px; position: relative;
}
.food .em { font-size: 34px; line-height: 1; }
.food.on { background: var(--brand-l); border-color: var(--brand); }
.food.on::after {
  content: attr(data-amt); position: absolute; top: 4px; right: 6px;
  background: var(--brand); color: #fff; font-size: 13px; font-weight: 800;
  border-radius: 10px; padding: 1px 7px;
}

/* 布里斯托 */
.bristol { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 10px; }
.bristol::-webkit-scrollbar { height: 6px; }
.bristol-item {
  flex: 0 0 108px; min-height: 150px; border-radius: 12px;
  background: #fff; border: 2px solid var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 8px 4px;
}
.bristol-item.on { border-color: var(--brand); background: var(--brand-l); }
.bristol-item svg { width: 74px; height: 56px; }
.bristol-item .bt { font-size: 16px; font-weight: 700; text-align: center; line-height: 1.2; }
.bristol-item .bd { font-size: 13px; color: var(--ink2); text-align: center; }
.bristol-item .no {
  width: 26px; height: 26px; border-radius: 50%; background: var(--line);
  color: #fff; font-size: 15px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.bristol-item.on .no { background: var(--brand); }

/* 数字键盘 */
.numpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.numpad button {
  min-height: 68px; border-radius: 12px; background: #fff;
  border: 2px solid var(--line); font-size: 28px; font-weight: 800;
}
.numpad button:active { background: var(--brand-l); }
.numpad .fn { font-size: 19px; background: #EEF1F4; }
.numpad .go { background: var(--brand); color: #fff; font-size: 20px; border-color: var(--brand); }

.amount-display {
  background: var(--brand-l); border-radius: 12px; padding: 14px;
  text-align: center; font-size: 40px; font-weight: 800; color: var(--brand-d);
  margin-bottom: 12px;
}
.amount-display small { font-size: 20px; font-weight: 600; }

/* 今日进度 */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stat {
  border-radius: 12px; padding: 10px 4px; text-align: center;
  background: #EEF1F4;
}
.stat.ok { background: var(--ok-l); }
.stat.warn { background: var(--warn-l); }
.stat.alert { background: var(--alert-l); }
.stat .em { font-size: 26px; line-height: 1.1; }
.stat .v { font-size: 19px; font-weight: 800; margin-top: 2px; }
.stat .l { font-size: 13px; color: var(--ink2); }

/* 流水 */
.log-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.log-item:last-child { border-bottom: none; }
.log-item .lt { font-size: 17px; font-weight: 800; flex: 0 0 54px; color: var(--ink2); }
.log-item .li { flex: 1; }
.log-item .lc { font-size: 18px; font-weight: 600; }
.log-item .ls { font-size: 14px; color: var(--ink2); }
.log-item .edit, .log-item .del {
  min-width: 56px; min-height: 56px; border-radius: 10px;
  background: #EEF1F4; font-size: 17px; font-weight: 700; color: var(--ink2);
}
.log-item .del { background: var(--alert-l); color: var(--alert); margin-left: 6px; }

/* 底部导航 */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: #fff; border-top: 2px solid var(--line);
  display: flex; z-index: 50;
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar button {
  flex: 1; min-height: 66px; background: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: 14px; color: var(--ink2); font-weight: 700;
}
.tabbar button .ti { font-size: 24px; }
.tabbar button.on { color: var(--brand); }

/* 遮罩弹层 */
.sheet-mask {
  position: fixed; inset: 0; background: rgba(10, 20, 30, .45);
  display: flex; align-items: flex-end; justify-content: center; z-index: 100;
}
.sheet {
  background: var(--bg); width: 100%; max-width: 560px;
  border-radius: 20px 20px 0 0; padding: 16px 14px 24px;
  max-height: 92vh; overflow-y: auto;
}
.sheet h2 { margin: 0 0 12px; font-size: 22px; }
.sheet .row { margin-bottom: 14px; }
.sheet .lb { font-size: 17px; font-weight: 700; margin-bottom: 8px; display: block; }

/* 提示条 */
.toast {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  background: rgba(20, 30, 40, .92); color: #fff;
  padding: 14px 22px; border-radius: 30px; font-size: 19px; font-weight: 700;
  z-index: 200; box-shadow: 0 4px 16px rgba(0, 0, 0, .2);
}
.toast.ok { background: var(--ok); }

/* 大对勾动效 */
.done-flash {
  position: fixed; inset: 0; background: rgba(255, 255, 255, .96);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  z-index: 300; gap: 16px;
}
.done-flash .ck {
  width: 130px; height: 130px; border-radius: 50%;
  background: var(--ok); color: #fff; font-size: 76px;
  display: flex; align-items: center; justify-content: center;
  animation: pop .35s cubic-bezier(.2, 1.6, .4, 1);
}
.done-flash .tx { font-size: 26px; font-weight: 800; color: var(--ok); }
@keyframes pop { 0% { transform: scale(.3); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

/* 空状态 */
.empty { text-align: center; padding: 40px 20px; color: var(--ink2); font-size: 17px; }
.empty .em { font-size: 54px; display: block; margin-bottom: 10px; }

/* 分组标题 */
.sec-title {
  font-size: 16px; font-weight: 800; color: var(--ink2);
  margin: 16px 0 8px; display: flex; align-items: center; gap: 6px;
}
.sec-title::before { content: ''; width: 4px; height: 16px; background: var(--brand); border-radius: 2px; }

.hint { font-size: 15px; color: var(--ink2); background: var(--brand-l); padding: 10px 12px; border-radius: 10px; margin-top: 8px; }
.warnbar { background: var(--warn-l); border: 2px solid var(--warn); border-radius: 12px; padding: 12px; font-size: 17px; margin-top: 12px; }
.alertbar { background: var(--alert-l); border: 2px solid var(--alert); border-radius: 12px; padding: 12px; font-size: 17px; margin-top: 12px; color: #8E2020; font-weight: 700; }

.switcher { display: flex; gap: 8px; flex-wrap: wrap; }
.switcher button {
  min-height: 46px; padding: 0 14px; border-radius: 23px;
  background: #fff; border: 2px solid var(--line); font-size: 16px; font-weight: 700;
}
.switcher button.on { background: var(--brand); color: #fff; border-color: var(--brand); }
