/* /what-can-i-make: your kitchen + ranked results (loaded on that page only). Colors come from site.css (dark mode follows). */
.pantry-head { align-items: flex-start; }
.pantry-head .lede { max-width: 62ch; }
.pantry-status:empty { display: none; }
.pantry-status { color: var(--herb); font-weight: 600; margin: 0; }
.pantry-grid { display: grid; grid-template-columns: minmax(280px, 360px) 1fr; gap: 24px; align-items: start; }
.pantry-grid > * { min-width: 0; }
.pantry-ui { display: none; }
.js .pantry-ui { display: block; }
.pantry-box { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }
.pantry-box h2 { margin-top: 0; }
.pantry-sub { font: 700 .95rem var(--sans); margin: 16px 0 6px; }
.combo { position: relative; }
.combo input { width: 100%; }
.combo-list { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); max-height: 280px; overflow: auto; }
.combo-list li { padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.combo-list li.on, .combo-list li:hover { background: var(--honey-soft); }
.pq-hint { min-height: 1.3em; margin: 4px 0 0; }
.have-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.have-chip { border: 1px solid var(--line); background: var(--herb-soft); color: var(--ink); border-radius: 999px; padding: 6px 12px; min-height: 36px; font: 500 .9rem var(--sans); cursor: pointer; }
.have-chip:hover { border-color: var(--herb); }
.basics { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.basics summary { font-weight: 700; cursor: pointer; min-height: 32px; }
.basics-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; }
.basics-list label { min-height: 36px; font-weight: 400; }
.popular { display: flex; flex-wrap: wrap; gap: 6px; }
.pop-btn { border: 1px dashed var(--line); background: transparent; color: var(--ink); border-radius: 999px; padding: 6px 12px; min-height: 36px; font: 500 .88rem var(--sans); cursor: pointer; }
.pop-btn::before { content: "+ "; color: var(--accent); font-weight: 700; }
.pop-btn[aria-pressed="true"] { background: var(--herb-soft); border-style: solid; border-color: var(--herb); }
.pop-btn[aria-pressed="true"]::before { content: "✓ "; color: var(--herb); }
.pantry-tools { margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pm-noscript textarea { width: 100%; }
.pm-noscript fieldset { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; margin: 12px 0; }
.pm-noscript legend { grid-column: 1 / -1; }

.pm-head { flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.pm-head h2 { margin: 0; }
.pm-filters { display: flex; flex-wrap: wrap; gap: 10px; }
.pm-filters label { display: block; font-size: .8rem; font-weight: 700; margin-bottom: 2px; }
.pm-summary { color: var(--muted); margin: 8px 0 0; }
.pm-summary:empty { display: none; }
.pm-section { margin-top: 22px; }
.pm-section h3 { font: 700 1.15rem var(--serif); margin: 0; }
.pm-now h3 { color: var(--herb); }
.pm-blurb { margin: 2px 0 8px; }
.pm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pm-item { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.pm-main { min-width: 0; flex: 1 1 260px; }
.pm-title { font: 600 1.08rem/1.3 var(--serif); color: var(--ink); text-decoration: none; }
.pm-title:hover { text-decoration: underline; }
.pm-meta { color: var(--muted); margin: 2px 0 0; }
.pm-need { margin: 6px 0 0; }
.pm-need .chip { font-weight: 600; }
.pm-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.pm-more { margin-top: 10px; }
.pm-empty { text-align: left; padding: 18px 0; }

@media (max-width: 960px) {
  .pantry-grid { grid-template-columns: 1fr; }
  .pantry-box { position: static; max-height: none; overflow: visible; }
}
@media (max-width: 640px) {
  .pm-filters { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .pm-filters > div:first-child { grid-column: 1 / -1; }
  .pm-filters select { width: 100%; }
  .pm-actions { width: 100%; }
  .pm-actions .btn { flex: 1 1 auto; }
}
@media print { .pantry-box, .pm-filters, .pm-actions, .plan-toast { display: none !important; } .pantry-grid { display: block; } }
