/* Styles for the tonight, plan and day-picker screens (public/plan.js).
   Plain rows with hairlines; one saffron button per screen; ink and muted for everything else.
   Classes: .tnx/.tx-* (tonight), .plx/.pl-* (plan, sheets, picker). Logical properties throughout (RTL). */

/* ---------- shared bits ---------- */
.tx-text { min-height: 48px; padding: 0 12px; border: 0; background: none; color: var(--muted); font-size: var(--fs-md); font-weight: 500; white-space: nowrap; display: inline-flex; align-items: center; border-radius: var(--r-md); text-decoration: none; }
.tx-text.strong { color: var(--ink); font-weight: 600; }
.tx-dots { flex: none; width: 48px; height: 48px; border: 0; background: none; color: var(--muted); font-size: 26px; line-height: 1; border-radius: var(--r-md); margin-inline-start: auto; display: grid; place-items: center; }
.tx-primary, .pl-primary { display: flex; align-items: center; justify-content: center; width: 100%; min-height: var(--tap-primary); padding: 0 24px; border: 0; border-radius: var(--r-md); background: var(--accent-action); color: var(--on-accent-action); font-size: var(--fs-lg); font-weight: var(--fw-bold); text-decoration: none; text-align: center; box-shadow: none; }
.tx-primary:active, .pl-primary:active { transform: scale(.98); }
.tx-primary.small { width: auto; min-height: 48px; padding: 0 20px; font-size: 17px; flex: none; }
.tx-primary[disabled], .pl-primary[disabled] { opacity: .55; pointer-events: none; }
.tx-primary:focus-visible, .pl-primary:focus-visible, .tx-outline:focus-visible { box-shadow: var(--focus); } /* box-shadow: none above would hide the ring */
.tx-meta { margin: 0; font-size: var(--fs-sm); line-height: 20px; color: var(--muted); }
.tx-sec { margin: 0 0 4px; font-family: var(--font-body); font-size: 13px; line-height: 16px; font-weight: 500; color: var(--muted); }
.tx-thumb { flex: none; display: block; width: 72px; height: 72px; border-radius: var(--r-lg); overflow: hidden; background: var(--track); }
.tx-thumb img, .tx-thumb .ph { width: 100%; height: 100%; object-fit: cover; font-size: var(--fs-2xl); }

/* ---------- tonight ---------- */
.tnx { max-width: 640px; padding-block: 8px 40px; }
.tx-skel { display: grid; gap: 16px; padding-top: 24px; }
.tx-skel i { display: block; height: 28px; border-radius: var(--r-sm); }
.tx-skel .s1 { width: 40%; height: 16px; }
.tx-skel .s2 { width: 80%; height: 36px; }
.tx-skel .s3 { height: 48px; }
.tx-ask { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 12px; padding-block: 8px; border-bottom: 1px solid var(--line); font-size: var(--fs-md); }
.tx-ask-q { flex: 1 1 220px; min-width: 0; padding-block: 8px; }
.tx-ask-acts { display: flex; margin-inline: -12px; }
.tx-grid { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "now" "main" "soon"; }
.tx-g-now { grid-area: now; }
.tx-g-now:empty { display: none; }
.tx-main { grid-area: main; padding-block: 24px 8px; display: grid; gap: 16px; align-content: start; }
.tx-g-soon { grid-area: soon; margin-top: 16px; }
.tx-now { display: flex; align-items: center; gap: 12px; min-height: 56px; padding-block: 4px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: var(--fs-md); }
.tx-now-ic { flex: none; display: grid; color: var(--muted); }
.tx-now-ic svg { width: 22px; height: 22px; }
.tx-now-t { flex: 1; min-width: 0; line-height: 22px; }
.tx-now-go { flex: none; display: grid; color: var(--muted); }
.tx-now-go svg { width: 20px; height: 20px; }
.tx-now .tx-text { margin-inline-end: -12px; }
.tx-dish { display: flex; align-items: flex-start; gap: 16px; }
.tx-dish-t { min-width: 0; flex: 1; display: grid; gap: 4px; }
.tx-label { margin: 0; font-size: 13px; line-height: 16px; font-weight: 500; color: var(--muted); }
.tx-dish h1, .tx-h1 { font-size: 26px; line-height: 32px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; text-wrap: balance; }
.tx-h1 { display: block; }
.tx-done { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; color: var(--herb-ink); font-weight: 500; }
.tx-done svg { width: 20px; height: 20px; }
.tx-miss { display: grid; }
.tx-miss-row { display: flex; align-items: center; gap: 12px; min-height: 48px; border-bottom: 1px solid var(--line); }
.tx-mt { flex: 1; min-width: 0; font-size: 17px; line-height: 24px; padding-block: 8px; overflow-wrap: anywhere; }
.tx-mm { flex: none; font-size: var(--fs-sm); color: var(--muted); }
.tx-miss .tx-text { margin-inline-end: -12px; }
.tx-have { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--herb-ink); font-weight: 500; font-size: 17px; }
.tx-have svg { width: 20px; height: 20px; }
.tx-all { display: flex; align-items: center; min-height: 48px; color: var(--ink); font-weight: 600; font-size: var(--fs-md); text-decoration: none; }
.tx-quiet { display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; margin-inline: -12px; margin-top: -8px; }
.tx-ideas { display: grid; }
.tx-idea { display: flex; align-items: center; gap: 12px; padding-block: 12px; border-bottom: 1px solid var(--line); }
.tx-idea-t { flex: 1; min-width: 0; display: grid; gap: 2px; }
.tx-idea-t b { font-size: var(--fs-lg); line-height: 24px; font-weight: 500; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.tx-ideas-more:not([hidden]) { display: grid; }
.tx-soon-row { display: flex; align-items: center; gap: 16px; min-height: 52px; width: 100%; padding: 8px 0; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); text-align: start; text-decoration: none; font-size: 17px; }
.tx-sd { flex: none; width: 64px; font-size: var(--fs-sm); color: var(--muted); }
.tx-st { flex: 1; min-width: 0; line-height: 24px; overflow-wrap: anywhere; }
.tx-soon-row.free .tx-st { color: var(--muted); font-size: var(--fs-md); }
.tx-prop { font-size: 13px; color: var(--muted); margin-inline-start: 4px; }
.tx-soon > :nth-child(5) { display: none; }
.tx-push { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 12px; margin-top: 32px; padding-top: 8px; border-top: 1px solid var(--line); font-size: var(--fs-sm); color: var(--muted); }
.tx-push-acts { display: flex; margin-inline: -12px; }

@media (min-width: 1100px) {
  .tnx { max-width: 1120px; padding-inline: 32px; padding-top: 16px; }
  .tx-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-rows: auto 1fr; column-gap: 64px; grid-template-areas: "main now" "main soon"; align-items: start; }
  .tx-main { padding-top: 16px; gap: 24px; max-width: 640px; }
  .tx-g-now { margin-bottom: 24px; padding-top: 16px; }
  .tx-g-soon { margin-top: 0; padding-top: 16px; }
  .tx-thumb { width: 160px; height: 160px; border-radius: var(--r-lg); }
  .tx-thumb img, .tx-thumb .ph { font-size: 56px; }
  .tx-dish { gap: 24px; }
  .tx-dish h1, .tx-h1 { font-size: var(--fs-3xl); line-height: 42px; }
  .tx-idea .tx-thumb { width: 96px; height: 96px; border-radius: var(--r-lg); }
  .tx-soon > :nth-child(5) { display: flex; }
}
/* the wall tablet (touch, wide): read from across the kitchen */
@media (min-width: 1100px) and (pointer: coarse) {
  .tx-dish h1, .tx-h1 { font-size: 40px; line-height: 44px; }
  .tx-label, .tx-sec { font-size: 15px; }
  .tx-meta { font-size: var(--fs-md); line-height: 22px; }
  .tx-mt, .tx-soon-row, .tx-have { font-size: 19px; }
  .tx-sd { font-size: var(--fs-md); width: 76px; }
  .tx-now { font-size: var(--fs-lg); }
  .tx-primary { min-height: 64px; font-size: 20px; }
  .tx-text { font-size: var(--fs-lg); }
  .tx-idea-t b { font-size: 20px; }
}

/* ---------- the plan ---------- */
.plx { max-width: 640px; padding-block: 8px 168px; }
.pl-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-block: 8px 4px; }
.pl-head h1 { font-size: 26px; line-height: 32px; }
.pl-sum { margin: 2px 0 0; font-size: var(--fs-sm); line-height: 20px; color: var(--muted); }
.pl-head-a { display: flex; align-items: center; gap: 8px; }
.pl-head-a .tx-dots { margin-inline-start: 0; }
.pl-bar { position: fixed; inset-inline: 0; bottom: calc(var(--nav-h, 72px) + env(safe-area-inset-bottom, 0px)); z-index: 30; padding: 24px 16px 12px; background: linear-gradient(to top, var(--bg) 62%, transparent); display: grid; pointer-events: none; }
.pl-bar .pl-primary { max-width: 608px; margin-inline: auto; pointer-events: auto; }
.pl-swapbar { position: sticky; top: 60px; z-index: 25; display: flex; align-items: center; gap: 8px; min-height: 48px; background: var(--bg); border-bottom: 1px solid var(--chili); font-weight: 500; }
.pl-wk { margin: 24px 0 0; font-family: var(--font-body); font-size: 13px; line-height: 16px; font-weight: 500; color: var(--muted); }
.pl-week:first-of-type .pl-wk { display: none; }
.pl-week:first-of-type { margin-top: 8px; }
.pl-blank { display: none; }
.pl-skel { display: grid; gap: 8px; padding-top: 16px; }
.pl-skel i { height: 64px; border-radius: var(--r-md); }

.pl-day { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 72px; padding: 10px 0; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); font: inherit; text-align: start; }
.pl-dl { flex: none; width: 68px; display: grid; line-height: 20px; white-space: nowrap; }
.pl-dl b { font-weight: 500; font-size: 15px; }
.pl-dl .num { font-size: 13px; color: var(--muted); }
.pl-day.today .pl-dl b { color: var(--chili-ink); }
.pl-th { flex: none; width: 48px; height: 48px; border-radius: var(--r-md); overflow: hidden; display: grid; place-items: center; background: var(--track); color: var(--muted); }
.pl-th img, .pl-th .ph { width: 100%; height: 100%; object-fit: cover; font-size: 20px; }
.pl-th.none svg { width: 22px; height: 22px; }
.pl-day.free .pl-th { visibility: hidden; }
.pl-tx { flex: 1; min-width: 0; display: grid; gap: 0; }
.pl-tag { font-size: 13px; line-height: 16px; color: var(--muted); }
.pl-t { font-size: var(--fs-lg); line-height: 24px; font-weight: 500; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.pl-day.proposed .pl-t { color: var(--muted); font-weight: 400; }
.pl-day.free .pl-t { color: var(--muted); font-weight: 400; }
.pl-sub { font-size: var(--fs-sm); line-height: 20px; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pl-go { flex: none; display: grid; place-items: center; min-width: 24px; color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
.pl-go svg { width: 20px; height: 20px; }
.pl-day.target .pl-go { color: var(--ink); }
.pl-day.cooked { opacity: .6; }
.pl-day.source { background: var(--surface-2); }
.swapping .pl-day:not(.target):not(.source) { opacity: .5; }

.pl-empty { text-align: center; padding: 64px 16px; display: grid; justify-items: center; gap: 8px; }
.pl-empty h2 { font-size: 26px; }
.pl-empty p { margin: 0 0 16px; color: var(--muted); max-width: 320px; }
.pl-empty .pl-primary { width: auto; min-width: 220px; }

@media (min-width: 1100px) {
  .plx { max-width: 1280px; padding: 16px 32px 48px; }
  .pl-head { padding-bottom: 8px; align-items: center; }
  .pl-head h1 { font-size: var(--fs-3xl); line-height: 42px; }
  .pl-bar { position: static; padding: 0; background: none; pointer-events: auto; display: block; }
  .pl-bar .pl-primary { width: auto; min-width: 240px; max-width: none; margin: 0; }
  .pl-swapbar { top: 0; }
  .pl-week:first-of-type .pl-wk { display: block; }
  .pl-wk { margin-top: 24px; margin-bottom: 8px; }
  .pl-week:first-of-type { margin-top: 0; }
  .pl-wgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .pl-blank { display: block; }
  .pl-day { flex-direction: column; align-items: flex-start; gap: 8px; min-height: 176px; padding: 12px; border: 0; border-block: 1px solid var(--line); border-inline-end: 1px solid var(--line); position: relative; }
  .pl-blank + .pl-day, .pl-wgrid > .pl-day:first-child { border-inline-start: 1px solid var(--line); }
  .pl-dl { width: auto; display: flex; align-items: baseline; gap: 8px; }
  .pl-th { width: 96px; height: 96px; border-radius: var(--r-lg); }
  .pl-th img, .pl-th .ph { font-size: 34px; }
  .pl-day.free .pl-th { display: none; }
  .pl-tx { width: 100%; flex: none; }
  .pl-t { font-size: var(--fs-md); line-height: 22px; -webkit-line-clamp: 3; }
  .pl-sub { white-space: normal; -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; }
  .pl-go { display: none; }
  .pl-day.free .pl-go, .pl-day.target .pl-go { display: grid; position: absolute; inset-block-end: 10px; inset-inline-end: 12px; }
  .pl-day.today { outline: 1px solid var(--chili); outline-offset: -1px; z-index: 1; }
}
@media (min-width: 1100px) and (pointer: coarse) {
  .pl-th { width: 72px; height: 72px; }
  .pl-dl b { font-size: var(--fs-md); }
  .pl-t { font-size: 17px; }
}

/* ---------- sheets: plain text rows ---------- */
.pl-sheet-sub { margin: 0 0 8px; color: var(--muted); font-size: var(--fs-sm); line-height: 20px; }
.pl-rows { display: grid; margin-top: 8px; }
.pl-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 56px; padding: 0 4px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); font-size: 17px; text-align: start; text-decoration: none; }
.pl-row:last-child { border-bottom: 0; }
.pl-row.danger { color: var(--danger); }
.pl-mark { display: grid; color: var(--herb-ink); width: 24px; }
.pl-mark svg { width: 22px; height: 22px; }
.pl-rows-label { margin: 16px 0 0; font-size: 13px; color: var(--muted); font-weight: 500; }

/* choosing a dinner for a day */
.pk-list { display: block; margin-block: 8px; }
.pk-sep { margin: 12px 0 0; font-size: 13px; color: var(--muted); font-weight: 500; }
.pl-skelrow { height: 56px; margin-bottom: 8px; border-radius: var(--r-md); }
.pk-quick .fchip { min-height: var(--tap-min); }
.pl-pick { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 8px 0; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); text-align: start; font: inherit; }
.pl-pth { flex: none; width: 48px; height: 48px; border-radius: var(--r-md); overflow: hidden; display: grid; place-items: center; background: var(--track); color: var(--muted); }
.pl-pth img, .pl-pth .ph { width: 100%; height: 100%; object-fit: cover; font-size: 20px; }
.pl-pth.none svg { width: 22px; height: 22px; }
.pl-ptx { flex: 1; min-width: 0; display: grid; }
.pl-ptitle { font-size: 17px; line-height: 24px; font-weight: 500; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.pl-pwhy { font-size: var(--fs-sm); color: var(--muted); }
.day-chip { border: 1px solid var(--line); border-radius: var(--r-md); }
.day-chip.busy { border-color: var(--line); }
.cooked-row { border-top-style: solid; }

/* the week's shopping */
.pl-shl { display: grid; margin-top: 4px; }
.pl-shg h3 { margin: 16px 0 0; font-family: var(--font-body); font-size: 13px; line-height: 16px; font-weight: 500; color: var(--muted); }
.pl-shi { display: flex; align-items: flex-start; gap: 12px; min-height: 48px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 17px; line-height: 24px; }
.pl-shi input { flex: none; width: 24px; height: 24px; margin: 0; accent-color: var(--herb-ink); }
.pl-shi small { color: var(--muted); font-size: var(--fs-sm); }
.pl-shi small.pl-low { color: var(--on-amber-soft); } /* running low at home: attention, said in words */
.pl-shd { margin-top: 8px; }
.pl-shd summary { min-height: 48px; display: flex; align-items: center; color: var(--muted); font-weight: 500; cursor: pointer; }
.pl-shf { position: sticky; bottom: 0; padding-top: 12px; margin-top: 8px; background: linear-gradient(to top, var(--surface) 75%, transparent); }

/* ---------- fix round 1 ---------- */
.tx-outline { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: none; color: var(--ink); font-size: var(--fs-md); font-weight: 500; white-space: nowrap; }
.tx-outline.chili { align-self: start; border-color: var(--accent-ink); color: var(--accent-ink); font-weight: 600; margin-block: 4px 8px; }
.tx-outline[disabled] { opacity: .55; pointer-events: none; }
.tx-ask { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 0; border: 0; }
.tx-ask-q { flex: 1 1 100%; padding: 0; }
.tx-ask-acts { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }
.tx-quiet { margin: 0; gap: 12px; }
.tx-mt { color: var(--muted); font-size: var(--fs-md); }
.tx-mm { color: var(--muted); }
.tx-soon-row.prop .tx-st { color: var(--muted); }
.tx-dots { margin-inline-start: auto; }

.pl-moredays { display: flex; align-items: center; width: 100%; min-height: 56px; padding: 0; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); font: inherit; font-weight: 600; text-align: start; }
.pl-day.free { min-height: 56px; padding-block: 4px; }
.pl-day.free .pl-th { display: none; }
.pl-day.free .pl-t { display: flex; align-items: center; gap: 8px; }
.pl-pl { display: grid; color: var(--muted); }
.pl-pl svg { width: 20px; height: 20px; }
.pl-dk { display: none; }
.pl-dl .num { font-size: var(--fs-sm); }
.pl-extra { display: none; }
.plx { padding-block-end: calc(150px + env(safe-area-inset-bottom, 0px)); }

@media (min-width: 1100px) {
  .plx { padding-block-end: 48px; }
  .pl-moredays { display: none; }
  .pl-extra { display: flex; }
  .pl-ph { display: none; }
  .pl-dk { display: inline; }
  .pl-day.free { min-height: 104px; justify-content: space-between; }
  .pl-day.free .pl-tx { flex: none; }
  .pl-day.free .pl-t { min-height: 48px; color: var(--muted); font-size: var(--fs-md); }
  .pl-dl { display: grid; gap: 0; }
  .pl-sub { font-size: var(--fs-sm); }
  .tnx { max-width: 1160px; }
  .tx-grid { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); column-gap: 56px; }
  .tx-main { max-width: none; padding-top: 8px; }
  .tx-g-now { padding-top: 8px; }
  .tx-g-soon { padding-top: 8px; font-size: 15px; color: var(--muted); }
  .tx-dish h1, .tx-h1 { font-family: var(--font-body); font-weight: 700; font-size: 44px; line-height: 52px; }
  .tx-soon-row { font-size: 15px; color: var(--muted); }
  .tx-soon-row .tx-st { font-size: 15px; }
  .tx-sd { font-size: var(--fs-sm); }
}
@media (min-width: 1100px) and (pointer: coarse) {
  .tx-dish h1, .tx-h1 { font-size: 48px; line-height: 56px; }
  .tx-soon-row, .tx-soon-row .tx-st { font-size: 17px; }
}
