.hardware-editor-dialog { width: min(680px, calc(100vw - 24px)); }
.hardware-editor-dialog h2 { padding-right: 25px; }
.hardware-editor-dialog fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.hardware-editor-dialog label { display: grid; gap: 5px; margin: 12px 0; }
.hardware-editor-dialog :is(input,textarea) { width: 100%; min-width: 0; padding: 10px; color: var(--text); background: #141e26; border: 1px solid var(--border); border-radius: 6px; font: inherit; }
.hardware-editor-dialog textarea { min-height: 130px; resize: vertical; }
.hardware-editor-dialog [role="status"] { min-height: 24px; }
.hardware-editor-dialog .error { color: #ff6974; }
.hardware-editor-previews, .hardware-gallery { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.hardware-editor-previews:empty, .hardware-gallery:empty { display: none; }
.hardware-gallery button, .hardware-editor-photo { width: 64px; height: 76px; border: 1px solid var(--border); border-radius: 5px; padding: 2px; background: #0c141b; cursor: pointer; }
.hardware-gallery img, .hardware-editor-photo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.hardware-editor-preview { position: relative; padding-top: 18px; }
.hardware-editor-remove { position: absolute; top: 0; right: 0; width: 23px; height: 23px; padding: 0; border: 1px solid var(--border); border-radius: 4px; color: var(--text); background: #19232b; cursor: pointer; }
.hardware-gallery-dialog { width: min(1050px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 40px 18px 18px; border: 1px solid #436478; border-radius: 12px; background: #19232b; color: var(--text); overflow: auto; }
.hardware-gallery-dialog::backdrop { background: #000c; }
.hardware-gallery-dialog h2 { font-size: 20px; margin: 0 35px 12px 0; }
.hardware-gallery-stage { display: grid; grid-template-columns: 42px minmax(0, 1fr) 42px; align-items: center; gap: 8px; }
.hardware-gallery-stage img { display: block; width: 100%; height: min(60dvh, 560px); object-fit: contain; }
.hardware-gallery-stage button { height: 54px; padding: 0; border: 1px solid var(--border); border-radius: 6px; background: #0c141b; color: var(--accent); font-size: 40px; cursor: pointer; }
.hardware-gallery-strip { display: flex; gap: 8px; overflow-x: auto; padding: 4px; }
.hardware-gallery-strip button { flex: 0 0 64px; height: 72px; padding: 3px; border: 2px solid transparent; background: #0c141b; border-radius: 4px; cursor: pointer; }
.hardware-gallery-strip button[aria-current="true"] { border-color: var(--accent); }
.hardware-gallery-strip img { width: 100%; height: 100%; object-fit: contain; }
[data-hardware-description] { white-space: pre-wrap; }
@media (max-width: 500px) { .hardware-gallery-stage { grid-template-columns: 30px minmax(0,1fr) 30px; gap: 4px; } .hardware-gallery-dialog { padding: 40px 10px 10px; } }
