/* Screen-specific layout: Today, Meals, Food, Money, Trip, Household. */

/* ================= recipe card (shared) ================= */
.recipe-card {
  display: flex; flex-direction: column; text-align: left; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); overflow: hidden; padding: 0; cursor: pointer; box-shadow: var(--shadow-1);
  transition: transform .15s, box-shadow .15s;
}
.recipe-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.rc-tile, .rs-hero, .tonight {
  --h: 20;
  background: linear-gradient(135deg, hsl(var(--h) 85% 92%), hsl(calc(var(--h) + 28) 80% 82%));
}
.rc-tile { position: relative; height: 96px; display: grid; place-items: center; font-size: 2.6rem; }
.rc-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; }
.rc-title { font-weight: 600; line-height: 1.25; }
.rc-sub, .rc-reason { font-size: .82rem; color: var(--muted); line-height: 1.35; }
.rc-reason { color: var(--success); font-weight: 500; }
.rc-meta { display: flex; gap: 10px; font-size: .78rem; color: var(--muted); margin-top: 4px; font-variant-numeric: tabular-nums; flex-wrap: wrap; }

/* ================= today ================= */
.greet { font-family: var(--display); font-size: 1.9rem; line-height: 1.15; margin: 14px 0 14px; }
.greet small { display: block; font-family: var(--font); font-size: .9rem; font-weight: 400; color: var(--muted); margin-top: 2px; }
.tonight {
  display: block; width: 100%; text-align: left; border: none; border-radius: var(--r-lg); padding: 22px 20px; cursor: pointer;
  position: relative; box-shadow: var(--shadow-1); color: var(--ink);
}
.tonight small { text-transform: uppercase; letter-spacing: .12em; font-weight: 700; font-size: .72rem; opacity: .7; }
.tonight h2 { font-family: var(--display); font-size: 2rem; line-height: 1.12; font-weight: 700; margin: 6px 0 8px; letter-spacing: -0.01em; }
.tonight span { font-size: .95rem; opacity: .85; }
.empty-night { cursor: default; }
.next-step {
  display: flex; flex-direction: column; gap: 14px; margin-top: 14px; padding: 18px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-1);
}
.next-step h3 { font-size: 1.15rem; }
.next-step p { color: var(--muted); margin-top: 2px; }
.week-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.wk { flex: none; width: 112px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; font-size: .85rem; line-height: 1.3; }
.wk small { display: block; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: .7rem; margin-bottom: 2px; }
.wk.today { border-color: var(--primary); background: var(--tint-red); }
.low-list { display: grid; gap: 8px; }
.low { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--r-sm); padding: 10px 14px; display: flex; flex-direction: column; font-size: .9rem; }
.low.now { border-left-color: var(--danger); }
.low span { color: var(--muted); font-size: .82rem; }
.idea-row { display: grid; grid-auto-flow: column; grid-auto-columns: 220px; gap: 12px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.report-mini { margin-top: 24px; padding: 14px 16px; border-radius: var(--r-md); background: var(--tint-green); }
.report-mini.watch { background: var(--tint-yellow); }

/* ================= meals ================= */
.meal-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .meal-grid { grid-template-columns: repeat(3, 1fr); } }
.rs-hero { position: relative; height: 150px; display: grid; place-items: center; font-size: 4rem; border-radius: var(--r-lg); margin: 56px 0 14px; }
.rs-title { font-family: var(--display); font-size: 1.8rem; line-height: 1.15; margin-bottom: 4px; }
.rs-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 16px 0; }
.rs-facts div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 6px; text-align: center; }
.rs-facts b { display: block; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.rs-facts span { font-size: .72rem; color: var(--muted); }
.fit { border-radius: var(--r-sm); padding: 10px 14px; font-size: .9rem; margin-bottom: 8px; }
.fit.ok { background: var(--tint-green); color: var(--success); font-weight: 500; }
.fit.bad { background: var(--tint-red); color: var(--danger); }
.rs-ingredients { list-style: none; margin: 8px 0 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); }
.rs-ingredients li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--line-soft); }
.rs-ingredients li:last-child { border-bottom: none; }
.rs-ingredients small { color: var(--muted); font-variant-numeric: tabular-nums; }
.rs-steps { padding-left: 22px; } .rs-steps li { padding: 6px 0; }
.rs-actions { margin-top: 20px; position: sticky; bottom: 0; padding: 12px 0; background: linear-gradient(transparent, var(--bg) 40%); }
.rs-actions .btn-primary { width: 100%; }
#view-meals h3, .sheet h3 { font-size: 1.1rem; margin: 22px 0 8px; }

/* ================= food ================= */
.food-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.stock-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.stock { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; }
.stock.now { border-color: var(--danger); background: var(--tint-red); }
.stock.soon { background: var(--tint-yellow); }
.st-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.st-pill { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 2px 8px; border-radius: var(--r-pill); background: var(--surface); }
.st-days { font-weight: 500; margin-top: 4px; }
.stock small { color: var(--muted); display: block; margin-top: 2px; line-height: 1.35; }
#expiring-strip { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 0; }
.exp-chip { font-size: .82rem; font-weight: 600; color: var(--warn); background: var(--tint-yellow); border-radius: var(--r-pill); padding: 5px 12px; }
.inv-state-label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 18px 0 8px; }
.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.inv-item { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-sm); padding: 9px 12px; font-size: .9rem; }
.inv-item .v-meta { display: block; color: var(--muted); font-size: .74rem; }
.inv-item .unverified { color: var(--warn); }
.inv-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.inv-dot.in_stock { background: var(--success); } .inv-dot.low { background: var(--accent); } .inv-dot.out { background: var(--faint); }
.vocab-cat { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 14px 0 6px; }
.vocab { display: flex; flex-wrap: wrap; gap: 6px; }
.vocab-chip { font-size: .8rem; border: 1px solid var(--line); border-radius: var(--r-pill); padding: 3px 11px; background: var(--surface); color: var(--muted); }
.vocab-chip b { color: var(--ink); font-weight: 600; }

/* ================= money ================= */
.report { background: var(--tint-green); border-radius: var(--r-lg); padding: 20px; margin-bottom: 16px; }
.report.watch { background: var(--tint-yellow); }
.report.good { background: var(--tint-blue); }
.report h2 { font-family: var(--display); font-size: 1.5rem; line-height: 1.2; margin-bottom: 10px; }
.report ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.report li { display: flex; gap: 10px; align-items: baseline; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 10px; text-align: center; }
.stat b { display: block; font-family: var(--display); font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.stat span { font-size: .75rem; color: var(--muted); line-height: 1.25; display: block; margin-top: 2px; }
.stat.good b { color: var(--success); }
#money-summary h3 { font-size: 1.1rem; margin: 24px 0 10px; }
.bars { display: flex; gap: 8px; align-items: flex-end; height: 150px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 12px 8px; }
.bar-col { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.bar-track { position: relative; flex: 1; width: 100%; display: flex; align-items: flex-end; }
.bar { width: 100%; background: var(--success); border-radius: 6px 6px 0 0; min-height: 2px; }
.bar.over { background: var(--danger); }
.bar-budget { position: absolute; left: -2px; right: -2px; border-top: 2px dashed var(--ink); opacity: .35; }
.bar-col small { font-size: .68rem; color: var(--muted); }
.cat-bars { display: grid; gap: 8px; }
.cat-bar { display: grid; grid-template-columns: 90px 1fr auto; gap: 10px; align-items: center; font-size: .9rem; text-transform: capitalize; }
.cb-track { height: 10px; background: var(--surface-2); border-radius: 5px; overflow: hidden; }
.cb-fill { height: 100%; background: var(--primary); border-radius: 5px; }
.cat-bar b { font-variant-numeric: tabular-nums; text-transform: none; }
.order { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 8px; }
.order summary { list-style: none; cursor: pointer; display: flex; gap: 12px; align-items: center; padding: 14px 16px; }
.order summary::-webkit-details-marker { display: none; }
.o-store { flex: 1; font-weight: 600; } .o-date { color: var(--muted); font-size: .85rem; }
.o-lines { padding: 0 16px 12px; border-top: 1px solid var(--line-soft); }
.o-lines div { display: flex; justify-content: space-between; padding: 6px 0; font-size: .88rem; color: var(--muted); }

/* ================= trip ================= */
.trip-steps { list-style: none; margin: 4px 0 0; padding: 0; display: flex; align-items: center; gap: 6px; }
.trip-steps li { display: flex; align-items: center; gap: 6px; flex: 1; font-size: .8rem; font-weight: 500; color: var(--faint); }
.trip-steps li::after { content: ""; flex: 1; height: 2px; background: var(--line); border-radius: 1px; }
.trip-steps li:last-child { flex: none; } .trip-steps li:last-child::after { display: none; }
.trip-steps i { font-style: normal; font-size: .72rem; font-weight: 700; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line); background: var(--surface); }
.trip-steps li.current { color: var(--ink); } .trip-steps li.current i { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.trip-steps li.done { color: var(--muted); } .trip-steps li.done i { background: var(--success); border-color: var(--success); color: #fff; font-size: 0; }
.trip-steps li.done i::before { content: "✓"; font-size: .72rem; }
.stage { animation: rise .3s ease both; }
.stage-title, .setup-title { font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; font-size: clamp(1.7rem, 6vw, 2.3rem); line-height: 1.12; margin: 22px 0 6px; }
.stage-sub, .setup-sub { color: var(--muted); margin-bottom: 16px; min-height: 1.4em; }
.c-cook { color: var(--success); } .c-quick { color: var(--warn); } .c-skip { color: var(--faint); }
.day-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; margin-bottom: 18px; }
.day-btn { background: var(--surface); border: 2px solid var(--line); border-radius: var(--r-md); padding: 12px 4px; text-align: center; cursor: pointer; min-height: 64px; transition: transform .12s; }
.day-btn:active { transform: scale(.96); }
.d-name { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.d-mode { display: block; font-weight: 600; margin-top: 2px; }
.day-btn.cook { border-color: var(--success); background: var(--tint-green); } .day-btn.cook .d-mode { color: var(--success); }
.day-btn.quick { border-color: var(--accent); background: var(--tint-yellow); } .day-btn.quick .d-mode { color: var(--warn); }
.day-btn.skip { opacity: .6; border-style: dashed; }
.setup-controls { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.trust-line { color: var(--muted); font-size: .88rem; margin-top: 16px; } .trust-line b { color: var(--ink); }
.store-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; margin-bottom: 16px; }
.store-card p { margin-top: 4px; }
.sc-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; } .sc-name { font-weight: 600; }
.sc-tag, .sf-tag { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--warn); background: var(--tint-yellow); border-radius: var(--r-pill); padding: 3px 10px; }
.sc-tag.live { color: var(--success); background: var(--tint-green); }
.storefront { margin-top: 18px; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-1); }
.sf-bar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--tint-red); }
.sf-name { font-family: var(--display); font-weight: 700; font-size: 1.15rem; flex: 1; text-transform: capitalize; }
.sf-status { padding: 14px 16px 8px; font-weight: 600; }
.shop-bar { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin: 0 16px 8px; }
.shop-fill { height: 100%; width: 3%; background: var(--primary); border-radius: 3px; transition: width .4s ease; }
.live-cart { height: min(44vh, 330px); overflow-y: auto; scroll-behavior: smooth; border-top: 1px solid var(--line-soft); }
.live-cart:empty::before { content: "Walking in…"; display: block; padding: 16px; color: var(--muted); }
.live-row { display: flex; align-items: baseline; gap: 10px; padding: 8px 16px; font-size: .94rem; animation: rise .25s ease both; }
.live-row .tick { color: var(--success); min-width: 1.2em; font-weight: 700; }
.live-row .ln { flex: 1; min-width: 0; } .live-row .ln small { display: block; color: var(--muted); font-size: .75rem; }
.live-row .lp { font-variant-numeric: tabular-nums; font-weight: 600; }
.live-row.home { color: var(--muted); } .live-row.home .lp { font-weight: 400; font-size: .8rem; }
.live-total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 16px; border-top: 1px solid var(--line-soft); color: var(--muted); }
.live-total b { color: var(--ink); font-family: var(--display); font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.total-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; margin-bottom: 12px; box-shadow: var(--shadow-1); }
.total-amount { font-family: var(--display); font-size: 2.8rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.total-amount .cur { font-size: .5em; vertical-align: .5em; color: var(--muted); margin-right: 2px; }
.budget-bar { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; margin: 8px 0 6px; }
.budget-fill { height: 100%; width: 0; background: var(--success); border-radius: 4px; transition: width .6s ease; }
.budget-fill.over { background: var(--danger); }
.hero-budget { color: var(--muted); font-size: .9rem; }
.needs-you { background: var(--tint-yellow); color: var(--ink); border-radius: var(--r-md); padding: 12px 16px; margin-bottom: 12px; font-size: .92rem; }
.needs-you.ok { background: var(--tint-green); color: var(--success); font-weight: 500; }
.list-toolbar { display: flex; align-items: center; gap: 10px; margin: 16px 0 10px; }
.cat-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; margin-bottom: 12px; }
.cat-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 16px; background: var(--surface-2); font-weight: 600; text-transform: capitalize; }
.cat-head .g-title { display: flex; flex-direction: column; font-family: var(--display); font-size: 1.05rem; text-transform: none; }
.cat-head .g-title small { font-family: var(--font); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.cat-head .g-right { display: flex; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; }
.swap-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 1.05rem; transition: transform .3s; }
.swap-btn:hover { transform: rotate(180deg); border-color: var(--primary); color: var(--primary); }
.item-row { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.item-row.validate { background: var(--tint-yellow); }
.i-name { flex: 1 1 100%; min-width: 0; font-weight: 500; text-transform: capitalize; }
.i-name small { display: block; font-weight: 400; color: var(--muted); font-size: .78rem; text-transform: none; }
.i-name small.ask { color: var(--warn); }
.i-price { font-variant-numeric: tabular-nums; font-weight: 600; margin-left: auto; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); }
.qty button { width: 34px; height: 34px; border: none; background: none; color: var(--muted); font-size: 1.1rem; cursor: pointer; border-radius: 50%; }
.qty .n { min-width: 1.4em; text-align: center; font-weight: 600; }
.home-group .item-row { opacity: .7; } .home-group .cat-head { color: var(--success); background: var(--tint-green); }
.home-toggle { cursor: pointer; user-select: none; }
#warnings .warning { background: var(--tint-yellow); border-radius: var(--r-sm); padding: 10px 14px; margin: 8px 0; font-size: .88rem; }
.approve-inline { display: block; width: 100%; margin-top: 16px; }
.approve-bar {
  position: fixed; left: 0; right: 0; bottom: 14px; margin: 0 auto; width: min(728px, calc(100vw - 24px)); z-index: 60;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px 10px 10px 18px; box-shadow: var(--shadow-2); animation: fade .3s ease both;
}
.approve-total { font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.approve-note { color: var(--muted); font-size: .76rem; display: block; line-height: 1.3; }
.approve-spacer { height: 24px; }
.pay-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; margin: 8px 0 14px; box-shadow: var(--shadow-1); }
.pay-card-title { font-family: var(--display); font-size: 1.3rem; font-weight: 600; margin-bottom: 8px; }
.pay-steps { padding-left: 22px; margin: 0 0 16px; color: var(--muted); } .pay-steps li { padding: 3px 0; } .pay-steps b { color: var(--ink); }
.pay-card a.btn-primary { display: inline-block; text-decoration: none; }
.pay-details { margin: 8px 0; color: var(--muted); } .pay-details summary { cursor: pointer; padding: 8px 0; }
.pay-line { display: flex; justify-content: space-between; padding: 6px 2px; border-bottom: 1px solid var(--line-soft); font-size: .9rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.home-dinners { margin-bottom: 14px; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--surface); }
.home-dinner { display: flex; gap: 12px; align-items: baseline; padding: 12px 16px; border-top: 1px solid var(--line-soft); }
.home-dinner:first-child { border-top: none; }
.hd-day { width: 6.4em; color: var(--muted); font-size: .8rem; text-transform: capitalize; }
.hd-name { flex: 1; font-family: var(--display); font-weight: 600; } .hd-time { color: var(--muted); font-size: .8rem; }

/* ================= household ================= */
#members { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.member-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.member-emoji { font-size: 1.5rem; background: var(--tint-yellow); border-radius: 50%; width: 48px; height: 48px; display: grid; place-items: center; }
.member-head input.m-name { font-family: var(--display); font-size: 1.2rem; font-weight: 600; border: none; border-bottom: 1px dashed transparent; background: none; padding: 4px 0; min-height: 0; }
.member-head input.m-name:focus { border-bottom-color: var(--muted); }
.member-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.goal-line { margin-top: 10px; font-size: .85rem; color: var(--success); }
.chips-input { margin-top: 10px; }
.chips-input .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip { font-size: .82rem; background: var(--surface-2); border-radius: var(--r-pill); padding: 4px 12px; }
.chip.allergy { background: var(--tint-red); color: var(--danger); font-weight: 500; }
.chip button { background: none; border: none; color: inherit; cursor: pointer; padding: 0 0 0 6px; }
.remove-member { margin-top: 14px; }
#learned { display: flex; flex-wrap: wrap; gap: 8px; }
.learned-chip { font-size: .85rem; border: 1px solid var(--line); border-radius: var(--r-pill); padding: 6px 14px; background: var(--surface); }
.learned-chip.avoid { background: var(--tint-yellow); border-color: transparent; }
