/* Backpack: tabs and the four-column grid of rarity-coloured tiles */
.bg-tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; margin: 6px 8px 0; }
.bg-tabs button { padding: 9px 2px; border: 0; border-radius: 10px 10px 0 0; background: rgba(255,255,255,.07); color: #cfc7ad; font-size: 12px; font-weight: 800; }
.bg-tabs button.on { background: #e9dcc0; color: #3a2a14; }
.bg-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 0 8px 14px; padding: 14px 12px; border-radius: 0 0 14px 14px; background: #e9dcc0; }
.bg-tile { --c: #7d8a80; position: relative; aspect-ratio: 1; border: 0; border-radius: 14px; padding: 0; display: grid; place-items: center; cursor: pointer;
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--c) 55%, #fff), var(--c)); box-shadow: 0 3px 0 color-mix(in srgb, var(--c) 60%, #000), 0 0 0 2px color-mix(in srgb, var(--c) 75%, #000) inset; }
.bg-tile:active { transform: translateY(2px); box-shadow: 0 1px 0 color-mix(in srgb, var(--c) 60%, #000), 0 0 0 2px color-mix(in srgb, var(--c) 75%, #000) inset; }
.bg-tile .ic { font-size: 34px; line-height: 1; position: relative; filter: drop-shadow(0 2px 1px rgba(0,0,0,.35)); }
.bg-tile .ic em { position: absolute; left: -16px; top: -14px; font-style: normal; }
.bg-tile b { position: absolute; right: 6px; bottom: 3px; font-size: 13px; font-weight: 900; color: #fff; text-shadow: 0 1px 0 #000, 0 0 3px #000; }
.bg-tile .top { position: absolute; top: 3px; left: 0; right: 0; text-align: center; font-style: normal; font-size: 11px; font-weight: 900; color: #fff; text-shadow: 0 1px 0 #000, 0 0 3px #000; }
.bg-frag { border-radius: 10px; } .bg-who { border-radius: 6px; border: 1px solid #fff; }
.bg-desc { font-size: 14px; line-height: 1.4; margin: 4px 0 10px; } .bg-have { font-size: 13px; opacity: .85; margin-bottom: 8px; }
/* sort row and "Usable" filter above the grid */
.bg-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 8px; padding: 10px 12px 0; background: #e9dcc0; }
.bg-tools .lb { font-size: 17px; font-weight: 900; color: #6b5330; line-height: 1; }
.bg-chip { min-height: 32px; padding: 4px 11px; white-space: nowrap; border-radius: 999px; border: 1px solid #b9a67c; background: #f6eedb; color: #4a3a1c; font-size: 12.5px; font-weight: 800; }
.bg-chip.on { background: #4a3a1c; border-color: #4a3a1c; color: #ffe9b0; }
.bg-chip.use { margin-left: auto; } .bg-chip.use::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 50%; background: #3fbf5a; box-shadow: 0 0 0 1.5px #fff; }
.bg-grid.none { display: block; padding: 28px 12px; text-align: center; color: #6b5330; font-size: 14px; font-weight: 700; }
.bg-tile.use::after { content: ''; position: absolute; top: 5px; right: 5px; width: 9px; height: 9px; border-radius: 50%; background: #3fbf5a; box-shadow: 0 0 0 1.5px #fff; }
/* item sheet: amount, choices, odds, timers, results */
.bg-note { font-size: 13px; padding: 8px 10px; margin-bottom: 8px; border-radius: 10px; background: rgba(255,255,255,.06); border: 1px solid var(--line); }
.bg-got-h { margin: 10px 0 6px; font-size: 12.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.bg-qty-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; font-size: 14px; font-weight: 700; }
.bg-stepper { display: flex; align-items: center; gap: 6px; }
.bg-step { min-width: 44px; min-height: 44px; padding: 0 10px; font-size: 18px; font-weight: 900; } .bg-step:last-child { font-size: 13px; }
.bg-qty { width: 72px; min-height: 44px; padding: 0 6px; text-align: center; font: inherit; font-size: 17px; font-weight: 800; color: inherit; background: rgba(0,0,0,.3); border: 1px solid var(--line); border-radius: 10px; -moz-appearance: textfield; appearance: textfield; }
.bg-qty::-webkit-outer-spin-button, .bg-qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bg-odds, .bg-got { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.bg-odd, .bg-got-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; font-size: 13.5px; }
.bg-odd + .bg-odd, .bg-got-row + .bg-got-row { border-top: 1px solid var(--line); }
.bg-odd b { color: var(--accent); flex: none; } .bg-odd span { min-width: 0; }
.bg-got-row .ic { font-size: 22px; flex: none; } .bg-got-row .nm { flex: 1; min-width: 0; font-weight: 700; } .bg-got-row b { color: var(--accent); font-size: 15px; }
.bg-picks, .bg-jobs { display: grid; gap: 6px; }
.bg-pick, .bg-job { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 6px 10px; text-align: left; border-radius: 12px; }
.bg-pick .ic { font-size: 24px; flex: none; } .bg-pick .nm, .bg-job .nm { flex: 1; min-width: 0; font-size: 14px; font-weight: 700; overflow-wrap: anywhere; }
.bg-job b { flex: none; font-variant-numeric: tabular-nums; color: var(--accent); }
.bg-pick i, .bg-job i { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-style: normal; font-size: 13px; font-weight: 900; color: transparent; }
.bg-pick.on, .bg-job.on { border-color: var(--accent); background: rgba(240,180,60,.14); }
.bg-pick.on i, .bg-job.on i { background: var(--accent); border-color: var(--accent); color: #241a05; }
