:root{--ink:#191714;--muted:#6f6961;--paper:#f7f3ec;--paper-deep:#e9e2d7;--white:#fff;--line:rgba(25,23,20,.13);--gold:#9b7540;--gold-light:#d8c5a4;--danger:#8c2f26;--success:#3d6841;--shadow:0 24px 80px rgba(35,28,20,.14)}
*{box-sizing:border-box}html{height:100%}body{min-height:100%;margin:0;background:var(--paper);color:var(--ink);font:14px/1.5 Arial,Helvetica,sans-serif}button,input,select,textarea{font:inherit}button{color:inherit}h1,h2{margin:0;font:400 2rem/1.05 Georgia,"Times New Roman",serif}.hidden{display:none!important}.eyebrow{margin:0 0 .55rem;color:var(--gold);font-size:.68rem;font-weight:700;letter-spacing:.2em;text-transform:uppercase}.site-header{position:sticky;top:0;z-index:20;display:flex;min-height:72px;align-items:center;justify-content:space-between;padding:0 2vw;border-bottom:1px solid var(--line);background:rgba(247,243,236,.96);backdrop-filter:blur(14px)}.brand{display:flex;align-items:center;gap:.7rem;font:400 1.12rem Georgia,serif;letter-spacing:.04em}.brand img{width:54px;height:54px;object-fit:contain}.header-actions,.panel-actions,.modal-actions,.image-actions,.catalog-toolbar{display:flex;gap:.6rem}.button{display:inline-flex;min-height:42px;align-items:center;justify-content:center;padding:.7rem 1rem;border:1px solid var(--ink);background:transparent;cursor:pointer;font-size:.78rem;font-weight:700;letter-spacing:.03em}.button:hover{transform:translateY(-1px)}.button:disabled{cursor:not-allowed;opacity:.38;transform:none}.button-dark{background:var(--ink);color:var(--white)}.button-gold{border-color:var(--gold);background:var(--gold);color:var(--white)}.button-light{background:rgba(255,255,255,.4)}.configuration{display:grid;grid-template-columns:220px 190px minmax(300px,1fr) auto;gap:.8rem;align-items:end;padding:1rem 2vw;border-bottom:1px solid var(--line);background:rgba(255,255,255,.36)}label{display:grid;gap:.35rem}label>span,.field>span{color:var(--muted);font-size:.67rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase}input,select,textarea{width:100%;border:1px solid var(--line);border-radius:0;outline:none;background:rgba(255,255,255,.72);color:var(--ink)}input,select{min-height:42px;padding:0 .75rem}textarea{min-height:92px;padding:.75rem;resize:vertical}input:focus,select:focus,textarea:focus{border-color:var(--gold);box-shadow:0 0 0 3px rgba(155,117,64,.1)}.project-state{display:flex;min-height:42px;align-items:center;gap:.5rem;color:var(--muted);font-size:.76rem}.status-dot{width:8px;height:8px;border-radius:50%;background:var(--gold)}.workspace{display:grid;min-height:calc(100vh - 178px);grid-template-columns:minmax(260px,.75fr) minmax(300px,.9fr) minmax(460px,1.45fr)}.panel{display:flex;min-width:0;flex-direction:column;border-right:1px solid var(--line)}.panel:last-child{border-right:0}.panel-heading{padding:1.25rem;border-bottom:1px solid var(--line)}.panel-heading h1,.panel-heading h2{font-size:1.8rem}.row-heading{display:flex;align-items:center;justify-content:space-between;gap:1rem}.panel-body{display:flex;min-height:0;flex:1;flex-direction:column;padding:1rem;gap:1rem}.panel-actions{padding:1rem;border-top:1px solid var(--line)}.panel-actions .button{flex:1}.stacked{flex-direction:column}.dropzone{display:grid;min-height:120px;place-items:center;padding:1.25rem;border:1px dashed var(--gold);background:rgba(255,255,255,.4);cursor:pointer}.dropzone strong{font:400 1.2rem Georgia,serif}.dropzone span{color:var(--muted);font-size:.75rem}.dropzone.dragging{background:var(--white);box-shadow:0 0 0 3px rgba(155,117,64,.12)}.search-results,.catalog-list{min-height:0;flex:1;overflow:auto}.search-row,.catalog-row{width:100%;padding:.8rem;border:0;border-bottom:1px solid var(--line);background:transparent;cursor:pointer;text-align:left}.search-row:hover,.catalog-row:hover,.catalog-row.active{background:rgba(255,255,255,.68)}.search-row.selected,.catalog-row.selected{box-shadow:inset 3px 0 var(--gold)}.search-row strong,.catalog-row strong{display:block;font:400 1rem Georgia,serif}.search-row span,.catalog-row span{color:var(--muted);font-size:.72rem}.catalog-row{display:grid;grid-template-columns:22px 1fr auto;align-items:center;gap:.6rem}.catalog-row input{width:16px;min-height:auto}.row-status{font-size:.66rem;font-weight:700}.row-status.warn{color:var(--danger)}.count-badge{display:grid;min-width:36px;height:36px;padding:0 .5rem;place-items:center;border-radius:99px;background:var(--ink);color:#fff;font-size:.72rem}.catalog-toolbar{padding:.65rem 1rem;border-bottom:1px solid var(--line)}.text-button{padding:0;border:0;background:transparent;color:var(--muted);cursor:pointer;font-size:.73rem;text-decoration:underline}.text-button.danger{margin-left:auto;color:var(--danger)}.editor-panel{overflow:auto}.editor-panel>.panel-heading,.editor-panel>.image-stage,.editor-panel>.image-actions,.editor-panel>.editor-form,.editor-panel>.validation-card{flex:none}.review-check{display:flex;align-items:center;gap:.4rem;color:var(--muted);font-size:.75rem}.review-check input{width:17px;min-height:auto}.image-stage{display:grid;min-height:280px;max-height:42vh;place-items:center;overflow:hidden;background:#201e1b;color:#ddd}.image-stage img{width:100%;height:100%;max-height:42vh;object-fit:contain}.image-actions{align-items:center;padding:.65rem 1rem;border-bottom:1px solid var(--line)}.image-actions>span{margin-right:auto;color:var(--muted);font-size:.72rem}.file-label{display:inline}.editor-form{display:grid;grid-template-columns:1fr 1fr;gap:.8rem;padding:1rem}.editor-form .full,.dialog-form .full{grid-column:1/-1}.editor-form small{float:right;color:var(--muted);font-weight:400}.validation-card{margin:0 1rem 1rem;padding:.8rem;border:1px solid var(--line);color:var(--muted);font-size:.75rem}.validation-card.error{border-color:rgba(140,47,38,.45);color:var(--danger)}.status-footer{position:sticky;bottom:0;z-index:15;display:flex;min-height:34px;align-items:center;justify-content:space-between;padding:0 1rem;border-top:1px solid var(--line);background:rgba(247,243,236,.97);color:var(--muted);font-size:.7rem}.empty{padding:2rem 1rem;color:var(--muted);text-align:center}dialog{border:0}dialog::backdrop{background:rgba(20,17,13,.56);backdrop-filter:blur(3px)}.modal-card{width:min(620px,calc(100% - 2rem));padding:2rem;background:var(--paper);box-shadow:var(--shadow)}.wide-modal{width:min(800px,calc(100% - 2rem))}.modal-card h2{font-size:2.5rem}.modal-card>p:not(.eyebrow){color:var(--muted)}.modal-actions{justify-content:flex-end;margin-top:1.5rem}.modal-actions.vertical{align-items:stretch;flex-direction:column}.welcome{text-align:center}.welcome-mark{width:100px;height:100px}.dialog-form{display:grid;margin-top:1.3rem;grid-template-columns:1fr 1fr;gap:.8rem}.file-drop{padding:.8rem;border:1px dashed var(--gold)}.bulk-form{display:grid;gap:.6rem;max-height:50vh;overflow:auto}.bulk-row{display:grid;grid-template-columns:160px 180px 1fr;align-items:center;gap:.7rem}.confirm-check{display:flex;margin-top:1rem;align-items:center;gap:.6rem}.confirm-check input{width:18px;min-height:auto}.progress-modal{width:min(760px,calc(100% - 2rem))}.progress-modal progress{width:100%;height:16px;margin:1.2rem 0}.progress-modal pre{height:260px;overflow:auto;padding:1rem;background:#171512;color:#e8dfd2;font:12px/1.6 Consolas,monospace;white-space:pre-wrap}.toast{position:fixed;right:1rem;bottom:3rem;z-index:100;max-width:420px;padding:.8rem 1rem;background:var(--ink);color:#fff;box-shadow:var(--shadow);opacity:0;pointer-events:none;transform:translateY(10px);transition:.2s}.toast.show{opacity:1;transform:none}
@media(max-width:1100px){.configuration{grid-template-columns:1fr 1fr}.configuration .wide{grid-column:1/-1}.workspace{grid-template-columns:1fr 1fr}.editor-panel{grid-column:1/-1;border-top:1px solid var(--line)}}
@media(max-width:700px){.site-header{align-items:flex-start;padding:.5rem 1rem;flex-direction:column}.header-actions{width:100%}.header-actions .button{flex:1}.configuration,.workspace{grid-template-columns:1fr}.configuration .wide{grid-column:auto}.panel{min-height:620px;border-right:0;border-bottom:1px solid var(--line)}.editor-form,.dialog-form{grid-template-columns:1fr}.editor-form .full,.dialog-form .full{grid-column:auto}.bulk-row{grid-template-columns:1fr}.status-footer{position:static;align-items:flex-start;padding:.5rem;flex-direction:column}.modal-card{padding:1.25rem}.modal-card h2{font-size:2rem}}
.validation-list{display:grid;max-height:55vh;margin-top:1rem;overflow:auto;border-top:1px solid var(--line)}.validation-row{display:grid;padding:.7rem;border-bottom:1px solid var(--line);grid-template-columns:90px 1fr;gap:.8rem;text-align:left}.validation-row button{padding:0;border:0;background:transparent;color:var(--gold);cursor:pointer;text-align:left}.validation-row strong{font-size:.72rem}.validation-row span{color:var(--muted);font-size:.78rem}.validation-row.error strong{color:var(--danger)}

/* Keep large inventory and catalog collections inside their own scrolling columns. */
@media (min-width:1101px){
  body{display:flex;height:100dvh;overflow:hidden;flex-direction:column}
  .site-header,.configuration,.status-footer{flex:none}
  .workspace{height:auto;min-height:0;overflow:hidden;flex:1}
  .panel{height:100%;min-height:0;overflow:hidden}
  .inventory-panel .panel-body,.catalog-panel{min-height:0}
  .search-results,.catalog-list{min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
  .editor-panel{min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
}
input::placeholder,textarea::placeholder{color:#9a948b;opacity:1}
@media (min-width:701px) and (max-width:1100px){
  .inventory-panel,.catalog-panel{height:70dvh;min-height:520px;max-height:760px;overflow:hidden}
  .search-results,.catalog-list{min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
}
@media (max-width:700px){
  .inventory-panel,.catalog-panel{height:70dvh;min-height:480px;max-height:720px;overflow:hidden}
  .search-results,.catalog-list{min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
}
@media (min-width:1101px) and (max-height:700px){
  body{display:block;height:auto;overflow:auto}
  .workspace{height:520px}
}
