/* 灶点 Web 验收端样式：手机宽容器，与小程序同色系（绿 #487a55 / 米白 #f7f4ee） */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, "PingFang SC", "Noto Sans SC", sans-serif; background: #e9e4da; color: #3f2c22; }
a { color: #487a55; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 14px; }

#errbar { position: fixed; top: 0; left: 0; right: 0; z-index: 99; background: #b3261e; color: #fff; font-size: 13px; padding: 8px 12px; text-align: center; }
#phone { max-width: 480px; margin: 0 auto; background: #f7f4ee; min-height: 100vh; display: flex; flex-direction: column; position: relative; box-shadow: 0 0 24px rgba(0,0,0,.12); }

#app-header { display: flex; align-items: center; gap: 8px; background: #487a55; color: #fff; padding: 10px 12px; position: sticky; top: 0; z-index: 20; }
#hdr-back { background: none; border: 0; color: #fff; font-size: 26px; line-height: 1; width: 32px; }
#hdr-title { font-size: 17px; font-weight: 600; }
.hdr-spacer { flex: 1; }

#view { flex: 1; padding: 14px 14px 84px; overflow-x: hidden; }
#tabbar { position: sticky; bottom: 0; display: flex; background: #fffefb; border-top: 1px solid #e9e2d8; z-index: 20; }
#tabbar .tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 0 9px; color: #7d6f62; font-size: 12px; }
#tabbar .tab.on { color: #487a55; font-weight: 600; }
.tab-ic { font-size: 20px; }

/* 按钮 */
.btn { background: #487a55; color: #fff; border: 0; border-radius: 20px; padding: 9px 18px; font-size: 14px; }
.btn.ghost { background: #e7f1e6; color: #487a55; }
.btn.danger { background: #b3261e; }
.btn.small { padding: 5px 12px; font-size: 13px; }
.btn.block { display: block; width: 100%; margin-top: 12px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.action-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 8px; }

/* 卡片 */
.card { display: flex; gap: 12px; background: #fffdf8; border: 1px solid #e9e2d8; border-radius: 12px; padding: 12px; margin: 8px 0; align-items: flex-start; }
.card-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
a.card-main { color: inherit; }
.card-title { font-size: 15px; font-weight: 600; color: #3f2c22; }
.card-sub { font-size: 13px; color: #7d6f62; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.card-meta { font-size: 12px; color: #a08b78; }
.card-price { color: #d96f32; font-weight: 700; font-size: 15px; white-space: nowrap; }
.cov { position: relative; flex: none; width: 72px; height: 72px; border-radius: 10px; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; }
.cov img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cov-ic { font-size: 34px; }
.cov-fallback .cov-ic { position: static; }
.dish-cov { width: 72px; height: 72px; }
.post-cov { width: 88px; height: 66px; }
.hero-cov { width: 110px; height: 110px; }
.hero-cov .cov-ic { font-size: 56px; }
.avatar { font-size: 30px; }
.avatar.big { font-size: 44px; }
.author-link { color: #487a55; cursor: pointer; }

/* 状态 */
.state { text-align: center; padding: 44px 16px; color: #7d6f62; }
.state .state-ic { font-size: 40px; margin-bottom: 10px; }
.state p { margin-bottom: 14px; }
.spinner { width: 30px; height: 30px; margin: 0 auto 10px; border: 3px solid #dfe8dc; border-top-color: #487a55; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.offline-tag { display: inline-block; background: #f3e2c7; color: #8a5a19; font-size: 12px; border-radius: 8px; padding: 2px 8px; margin-bottom: 8px; }
.badge { flex: none; font-size: 12px; border-radius: 10px; padding: 2px 9px; }
.st-pending { background: #fdf0d5; color: #8a5a19; }
.st-ok { background: #e2f2e4; color: #2e6b34; }
.st-bad { background: #fbe3e1; color: #b3261e; }
.st-done { background: #e8e4de; color: #7d6f62; }
.count-badge { background: #d96f32; color: #fff; border-radius: 10px; font-size: 12px; padding: 1px 8px; }

/* Toast / 对话框 */
#zd-toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%) translateY(20px); background: rgba(47,42,38,.92); color: #fff; padding: 9px 18px; border-radius: 20px; font-size: 14px; opacity: 0; pointer-events: none; transition: all .25s; z-index: 60; max-width: 86vw; text-align: center; }
#zd-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.dlg-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 70; display: flex; align-items: center; justify-content: center; }
.dlg { background: #fffdf8; border-radius: 14px; padding: 20px; width: 84vw; max-width: 340px; }
.dlg-title { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.dlg-body { font-size: 14px; color: #7d6f62; margin-bottom: 8px; }
.dlg-btns { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }

/* 表单 */
.form label { display: block; font-size: 13px; color: #7d6f62; margin: 14px 0 5px; }
.form input[type=text], .form input[type=password], .form textarea, .form select, .form input[type=file] {
  width: 100%; border: 1px solid #e0d7c9; border-radius: 9px; padding: 9px 10px; background: #fff; color: #3f2c22; }
.field-err { color: #b3261e; font-size: 13px; min-height: 18px; margin-top: 6px; }
.form-tip { font-size: 12px; color: #a08b78; margin: 8px 0; }
.machine-note { color: #b3261e; font-size: 13px; line-height: 1.6; }
.person-row { display: flex; align-items: center; gap: 16px; }
.person-count { font-size: 20px; font-weight: 700; min-width: 30px; text-align: center; }

/* 搜索 / chips / 分段 */
.search-box { display: flex; gap: 6px; margin-bottom: 10px; }
.search-box input { flex: 1; border: 1px solid #e0d7c9; border-radius: 20px; padding: 9px 14px; background: #fff; }
.search-clear { background: #e7f1e6; color: #487a55; border: 0; border-radius: 50%; width: 36px; height: 36px; flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 8px 0 12px; }
.chip { background: #fff; border: 1px solid #e0d7c9; color: #5c4a3d; border-radius: 16px; padding: 5px 13px; font-size: 13px; }
.chip.on { background: #487a55; color: #fff; border-color: #487a55; }
.seg-tabs { display: flex; background: #ece7dd; border-radius: 10px; padding: 3px; margin-bottom: 12px; }
.seg { flex: 1; border: 0; background: none; padding: 7px 4px; border-radius: 8px; font-size: 14px; color: #7d6f62; }
.seg.on { background: #fff; color: #3f2c22; font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.seg-row { display: flex; gap: 8px; align-items: flex-start; }
.seg-row .seg-tabs { flex: 1; }
.load-more { display: block; margin: 14px auto; }
.list-end { text-align: center; color: #b6a894; font-size: 12px; padding: 14px 0; }

/* 首页 */
.entry-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.entry { background: #fffdf8; border: 1px solid #e9e2d8; border-radius: 12px; padding: 14px 12px; display: flex; flex-direction: column; gap: 3px; color: #3f2c22; }
.entry-ic { font-size: 24px; }
.entry-name { font-weight: 600; font-size: 15px; }
.entry-desc { font-size: 12px; color: #a08b78; }
.sec-title { font-size: 17px; margin: 18px 0 8px; color: #3f2c22; }
.sec-more { font-size: 13px; font-weight: 400; float: right; }
.sub-title { font-size: 15px; margin: 18px 0 8px; color: #487a55; }

/* 菜品详情 */
.dish-hero { display: flex; gap: 14px; align-items: center; }
.dish-hero-main h1 { font-size: 21px; margin-bottom: 4px; }
.dish-price { color: #d96f32; font-weight: 700; font-size: 18px; margin-top: 4px; }
.dish-desc { margin: 12px 0; line-height: 1.65; font-size: 14px; }
.ingr { list-style: none; background: #fffdf8; border: 1px solid #e9e2d8; border-radius: 10px; padding: 6px 14px; }
.ingr li { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed #eee5d8; font-size: 14px; }
.ingr li:last-child { border-bottom: 0; }
.ingr-amt { color: #7d6f62; }
.steps { padding-left: 20px; line-height: 1.8; font-size: 14px; }
.safe-tip { background: #fdf6e3; border-radius: 8px; padding: 9px 12px; font-size: 13px; }

/* 食育 */
.dir-head { display: flex; justify-content: space-between; background: #fffdf8; border: 1px solid #e9e2d8; border-radius: 10px; padding: 13px 14px; margin: 8px 0; font-weight: 600; cursor: pointer; }
.dir-body { padding: 2px 0 10px; }
.food-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.food-card { background: #fffdf8; border: 1px solid #e9e2d8; border-radius: 10px; padding: 11px; font-size: 12px; line-height: 1.55; }
.food-ic { font-size: 26px; }
.food-name { font-size: 14px; font-weight: 600; margin: 3px 0; }
.food-dim { color: #7d6f62; }
.food-avoid { color: #b3261e; }
.safe-card { background: #fffdf8; border: 1px solid #e9e2d8; border-radius: 10px; padding: 11px 13px; margin: 7px 0; font-size: 13px; line-height: 1.6; }
.task-group { border-left: 4px solid #487a55; padding-left: 9px; margin: 14px 0 7px; font-size: 14px; }
.task-card { display: flex; gap: 10px; background: #fffdf8; border: 1px solid #e9e2d8; border-radius: 10px; padding: 11px 13px; margin: 7px 0; font-size: 13px; line-height: 1.55; align-items: flex-start; }
.task-main { flex: 1; }
.btn.small { align-self: center; }

/* 一周餐 */
.meal-day { background: #fffdf8; border: 1px solid #e9e2d8; border-radius: 10px; padding: 10px 12px; margin: 9px 0; }
.meal-day h4 { margin-bottom: 6px; }
.meal-cell { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 5px 0; border-top: 1px dashed #eee5d8; }
.meal-cell:first-of-type { border-top: 0; }
.meal-col { font-size: 12px; color: #fff; background: #a08b78; border-radius: 8px; padding: 1px 8px; }
.meal-dish { background: #edf3e8; border-radius: 8px; padding: 3px 6px 3px 10px; font-size: 13px; display: inline-flex; align-items: center; gap: 4px; }
.meal-dish a { color: #3f2c22; }
.mini-x { background: none; border: 0; color: #b3261e; font-size: 15px; padding: 0 2px; }
.mini-add { background: none; border: 1px dashed #b9cdb4; color: #487a55; border-radius: 8px; padding: 3px 9px; font-size: 12px; }
.picker { background: #fffdf8; border: 1px solid #e0d7c9; border-radius: 12px; padding: 13px; margin-top: 14px; }
.picker-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; }
.picker input { width: 100%; border: 1px solid #e0d7c9; border-radius: 9px; padding: 8px 10px; margin-bottom: 4px; }
.cand-list { display: flex; flex-direction: column; max-height: 320px; overflow: auto; }
.cand { text-align: left; background: none; border: 0; border-bottom: 1px solid #f1eadf; padding: 9px 4px; font-size: 14px; }
.cand-sub { float: right; color: #a08b78; font-size: 12px; }

/* 采购清单 */
.shelf h4 { margin: 14px 0 2px; }
.buy-item { background: #fffdf8; border: 1px solid #e9e2d8; border-radius: 9px; padding: 9px 12px; margin: 6px 0; cursor: pointer; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.buy-name { font-weight: 600; }
.buy-qty { color: #7d6f62; font-size: 13px; }
.buy-state { margin-left: auto; font-size: 12px; }
.buy-item.st-have { opacity: .65; }
.buy-item.st-got { opacity: .5; }
.buy-item.st-got .buy-name { text-decoration: line-through; }
.buy-subs { width: 100%; font-size: 12px; color: #a08b78; }

/* 作品 */
.video-wrap { position: relative; border-radius: 12px; overflow: hidden; background: #000; margin-bottom: 12px; }
.video-wrap video { width: 100%; max-height: 300px; display: block; }
.video-wrap .post-cover { width: 100%; display: block; }
.video-fallback { display: none; }
.video-wrap.video-failed video { display: none; }
.video-wrap.video-failed .video-fallback { display: block; color: #fff; text-align: center; }
.video-fallback img { width: 100%; }
.post-title { font-size: 19px; margin: 6px 0; }
.dish-link { font-weight: 600; }
.comment { border-bottom: 1px solid #eee5d8; padding: 9px 0; font-size: 14px; }
.comment-form { display: flex; gap: 8px; margin-top: 12px; }
.comment-form input { flex: 1; border: 1px solid #e0d7c9; border-radius: 20px; padding: 9px 14px; background: #fff; }

/* 达人 */
.author-head { display: flex; gap: 13px; align-items: center; margin: 10px 0; }
.author-head h1 { font-size: 19px; }
.sign-list { display: flex; flex-wrap: wrap; gap: 8px; }
.sign-chip { background: #edf3e8; border-radius: 14px; padding: 5px 12px; font-size: 13px; }

/* 登录 */
.login-wrap { padding: 40px 8px 0; }
.login-logo { font-size: 56px; text-align: center; }
.login-title { text-align: center; font-size: 23px; margin: 8px 0 4px; }
.login-sub { text-align: center; color: #a08b78; font-size: 13px; margin-bottom: 12px; }

/* 我的 */
.profile-head { display: flex; gap: 13px; align-items: center; background: #fffdf8; border: 1px solid #e9e2d8; border-radius: 12px; padding: 15px; margin-bottom: 12px; }
.profile-head h1 { font-size: 18px; }
.sync-ok { color: #2e6b34; font-size: 12px; margin-top: 3px; }
.entry-row { display: flex; align-items: center; gap: 12px; background: #fffdf8; border: 1px solid #e9e2d8; border-radius: 10px; padding: 12px 14px; margin: 7px 0; color: #3f2c22; }
.row-arrow { color: #c9bba6; font-size: 19px; }

/* 记录 */
.record-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; background: #fffdf8; border: 1px solid #e9e2d8; border-radius: 10px; padding: 11px 13px; margin: 7px 0; font-size: 14px; }
.audit-remark { color: #b3261e; }

/* 订单 */
.stepper { display: inline-flex; align-items: center; gap: 10px; }
.stepper button { width: 28px; height: 28px; border-radius: 50%; border: 1px solid #b9cdb4; background: #fff; color: #487a55; font-size: 16px; }
.stepper .qty { font-weight: 700; min-width: 18px; text-align: center; }
.order-total { font-size: 17px; font-weight: 700; margin: 16px 0 4px; text-align: right; }
.mock-note { background: #fdf0d5; color: #8a5a19; border-radius: 9px; padding: 8px 12px; font-size: 13px; margin-bottom: 10px; text-align: center; }
.order-wrap { margin: 8px 0; }
.order-wrap .card { margin-bottom: 0; }
.order-head { display: flex; justify-content: space-between; width: 100%; align-items: center; }
.order-no { font-size: 12px; color: #a08b78; word-break: break-all; }
.order-card { flex-direction: column; gap: 6px; }
.order-foot { display: flex; justify-content: space-between; width: 100%; font-size: 12px; color: #a08b78; align-items: center; }
.order-actions { padding: 8px 2px 2px; text-align: right; }
.addr { padding: 4px 2px 0; }

/* 课程 */
.lesson { background: #fffdf8; border: 1px solid #e9e2d8; border-radius: 10px; padding: 12px 14px; margin: 8px 0; }
.lesson-head { display: flex; justify-content: space-between; font-weight: 600; cursor: pointer; gap: 8px; }
.lesson-body { margin-top: 10px; border-top: 1px dashed #eee5d8; padding-top: 8px; }
.lesson-pt { margin: 9px 0; font-size: 13px; line-height: 1.65; }
.lesson-pt.err { color: #b3261e; }
.lesson-pt.try { color: #2e6b34; }

/* 审核 */
.admin-card { flex-wrap: wrap; }
.admin-actions { width: 100%; display: flex; gap: 8px; justify-content: flex-end; margin-top: 6px; }
