/* Contract: contracts/web/rules.md
 * Pictures first: what the justified grid and the preview's foot add.
 *
 * The grid's own rules (flex rows, each card grown by `--ar`) are edited in
 * place in 03-grid.css, where the rules they replaced lived. This file holds
 * only what had no home there: the end of the last row, the card's quiet
 * "not described" dot and filename line, and the preview's caption and verbs.
 */

/* The last row would otherwise be stretched to the full width, so three
   pictures that happened to be left over came out three times their size.
   Something that grows far faster than any card soaks up the slack there; in
   every full row it does not exist, so those still reach the edge. */
.grid::after { content: ''; flex: 1000 1 0; }

/* ---------- the words under a card ---------- */
.meta { position: relative; }
.meta .sub[hidden] { display: none; }
/* A filename moved underneath a caption title: one line, and visibly a name. */
.meta .sub.filename {
  -webkit-line-clamp: 1; font-size: 11px; word-break: break-all;
  font-variant-numeric: tabular-nums; opacity: .8;
}
/* Not yet described: a dot rather than a sentence on every new card. */
.undesc {
  position: absolute; top: 14px; right: 9px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink-dim); opacity: .55;
}
.undesc[hidden] { display: none; }
.meta:has(.undesc:not([hidden])) .name { padding-right: 10px; }

/* ---------- the preview's foot: web/lightbox-info.js ---------- */
.lb-caption {
  margin: 3px 0 2px; max-width: 72ch;
  font-size: 13px; line-height: 1.45; color: #d6d4de;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.lb-caption[hidden], .lb-facts[hidden] { display: none; }
.lb-acts { display: flex; align-items: center; gap: 6px; }
/* The card's own buttons, which start invisible and wait for a card hover that
   never comes here — the same undoing .previewbar does in the panel. */
.lb-acts .mark {
  opacity: 1; width: 34px; height: 34px; border-radius: 8px;
  color: #cfcdd8; background: rgba(255, 255, 255, .08); text-decoration: none;
}
.lb-acts .mark:hover { background: rgba(255, 255, 255, .14); color: #eceaf2; }
.lb-acts .fav.on { color: #f0b429; }
.lb-acts .mark:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
