#quickbar { display: flex; gap: 4px; padding: 5px; max-width: none; overflow: visible; background: #151710ec; border: 2px solid #77715c; box-shadow: inset 0 0 0 2px #070906, 3px 4px #0009; }
#quickbar .quick-slot { flex: 0 0 58px; width: 58px; height: 58px; border: 2px solid #494b3a; border-radius: 0; background: #272b21; box-shadow: inset 2px 2px #12170f, inset -2px -2px #424536; padding: 12px 5px 4px; }
#quickbar .quick-slot.active { border-color: #d9c792; background: #534d35; box-shadow: inset 0 0 0 2px #857854; }
#quickbar .quick-slot.empty { background: #191d16; }
#quickbar .quick-slot:disabled { opacity: 1; cursor: default; }
#quickbar .quick-slot.empty .slot-art { opacity: .4; }
#quickbar .quick-slot kbd { font: 17px 'Street Terminal', monospace; top: 0; left: 4px; }
#quickbar .quick-slot small { font: 17px 'Street Terminal', monospace; right: 3px; bottom: 0; }
#quickbar .slot-art svg { width: 37px; height: 32px; }
#quickbar .slot-empty { color: #686b56; font: 26px monospace; }
#quickbar button:focus-visible, #bag button:focus-visible { outline: 2px solid #e9cd8d; outline-offset: 2px; }
#touch-bag { display: block; }
#bag { width: min(480px, calc(100vw - 32px)); box-sizing: border-box; padding: 18px; display: flex; flex-direction: column; overflow: hidden; }
#bag[hidden] { display: none; }
#bag .panel-heading { margin-bottom: 12px; flex-shrink: 0; }
#bag-filter { min-width: 110px; max-width: calc(100% - 48px); padding: 5px 28px 5px 8px; border: 1px solid #6b624b; border-radius: 0; color: #e3d4ae; background: #25291e; font: 25px 'Street Terminal', monospace; }
#bag-items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; overflow-y: auto; min-height: 0; align-content: start; padding: 2px 5px 8px 2px; scrollbar-width: thin; scrollbar-color: #766c4e #14190f; }
#bag-items:has(.bag-tape) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#bag .bag-entry { position: relative; min-width: 0; border: 1px solid #53513d; background: #151a12ad; }
#bag .bag-entry.equipped { border-color: #b49b67; box-shadow: inset 3px 0 #b49b67; }
#bag .bag-item { display: flex; flex-direction: column; align-items: center; text-align: center; width: 100%; min-height: 105px; border: 0; padding: 12px 6px 6px; gap: 7px; }
#bag .bag-item svg { width: 48px; height: 40px; flex-shrink: 0; }
#bag .bag-item span { min-width: 0; }
#bag .bag-item strong { font-size: 19px; line-height: .98; overflow-wrap: anywhere; }
#bag .bag-item small { position: absolute; right: 5px; top: 3px; font-size: 16px; color: #dbd2b3; text-shadow: 1px 1px #000; }
#bag .bag-bind { display: flex; gap: 4px; padding: 0 6px 6px; }
#bag .bag-bind button { flex: 1; height: 29px; padding: 0; color: #b9ac89; background: #22291d; border: 1px solid #494a37; font: 20px 'Street Terminal', monospace; }
#bag .bag-bind button[aria-pressed=true] { border-color: #bba069; color: #f3dc9a; background: #50482e; }
#bag .bag-bind button:hover { background: #4a5035; }
@media (hover: hover) and (pointer: fine) {
  #bag .bag-bind button:not([aria-pressed=true]) { opacity: 0; }
  #bag .bag-entry:hover .bag-bind button, #bag .bag-entry:focus-within .bag-bind button { opacity: 1; }
}
#bag .bag-tape { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 8px; text-align: left; background: #11180fd9; border: 1px solid var(--tape-ink, #58543d); border-left-width: 4px; padding: 8px; min-width: 0; }
#bag .bag-tape > .cassette-art { width: 100%; max-width: 180px; align-self: center; }
#bag .bag-tape > span:not(.bag-play) { min-width: 0; }
#bag .bag-tape strong { display: block; color: #e4d7b1; font: 21px/1 'Street Terminal', monospace; overflow-wrap: anywhere; }
#bag .bag-tape small { display: block; color: #aaa185; font: 15px/1.1 'Street Terminal', monospace; margin-top: 4px; overflow-wrap: anywhere; }
#bag .bag-tape .bag-rarity { display: inline-block; margin-top: 6px; padding: 1px 5px; border: 1px solid currentColor; color: var(--tape-ink); font: 15px/1 'Street Terminal', monospace; text-transform: uppercase; letter-spacing: .5px; }
#bag .bag-tape[data-rarity='ultra-legendary'] { background: linear-gradient(145deg, #142b32, #261c34); box-shadow: inset 0 0 0 1px #c5afff88, 0 0 8px #dcfaff22; }
#bag .bag-play { position: absolute; right: 8px; bottom: 8px; color: #c6af76; font-size: 11px; }
#bag .bag-empty { grid-column: 1 / -1; color: #aaa185; text-align: center; font-size: 24px; }
body.touch-controls #quickbar { max-width: none; gap: 3px; }
body.touch-controls #quickbar .quick-slot { flex-basis: 48px; width: 48px; height: 48px; }
body.touch-controls #bag .bag-bind button { height: 36px; }
@media (max-width: 600px) {
  #quickbar { left: 50%; transform: translateX(-50%); }
  #bag { right: 10px; top: 70px; bottom: 14px; padding: 12px; }
  #bag .bag-tape strong { font-size: 21px; }
}
@media (max-width: 360px) {
  #bag-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
