.clothing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.clothing-card {
  overflow: hidden;
}

.clothing-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.clothing-card-head .avatar {
  width: 48px;
  height: 48px;
}

.clothing-child-name {
  display: flex;
  align-items: center;
  gap: 9px;
}

.clothing-child-name h3 {
  margin: 0;
  font-size: 19px;
}

.clothing-card-head p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.clothing-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: wrap;
}

.clothing-edit-button {
  min-height: 36px;
  padding: 7px 11px;
  font-size: 13px;
}

.clothing-status-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
  flex: 0 0 auto;
  box-shadow: 0 0 0 4px rgba(23, 107, 91, .1);
}

.clothing-status-dot.ready {
  background: #24936f;
}

.clothing-status-dot.missing {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(180, 59, 69, .1);
}

.clothing-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 18px 22px 22px;
}

.clothing-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--soft-2);
}

.clothing-item span {
  font-size: 14px;
  font-weight: 600;
}

.clothing-item strong {
  color: var(--primary);
  font-size: 19px;
}

.clothing-item small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
}

.clothing-item.missing {
  border-color: var(--danger-line);
  background: var(--danger-bg);
}

.clothing-item.missing strong {
  color: var(--danger);
}

.clothing-editor-help {
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.6;
}

.error-code {
  display: block;
  margin-top: 6px;
  direction: ltr;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  opacity: .8;
}

.clothing-editor-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.clothing-editor-row label {
  font-weight: 700;
}

.quantity-stepper {
  direction: ltr;
  display: grid;
  grid-template-columns: 42px 64px 42px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.quantity-stepper button,
.quantity-stepper input {
  height: 42px;
  border: 0;
  background: var(--card);
  text-align: center;
}

.quantity-stepper button {
  color: var(--primary);
  font-size: 21px;
  font-weight: 700;
}

.quantity-stepper button:hover {
  background: var(--mint);
}

.quantity-stepper input {
  width: 64px;
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
  color: var(--ink);
  font-weight: 800;
  appearance: textfield;
}

.quantity-stepper input::-webkit-inner-spin-button,
.quantity-stepper input::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

@media (max-width: 900px) {
  .clothing-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .clothing-card-head {
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 17px;
  }

  .clothing-card-head > .person {
    min-width: 0;
    flex: 1 1 180px;
  }

  .clothing-card-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .clothing-items {
    padding: 14px 17px 17px;
  }

  .clothing-card-head > .badge {
    display: none;
  }

  .clothing-card-actions > .badge {
    display: none;
  }

  .clothing-edit-button {
    padding-inline: 9px;
  }
}

.clothing-editor-label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.clothing-editor-label select {
  width: auto;
  max-width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.clothing-editor-label select:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}
