/* Collection layouts only; the Card Archive supplies the suite theme. */
.collection-manager { min-width: 0; }
/* Unlike the archive's simple search bar, the multi-row collection filters
   would obscure selected items and keyboard focus if they stayed sticky. */
.collection-manager .search-shell { position: static; }
.inventory-panel { padding: 1rem; margin-block: 1rem; border: 1px solid var(--line); border-radius: 1rem; background: var(--navy); }
.inventory-panel h2 { margin-top: 0; }
.inventory-actions, .inventory-inline { display: flex; flex-wrap: wrap; gap: .6rem; align-items: end; }
.inventory-actions button, .inventory-inline button { min-height: 2.75rem; }
.inventory-notice { white-space: pre-wrap; overflow-wrap: anywhere; }
.inventory-notice[data-error="true"] { color: var(--gold); }
.inventory-summaries { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: .6rem; }
.inventory-summaries p { padding: .7rem; border: 1px solid var(--line); border-radius: .6rem; margin: 0; }
.inventory-summaries strong { display: block; color: var(--cyan); font-size: 1.3rem; }
.inventory-progress { display: grid; gap: .35rem; margin-top: .8rem; }
.inventory-progress progress { width: 100%; accent-color: var(--cyan); }
.inventory-filters { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); }
.inventory-field { display: grid; gap: .25rem; min-width: 0; }
.inventory-field input, .inventory-field select, .inventory-field textarea { min-width: 0; width: 100%; }
.collection-manager input:not([type="file"]):not([type="checkbox"]), .collection-manager select, .collection-manager textarea { color: var(--paper); background: var(--panel); border: 1px solid var(--line); border-radius: .5rem; padding: .55rem; font: inherit; }
.collection-manager [hidden] { display: none !important; }
.inventory-select-item { display: flex; align-items: center; gap: .5rem; min-height: 2.75rem; cursor: pointer; }
.inventory-select-item input { width: 1.3rem; height: 1.3rem; accent-color: var(--cyan); }
.inventory-tile:has(input[data-select-key]:checked) { outline: 2px solid var(--cyan); outline-offset: 2px; }
.inventory-bulk .inventory-inline { margin-top: .8rem; }
.inventory-bulk .inventory-field { flex: 1 1 10rem; }
.inventory-selection-count { font-weight: 750; color: var(--cyan); }
.bulk-changes { max-height: min(36vh, 18rem); overflow-y: auto; padding-inline-start: 1.6rem; overflow-wrap: anywhere; }
.bulk-changes li { margin-block: .4rem; }
.binder-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: .8rem; margin-block: 1rem; }
.binder-cover { border: 1px solid var(--line); border-radius: .7rem; padding: .75rem; background: var(--panel); min-width: 0; overflow-wrap: anywhere; }
.binder-cover[data-selected="true"] { border: 2px solid var(--cyan); }
.binder-cover h3 { margin-top: 0; }
.binder-thumbnails { display: flex; gap: .35rem; justify-content: center; align-items: center; min-height: 5rem; }
.binder-thumbnails .inventory-image { width: min(30%, 4rem); min-height: 4rem; max-height: 5rem; }
.inventory-results[data-view="gallery"] { grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr)); }
.inventory-results[data-view="gallery"] .inventory-item-header { display: flex; flex-direction: column; gap: .55rem; }
.inventory-results[data-view="gallery"] .inventory-image { width: 100%; height: 10rem; max-height: 10rem; }
.gallery-quantities { color: var(--cyan); font-weight: 700; }
.gallery-position { color: var(--muted); font-size: .875rem; }
.inventory-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: 1rem; align-items: start; }
.inventory-results[data-view="list"] { grid-template-columns: 1fr; }
.inventory-tile { padding: .8rem; min-width: 0; overflow-wrap: anywhere; }
.inventory-item-header { display: grid; grid-template-columns: 5rem minmax(0, 1fr); gap: .65rem; align-items: start; }
.inventory-image { width: 5rem; min-height: 5rem; max-height: 7rem; object-fit: contain; display: grid; place-items: center; border: 1px solid var(--line); border-radius: .4rem; color: var(--muted); text-align: center; font-size: .8rem; }
.inventory-item-header h3 { margin: .1rem 0 .35rem; font-size: 1rem; }
.inventory-item-header p { margin: .2rem 0; color: var(--muted); font-size: .875rem; }
.quantity-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin-block: .7rem; }
.quantity-grid label { min-width: 0; display: grid; gap: .2rem; font-size: .875rem; }
.quantity-grid input { width: 100%; min-width: 0; }
.inventory-tile details summary { cursor: pointer; color: var(--cyan); padding-block: .4rem; }
.inventory-tile textarea { width: 100%; min-height: 3.5rem; resize: vertical; }
.inventory-tile .inventory-inline { margin-top: .55rem; }
.inventory-tile .inventory-field { flex: 1 1 8rem; }
.inventory-paging { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: center; margin-block: 1rem; }
.inventory-binder-row { margin-block: .65rem; }
.inventory-result-count { color: var(--cyan); font-weight: 750; margin-block: .8rem; }
.collection-workspace[hidden] { display: block !important; visibility: hidden; pointer-events: none; }
.collection-account-panel input, .collection-account-panel select { color: var(--paper); background: var(--panel); border: 1px solid var(--line); border-radius: .5rem; padding: .55rem; font: inherit; min-width: 0; width: 100%; }
.collection-account-panel .inventory-field { flex: 1 1 12rem; }
.collection-account-panel a { overflow-wrap: anywhere; }
.account-sync-state { color: var(--cyan); font-weight: 750; }
.account-shares { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: .7rem; }
.account-share-list, .shared-results { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,15rem),1fr)); gap: .8rem; margin-top: .85rem; }
.account-share-link { background: var(--panel); border: 1px solid var(--line); border-radius: .7rem; padding: .75rem; margin-block: .7rem; }
.account-share-list h4, .shared-entry h3 { margin: .3rem 0; overflow-wrap: anywhere; }
.shared-reader .inventory-panel .inventory-field { flex: 1 1 14rem; }
.shared-reader .inventory-filters { margin-block: .8rem; }
.account-dialog [hidden] { display: none !important; }
.collection-account-panel .primary-button:disabled, .collection-manager .primary-button:disabled { cursor: not-allowed; opacity: .45; }
@media (min-width: 48rem) {
  .inventory-results[data-view="list"] .inventory-tile { display: grid; grid-template-columns: minmax(14rem, 1fr) minmax(18rem, 1.1fr); gap: 1rem; }
  .inventory-results[data-view="list"] .inventory-select-item { grid-column: 1 / -1; }
}
@media (forced-colors: active) { .inventory-panel, .inventory-image, .inventory-tile { border: 1px solid CanvasText; } }
