/* ==========================================================================
   Masterlists (Pufflings, Seekers, Traits, Items, Cards, Furniture, Gallery,
   Players) and the per-player lists — the noticeboard redesign
   "Masterlists", images/masterlist-*.

   Page shape: .board-head (plaque + count) → form.filter-bar.ml-filters (type chips,
   search, "More filters") → .ml-results (count line, calm bulletin grid, pager).
   The grid, cards, pager and empty note are shared board pieces (board.css); this
   file only lays out the filter bar and the count line.
   ========================================================================== */

/* The filter bar is a column: the always-visible row, then the folding extras. */
.filter-bar.ml-filters{ display:block; }
/* site.css gives every div in a form a bottom margin; the bar spaces itself. */
.ml-filters div{ margin-bottom:0; }
.ml-filter-top{ display:flex; flex-wrap:wrap; gap:10px 14px; align-items:center; align-content:flex-start; }
.ml-filter-top > .chip-row{ flex:0 1 auto; }
.ml-search{ flex:1 1 220px; min-width:0; }
.ml-filters .pf-search{ min-height:44px; }
.ml-filters .fchip{ min-height:44px; }
.ml-more-toggle{ white-space:nowrap; }

.ml-more{ display:grid; grid-template-columns:repeat(auto-fit, minmax(200px, 1fr)); gap:12px 16px; align-items:end;
  margin-top:12px; padding-top:12px; border-top:2px dashed var(--line); }
.ml-more > div{ min-width:0; margin:0; }
.ml-more select{ min-width:0; width:100%; }
.ml-more .filters-break{ grid-column:1 / -1; display:flex; flex-wrap:wrap; gap:4px 22px; }
.ml-more .filters-break label{ display:inline-flex; align-items:center; gap:8px; min-height:44px; font-weight:700; }

/* "Showing 1–24 of 128" sits straight on the board: cream on the small dark-wood label
   board.css gives direct children of the board (same colours, same contrast pair). */
.ml-results > .result-count{
  margin:-10px 0 18px; font-size:13.5px; font-weight:700;
  color:#fff3dc; text-shadow:0 1px 0 rgba(0,0,0,.35);
  width:fit-content; max-width:100%; padding:2px 12px; border-radius:10px; background:rgba(60,40,22,.6);
}
:root[data-theme="dark"] .ml-results > .result-count{ background:none; padding-left:0; padding-right:0; }

/* Players: the avatar is the card's cover, kept round-ish. */
.player-card .cover img{ object-fit:cover; }

@media (max-width:480px){
  /* Phones: the chips are one scrolling row (board.css), then search and "More filters"
     share a row, so the first cards land on the first screen. */
  .ml-filter-top{ gap:8px; }
  .ml-filter-top > .chip-row{ flex-basis:100%; }
  .ml-search{ flex:1 1 120px; }
  .ml-more{ grid-template-columns:minmax(0, 1fr); }
  /* The plaque's count line repeats "Showing 1–24 of 128" just below it. */
  .board-head:has(+ .ml-filters) .wood-plaque p{ display:none; }
  .board-head:has(+ .ml-filters){ gap:10px; }
}

/* 44px tap targets for the page's own buttons. */
.board-head .button, .ml-filters .button{ min-height:44px; display:inline-flex; align-items:center; }
