/* Item systems (#catalog usable items, #wearables, #armory weapons): storybook panels, item cards and the item editor. */
.items-page{background:none;border:0;box-shadow:none;padding:0;min-width:0}
.items-page .items-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:17px 19px;margin-bottom:12px}
.items-page .items-heading h2{font-size:23px;margin:0}
.items-page .items-heading p{font-size:12px;color:#907559;margin:5px 0 0;max-width:640px}
.items-actions{display:flex;gap:7px;flex-wrap:wrap}
.items-page .items-primary{padding:9px 16px;border:1px solid #3f7a31;border-radius:8px;background:linear-gradient(#6aac55,#4f923e);color:#fffdf2;font-weight:700;box-shadow:inset 0 1px #9ed08a,0 2px 0 #3a6d2d;cursor:pointer}
.items-page .items-primary:disabled{filter:grayscale(.6);opacity:.6}
.items-page button.secondary{padding:9px 14px;border-radius:8px;cursor:pointer}
.items-page button.danger{padding:9px 14px;border:1px solid #c98a78;border-radius:8px;background:linear-gradient(#fff4ef,#f6d9cf);color:#9a3f2b;cursor:pointer}
.items-page button.danger:disabled{opacity:.45;cursor:default}
/* The three systems as tabs, so moving between them is one click. */
.items-systems{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:12px}
.items-systems a{display:block;padding:11px 12px;border:1px solid #d4bc95;border-radius:10px;background:linear-gradient(#fffaf1,#f6e9d2);color:#735738;font-weight:700;text-align:center;text-decoration:none}
.items-systems a[aria-current=page]{border-color:#3f7a31;background:linear-gradient(#6aac55,#4f923e);color:#fffdf2;box-shadow:inset 0 1px #9ed08a,0 2px 0 #3a6d2d}
.items-message{margin:8px 0 12px;padding:10px 14px;border:1px solid #dac6a3;background:#fff7e6;border-radius:7px;font-size:13px}
.items-message.bad{border-color:#e3b3a3;background:#fdece6;color:#9a3f2b}
.items-message:empty{display:none}
.items-filters{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:12px}
.items-filters button{display:inline-flex;align-items:center;gap:6px;padding:7px 14px;border:1px solid #d4bc95;border-radius:999px;background:#fffaf1;color:#735738;font-weight:700;cursor:pointer}
.items-filters button b{min-width:20px;padding:0 6px;border-radius:999px;background:#efe0c6;color:#735738;font-size:11px;line-height:18px}
.items-filters button[aria-pressed=true]{border-color:#83a067;background:linear-gradient(#f3f6df,#dfebc6);color:#44622f}
.items-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(320px,440px);gap:12px;align-items:start}
.items-layout:has(.items-editor[hidden]){grid-template-columns:minmax(0,1fr)}
.items-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:10px;align-content:start}
.items-page .item-card{display:grid;grid-template-columns:64px minmax(0,1fr);gap:4px 12px;align-items:start;padding:12px;border:1px solid #d4bc95;border-radius:10px;background:linear-gradient(135deg,#fffcf3,#f3e4c8);color:#5c493d;text-align:left;box-shadow:inset 0 0 0 3px #ffffff69;cursor:pointer}
.items-page .item-card[aria-pressed=true]{border-color:#83a067;background:linear-gradient(135deg,#f3f6df,#dfebc6)}
.items-page .item-card.is-retired{opacity:.62}
.item-art{grid-row:span 2;display:grid;place-items:center;width:64px;height:64px;border:1px solid #dcc3a2;border-radius:10px;background:radial-gradient(circle at 50% 40%,#fffaf0,#ecdcc0)}
.item-art img{width:86%;height:86%;object-fit:contain}
.item-copy{display:flex;flex-direction:column;gap:2px;min-width:0}
.item-copy strong{font-size:15px;color:#5a4128;overflow-wrap:anywhere}
.item-copy small{font-size:11.5px;color:#8c7b6b}
.item-copy em{font-size:11px;font-style:normal;color:#9a3f2b;font-weight:700}
.item-chips{display:flex;flex-wrap:wrap;gap:4px}
.item-chip{align-self:flex-start;padding:0 8px;border-radius:999px;background:#efe0c6;color:#735738;font-size:10.5px;font-weight:700;line-height:18px}
.item-chip-food{background:#fde9c8;color:#8a5a14}.item-chip-medicine{background:#f8dde2;color:#9a2f4a}.item-chip-misc{background:#e3ebf3;color:#35587a}
.item-chip-buff{background:#e9e0f7;color:#5b3f96}.item-chip-wearable{background:#dcefe2;color:#2f6b45}.item-chip-weapon{background:#e6e3dc;color:#4d4a44}
.item-chip-builtin{background:#fff;border:1px solid #d4bc95;color:#907559;line-height:16px}
.item-meta,.item-sale{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:4px 10px;font-size:11px;color:#8c7b6b}
.item-sale{padding-top:6px;border-top:1px dashed #dcc3a2;color:#44622f;font-weight:700}
.items-empty{grid-column:1/-1;padding:40px 20px;border:1px dashed #d4bc95;border-radius:10px;text-align:center;color:#8c7b6b}.items-empty strong{display:block;font-size:16px;color:#735738}
.items-note{margin:0 0 8px;font-size:11.5px;color:#907559}
.items-builtins{width:100%;border-collapse:collapse;font-size:12.5px;background:#fffcf6;border:1px solid #e6c9a5;border-radius:9px;overflow:hidden}
.items-builtins th,.items-builtins td{padding:8px 10px;border-bottom:1px solid #f0dfc6;text-align:left}.items-builtins th{background:#f6ead3;color:#735738}
/* Editor */
.items-editor{display:flex;flex-direction:column;gap:10px;position:sticky;top:12px;max-height:calc(100vh - 40px);overflow:auto}
.items-editor h3{margin:0;font-size:19px;color:#705238}
.items-kinds{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}
.items-kinds button{padding:9px 6px;border:1px solid #d4bc95;border-radius:8px;background:#fffaf1;color:#735738;font-weight:700;cursor:pointer}
.items-kinds button[aria-checked=true]{border-color:#3f7a31;background:linear-gradient(#6aac55,#4f923e);color:#fffdf2}
.items-kinds button:disabled:not([aria-checked=true]){opacity:.45;cursor:default}
.items-field{display:flex;flex-direction:column;gap:4px;font-size:12px;color:#735738;font-weight:700;min-width:0}
.items-field small{font-weight:400;color:#8c7b6b}
.items-field input,.items-field select,.items-field textarea,.items-bonus select{width:100%;box-sizing:border-box;font:inherit;font-size:13px;font-weight:400;border:1px solid #dfcbb4;border-radius:6px;background:#fffdf9;color:#5c493d;padding:8px 10px}
.items-field textarea{resize:vertical}
.items-field input:disabled,.items-field select:disabled{opacity:.45}
.items-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(52px,1fr));gap:6px}
.items-page .items-thumb{display:grid;place-items:center;aspect-ratio:1;padding:4px;border:1px solid #dcc3a2;border-radius:8px;background:#fffaf0;cursor:pointer}
.items-page .items-thumb img{width:100%;height:100%;object-fit:contain}
.items-page .items-thumb[aria-checked=true]{border:2px solid #4f923e;background:#eef5e2;box-shadow:0 0 0 2px #cfe3bd}
.items-effects,.items-sale{display:flex;flex-direction:column;gap:8px;margin:0;padding:10px 12px;border:1px solid #e6c9a5;border-radius:9px;background:#fffcf6;min-width:0}
.items-effects legend,.items-sale legend{padding:0 6px;font-weight:700;color:#705238}
.items-effects[hidden]{display:none}
.items-effect-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:6px 8px;align-items:end;padding-top:8px;border-top:1px dashed #ecd9bd}
.items-effect-row:first-of-type{padding-top:0;border-top:0}
.items-effect-row .items-toggle{grid-column:1/-1;font-weight:700;color:#5a4128}
.items-subhead{font-size:12px;font-weight:700;color:#735738}
/* Weapon numbers and the stat rows of gear: a number box between minus and plus buttons. */
.items-weapon{display:flex;flex-direction:column;gap:8px}
.items-weapon .items-field{display:grid;grid-template-columns:minmax(0,1fr) 170px;gap:2px 10px;align-items:center}
.items-weapon .items-field>span:first-child{grid-column:1;grid-row:1;font-size:13px}
.items-weapon .items-field>small{grid-column:1;grid-row:2}
.items-weapon .items-stepper{grid-column:2;grid-row:1/span 2}
.items-pace{margin:0;padding:8px 10px;border-radius:7px;background:#f3f6df;color:#44622f;font-size:12px;font-weight:700}
.items-stepper{display:grid;grid-template-columns:36px minmax(0,1fr) 36px;gap:4px}
.items-stepper input,.items-field .items-stepper input{text-align:center;padding:8px 4px;-moz-appearance:textfield;appearance:textfield}
.items-stepper input::-webkit-outer-spin-button,.items-stepper input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.items-page .items-step{padding:0;border:1px solid #d4bc95;border-radius:6px;background:linear-gradient(#fffaf1,#f1e1c4);color:#5a4128;font-size:17px;font-weight:700;line-height:1;cursor:pointer}
.items-page .items-step:disabled{opacity:.45;cursor:default}
.items-bonuses{display:flex;flex-direction:column;gap:6px}
.items-bonus{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(130px,1fr) auto;gap:6px;align-items:stretch}
.items-bonus .items-stepper input{width:100%;box-sizing:border-box;font:inherit;font-size:13px;border:1px solid #dfcbb4;border-radius:6px;background:#fffdf9;color:#5c493d;padding:8px 4px}
.items-page .items-remove{padding:0 12px;border:1px solid #c98a78;border-radius:6px;background:linear-gradient(#fff4ef,#f6d9cf);color:#9a3f2b;font-weight:700;cursor:pointer}
.items-page .items-add-bonus{align-self:flex-start}
.items-sale:disabled .items-shop{opacity:.45}
.items-retired-note{color:#9a3f2b;font-weight:700}.items-retired-note[hidden]{display:none}
.items-shop{display:grid;grid-template-columns:minmax(0,1.3fr) repeat(3,minmax(0,1fr));gap:6px;align-items:end;padding-top:8px;border-top:1px dashed #ecd9bd}
.items-shop-name{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:1px 7px;font-size:12.5px;font-weight:700;color:#5a4128;align-self:center;cursor:pointer}
.items-shop-name small{grid-column:2;font-weight:400;color:#8c7b6b}
.items-page .items-shop-name input,.items-page .items-toggle input{width:auto;min-width:0;margin:0;flex:none;accent-color:#4f923e}
.items-shop input[type=number]:disabled{opacity:.45}
.items-toggle{display:flex;align-items:center;gap:8px;font-size:12.5px;color:#5a4128}
.items-preview-label{font-size:12px;font-weight:700;color:#735738}
.items-preview{display:grid;grid-template-columns:56px minmax(0,1fr);gap:10px;align-items:center;padding:10px;border:1px solid #d9bd8e;border-radius:12px;background:linear-gradient(#fffdf7,#f8ecd5)}
.items-preview img{width:56px;height:56px;object-fit:contain}.items-preview strong{display:block;font-size:14px;color:#5a4128}.items-preview small{font-size:11.5px;color:#8c7b6b}
.items-editor-actions{display:flex;flex-wrap:wrap;gap:8px;position:sticky;bottom:-17px;padding:10px 0;background:linear-gradient(#fffaf000,#fffaf0 30%)}
@media(max-width:1100px){.items-layout{grid-template-columns:minmax(0,1fr)}.items-editor{position:static;max-height:none}}
@media(max-width:600px){.items-page .items-heading{flex-direction:column;align-items:flex-start}.items-shop{grid-template-columns:1fr 1fr}.items-shop-name{grid-column:1/-1}.items-grid{grid-template-columns:1fr}.items-kinds{grid-template-columns:repeat(2,1fr)}.items-systems a{padding:9px 4px;font-size:12px}.items-bonus{grid-template-columns:minmax(0,1fr) auto}.items-bonus select{grid-column:1/-1}}
/* Item 47: rarity chip on item cards and the tier select in the editor. */
.item-chip-rarity{background:#fffaf0;color:var(--rarity-ink,#735738);box-shadow:inset 0 0 0 1.5px var(--rarity,#b9b4a8)}
.items-rarity-select{color:var(--rarity-ink,inherit);box-shadow:inset 4px 0 0 var(--rarity,transparent)}
