/* Full-width catalog, with the native item controls grouped in one dialog. */
#section-items { min-height: 0; min-width: 0; }
#section-items [hidden] { display: none !important; }
#section-items .items-catalog { width: 100%; min-width: 0; border: 0; background: #1a1e28; }
#section-items .items-catalog-bar { padding: 18px 24px 14px; background: #1a1e28; flex-shrink: 0; }
.items-search-row { display: flex; align-items: center; gap: 20px; }
#items-search { max-width: 420px; background: #1a1e28; }
#items-count { color: #9b9788; font-size: 12px; margin-left: auto; white-space: nowrap; }
#section-items #items-cats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
#section-items .items-cat { border: 1px solid #38352f; background: #1a1e28; color: #d9d3c4; border-radius: 6px; padding: 5px 10px; font-size: 12px; gap: 7px; }
#section-items .items-cat span { opacity: .7; font-size: 10px; }
#section-items .items-cat.on { color: #e2d3a6; background: #1a1e28; border-color: #8d7a4e; }
#section-items .items-cat:hover { border-color: #8d7a4e; }
.items-catalog-scroll { min-height: 0; overflow: auto; flex: 1; padding: 14px; scrollbar-gutter: stable; }
.items-names-hint { flex-shrink: 0; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 16px; padding: 10px 14px 0; text-align: center; color: #d9d3c4; font-size: 12px; letter-spacing: .07em; }
.items-names-hint strong { font-weight: 800; }
.items-names-hint label { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; letter-spacing: normal; cursor: pointer; }
.items-names-hint input { accent-color: #b9a26c; cursor: pointer; }
#section-items #items-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); align-content: start; gap: 4px; padding: 0; overflow: visible; }
#section-items .items-card { position: relative; min-width: 0; width: 100%; height: 72px; margin: 0; padding: 4px 2px 2px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px; text-align: center; background: transparent; border: 0; border-radius: 0; box-shadow: none; transition: none; }
#section-items .items-card .presence-row-byline { display: none; }
#section-items .items-card:hover, #section-items .items-card.selected { background: transparent; border: 0; }
#section-items .items-card .item-icon { border-radius: 0; background-color: transparent !important; }
#section-items .items-card .item-icon, #section-items .items-add > span { filter: drop-shadow(0 2px 2px rgb(24 39 58 / 30%)); }
#section-items .items-card:hover .item-icon, #section-items .items-card:focus-visible .item-icon,
#section-items .items-add:hover > span, #section-items .items-add:focus-visible > span {
  filter: drop-shadow(1px 0 0 #e2d3a6) drop-shadow(-1px 0 0 #e2d3a6) drop-shadow(0 1px 0 #e2d3a6) drop-shadow(0 -1px 0 #e2d3a6) drop-shadow(0 2px 2px rgb(24 39 58 / 30%));
}
#section-items .items-card .item-name, #section-items .items-add-name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; white-space: normal; line-height: 1.2; font-size: 11px; font-weight: 500; width: 100%; height: 27px; flex-shrink: 0; overflow: hidden; color: #d9d3c4; visibility: hidden; }
#section-items .items-card:hover .item-name, #section-items .items-card:focus-visible .item-name,
#section-items .items-add:hover .items-add-name, #section-items .items-add:focus-visible .items-add-name,
#section-items.items-show-names .item-name, #section-items.items-show-names .items-add-name { visibility: visible; }
#section-items .items-card.items-previewing .item-name { visibility: hidden; }
#section-items .items-add { color: #9b9788; }
.items-add > span { font-size: 28px; line-height: 34px; font-weight: 300; }
#items-no-results { color: #9b9788; padding: 8px 0 20px; font-size: 13px; }
.items-catalog-preview { position: fixed; z-index: 500; display: flex; flex-direction: column; gap: 2px; padding: 4px; background: #1a1e28; border-radius: 6px; box-shadow: 0 3px 16px #24384c26, 0 0 0 1px #dce4ec; }
.items-preview-row { display: flex; gap: 4px; overflow-x: auto; min-width: 0; scrollbar-width: thin; }
.items-preview-button { display: flex; flex: 0 0 42px; width: 42px; height: 42px; padding: 4px; border: 0; border-radius: 4px; background: transparent; }
.items-preview-button .item-icon { border-radius: 0; background-color: transparent !important; filter: drop-shadow(0 2px 2px rgb(24 39 58 / 30%)); }
.items-preview-button:hover { background: rgb(52 152 219 / 12%); }
.items-preview-button:hover .item-icon, .items-preview-button:focus-visible .item-icon { filter: drop-shadow(1px 0 0 #e2d3a6) drop-shadow(-1px 0 0 #e2d3a6) drop-shadow(0 1px 0 #e2d3a6) drop-shadow(0 -1px 0 #e2d3a6) drop-shadow(0 2px 2px rgb(24 39 58 / 30%)); }
.items-preview-caption { font-size: 11px; line-height: 18px; min-width: 0; color: #d9d3c4; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.items-preview-caption > span { display: block; overflow: hidden; text-overflow: ellipsis; }
.items-preview-credit { height: 12px; line-height: 12px; font-size: 10px; text-align: center; }
.items-popup { position: fixed; inset: 0; z-index: 9000; background: #0d101788; backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 20px; }
.items-dialog { position: relative; display: flex; flex-direction: column; width: min(960px, 100%); height: min(800px, 100%); min-width: 0; border: 1px solid #38352f; border-radius: 12px; background: #1a1e28; box-shadow: 0 20px 80px #0005; overflow: hidden; color: #d9d3c4; line-height: 1.5; }
.items-dialog-header { display: flex; align-items: center; gap: 14px; padding: 16px 22px; background: #1a1e28; flex-shrink: 0; }
.items-dialog-heading { min-width: 0; flex: 1; }
.items-dialog-header h2 { font-size: 19px; line-height: 1.3; color: #d9d3c4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.items-dialog-header p { font-size: 11px; color: #9b9788; margin-top: 3px; }
.items-close { color: #9b9788; background: #1a1e28; font-size: 22px; width: 34px; height: 34px; padding: 0; display: flex; align-items: center; justify-content: center; }
.items-variants { flex-shrink: 0; display: flex; align-items: center; gap: 12px; padding: 0 22px 10px; background: #1a1e28; }
.items-variants > span { font-size: 11px; color: #9b9788; }
.items-variant-list { display: flex; gap: 5px; min-width: 0; flex: 1; overflow-x: auto; padding: 3px; scrollbar-width: thin; }
.items-variant { flex-shrink: 0; display: flex; flex-direction: column; gap: 3px; padding: 4px 6px; border: 1px solid transparent; background: transparent; color: #9b9788; border-radius: 5px; transition: none; }
.items-variant small { font-size: 9px; line-height: 1; }
.items-variant .item-icon { border-radius: 0; background-color: transparent !important; filter: drop-shadow(0 2px 2px rgb(24 39 58 / 25%)); }
.items-variant:hover { background: #1a1e28; border-color: #8d7a4e; }
.items-variant[aria-pressed=true] { background: #1a1e28; border-color: #8d7a4e; color: #e2d3a6; }
.items-tabs { display: flex; gap: 6px; flex-shrink: 0; overflow-x: auto; padding: 0 22px 12px; border-bottom: 1px solid #38352f; background: #1a1e28; }
.items-tabs button { flex-shrink: 0; padding: 7px 12px; font-size: 12px; color: #9b9788; background: transparent; }
.items-tabs button[aria-selected=true] { color: #e2d3a6; background: #1a1e28; }
#section-items #items-editor { padding: 22px; min-height: 0; overflow: auto; overscroll-behavior: contain; background: #1a1e28; scrollbar-gutter: stable; }
#items-editor .editor-section { padding: 20px; margin-bottom: 16px; border-color: #38352f; border-radius: 8px; }
#items-editor .section-title { font-size: 14px; padding-bottom: 10px; margin-bottom: 16px; border-bottom: 1px solid #38352f; }
#items-editor .form-row { gap: 20px; margin-bottom: 4px; }
#items-editor .form-group { min-width: 0; margin-bottom: 15px; }
#items-editor .form-group input:not([type=checkbox]):not([type=color]):not([type=range]),
#items-editor .form-group select, #items-editor .form-group textarea { padding: 8px 10px; font-size: 13px; background-color: #1a1e28; color: #d9d3c4; border-color: #38352f; }
#items-editor input[type=checkbox] { width: auto; flex-shrink: 0; }
#items-editor .info-box { padding: 10px 12px; font-size: 12px; border-left-width: 2px; color: #d9d3c4; background: #1a1e28; }
.items-group-help { color: #9b9788; font-size: 12px; margin: 0 0 16px; }
.items-dialog-footer { flex-shrink: 0; display: flex; align-items: center; gap: 18px; padding: 12px 22px; border-top: 1px solid #38352f; background: #1a1e28; }
.items-dialog-actions { display: flex; gap: 6px; }
.items-dialog-footer button { font-size: 12px; }
.items-delete { color: #c9745c; background: transparent; }
.items-delete:hover { background: #33231f; }
#items-save-hint { flex: 1; font-size: 11px; color: #9b9788; text-align: right; }
.items-variant-review { flex-shrink: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 12px 22px; background: #1a1e28; border-top: 1px solid #8d7a4e; }
.items-variant-review > div { flex: 1; min-width: 160px; }
.items-variant-review strong { font-size: 12px; }
.items-variant-review p { font-size: 11px; color: #9b9788; max-height: 34px; overflow: auto; }
.items-variant-review button { font-size: 11px; padding: 7px 9px; }
.items-duplicate-shade { position: absolute; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; padding: 18px; background: #0d101766; }
.items-duplicate-choice { width: min(460px, 100%); max-height: 100%; overflow: auto; padding: 22px; background: #1a1e28; border: 1px solid #38352f; border-radius: 10px; box-shadow: 0 12px 40px #14233433; }
.items-duplicate-choice h3 { font-size: 17px; margin-bottom: 6px; }
.items-duplicate-choice p { font-size: 12px; color: #9b9788; }
.items-duplicate-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0; }
.items-duplicate-options button { display: flex; flex-direction: column; align-items: flex-start; text-align: left; padding: 14px; background: #1a1e28; color: #d9d3c4; border: 1px solid #38352f; }
.items-duplicate-options button:hover { background: #1a1e28; border-color: #8d7a4e; }
.items-duplicate-options strong { font-size: 14px; }
.items-duplicate-options span { font-size: 11px; line-height: 1.5; color: #9b9788; }
#section-items button:focus-visible { outline: 2px solid #8d7a4e; outline-offset: 2px; }
@media (max-width: 850px) {
  #section-items .items-catalog-bar, .items-catalog-scroll { padding: 14px; }
  .items-search-row { flex-wrap: wrap; gap: 8px; }
  #items-search { max-width: none; }
  #items-count { margin-left: 0; }
  .items-popup { padding: 10px; }
  #items-editor .form-row { grid-template-columns: 1fr; gap: 0; }
  .items-dialog-header, #section-items #items-editor { padding: 14px; }
  .items-tabs { padding-left: 14px; padding-right: 14px; }
  #items-save-hint { display: none; }
  .items-dialog-footer { padding: 10px 14px; justify-content: space-between; }
}
