/* The discard pile: one ledger per cost over the board; a long one scrolls on its own. The cog would cover its close button. */
main:has(.discard) #sound { display: none; }
.discard { position: absolute; inset: 0; z-index: 35; display: flex; align-items: center; justify-content: center; padding: 1.5rem 1rem;
  border-radius: 0.8rem; background: #000a; }
.discard-pile { display: grid; grid-template-rows: auto minmax(0, 1fr); width: min(75rem, 100%); max-height: 100%; border: 1px solid #8c8461;
  border-radius: 0.75rem; background: linear-gradient(#17120ef4, #0a0807f8); box-shadow: 0 1.2rem 4rem #000; }
.discard-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; padding: 0.8rem 1.1rem 0.7rem; border-bottom: 1px solid var(--line); }
.discard-head .skull { width: 1rem; height: 1.2rem; background: var(--art-skull) center / contain no-repeat; }
.discard-head h2 { margin: 0; font: bold 1rem var(--serif); }
.discard .tabs { display: flex; gap: 0.25rem; }
.discard .tab { padding: 0.2rem 0.65rem; border: 1px solid var(--line); border-radius: 1rem; background: none; color: var(--muted); font-size: 0.75rem; cursor: pointer; }
.discard .tab.on { border-color: var(--gold); background: var(--gold); color: #15110d; font-weight: 600; }
.tallies { display: flex; gap: 0.9rem; margin-left: 1rem; color: var(--muted); font-size: 0.75rem; }
.tally b { margin-right: 0.2rem; color: var(--text); font: bold 0.9rem var(--serif); }
.discard .close { display: grid; place-items: center; width: 1.6rem; height: 1.6rem; margin-left: auto; padding: 0; border: 1px solid #8c8461; border-radius: 50%;
  background: #2a1410; color: var(--danger); font-size: 0.8rem; cursor: pointer; }
.ledgers { display: flex; gap: 0.75rem; min-height: 0; padding: 0.9rem 1rem 1rem; overflow-x: auto; }
.ledgers .empty { margin: 0; }
.bracket { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr); flex: 1 1 0; min-width: 8rem; max-width: 14.5rem; min-height: 0; }
.bracket-head { display: flex; align-items: center; gap: 0.45rem; margin-bottom: 0.4rem; padding: 0 0.25rem 0.5rem; border-bottom: 1px solid #5a4a3599; }
.bracket-head .orb { display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--art-orb, var(--orb)) center / contain no-repeat;
  font: bold 0.95rem var(--serif); text-shadow: 0 0 3px #000; }
.bracket-head .total { color: var(--muted); font-size: 0.7rem; }
.ledger { position: relative; min-height: 0; padding-right: 0.3rem; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: #d9b56a99 #ffffff12; }
.bracket:has(.more:not([hidden])) .ledger { mask-image: linear-gradient(#000 calc(100% - 3.5rem), transparent); }
.more { position: absolute; left: 50%; bottom: 0.4rem; z-index: 2; transform: translateX(-50%); padding: 0.2rem 0.65rem; border: 1px solid var(--gold);
  border-radius: 1rem; background: #0b0907; color: var(--gold); font-size: 0.7rem; font-weight: 600; white-space: nowrap; cursor: pointer; }
.entry { position: relative; display: flex; align-items: center; gap: 0.35rem; height: 1.8rem; margin-bottom: 0.2rem; padding: 0 0.3rem 0 0.55rem;
  overflow: hidden; border-radius: 3px; background: var(--art, none) right 0 top calc(50% + var(--strip, 0) * 100%) / 66% auto no-repeat, #0b0907; }
.entry::before { content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, #0b0907 30%, #0b090799 48%, #0b090700 80%), var(--list-color) left / 70% 100% no-repeat; }
.entry::after { content: ''; position: absolute; inset: 0; border: 5px solid transparent; pointer-events: none;
  border-image: var(--art-list-frame, linear-gradient(#8c8461, #8c8461)) 12 46 / 5px 16px stretch; }
.entry > * { position: relative; z-index: 1; }
.entry:hover { outline: 1px solid var(--target); box-shadow: 0 0 0.5rem #f2c14e88; }
.entry.strength { --list-color: var(--art-list-strength, linear-gradient(90deg, var(--strength), transparent)); }
.entry.intelligence { --list-color: var(--art-list-intelligence, linear-gradient(90deg, var(--intelligence), transparent)); }
.entry.willpower { --list-color: var(--art-list-willpower, linear-gradient(90deg, var(--willpower), transparent)); }
.entry.agility { --list-color: var(--art-list-agility, linear-gradient(90deg, var(--agility), transparent)); }
.entry.endurance { --list-color: var(--art-list-endurance, linear-gradient(90deg, var(--endurance), transparent)); }
.entry.neutral { --list-color: var(--art-list-neutral, linear-gradient(90deg, var(--neutral), transparent)); }
.entry-name { flex: 1; min-width: 0; overflow: hidden; font: bold 0.75rem var(--serif); white-space: nowrap; text-overflow: ellipsis;
  text-shadow: 0 1px 2px #000, 0 0 4px #000; }
.entry-cost { flex: none; color: #9fc6ff; font: bold 0.75rem var(--serif); text-shadow: 0 1px 2px #000; }
.entry-cost::after { content: ' ·'; color: var(--text); }
.copies { flex: none; display: grid; place-items: center; min-width: 1.25rem; height: 1.25rem; padding: 0 0.15rem; border: 1px solid var(--gold); border-radius: 0.7rem;
  background: #0b0907dd; font: bold 0.65rem var(--serif); }
