/* crew app v3 — stream S5: request tracker v2 (linked-item card) + optional delivery QR.
   Theme tokens from crew/css/app.css only. The two --trk-qr-* tokens are the only literal colours on purpose:
   a QR code must be dark modules on a light plate in BOTH themes (many scanners cannot read an inverted code),
   so the plate does not follow dark mode; everything around it does. */
:root { --trk-qr-ink: #000; --trk-qr-paper: #fff; }

/* linked-item card — the host is always rendered for a sent request so the card can appear in place; while it
   is empty neither it nor its slot takes space (no extra gap in the .content column) */
.trk-host:empty, .req-slot:has(> .trk-host:empty) { display: none; }
.trk-card .trk-head { gap: 10px; margin-bottom: 12px; align-items: center; }
.trk-card .trk-title { gap: 10px; min-width: 0; }
.trk-card .trk-title .kicker { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trk-card .trk-kv { margin: 0 0 12px; }
.trk-card .trk-by { margin: 0 0 12px; }
.trk-card .trk-proof { display: flex; align-items: center; gap: 6px; margin: 0 0 12px; font-size: 14px; font-weight: 600; color: var(--ok); }
.trk-card .trk-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.trk-card .trk-actions > .btn { flex: 1 1 150px; }
.trk-card .trk-hint { margin-top: 8px; }
.trk-card .saved-copy { margin-top: 10px; }
.trk-sk { display: flex; flex-direction: column; gap: 12px; min-height: 124px; }
.trk-sk .trk-sk-pill { width: 96px; height: 24px; border-radius: var(--pill); }

/* delivery QR (sheet + Me › My QR) */
.trk-qr { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.trk-qr .callout { text-align: left; align-self: stretch; }
.trk-bright { display: inline-flex; align-items: center; gap: 6px; }
.trk-qr-box {
  width: min(76vw, 300px); aspect-ratio: 1 / 1; margin: 0; padding: 0; flex: none;
  display: grid; place-items: center; overflow: hidden;
  border-radius: var(--r-lg); border: 1px solid var(--line);
  background: var(--trk-qr-paper); color: var(--trk-qr-ink);
}
.trk-qr-box .trk-qr-svg { width: 100%; height: 100%; display: block; }
.trk-qr-box.trk-qr-none { background: var(--surface-2); color: var(--text-3); }
.trk-qr-box .trk-qr-sk { width: 100%; height: 100%; border-radius: 0; }
.trk-count { margin: 0; min-height: 1.5em; font-size: 16px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.trk-code-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.trk-code { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.trk-code-txt {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.75rem; font-weight: 700;
  letter-spacing: .12em; color: var(--text); user-select: text; -webkit-user-select: text; -webkit-touch-callout: default;
}
.trk-qr-for, .trk-qr-opt { text-align: center; }
.trk-my-intro { margin: 0; }

/* the QR sheet uses the whole phone screen */
.sheet.trk-qr-sheet { top: calc(var(--safe-t) + 8px); max-height: none; }
.sheet.trk-qr-sheet .sheet-b { flex: 1; justify-content: center; }
@media (min-width: 900px) {
  .sheet.trk-qr-sheet { top: auto; max-height: calc(100dvh - 48px); }
}
