/* R10 (26/11/2026): on a phone a register is a list of cards.

   The grid keeps the rows (search, filters, order, pages) and is only hidden
   here; admin-ui.js draws one card per row of the page in view. A card opens
   by the control laid over its body. The action that cannot be undone is
   outside that body, alone in the last line, with a 44 px target. Above
   640 px nothing in this file applies: the lists stay hidden and empty. */
.record-cards[hidden], .record-cards-pager[hidden], .record-cards-clear[hidden] { display: none !important; }
@media (min-width: 641px) { .record-cards, .record-cards-pager, .record-cards-clear { display: none !important; } }

@media (max-width: 640px) {
  .as-cards > .data-grid { display: none; }
  /* «Compact rows», «Columns» and «Reset view» speak of a table. */
  .as-cards > .data-toolbar .toolbar-end { display: none; }
  .as-cards > .data-toolbar:not(:has(input)) { display: none; }
  .as-cards > .data-toolbar { margin-bottom: 10px; }
  .as-cards > .data-toolbar input { min-height: 44px; }

  .record-cards { display: grid; gap: 10px; min-width: 0; margin: 0; }
  .record-cards-clear { min-height: 44px; margin: 0 0 10px; }
  .record-cards-empty { margin: 0; padding: 14px 0; color: var(--muted); font: 14px/1.5 var(--sans); }

  .record-card { min-width: 0; border-radius: var(--r-tile); background: var(--card); box-shadow: inset 0 0 0 1px var(--line), var(--shadow); color: var(--ink); overflow: hidden; }
  .record-card-body { position: relative; min-width: 0; padding: 14px 16px 12px; }
  .record-card-title { margin: 0; font: 600 15px/1.35 var(--sans); letter-spacing: 0; color: var(--ink); overflow-wrap: anywhere; }
  .record-card-title strong { font-weight: 600; }
  .record-card-title .mono { font-size: 14px; }
  .record-card-title :is(.sub, small, .account-email, .muted) { display: block; margin: 2px 0 0; font-weight: 400; font-size: 12px; line-height: 1.4; color: var(--muted); overflow-wrap: anywhere; }
  .record-card-title .account-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; overflow: visible; }
  .record-card-title .account-line .account-email { flex-basis: 100%; }

  /* The whole body is the target that opens the record. */
  .record-card-open { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; border-radius: var(--r-tile) var(--r-tile) 0 0; background: none; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .record-card-body:only-child .record-card-open { border-radius: var(--r-tile); }
  .record-card-open:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
  .record-card-open:active { background: var(--chip); }
  /* A link or a copy button inside the card stays its own target. */
  .record-card-body :is(a, button):not(.record-card-open) { position: relative; z-index: 2; }

  .record-card-fields { display: grid; gap: 8px; margin: 10px 0 0; }
  .record-card-fields > div { display: block; min-width: 0; }
  .record-card-fields dt { margin: 0; font: 400 12px/1.4 var(--sans); color: var(--muted); }
  .record-card-fields dd { margin: 1px 0 0; font: 400 13.5px/1.45 var(--sans); color: var(--ink); overflow-wrap: anywhere; min-width: 0; }
  .record-card-fields dd :is(.sub, small) { display: block; font-size: 12px; color: var(--muted); }
  .record-card-fields dd .cell-content > .numeric-cell { text-align: left; }

  .record-card-actions, .record-card-danger { display: flex; align-items: center; margin: 0 16px; border-top: 1px solid var(--line); }
  .record-card-actions :is(button, a) { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; padding: 0 4px; margin-left: -4px; }
  /* Alone in the last line, away from the body that opens the card. */
  .record-card-danger .danger-link { display: inline-flex; align-items: center; justify-content: flex-start; min-width: 44px; min-height: 44px; margin: 4px 0 4px -4px; padding: 0 4px; color: var(--bad); font: 500 14px var(--sans); }

  .record-cards-pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 12px 0 0; font: 13px var(--sans); color: var(--muted); }
  .record-cards-pager .pillbutton { min-width: 44px; min-height: 44px; padding: 0 16px; font-size: 13px; }
  .record-cards-pager .pillbutton:disabled { opacity: 0.45; cursor: default; }
}

/* Field sessions, 1/12/2026: in a card the name of who shared the dig is text.
   The whole card opens the dig, whose page links the account; a second, small
   target inside it would be under 44 px. */
.record-cards .dig-who { pointer-events: none; color: inherit; text-decoration: none; }
