body { margin: 0; background: #f1f1f1; font: 14px/1.4 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: #303030; }
.steps { display: grid; gap: 24px; }
.step { display: grid; gap: 10px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
/* Polaris elements are display: contents, so a plain box carries the flex size */
.row > .grow { flex: 1 1 0; min-width: 180px; }
.chosen { display: flex; gap: 10px; align-items: center; min-height: 40px; }
.chosen img { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; border: 1px solid #d4d4d4; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.card { display: grid; gap: 6px; padding: 6px; border: 1px solid #d4d4d4; border-radius: 10px; background: #fff; cursor: pointer; text-align: start; font: inherit; color: inherit; }
.card:hover { border-color: #8a8a8a; }
.card[aria-selected='true'] { border-color: #303030; box-shadow: 0 0 0 2px #303030; }
.card img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #f6f6f6; border-radius: 6px; }
.card b { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card small { color: #616161; font-size: 12px; }

.drop { display: flex; gap: 12px; align-items: center; padding: 14px; border: 1px dashed #8a8a8a; border-radius: 10px; background: #fff; cursor: pointer; }
/* the whole box is the file button; the native control stays reachable by keyboard but out of sight */
.drop { position: relative; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop:focus-within { outline: 2px solid #005bd3; outline-offset: 2px; }
.drop img { width: 56px; height: 56px; object-fit: contain; background: #f6f6f6; border-radius: 6px; }

.go { display: grid; gap: 12px; justify-items: start; }
.done { display: flex; gap: 14px; align-items: center; }
.done img { width: 120px; height: 120px; object-fit: contain; background: #f6f6f6; border-radius: 8px; border: 1px solid #d4d4d4; }

.placed { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.placed li { display: flex; gap: 10px; align-items: center; }
.placed img { width: 40px; height: 40px; object-fit: contain; background: #f6f6f6; border-radius: 6px; }
