/* 每日计划 — 移动优先样式 */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
body {
  margin: 0; background: #f6f5f2; color: #26211d;
  font-family: system-ui, -apple-system, "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
  -webkit-font-smoothing: antialiased;
}
body.sheet-open { overflow: hidden; }
.boot { text-align: center; padding: 40vh 0; color: #999; }
.view { padding: 12px 14px 84px; max-width: 640px; margin: 0 auto; }
.page-h { font-size: 20px; font-weight: 700; margin: 8px 2px 12px; }
.muted { color: #8d8781; } .small { font-size: 12.5px; } .center { text-align: center; }
.strong { font-weight: 600; } .danger-text { color: #d9482b; }
.link { color: #2f6fed; }
b { font-weight: 600; }

/* 顶部今日 */
.today-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 2px 6px; }
.today-date { font-size: 22px; font-weight: 700; }
.today-sub { color: #8d8781; font-size: 13px; margin-top: 2px; }
.head-btn { font-size: 20px; }

/* 提醒条 */
.alerts .alert { border-radius: 12px; padding: 10px 12px; margin: 6px 0; font-size: 14px; line-height: 1.5; }
.alert.red { background: #fdecea; color: #b3261e; border: 1px solid #f5c6c0; font-weight: 600; }
.alert.amber { background: #fff7e0; color: #8a5b00; border: 1px solid #f2dfae; }
.alert.blue { background: #e9f2ff; color: #1b4d99; border: 1px solid #c8dcf7; }
.alert.gray { background: #efeeec; color: #5c5751; }

/* 时间轴 */
.timeline { margin-top: 4px; }
.tl-section { font-size: 13px; color: #8d8781; margin: 14px 2px 6px; font-weight: 600; letter-spacing: 1px; }
.tl-row { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 14px; padding: 12px 12px; margin: 8px 0; box-shadow: 0 1px 3px rgba(60, 45, 30, 0.06); }
.tl-row.faded { opacity: 0.55; }
.tl-time { min-width: 52px; text-align: center; color: #d9482b; line-height: 1.25; font-variant-numeric: tabular-nums; }
.tl-time b { font-size: 15px; display: block; } .tl-time span { font-size: 11.5px; color: #a49e97; display: block; }
.tl-main { flex: 1; min-width: 0; }
.tl-title { font-size: 15.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-meta { font-size: 12.5px; color: #8d8781; margin-top: 2px; }
.exp-row { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 14px; padding: 12px; margin: 8px 0; box-shadow: 0 1px 3px rgba(60,45,30,.06); }
.exp-row.arrived { border: 1.5px solid #e05a45; background: #fff6f4; }
.exp-main { flex: 1; min-width: 0; }

/* 任务卡片 */
.task-cards { display: grid; gap: 8px; }
.task-card { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 14px; padding: 12px; box-shadow: 0 1px 3px rgba(60,45,30,.06); }
.task-card.done { opacity: 0.6; }
.task-info { flex: 1; min-width: 0; }
.task-title { font-size: 15px; font-weight: 600; }
.task-title.done-text, .task-card.done .task-title { text-decoration: line-through; }
.task-meta { font-size: 12px; color: #8d8781; margin-top: 2px; }
.prog { height: 6px; border-radius: 3px; background: #eeeae4; overflow: hidden; margin-top: 6px; }
.prog > i { display: block; height: 100%; background: #ff5c38; border-radius: 3px; transition: width .2s; }
.task-note { font-size: 12px; color: #6b645d; margin-top: 4px; }

/* 完成圈 */
.check { width: 26px; height: 26px; min-width: 26px; border-radius: 50%; border: 2px solid #cfc8c1; background: transparent; color: #fff; font-size: 15px; line-height: 1; cursor: pointer; }
.check.done { background: #38a169; border-color: #38a169; }

/* 通用卡片 */
.cards { display: grid; gap: 8px; }
.card { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 14px; padding: 12px; box-shadow: 0 1px 3px rgba(60,45,30,.06); }
.card.dim { opacity: 0.55; }
.card.redline { border: 1.5px solid #e05a45; }
.card.clickable { cursor: pointer; }
.card-main { flex: 1; min-width: 0; }
.card-title { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.card-meta { font-size: 12.5px; color: #8d8781; margin-top: 2px; }
.card-right { text-align: right; font-size: 14px; }
.group-h { font-size: 13px; color: #8d8781; font-weight: 600; margin: 14px 2px 4px; }
.tag { display: inline-block; font-size: 11px; color: #8d8781; border: 1px solid #ddd7d1; border-radius: 6px; padding: 0 6px; margin-left: 6px; vertical-align: 2px; }
.empty { text-align: center; color: #a49e97; padding: 34px 10px; line-height: 2; font-size: 14px; }
.bar-hint { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 4px 2px 8px; }

/* 按钮 */
.btn { border: none; border-radius: 10px; background: #efedea; color: #3c352e; font-size: 14.5px; padding: 9px 14px; cursor: pointer; font-family: inherit; }
.btn:active { transform: scale(0.97); }
.btn.primary { background: #ff5c38; color: #fff; }
.btn.green { background: #38a169; color: #fff; }
.btn.danger { background: #d9482b; color: #fff; }
.btn.danger-o { background: transparent; color: #d9482b; border: 1px solid #e6b3a8; }
.btn.tiny { padding: 5px 9px; font-size: 12.5px; border-radius: 8px; }
.btn.big { padding: 13px 20px; font-size: 16px; }
.btn.block { display: block; width: 100%; margin-top: 10px; }
.btn:disabled { opacity: 0.6; }
.icon-btn { border: none; background: transparent; font-size: 16px; color: #6b645d; cursor: pointer; padding: 6px; }
.fab { position: fixed; right: 18px; bottom: calc(76px + env(safe-area-inset-bottom)); width: 52px; height: 52px; border-radius: 50%; border: none; background: #ff5c38; color: #fff; font-size: 28px; box-shadow: 0 4px 14px rgba(255, 92, 56, 0.45); cursor: pointer; z-index: 30; }

/* 分段控件 */
.seg { display: flex; background: #eceae6; border-radius: 12px; padding: 3px; margin-bottom: 12px; }
.seg.compact { margin: 10px 0; }
.seg-btn { flex: 1; border: none; background: transparent; padding: 8px 0; border-radius: 9px; font-size: 14px; color: #6b645d; cursor: pointer; font-family: inherit; }
.seg-btn.on { background: #fff; color: #26211d; font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.07); }

/* 底部页签 */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; background: #fffdfa; border-top: 1px solid #eae6e1; padding-bottom: env(safe-area-inset-bottom); z-index: 40; }
.tab { flex: 1; border: none; background: none; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 0 6px; font-size: 11px; color: #9b948d; cursor: pointer; font-family: inherit; }
.tab .ic { width: 22px; height: 22px; }
.tab .ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tab.on { color: #ff5c38; font-weight: 600; }
.run-pill { position: fixed; top: 8px; left: 50%; transform: translateX(-50%); z-index: 50; background: rgba(38, 33, 29, 0.88); color: #fff; border: none; border-radius: 999px; padding: 7px 16px; font-size: 13px; cursor: pointer; max-width: 92vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: inherit; }

/* 表单 */
.form { display: grid; gap: 12px; padding: 4px 2px; }
.form-row { display: grid; gap: 5px; }
.form-label { font-size: 13px; color: #6b645d; }
.inp { width: 100%; border: 1.5px solid #e0dad3; border-radius: 10px; padding: 11px 12px; font-size: 15px; background: #fff; color: inherit; font-family: inherit; appearance: none; -webkit-appearance: none; }
.inp:focus { outline: none; border-color: #ff5c38; }
select.inp { background: #fff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="6"><path d="M0 0l5 6 5-6z" fill="%23999"/></svg>') no-repeat right 12px center; }
textarea.inp { resize: none; }
.form-err { color: #c0341d; background: #fdecea; border-radius: 10px; padding: 9px 12px; font-size: 13.5px; }
.wd-picker { display: flex; gap: 6px; }
.wd-btn { flex: 1; border: 1.5px solid #e0dad3; background: #fff; border-radius: 9px; padding: 9px 0; font-size: 14px; cursor: pointer; font-family: inherit; }
.wd-btn.on { background: #ff5c38; border-color: #ff5c38; color: #fff; font-weight: 600; }

/* 弹层 */
.sheet-mask { position: fixed; inset: 0; background: rgba(30, 22, 16, 0.45); z-index: 60; display: flex; align-items: flex-end; }
.sheet { background: #fbfaf8; width: 100%; max-width: 640px; margin: 0 auto; border-radius: 20px 20px 0 0; padding: 16px 18px calc(20px + env(safe-area-inset-bottom)); max-height: 86vh; overflow-y: auto; animation: up 0.22s ease; }
@keyframes up { from { transform: translateY(40px); opacity: 0.4; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-title { font-size: 17px; font-weight: 700; }
.sheet-body { }
.confirm-mask { position: fixed; inset: 0; background: rgba(30,22,16,.45); z-index: 70; display: flex; align-items: center; justify-content: center; }
.confirm-box { background: #fff; border-radius: 16px; padding: 22px; width: min(320px, 86vw); }
.confirm-text { font-size: 15px; line-height: 1.6; }
.confirm-btns { display: flex; gap: 10px; margin-top: 18px; } .confirm-btns .btn { flex: 1; }

/* toast */
.toast { position: fixed; bottom: calc(96px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); background: rgba(38,33,29,.92); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 13.5px; z-index: 90; max-width: 86vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 专注 */
.focus-card { background: #fff; border-radius: 18px; padding: 16px; box-shadow: 0 1px 4px rgba(60,45,30,.08); text-align: center; margin-bottom: 14px; }
.focus-ctx { display: flex; align-items: center; gap: 8px; text-align: left; }
.focus-ctx .inp { flex: 1; }
.min-row { display: flex; align-items: center; gap: 8px; justify-content: center; font-size: 14px; margin: 6px 0; flex-wrap: wrap; }
.min-inp { width: 76px; text-align: center; }
.quick-mins { display: flex; gap: 6px; }
.clock { font-size: 64px; font-weight: 700; letter-spacing: 2px; margin: 14px 0 2px; font-variant-numeric: tabular-nums; color: #26211d; }
.clock-hint { min-height: 20px; }
.focus-btns { display: flex; gap: 10px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }

/* 统计 */
.stats-ctrl { margin-bottom: 12px; }
.stats-range { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.stats-total { background: #fff; border-radius: 14px; padding: 14px; margin-bottom: 10px; }
.big-num { font-size: 26px; font-weight: 700; color: #ff5c38; margin-bottom: 4px; }
.chart-card { display: block; padding: 14px; margin-bottom: 10px; }
.chart-h { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.chart { width: 100%; display: block; }
.legend { margin-top: 8px; display: grid; gap: 6px; }
.lg-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.lg-dot { width: 10px; height: 10px; border-radius: 3px; }
.lg-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-val { color: #8d8781; }

/* 快递轨迹 / 清单 */
.detail p { margin: 6px 0; line-height: 1.6; font-size: 14.5px; }
.trace-row { padding: 8px 0; border-bottom: 1px dashed #e7e2dc; font-size: 13.5px; line-height: 1.55; }
.trace-time { margin-bottom: 2px; }
.pack-list { display: grid; gap: 4px; }
.pack-item { display: flex; gap: 10px; align-items: center; font-size: 15px; padding: 8px 4px; }
.pack-item input { width: 19px; height: 19px; accent-color: #38a169; }
.pack-item.done span { text-decoration: line-through; color: #a49e97; }
.pack-h { font-size: 13px; color: #8d8781; margin: 10px 0 4px; }
.items-edit { display: grid; gap: 8px; }
.item-line { display: flex; gap: 8px; } .item-line .inp { flex: 1; }
.add-item { justify-self: start; }
.status-card { border-left: 4px solid #ff5c38; }

/* 登录 */
.auth-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px 26px; max-width: 460px; margin: 0 auto; }
.auth-logo img { border-radius: 22%; }
.auth-title { font-size: 24px; margin: 10px 0 4px; }
.auth-sub { margin: 0 0 18px; text-align: center; }
.auth-card { width: 100%; display: grid; gap: 12px; background: #fff; padding: 18px; border-radius: 18px; box-shadow: 0 2px 10px rgba(60,45,30,.08); }
.auth-tip { margin-top: 16px; text-align: center; line-height: 1.7; }
