/* Pictures that follow the data, on the four simple tabs (simple.js, list.js, meals.js, supply.js).
   One painted card at the top of Pantry, painted tiles where there is a choice (places, ways to add to the shopping
   list, what to be ready for), and a small painting on each item, meal, food group and supply line.
   Loaded after fresh.css. Colours come from its tokens, so a Look chosen in Settings and dark mode still apply. */

/* ---- the card at the top of a tab: its main number, one line under it, and its painting ---- */
.topcard { display: flex; align-items: center; gap: .5rem; margin: 0 0 .9rem; padding: .7rem .6rem .7rem 1.1rem; min-height: 5.6rem;
  border-radius: 14px; background: color-mix(in srgb, var(--brandbg) 70%, var(--card)); border: 1px solid color-mix(in srgb, var(--brand) 14%, var(--line)); overflow: hidden; }
.topcard .grow { flex: 1; display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.topcard b { font-size: 1.75rem; font-weight: 700; letter-spacing: -.025em; line-height: 1.05; color: var(--ink); }
.topcard span { color: var(--muted); font-size: .9375rem; }
.topcard span .w { color: var(--warn); font-weight: 600; } .topcard span .b { color: var(--bad); font-weight: 600; }
.topcard .tc-art { width: 7.4rem; height: auto; margin: -.6rem -.2rem -.8rem 0; flex: 0 0 auto; object-fit: contain; }

/* ---- painted tiles for a choice ---- */
.ptiles { display: flex; gap: .5rem; overflow-x: auto; margin: 0 -1rem .8rem; padding: 2px 1rem 4px; scrollbar-width: none; }
.ptiles::-webkit-scrollbar { display: none; }
.ptiles.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 0 .9rem; padding: 0; overflow: visible; }
.ptile { flex: 0 0 auto; width: 6rem; display: flex; flex-direction: column; align-items: center; gap: .1rem; padding: .5rem .35rem .6rem; min-height: 0;
  border-radius: 12px; background: var(--card); border: 1px solid var(--line); color: var(--ink); font: inherit; text-decoration: none; text-align: center; cursor: pointer; }
.ptiles.three .ptile { width: auto; }
.ptile.wide { width: 8.6rem; }
.ptile img, .ptile .pt-pic { width: 4.5rem; height: 3.4rem; object-fit: contain; display: block; }
.ptile.wide img { width: 7rem; height: 4rem; }
.ptile b { font-size: .875rem; font-weight: 600; line-height: 1.15; }
.ptile small { font-size: .78rem; color: var(--muted); }
.ptile small .plustag { margin: 0; }
.ptile.on { border-color: var(--brand); background: color-mix(in srgb, var(--brandbg) 55%, var(--card)); box-shadow: inset 0 0 0 1px var(--brand); }
.ptile:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (hover: hover) { .ptile:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); } }

/* ---- a small painting on a row or a group heading ---- */
.rowart { flex: 0 0 auto; display: grid; place-items: center; width: 40px; height: 40px; }
.rowart img { width: 40px; height: 40px; object-fit: contain; }
.plist li.grp .grp-art, .sgrp summary .grp-art { width: 28px; height: 28px; object-fit: contain; flex: 0 0 auto; margin-right: .5rem; }
.plist li.grp:has(.grp-art) { display: flex; align-items: center; }
.sgrp summary .grp-art { width: 40px; height: 40px; margin-right: .1rem; }
.chip-art { width: 20px; height: 20px; object-fit: contain; margin: 0 .35rem 0 -.15rem; vertical-align: -5px; display: inline-block; }
.pchips button .chip-art { opacity: .95; }

/* ---- Supply: the shelf that fills up with the days, and the household ---- */
.sdays.painted { position: relative; }
.sdays.painted .sd-of { display: block; max-width: 60%; }
.sdays .sd-shelf { position: absolute; right: .8rem; top: 3.6rem; width: 7.4rem; height: auto; pointer-events: none; }
.sdays .sd-people { margin: .35rem 0 .1rem; }
.sdays .sd-people .pic.people { display: flex; align-items: flex-end; gap: 1px; min-height: 0; margin: 0; }
@media (max-width: 360px) { .sdays .sd-shelf { width: 5.6rem; } }

/* wide screens: the tiles wrap instead of scrolling sideways */
@media (min-width: 900px) and (hover: hover) {
  .ptiles { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; flex-wrap: wrap; overflow: visible; }
}
