/* v29.css — SPEC-v2.9 (צבי): §1 the meal picker's "🎲 תפתיע אותי" button (ui/board.js), and §6 the
   "📊 סטטיסטיקות" card of the "עוד" tab (ui/more.js) and its screen (ui/stats.js): the range
   switch, "🍽️ N ארוחות תוכננו", cards with bars, the two small tiles, "👨‍👩‍👧 בכל המשפחה".
   Like v26b.css / v28.css: built only from the app's shared variables (style.css), which
   theme-clean.css points at its own tokens (--paper / --sheet / --ink / --ink-soft / --lemon /
   --g-lemon / --rim-lemon / --font / --hand), so the fridge look (default, where paper stays a light
   object even in dark mode) and html[data-theme="clean"] (light and dark) both follow it; the few
   clean-only rules below just swap a fridge object for its flat twin. The screen reuses the app's
   own parts as they are: .back-link, .page-head, .sec-switch / .sec-btn (the range), .paper,
   .stick, .card-title, .menu-card (the entry), .bdot (a board's colour).
   Every font-size follows the text-size slider (var(--ts)); every tap target >= 44px; nothing
   wider than a 360px phone. */

/* ---------------- the picker's foot: "🎲 תפתיע אותי" ---------------- */
/* a lemon magnet between "+ מנה חדשה" and "ניקוי" / "סיום" (the tomato one stays the main action) */
.sheet-foot .pk-surprise {
  gap: 5px;
  background: var(--g-lemon); box-shadow: var(--rim-lemon); color: var(--lemon-ink);
}
.sheet-foot .pk-surprise:active:not(:disabled) { box-shadow: var(--rim-pressed); }
/* on a phone: "🎲 תפתיע", and the picker's buttons (three or four in one row) a little narrower,
   so "+ מנה חדשה" stays on one line */
@media (max-width: 520px) {
  .sheet-foot .pk-surprise .sp-more { display: none; }
  .pk-foot .btn { padding-left: 8px; padding-right: 8px; }
  .pk-foot.crowded { gap: 8px; }
  .pk-foot.crowded .btn { padding-left: 5px; padding-right: 5px; font-size: calc(15.5px * var(--ts)); }
  .pk-foot.crowded .pk-meals-edit { font-size: calc(14px * var(--ts)); }
  html[data-theme="clean"] .pk-foot.crowded .btn { font-size: calc(15px * var(--ts)); }
}

/* ---------------- "עוד": the entry card (the look of "🍽️ הארוחות שלנו") ---------------- */
.st-entry { margin: 2px 0 20px; }
.st-entry .menu-li { margin-bottom: 0; }
.stats-card { --nb: var(--marker-blue); }
.stats-card .menu-emoji { background: var(--g-lemon); box-shadow: var(--rim-lemon); }

/* ---------------- the stats screen ---------------- */
/* השבוע · החודש · 3 חודשים · הכל — the menus tab's switch, four across */
.sec-switch.st-range { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 6px 0 20px; }

/* "🍽️ N ארוחות תוכננו": a sticky note */
.st-sum { padding-top: 22px; }
.st-big { font: 700 calc(22px * var(--ts))/1.3 var(--hand); color: var(--ink); overflow-wrap: anywhere; }
.st-big .num { font: 800 calc(32px * var(--ts))/1 var(--font); }
.st-sum p { margin-top: 4px; font: 600 calc(14px * var(--ts))/1.35 var(--font); }

/* a card of rows, each with a bar (most first; the longest bar = the list's top) */
.st-card .card-title { margin-bottom: 8px; }
.st-card > .muted.small { margin: -4px 0 10px; }
.st-bars { list-style: none; margin: 0; padding: 0; }
.st-row { margin: 0 0 12px; }
.st-row:last-child { margin-bottom: 2px; }
.st-line { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.st-name { flex: 1 1 auto; min-width: 0; font: 600 calc(18px * var(--ts))/1.25 var(--hand); color: var(--ink); overflow-wrap: anywhere; }
.st-name .bdot { margin-inline-end: 4px; }
.st-num {
  flex: none; display: inline-flex; align-items: center; gap: 2px;
  font: 700 calc(14.5px * var(--ts))/1.2 var(--font); color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.st-sub { font: 600 calc(14.5px * var(--ts))/1.3 var(--font); color: var(--ink-soft); overflow-wrap: anywhere; }
.st-bar {
  display: block; height: 10px; margin-top: 5px; border-radius: 999px; overflow: hidden;
  background: rgba(0, 0, 0, 0.07);
}
/* RTL: a bar grows from the right, like the text */
.st-bar i {
  display: block; height: 100%; border-radius: inherit;
  background: var(--lemon); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.st-loved .st-bar i { background: var(--marker-red); }
.st-items .st-bar i { background: var(--doodle); }
.st-fam .st-bar i { background: var(--tom); }
.st-bar i.bc { background: var(--bc); }   /* "👤 המנה של כל אחד": the board's own colour */
.st-h { margin: 16px 0 8px; font: 700 calc(16px * var(--ts))/1.3 var(--font); color: var(--ink); }
.st-card > p:not(.muted) { margin-bottom: 4px; }
.st-loading { padding: 8px 0 4px; }

/* "📅 היום העמוס" · "⏰ הארוחה הכי מתוכננת": two small cards side by side (one under the other
   when the text is very big) */
.st-tiles {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: 12px;
  margin: 0 0 20px;
}
.st-tiles .paper { margin: 0; padding: 14px 12px 12px; }
.st-tile-t { font: 700 calc(14.5px * var(--ts))/1.3 var(--font); color: var(--ink-soft); }
.st-tile-v { margin-top: 4px; font: 700 calc(21px * var(--ts))/1.2 var(--hand); color: var(--ink); overflow-wrap: anywhere; }
.st-tile-s { margin-top: 2px; font: 600 calc(14px * var(--ts))/1.3 var(--font); color: var(--ink-soft); }

.st-empty .btn + .btn { margin-top: 10px; }

/* ---------------- the clean look ("לבן ולימון") ---------------- */
/* one accent: the lemon; a soft lemon 🎲 next to the lemon "סיום"; flat grey tracks */
html[data-theme="clean"] .sheet-foot .pk-surprise { background: var(--c-lemon-soft); box-shadow: none; color: var(--c-ink); }
html[data-theme="clean"] .sheet-foot .pk-surprise:active:not(:disabled) { background: var(--c-lemon-soft); filter: brightness(0.96); }
html[data-theme="clean"] .st-big { font-weight: 600; }
html[data-theme="clean"] .st-big .num { font-weight: 700; }
html[data-theme="clean"] .st-name { font-weight: 600; font-size: calc(16.5px * var(--ts)); }
html[data-theme="clean"] .st-tile-v { font-weight: 600; font-size: calc(18px * var(--ts)); }
html[data-theme="clean"] .st-bar { background: var(--c-fill); }
html[data-theme="clean"] .st-bar i { background: var(--c-lemon); box-shadow: none; }
html[data-theme="clean"] .st-bar i.bc { background: var(--bc); }
